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); }
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); } }