static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //I've found that my Arduino hangs on the very first connection to work around that //kick-off connection to Light before we start and send a non-event code: SerialSender serialSender = new SerialSender(); serialSender.SendSerialData("0"); var skypeStatus = new SkypeStatusInfo(); var skypeStatusMonitor = new Thread(skypeStatus.StatusSetup); skypeStatusMonitor.Start(); //Show the System Tray Icon using (ProcessIcon pi = new ProcessIcon()) { pi.DisplayIcon(); //Make Sure the Application Runs Application.Run(); } }
private void ConversationAdded(object sender, ConversationManagerEventArgs e) { var notified = false; var avModality = (AVModality)e.Conversation.Modalities[ModalityTypes.AudioVideo]; while (e.Conversation.Modalities[ModalityTypes.AudioVideo].State == ModalityState.Notified && e.Conversation.State == ConversationState.Active) { while (notified != true) { //We have an incomming call if (avModality.State == ModalityState.Notified) { _serialSender.SendSerialData(ColourStates.BlueIncomingCall); notified = true; } } } //Return user back to their current Sykpe State SetCurrentLyncStatus(); }