Ejemplo n.º 1
0
        private void tick_Elapsed(object sender, ElapsedEventArgs e)
        {
            mgcStatus _tempNewStatus = doGetStatus();

            if (_tempNewStatus.status == confStatusText.InConference)
            {
                if (doUpdateWindows())
                {
                    getNewPositions();                                      //get the new positions of the windows
                    doShowWindows();                                        //move, bring the windows to the front
                    setGUIFocus();
                }
                else if (_tempNewStatus.confParticipants != _status.confParticipants)
                {
                    _status = _tempNewStatus;
                    getNewPositions();                                      //get the new positions of the windows
                    doShowWindows();                                        //move, bring the windows to the front
                    setGUIFocus();
                }
                else if (Data.constants.isPermissioning)
                {
                    setPermTopFocus();
                    isShowPerms = Data.constants.isPermissioning;
                }
                else if (!Data.constants.isPermissioning && isShowPerms)
                {
                    getNewPositions();                                      //get the new positions of the windows
                    doShowWindows();                                        //move, bring the windows to the front
                    setGUIFocus();
                    isShowPerms = Data.constants.isPermissioning;
                }
                else if (Data.constants.toPromote != Promotion)
                {
                    getNewPositions();                                      //get the new positions of the windows
                    doShowWindows();                                        //move, bring the windows to the front
                    setGUIFocus();
                    Promotion = Data.constants.toPromote;
                }
            }
        }
Ejemplo n.º 2
0
        public mgcStatus doGetStatus()
        {
            mgcStatus newStatus = new mgcStatus();
            String statustext = apiHelper.apiGetControlText(_conferenceControls.hwndConfStatusTXT);
            // switch with first word of string
            switch (statustext.Split(' ')[0])
            {
                case "Registering":
                    newStatus.status = confStatusText.Registering;
                    break;

                case "Connecting":
                    newStatus.status = confStatusText.Connecting;
                    break;

                case "Entering":
                    newStatus.status = confStatusText.Entering;
                    break;

                case "Leaving":
                    newStatus.status = confStatusText.Leaving;
                    break;

                case "Not":
                    newStatus.status = confStatusText.NotInConference;
                    break;

                case "In":
                    newStatus.status = confStatusText.InConference;
                    Regex r = new Regex(".*?(\\d+)", RegexOptions.IgnoreCase | RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace);
                    Match m = r.Match(statustext);
                    if (m.Success)
                    {
                        newStatus.confParticipants = Int32.Parse(m.Groups[1].ToString())+1;
                    }
                    break;

                default:
                    newStatus.status = confStatusText.Unknown;
                    break;
            }
            return newStatus;
        }