예제 #1
0
파일: Program.cs 프로젝트: joh06937/gui
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     //try
     //{
         ComSelector selector = new ComSelector();
         Application.Run(selector);
         string comPort = selector.GetPort();
         if (comPort != null)
         {
             GUI gui = new GUI(comPort);
             Application.Run(gui);
         }
     //} catch(Exception)
     //{
     //}
 }
예제 #2
0
파일: Program.cs 프로젝트: joh06937/gui
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     try
     {
         ComSelector selector = new ComSelector();
         Application.Run(selector);
         string comPort = selector.GetPort();
         if (comPort != null)
         {
             GUI gui = new GUI(comPort);
             Application.Run(gui);
         }
     } catch(Exception ex)
     {
         MessageBox.Show("Exception occurred in GUI!\n" +
                     "Reason: " + ex.Message);
     }
 }