public Form1() { InitializeComponent(); vlcControl1.Video.IsMouseInputEnabled = false; vlcControl1.Video.IsKeyInputEnabled = false; vlcControl2.Video.IsMouseInputEnabled = false; vlcControl2.Video.IsKeyInputEnabled = false; if (!CountyUtils.CheckEthernet()) { ethernetErrorPanel.Visible = true; Timer timer = new Timer(); timer.Interval = (3 * 1000); // 3 secs timer.Tick += new EventHandler(timer_Tick); timer.Start(); } else { try { CreateChannelList(); } catch (Exception e) { Console.WriteLine(e.Source); } } }
private void timer_Tick(object sender, EventArgs e) { if (CountyUtils.CheckEthernet()) { ethernetErrorPanel.Visible = false; try { CreateChannelList(); } catch (Exception e2) { Console.WriteLine(e2.Source); } } }