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;
            }
        }
Example #2
0
 public DeviceEventArgs(IHeadsetDevice device)
 {
     this.device = device;
 }
Example #3
0
 public bool HasLimit(IHeadsetDevice.HEADSET_LIMITATIONS limit)
 {
     return (limitations & limit) == limit;
 }
Example #4
0
 public DeviceEventArgs(IHeadsetDevice device)
 {
     this.device = device;
 }
Example #5
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;
            }
        }