static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); MainWindowForm form = new MainWindowForm(); form.portProgram = new SerialPortProgram(form); Application.Run(form); }
public SerialPortProgram(MainWindowForm plat) { controller = new XController(); timer.Tick += new EventHandler(timerTick); timer.Interval = 200; timer.Enabled = true; timer.Start(); timr2.Tick += new EventHandler(timerTick2); timr2.Interval = 100; timr2.Enabled = true; timr2.Start(); platform = plat; timr3.Tick += new EventHandler(timerTick3); timr3.Interval = 400; timr3.Enabled = true; timr3.Start(); timr4.Tick += new EventHandler(timerTick4); timr4.Interval = 500; timr4.Enabled = true; timr4.Start(); }