Пример #1
0
 private void OnDeviceEvent(COMDeviceEventArgs e)
 {
     if (DeviceEvent != null)
     {
         DeviceEvent(e);
     }
 }
Пример #2
0
        // print device events
        void m_deviceComEvents_Handler(COMDeviceEventArgs e)
        {
            DebugPrint(MethodInfo.GetCurrentMethod().Name, string.Format("Device Event: Audio:{0} Buton:{1} Mute:{2}", e.AudioState, e.ButtonPressed, e.mute));

            switch (e.ButtonPressed)
            {
                case DeviceHeadsetButton.HeadsetButton_Flash:
                    OnCallSwitched(EventArgs.Empty);
                    break;
                //case DeviceHeadsetButton.HeadsetButton_Mute:  // Not needed, now relying on IDeviceListener event for mute change
                //    OnMuteChanged(new MuteChangedArgs(e.mute));
                //    break;
            }

            OnButtonPress(new ButtonPressArgs(e.ButtonPressed, e.AudioState, e.mute));
        }
Пример #3
0
 private void _deviceComEvents_onButtonPressed(COMDeviceEventArgs args)
 {
     OnDeviceEvent(args);
 }
Пример #4
0
 private void _deviceComEvents_onMuteStateChanged(COMDeviceEventArgs args)
 {
     OnDeviceEvent(args);
 }
Пример #5
0
 private void _deviceComEvents_onAudioStateChanged(COMDeviceEventArgs args)
 {
     // uncomment for additional information message
     //OnSDKInfo(new SDKInfoArgs(SDKInfoType.sdk_notification, "ICOMDeviceEvents_Event.onAudioStateChanged: " + args.AudioState));
 }