예제 #1
0
파일: Program.cs 프로젝트: sqratchsix/COMET
        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);
        }
예제 #2
0
 private void openNewInstanceOfSerial()
 {
     SerialWindow newInstance = new SerialWindow();
     newInstance.Size = this.Size;
     newInstance.Show();
     //try to open a new port
     newInstance.openPortActionFirstTime();
 }