Пример #1
0
 // Multiline device line state changed (for multi-line device, e.g. Savi 7xx): ************************************************************
 private void OnMultiLineStateChanged(MultiLineStateArgs e)
 {
     if (MultiLineStateChanged != null)
         MultiLineStateChanged(this, e);
 }
Пример #2
0
 void m_spokes_MultiLineStateChanged(object sender, MultiLineStateArgs e)
 {
     OnPltEvent(new PltEventArgs(PltEventType.MultiLineStateChanged,
         e.MultiLineState.PCActive.ToString(),
         e.MultiLineState.PCHeld.ToString(),
         e.MultiLineState.MobileActive.ToString(),
         e.MultiLineState.MobileHeld.ToString(),
         e.MultiLineState.DeskphoneActive.ToString(),
         e.MultiLineState.DeskphoneHeld.ToString()));
 }
Пример #3
0
        void m_spokes_MultiLineStateChanged(object sender, MultiLineStateArgs e)
        {
            LogMessage(MethodInfo.GetCurrentMethod().Name, "Multiline state updated:\r\n" + e.ToString());

            // show active states
            SetEnable(pcLineActivePictureBox, e.MultiLineState.PCActive,
                !e.MultiLineState.PCActive ? Properties.Resources.status_idle : Properties.Resources.status_on);
            SetEnable(mobLineActivePictureBox, e.MultiLineState.MobileActive,
                !e.MultiLineState.MobileActive ? Properties.Resources.status_idle : Properties.Resources.status_on);
            SetEnable(deskLineActivePictureBox, e.MultiLineState.DeskphoneActive,
                !e.MultiLineState.DeskphoneActive ? Properties.Resources.status_idle : Properties.Resources.status_on);

            // show held states
            SetEnable(pcLineHeldPictureBox, e.MultiLineState.PCHeld,
                !e.MultiLineState.PCHeld ? Properties.Resources.status_idle : Properties.Resources.status_off);
            SetEnable(mobLineHeldPictureBox, e.MultiLineState.MobileHeld,
                !e.MultiLineState.MobileHeld ? Properties.Resources.status_idle : Properties.Resources.status_off);
            SetEnable(deskLineHeldPictureBox, e.MultiLineState.DeskphoneHeld,
                !e.MultiLineState.DeskphoneHeld ? Properties.Resources.status_idle : Properties.Resources.status_off);

            UpdateMultiLineButtonTexts(e);

            m_lastMultiLineState = e;
        }
Пример #4
0
        public Form1()
        {
            InitializeComponent();

            MultiLineStateFlags initial_activeHeldFlags = new MultiLineStateFlags();
            initial_activeHeldFlags.PCActive = false;
            initial_activeHeldFlags.MobileActive = false;
            initial_activeHeldFlags.DeskphoneActive = false;
            initial_activeHeldFlags.PCHeld = false;
            initial_activeHeldFlags.MobileHeld = false;
            initial_activeHeldFlags.DeskphoneHeld = false;
            m_lastMultiLineState = new MultiLineStateArgs(initial_activeHeldFlags);

            // Extra GUI init...
            ExtraGUIInit();

            m_dummyspeechaudio = new SpeechSynthesizer();
            m_dummyspeechaudio.SetOutputToDefaultAudioDevice();

            wearingpicboxtimer = new Timer();
            wearingpicboxtimer.Interval = 500;
            wearingpicboxtimer.Tick += wearingpicboxtimer_Tick;

            m_animtimers = new List<AnimTimerInfo>();
            m_animtimer = new Timer();
            m_animtimer.Interval = 40;
            m_animtimer.Tick += m_animtimer_Tick;
            m_animtimer.Start();
        }
Пример #5
0
        private void UpdateMultiLineButtonTexts(MultiLineStateArgs e)
        {
            if (pcLineActiveBtn.InvokeRequired)
            {
                UpdateMultiLineButtonTextsCallback d = new UpdateMultiLineButtonTextsCallback(UpdateMultiLineButtonTexts);
                this.Invoke(d, new object[] { e });
            }
            else
            {
                // Update the button text for Activate buttons...
                pcLineActiveBtn.Text = e.MultiLineState.PCActive ? "De-Activate" : "Activate";
                mobLineActiveBtn.Text = e.MultiLineState.MobileActive ? "De-Activate" : "Activate";
                deskLineActiveBtn.Text = e.MultiLineState.DeskphoneActive ? "De-Activate" : "Activate";

                // Update the button text for Hold buttons...
                pcLineHoldBtn.Text = e.MultiLineState.PCHeld ? "Un-hold" : "Hold";
                mobLineHoldBtn.Text = e.MultiLineState.MobileHeld ? "Un-hold" : "Hold";
                deskLineHoldBtn.Text = e.MultiLineState.DeskphoneHeld ? "Un-hold" : "Hold";
            }
        }
Пример #6
0
 static void spokes_MultiLineStateChanged(object sender, MultiLineStateArgs e)
 {
     Console.WriteLine("MultiLineStateChanged, sending message to Client App via socket...");
     if (socket == null)
     {
         Console.WriteLine("INFO: No client connected.");
         return;
     }
     socket.sendMsg("MultiLineStateChanged,"+
         e.MultiLineState.PCActive+","+
         e.MultiLineState.PCHeld+","+
         e.MultiLineState.MobileActive+","+
         e.MultiLineState.MobileHeld+","+
         e.MultiLineState.DeskphoneActive+","+
         e.MultiLineState.DeskphoneHeld);
 }