Esempio n. 1
0
        private void UpdateServiceStatus()
        {
            try
            {
                if (!ServiceManager.DoesServiceExist("SmokeSignalSrvc"))
                {
                    ServiceStatusLabel.Text      = "Not installed!!!";
                    ServiceStatusLabel.ForeColor = Color.Red;
                }
                else
                {
                    ServiceControllerStatus status = ServiceManager.ServiceStatus("SmokeSignalSrvc");
                    string s = status.ToString();
                    Color  c = Color.Green;
                    if (status != ServiceControllerStatus.Running)
                    {
                        c = Color.YellowGreen;
                    }

                    s += serviceConfigured ? ", configured" : ", not configured";

                    ServiceStatusLabel.ForeColor = c;
                    ServiceStatusLabel.Text      = s;
                }
            }
            finally
            {
                OnDelay.Do(UpdateServiceStatus, 5 * 1000);
            }
        }
Esempio n. 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            this.ValidateChildren();

            serviceConfigured = (InvalidControls == 0);

            UpdateServiceStatus();

            StartingUp = false;

            OnDelay.InAMoment(CheckForUpdateSilent);
        }
Esempio n. 3
0
        private void AboutButton_Click(object sender, EventArgs e)
        {
            AboutWindow  aw     = new AboutWindow();
            DialogResult result = aw.ShowDialog();

            aw.Close();

            if (result == DialogResult.OK)
            {
                OnDelay.InAMoment(CheckForUpdateUI);
            }
        }