Ejemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            SerialWindow serialWin = new SerialWindow();
            try
            {
                //try to open the first serial port when the program starts
                serialWin.openPortActionFirstTime();
            }
            catch (Exception)
            {
                //do nothing
            }
            serialWin.Show();
            serialWin.updateLayoutHistoryPanel();

            //Application.Run(serialWin);
            ProgramWithContext context = new ProgramWithContext();
            Application.Run(context);
        }
Ejemplo n.º 2
0
 private void openNewInstanceOfSerial()
 {
     SerialWindow newInstance = new SerialWindow();
     newInstance.Size = this.Size;
     newInstance.Show();
     //try to open a new port
     newInstance.openPortActionFirstTime();
 }