FSClient.Broker.TalkTogglePressed C# (CSharp) Method

TalkTogglePressed() public method

public TalkTogglePressed ( ) : void
return void
		public void TalkTogglePressed() {
			if (Call.active_call != null && (Call.active_call.state != Call.CALL_STATE.Ringing || Call.active_call.is_outgoing))
				HangupPressed();
			else
				TalkPressed();
		}

Usage Example

コード例 #1
0
        private void DeviceStatusChanged(object sender, IHeadsetDevice.StatusEventArgs e)
        {
            IHeadsetDevice device = sender as IHeadsetDevice;
            DeviceData     data   = (from d in devices where d.device == device select d).SingleOrDefault();

            if (!data.active)
            {
                return;
            }
            if (!data.in_use && e.type != IHeadsetDevice.HEADSET_EVENT_TYPE.Talk)
            {
                return;
            }
            switch (e.type)
            {
            case IHeadsetDevice.HEADSET_EVENT_TYPE.Talk:
                broker.TalkPressed();
                break;

            case IHeadsetDevice.HEADSET_EVENT_TYPE.ToggleTalk:
                broker.TalkTogglePressed();
                break;

            case IHeadsetDevice.HEADSET_EVENT_TYPE.Hangup:
                broker.HangupPressed();
                break;

            case IHeadsetDevice.HEADSET_EVENT_TYPE.Mute:
                broker.Muted = true;
                break;

            case IHeadsetDevice.HEADSET_EVENT_TYPE.ToggleMute:
                broker.Muted = !broker.Muted;
                break;

            case IHeadsetDevice.HEADSET_EVENT_TYPE.UnMute:
                broker.Muted = false;
                break;

            case IHeadsetDevice.HEADSET_EVENT_TYPE.Redial:
                //broker.RedialPressed();
                break;

            case IHeadsetDevice.HEADSET_EVENT_TYPE.Flash:
                //broker.FlashPressed();
                break;
            }
        }