Exemple #1
0
        //Updates the presence when it detects a title change.

        private void UpdatePresence()
        {
            string newTitle = GetWindowTitle.GetFullTitle();

            if (oldTitle != newTitle)
            {
                if (client != null)
                {
                    client.Invoke();
                }

                //TickBoxSaver();

                CurrentlyOpen.Content      = GetWindowTitle.GetCaptionOfActiveWindow();
                CurrentProcessOpen.Content = GetWindowTitle.GetActiveProcessFileName();

                SetPresence.StatText    = CustomStatusText.Text;
                SetPresence.CustAppText = CustomAppText.Text;

                CustomAppText.MaxLength    = 128;
                CustomStatusText.MaxLength = 128;

                oldTitle = newTitle;

                BlockedWordCheck();
                var sP = new SetPresence();
                sP.RPCUpdate();
            }
        }
Exemple #2
0
        private void ForceUpdatePresence()
        {
            if (client != null)
            {
                client.Invoke();
            }

            //TickBoxSaver();

            CurrentlyOpen.Content = GetWindowTitle.GetCaptionOfActiveWindow();

            SetPresence.StatText    = CustomStatusText.Text;
            SetPresence.CustAppText = CustomAppText.Text;

            CustomAppText.MaxLength    = 128;
            CustomStatusText.MaxLength = 128;

            BlockedWordCheck();
            var sP = new SetPresence();

            sP.RPCUpdate();
        }