Inheritance: System.Windows.Forms.Form
Exemple #1
0
        public static void Main()
        {
      #if !DEBUG
            Application.ThreadException +=
                new ThreadExceptionEventHandler(Application_ThreadException);
            Application.SetUnhandledExceptionMode(
                UnhandledExceptionMode.CatchException);

            AppDomain.CurrentDomain.UnhandledException +=
                new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
      #endif

            if (!AllRequiredFilesAvailable() || !IsNetFramework45Installed())
            {
                Environment.Exit(0);
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            using (GUI.MainForm form = new GUI.MainForm()) {
                form.FormClosed += delegate(Object sender, FormClosedEventArgs e) {
                    Application.Exit();
                };
                Application.Run();
            }
        }
        public SerialForm(MainForm parent)
        {
            InitializeComponent();

            portBox.Text = parent.Serial.Port;
            this.parent = parent;
        }
        public PortForm(MainForm m)
        {
            InitializeComponent();
              parent = m;

              localIP = getLocalIP();
        }
        public static void Main()
        {
      #if !DEBUG
            Application.ThreadException +=
                new ThreadExceptionEventHandler(Application_ThreadException);
            Application.SetUnhandledExceptionMode(
                UnhandledExceptionMode.CatchException);

            AppDomain.CurrentDomain.UnhandledException +=
                new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
      #endif

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            using (GUI.MainForm form = new GUI.MainForm()) {
                form.FormClosed += delegate(Object sender, FormClosedEventArgs e) {
                    Application.Exit();
                };
                Application.Run();
            }
        }
        static void Main()
        {
      #if !DEBUG
            try {
      #endif
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            using (GUI.MainForm form = new GUI.MainForm()) {
                form.FormClosed += delegate(Object sender, FormClosedEventArgs e) {
                    Application.Exit();
                };
                Application.Run();
            }

      #if !DEBUG
        }

        catch (Exception e) {
            Utilities.CrashReport.Save(e);
        }
      #endif
        }
    public static void Main() {
      #if !DEBUG
        Application.ThreadException += 
          new ThreadExceptionEventHandler(Application_ThreadException);
        Application.SetUnhandledExceptionMode(
          UnhandledExceptionMode.CatchException);

        AppDomain.CurrentDomain.UnhandledException += 
          new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
      #endif

      if (!AllRequiredFilesAvailable())
        Environment.Exit(0);

      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      using (GUI.MainForm form = new GUI.MainForm()) {
        form.FormClosed += delegate(Object sender, FormClosedEventArgs e) {
          Application.Exit();
        };        
        Application.Run();
      }
    }