Exemple #1
0
 private static void MsgReceived(object sender, EventArgs e)
 {
     if (LyncStatusWatcher.CurrentCallState == CallState.NoUpdate)
     {
         LedSdkAbstraction.FlashLighting(currentSdk, 0, 0, 100, 2000, 200);
     }
 }
Exemple #2
0
 private static void MsgStatusUpdated(MessageState state)
 {
     if (state == MessageState.New && LyncStatusWatcher.CurrentCallState == CallState.NoUpdate)
     {
         LedSdkAbstraction.FlashLighting(currentSdk, 0, 0, 100, 2000, 200);
     }
     ThreadPool.QueueUserWorkItem(FlashForWaitingMsg);
 }
Exemple #3
0
        private static void FlashForWaitingMsg(object state)
        {
            bool stillWaiting;

            do
            {
                Thread.Sleep(10000);
                stillWaiting = LyncStatusWatcher.CurrentMsgState == MessageState.New;
                if (stillWaiting && LyncStatusWatcher.CurrentCallState == CallState.NoUpdate)
                {
                    LedSdkAbstraction.FlashLighting(currentSdk, 0, 0, 100, 1000, 200);
                }
            } while (stillWaiting);
        }
Exemple #4
0
        private static void CallStatusUpdated(CallState state)
        {
            switch (state)
            {
            case CallState.Ringing:
                LedSdkAbstraction.FlashLighting(currentSdk, 0, 0, 100, 120000, 200);
                break;

            case CallState.Connected:
                LedSdkAbstraction.PulseLighting(currentSdk, 100, 0, 0, 0, 800);     //duration == 0 is infinite for Logitech.
                break;

            case CallState.NoUpdate:
                SetLEDToCurrentStatus(LyncStatusWatcher.UserStatus);
                break;
            }
        }