Beispiel #1
0
        public TimerController(RecController rec, System.Windows.Forms.Label LabelRecState)
        {
            this.rec           = rec;
            this.LabelRecState = LabelRecState;

            timer = new Timer
            {
                Interval  = Constants.TimerTickInterval,
                AutoReset = true
            };
            timer.Elapsed += new ElapsedEventHandler(TimeVerifier);
        }
Beispiel #2
0
        public void TestConnection()
        {
            var testreq = new Request(TextAddr.Text).Probe();

            if (testreq)
            {
                is_ok = true;
                LabelConnState.Text      = "З'єднання встановлено";
                LabelConnState.BackColor = Color.LightGreen;
                LabelConnState.ForeColor = Color.Black;

                RecCtl   = new RecController(TextAddr.Text);
                TimerCtl = new TimerController(RecCtl, LabelRecState);
            }
        }