Example #1
0
        void LControl_PingChanged_event(object sender, LiveControlerArgs e)
        {
            if (this.InvokeRequired)
            {
                this.BeginInvoke((MethodInvoker) delegate
                {
                    LControl_PingChanged_event(sender, e);
                });
                return;
            }
            switch (e.state)
            {
            case GuardStates.ERROR:
                this.tslbl_ping_value.BackColor = Color.Red;
                this.tslbl_ping_value.Text      = e.Interval.ToString();
                break;

            case GuardStates.OK:
                this.tslbl_ping_value.BackColor = Color.Green;
                this.tslbl_ping_value.Text      = e.Interval.ToString();
                break;

            case GuardStates.WARNING:
                this.tslbl_ping_value.BackColor = Color.OrangeRed;
                this.tslbl_ping_value.Text      = e.Interval.ToString();
                break;
            }
        }
Example #2
0
 void LControl_PingChanged_event(object sender, LiveControlerArgs e)
 {
     if (this.InvokeRequired)
     {
         this.BeginInvoke((MethodInvoker)delegate
         {
             LControl_PingChanged_event(sender, e);
         });
         return;
     }
     switch (e.state)
     {
         case GuardStates.ERROR:
             this.tslbl_ping_value.BackColor = Color.Red;
             this.tslbl_ping_value.Text = e.Interval.ToString();
             break;
         case GuardStates.OK:
             this.tslbl_ping_value.BackColor = Color.Green;
             this.tslbl_ping_value.Text = e.Interval.ToString();
             break;
         case GuardStates.WARNING:
             this.tslbl_ping_value.BackColor = Color.OrangeRed;
             this.tslbl_ping_value.Text = e.Interval.ToString();
             break;
     }
 }