System.Windows.Forms.Application.EnableVisualStyles()

Here are the examples of the csharp api System.Windows.Forms.Application.EnableVisualStyles() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1397 Examples 7

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 00000vish

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 00000vish

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            try
            {
                //since cant detect if user open or started with windows
                //this app will only open with windows and opens app with -startup let main know its open with windowws
                checkArgs();
            }
            catch (Exception D) { MessageBox.Show(D.ToString());}           
            Environment.Exit(0);
        }

19 View Source File : ThisAddIn.Designer.cs
License : GNU General Public License v3.0
Project Creator : 0dteam

[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "15.0.0.0")]
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
        protected override void Initialize() {
            base.Initialize();
            this.Application = this.GetHosreplacedem<Microsoft.Office.Interop.Outlook.Application>(typeof(Microsoft.Office.Interop.Outlook.Application), "Application");
            Globals.ThisAddIn = this;
            global::System.Windows.Forms.Application.EnableVisualStyles();
            this.InitializeCachedData();
            this.InitializeControls();
            this.InitializeComponents();
            this.InitializeData();
        }

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 0x00000FF

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new frmMain());
        }

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 0x2b00b1e5

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.ApplicationExit += new EventHandler(OnApplicationExit);
            t.Start();
            using (NotifyIcon icon = new NotifyIcon())
            {
                icon.Icon = System.Drawing.Icon.ExtractreplacedociatedIcon(Application.ExecutablePath);
                icon.ContextMenu = new ContextMenu(new MenuItem[] {
                    new MenuItem("Options", (s, e) => {new Form1().Show();}),
                    new MenuItem("Exit", (s, e) => { Application.Exit(); }),
                });
                icon.Visible = true;

                Application.Run();
                icon.Visible = false;
            }
        }

19 View Source File : cMain.cs
License : MIT License
Project Creator : 0xPh0enix

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new fMain());
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : 1-EXON

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new DiscordWebhook());
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : 0xLaileb

[STAThread]
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Demo());
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : 20chan

[STAThread]
        static void Main() {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : 1CM69

[STAThread]
    private static void Main()
    {
      Application.EnableVisualStyles();
      Application.SetCompatibleTextRenderingDefault(false);
      Application.Run((Form) new MainForm());
    }

19 View Source File : Program.cs
License : MIT License
Project Creator : 2401dem

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            form1 = new Form1();
            Application.Run(form1);
        }

19 View Source File : Program.cs
License : Apache License 2.0
Project Creator : 214175590

[STAThread]
        static void Main(string[] args)
        {
            if (null != args && args.Length > 3)
            {
                initUser = new SshUser();
                initUser.Host = args[0];
                initUser.UserName = args[1];
                initUser.Preplacedword = args[2];
                initUser.Port = Convert.ToInt32(args[3]);
            }
            /*AllocConsole();
            windowHandle = FindWindow(null, Process.GetCurrentProcess().MainModule.FileName);

            IntPtr closeMenu = GetSystemMenu(windowHandle, IntPtr.Zero);
            uint SC_CLOSE = 0xF060;
            RemoveMenu(closeMenu, SC_CLOSE, 0x0);
            SetConsolereplacedle("调试信息");*/

            try
            {
                //处理未捕获的异常   
                Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
                //处理UI线程异常   
                Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
                //处理非UI线程异常   
                AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);


                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                MAIN = new MainForm();
                Application.Run(MAIN);

                //Application.Run(new SftpForm(initUser));
            }
            catch (Exception ex)
            {
                string str = GetExceptionMsg(ex, string.Empty);
                MessageBox.Show(str, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            
            //FreeConsole();
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : 2881099

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ApplicationEventHandlerClreplaced AppEvents = new ApplicationEventHandlerClreplaced();
            Application.ThreadException += new ThreadExceptionEventHandler(AppEvents.OnThreadException);
            Application.Run(new Form1());
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : 2881099

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            MiniblinkPInvoke.Resourcereplacedemblys.Add("FreeSqlTools", System.Reflection.replacedembly.GetExecutingreplacedembly());
            MiniblinkPInvoke.PageNameSpace = "FreeSqlTools.Pages";
            Curd.InitFreeSql();
            Application.Run(new FrWebMain());
        }

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 2dust

[STAThread]
        static void Main()
        {
            if (Environment.OSVersion.Version.Major >= 6)
            {
                SetProcessDPIAware();
            }

            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);


            //AppDomain.CurrentDomain.replacedemblyResolve += CurrentDomain_replacedemblyResolve;

            if (!IsDuplicateInstance())
            {

                Utils.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");

                //设置语言环境
                string lang = Utils.RegReadValue(Global.MyRegPath, Global.MyRegKeyLanguage, "zh-Hans");
                Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo(lang);

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new MainForm());
            }
            else
            {
                UI.ShowWarning($"v2rayN is already running(v2rayN已经运行)");
            }
        }

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 2dust

[STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm(args));
        }

19 View Source File : ThisAddIn.Designer.cs
License : MIT License
Project Creator : 7coil

[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
        protected override void Initialize() {
            base.Initialize();
            this.Application = this.GetHosreplacedem<Microsoft.Office.Interop.Excel.Application>(typeof(Microsoft.Office.Interop.Excel.Application), "Application");
            Globals.ThisAddIn = this;
            global::System.Windows.Forms.Application.EnableVisualStyles();
            this.InitializeCachedData();
            this.InitializeControls();
            this.InitializeComponents();
            this.InitializeData();
        }

19 View Source File : ThisAddIn.Designer.cs
License : MIT License
Project Creator : 7coil

[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
        protected override void Initialize() {
            base.Initialize();
            this.Application = this.GetHosreplacedem<Microsoft.Office.Interop.Outlook.Application>(typeof(Microsoft.Office.Interop.Outlook.Application), "Application");
            Globals.ThisAddIn = this;
            global::System.Windows.Forms.Application.EnableVisualStyles();
            this.InitializeCachedData();
            this.InitializeControls();
            this.InitializeComponents();
            this.InitializeData();
        }

19 View Source File : ThisAddIn.Designer.cs
License : MIT License
Project Creator : 7coil

[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
        protected override void Initialize() {
            base.Initialize();
            this.Application = this.GetHosreplacedem<Microsoft.Office.Interop.PowerPoint.Application>(typeof(Microsoft.Office.Interop.PowerPoint.Application), "Application");
            Globals.ThisAddIn = this;
            global::System.Windows.Forms.Application.EnableVisualStyles();
            this.InitializeCachedData();
            this.InitializeControls();
            this.InitializeComponents();
            this.InitializeData();
        }

19 View Source File : ThisAddIn.Designer.cs
License : MIT License
Project Creator : 7coil

[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Tools.Office.ProgrammingModel.dll", "16.0.0.0")]
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Never)]
        protected override void Initialize() {
            base.Initialize();
            this.Application = this.GetHosreplacedem<Microsoft.Office.Interop.Word.Application>(typeof(Microsoft.Office.Interop.Word.Application), "Application");
            Globals.ThisAddIn = this;
            global::System.Windows.Forms.Application.EnableVisualStyles();
            this.InitializeCachedData();
            this.InitializeControls();
            this.InitializeComponents();
            this.InitializeData();
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : 86Box

[STAThread]
        static void Main()
        {
            if (Environment.OSVersion.Version.Major >= 6)
                SetProcessDPIAware();

            SetCurrentProcessExplicitAppUserModelID(AppID);
            const string name = "86Box Manager";

            //Use a mutex to check if this is the first instance of Manager
            mutex = new Mutex(true, name, out bool firstInstance);

            //If it's not, we need to restore and focus the existing window, as well as preplaced on any potential command line arguments
            if (!firstInstance)
            {
                //Finds the existing window, unhides it, restores it and sets focus to it
                IntPtr hWnd = FindWindow(null, "86Box Manager");
                ShowWindow(hWnd, ShowWindowEnum.Show);
                ShowWindow(hWnd, ShowWindowEnum.Restore);
                SetForegroundWindow(hWnd);

                //If this second instance comes from a VM shortcut, we need to preplaced on the command line arguments so the VM will start
                //in the existing instance.
                //NOTE: This code will have to be modified in case more command line arguments are added in the future.
                if (args.Length == 3 && args[1] == "-S" && args[2] != null)
                {
                    string message = args[2];
                    COPYDATASTRUCT cds;
                    cds.dwData = IntPtr.Zero;
                    cds.lpData = Marshal.StringToHGlobalAnsi(message);
                    cds.cbData = message.Length;
                    SendMessage(hWnd, WM_COPYDATA, IntPtr.Zero, ref cds);
                }

                return;
            }
            else
            {
                //Then check if any instances of 86Box are already running and warn the user
                Process[] pname = Process.GetProcessesByName("86box");
                if (pname.Length > 0)
                {
                    DialogResult result = MessageBox.Show("At least one instance of 86Box.exe is already running. It's not recommended that you run 86Box.exe directly outside of Manager. Do you want to continue at your own risk?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                    if (result == DialogResult.No)
                    {
                        return;
                    }
                }
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new frmMain());
            }
        }

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 9vult

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FrmStartPage());
        }

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : 9vult

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // Initialize the Client
            WFClient.Initialize();

            Application.Run(new FrmLauncher());
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : a11s

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Form form=null;
            Console.WriteLine("All test:");
            Console.WriteLine("1 PureUdp test");
            Console.WriteLine("2 PureKcp test");
            Console.WriteLine("3 Udp+Kcp mix test");
            Console.WriteLine("4 PureKcp withflush minrto mix test");
            Console.WriteLine("other: exit");
            string input = "";           
            Console.WriteLine("input 1~4:");
            input = Console.ReadLine();
            switch (input.Trim())
            {
                case "0":
                    form = new ClientForm1();
                    break;
                case "1":
                    form = new ClientUdp();
                    break;
                case "2":                         
                    form = new ClientKcp();
                    break;
                case "3":
                    form = new ClientMix();
                    break;
                case "4":                    
                    KcpSetting.Default.RTO = 1;
                    KcpSetting.Default.NoDelay = 1;
                    KcpSetting.Default.NoDelayInterval = 1;
                    KcpSetting.Default.NoDelayResend = 10;
                    KcpSetting.Default.NoDelayNC = 1;
                    KcpSetting.Default.SndWindowSize = 2048;
                    KcpSetting.Default.RecWindowSize = 2048;
                    KcpSetting.Default.MTU = Utilities.PackSettings.MAX_DATA_LEN;
                    form = new ClientKcp();
                    break;
                default:
                    return;
                    break;
            }

            Application.Run(form);
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : a11s

[STAThread]
        static void Main()
        {
            //sw.Start();
            //lasttime = DateTime.Now;
            //System.Threading.SpinWait wait = new System.Threading.SpinWait();
            //for (int i = 0; i < 100000; i++)
            //{
            //    if (DateTime.Now.Subtract(lasttime).TotalMilliseconds > 1000)
            //    {
            //        lasttime = DateTime.Now;
            //        Console.WriteLine($"{sw.ElapsedMilliseconds}\t {counter - counter2}\t {counter}");
            //        counter2 = counter;
            //    }
            //    wait.SpinOnce();
            //    counter++;
            //}
            Console.WriteLine("All test:");
            Console.WriteLine("1 PureUdp test");
            Console.WriteLine("2 PureKcp test");
            Console.WriteLine("3 Udp+Kcp mix test");
            Console.WriteLine("4 PureKcp withflush minrto test");
            Console.WriteLine("other: exit");
            string input = "";
            Console.WriteLine("input 1~4:");
            input = Console.ReadLine();
            switch (input.Trim())
            {
                case "0":
                    StartServer = StartServer0;
                    break;
                case "1":
                    StartServer = StartServer1;
                    break;
                case "2":
                    StartServer = StartServer2;
                    break;
                case "3":
                    StartServer = StartServer3;
                    break;
                case "4":
                    StartServer = StartServer4;
                    break;
                default:
                    return;
                    break;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new ServerForm1());
            var servertype = Server.GetType().Name;
            var t = Server.AsyncClose(TimeSpan.FromSeconds(10));
            Console.WriteLine("closing..");
            t.Wait();
            Console.WriteLine($"Server {servertype} Closed. Press any to to exit");
            Console.ReadKey();
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : a11s

[STAThread]
        static void Main()
        {
            Console.WriteLine("All test:");
            Console.WriteLine("1 PureUdp test");
            Console.WriteLine("2 PureKcp test");
            Console.WriteLine("3 Udp+Kcp mix test");
            Console.WriteLine("4 PureKcp withflush minrto mix test");
            Console.WriteLine("other: exit");
            string input = "";
            Console.WriteLine("input 1~3:");
            input = Console.ReadLine();
            switch (input.Trim())
            {
                case "0":
                    StartServer = StartServer0;
                    break;
                case "1":
                    StartServer = StartServer1;
                    break;
                case "2":
                    StartServer = StartServer2;
                    break;
                case "3":
                    StartServer = StartServer3;
                    break;
                case "4":
                    StartServer = StartServer4;
                    break;
                default:
                    return;
                    break;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
            var servertype = Server.GetType().Name;
            Server?.Close(TimeSpan.FromSeconds(10));
            Console.WriteLine("closing..");
            
            Console.WriteLine($"Server {servertype} Closed. Press any to to exit");
            Console.ReadKey();
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : a2633063

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new ZUART());
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : a1xd

[STAThread]
        static void Main()
        {
            var mutex = new System.Threading.Mutex(true, "RawAccelGrapher", out bool result);

            if (!result)
            {
                MessageBox.Show("Another instance of the Raw Accel Grapher is already running.");
                return;
            }

            CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture;
            CultureInfo.DefaultThreadCurrentUICulture = CultureInfo.InvariantCulture;

            AppDomain.CurrentDomain.UnhandledException += GlobalUnhandledExceptionHandler;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new RawAcceleration());

            GC.KeepAlive(mutex);      
        }

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : a4004

[STAThread]
        static void Main(string[] argv)
        {
            if (argv.Any(o => o.Contains("--debug") || o.Contains("-d")))
            {
                NativeMethods.AllocConsole();
                Default = Console.ForegroundColor;
                DebugMode = true;

                Console.replacedle = "Espressif Flash Manager - Debugging Console";
            }

            AllowFileDebugging = -1;
            Debug("Application init.");

            if (argv.Any(o => o.Contains("--fixdriver") || o.Contains("-fd")))
            {
                Debug("Program executed with --fixdriver flag. Device picker will be disabled and esptool will autodetect" +
                    " in order to mitigate access denied error messages.");

                Settings.PortFix = true;
            }

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);

            if (argv.Any(o => o.Contains("--portable") || o.Contains("-p")))
            {
                Portable = true;

                Debug("Program executed with the --portable flag which removes the need for Python and the esptool module" +
                    " and instead uses a precompiled (outdated) copy of the esptool.", Event.Warning);
                Debug("You are warned that using untrusted executables not provided by N2D22 exposes your computer system" +
                    " to security risks. It's recommended that you do not use this mode and instead use the Python utility.", Event.Warning);

                if (!File.Exists("esptool.exe"))
                {
                    Debug("Could not find a matching file for esptool.exe in the current working directory.", Event.Critical);

                    OpenFileDialog fileDialog = new OpenFileDialog()
                    {
                        Multiselect = false,
                        SupportMultiDottedExtensions = true,
                        Filter = "Executable files (*.exe)|*.exe|All files (*.*)|*.*",
                        replacedle = "Browse for esptool binary",
                    };

                    if (fileDialog.ShowDialog() == DialogResult.OK)
                        Settings.EsptoolExe = fileDialog.FileName;
                    else
                        Terminate();                  
                }
                else
                    Settings.EsptoolExe = "esptool.exe";
            }

            Application.ThreadException += (s, e) =>
            {
                Debug("threadexception", e.Exception.ToString(), Event.Critical);

                MainWindow.Instance.Invoke(new Action(() =>
                {
                    MessageBox.Show($"{e.Exception.Message}\nThe application will terminate immediately.", "Unexpected Error",
                        MessageBoxButtons.OK, MessageBoxIcon.Error);
                    Terminate();
                }));
            };
            AppDomain.CurrentDomain.UnhandledException += (s, e) =>
            {
                Debug("appdomain", e.ExceptionObject.ToString(), Event.Critical);

                MainWindow.Instance.Invoke(new Action(() =>
                {
                    MessageBox.Show($"{(e.ExceptionObject as Exception).Message}\nThe application will terminate immediately.", "Unexpected Error",
                        MessageBoxButtons.OK, MessageBoxIcon.Error);
                    Terminate();
                }));
            };

            if (!argv.Any(o => o.Contains("--debugyes") || o.Contains("-dyes")) && DebugMode)
            {
                Debug("[WARN] Do not close this debugging window, doing so will prevent logging " +
                    "to the disk and may cause unintended behaviour.", Event.Critical);
                Debug("If you wish to hide this window, please run N2D22 without the --debug flag.", Event.Warning);

                string conf = string.Empty;

                do
                {
                    Console.Write("Please type \"understood\" without the quotes to continue: ");
                    conf = Console.ReadLine();
                }
                while (conf != "understood");

                Debug("To debug faster, simply append 'yes' to the --debug flag i.e. \"--debugyes\" to skip the confirmation.", Event.Success);

                Console.Write("Press any key to continue . . .");
                Console.ReadKey();
            }

            Debug("Creating MainWindow");
            Application.Run(new MainWindow());
            Debug("Window destroyed. Exiting", Event.Critical);

            if (argv.Any(o => o.Contains("--debug") || o.Contains("-d")))
                NativeMethods.FreeConsole();

            Terminate();
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : aaaddress1

[STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            mainUi = new UI();

            if (args.Length > 0)
                mainUi.srcPath = args[0];

            Application.Run(mainUi);
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : aabiryukov

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new MainForm());
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : ab4d

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            using (var form = new OculusDemoForm())
            {
                form.Run();
            }
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : AbdisamadMoh

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
           Application.Run(new Form1());
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : ABN-SFLookupTechnicalSupport

[STAThread]
      static void Main() {
         Application.EnableVisualStyles();
         Application.SetCompatibleTextRenderingDefault(false);
         Application.Run(new FormAbnLookup());
      }

19 View Source File : Program.cs
License : MIT License
Project Creator : Abneed

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FormMain());
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : ABTSoftware

[STAThread]
        static void Main()
        {
            // TODO SET YOUR LICENSE KEY HERE 
            SciChartSurface.SetRuntimeLicenseKey(@"TODO SET KEY HERE");

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : ACBrNet

[STAThread]
		static void Main()
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			Application.Run(new FrmMain());
		}

19 View Source File : Program.cs
License : Microsoft Public License
Project Creator : achimismaili

[STAThread]
        static void Main()
        {
            if (SPFarm.Local == null)
            {
                string msg = "Cannot find local SharePoint Farm. "
                    + "Either this account has not enough access to the SharePoint config db"
                    + " (dbReader is not sufficient, dbOwner is recommended)"
                    + " or SharePoint " + spver.SharePointVersion
                    + " is not installed on this machine. "
                    + " FeatureAdmin will close now.";
                MessageBox.Show(msg);
                return;
            }
            // We could also check SPFarm.Local.CurrentUserIsAdministrator(true)
            // but it seems that non-farm admins are already trapped by SPFarm.Local == null

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FrmMain());
        }

19 View Source File : Program.cs
License : BSD 3-Clause "New" or "Revised" License
Project Creator : ActuarialIntelligence

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Main());
        }

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : AdamWhiteHat

[STAThread]
		static void Main()
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);
			Application.ThreadException += Application_ThreadException;
			Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
			AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
			Application.Run(new MainForm());
		}

19 View Source File : Program.cs
License : The Unlicense
Project Creator : ADeltaX

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var form = new Form1();
            form.Width = 609;
            form.Height = 639;

            Application.Run(form);
        }

19 View Source File : KoiInfo.cs
License : GNU General Public License v3.0
Project Creator : Aekras1a

private static void CheckUpdate(ConfuserContext ctx)
        {
            var ver = new KoiSystem().GetVersion(settings.KoiID);
            if(ver == settings.Version)
                return;

            ctx.Logger.LogFormat("New version of KoiVM: {0}", ver);
            ctx.Logger.LogFormat("Current version of KoiVM: {0}", settings.Version);

            if(settings.NoUI)
            {
                ctx.Logger.LogFormat("Updating...");
                var sys = new KoiSystem();
                var hnd = new ManualResetEvent(false);
                var okay = false;
                sys.Progress += _ => { };
                sys.Finish += f =>
                {
                    okay = f;
                    hnd.Set();
                };
                sys.Login(settings.KoiID);
                hnd.WaitOne();
                if(!okay)
                    throw new InvalidOperationException("Authentication failed.");
                settings.Version = ver;
                settings.Save();
            }
            else
            {
                Application.EnableVisualStyles();
                if(new UpdatePrompt(ver) {TopLevel = true}.ShowDialog() != DialogResult.OK)
                    throw new InvalidOperationException("Authentication failed.");
            }
        }

19 View Source File : KoiInfo.cs
License : GNU General Public License v3.0
Project Creator : Aekras1a

private static void RetrieveKoi(ConfuserContext ctx)
        {
            if(settings.NoUI)
            {
                ctx.Logger.Log("Retrieving Koi...");

                var sys = new KoiSystem();
                var hnd = new ManualResetEvent(false);
                var okay = false;
                sys.Progress += _ => { };
                sys.Finish += f =>
                {
                    okay = f;
                    hnd.Set();
                };
                sys.Login(settings.KoiID);
                hnd.WaitOne();
                if(!okay)
                    throw new InvalidOperationException("Authentication failed.");
            }
            else
            {
                Application.EnableVisualStyles();
                if(new LoginPrompt {TopLevel = true}.ShowDialog() != DialogResult.OK)
                    throw new InvalidOperationException("Authentication failed.");
            }
        }

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : Aekras1a

[STAThread]
        private static void Main(string[] args)
        {
            KoiInfo.Init();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new ConfigWindow());
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : Aemony

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FormSteamID64Editor());
        }

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : aerdogan

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FrmRedis());
        }

19 View Source File : Program.cs
License : MIT License
Project Creator : Aeroblast

[STAThread]
        static void Main(string[] args)
        {
#if !DEBUG
            try
            {
#endif
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);

                if (args.Length > 0)
                    if (File.Exists(args[0]))
                    {
                        ReadBook(args[0]);
                    }
                    else { MessageBox.Show("文件不存在:" + args[0]); }
                else
                {
                    OpenFileDialog dialog = new OpenFileDialog();
                    dialog.Multiselect = false;
                    dialog.replacedle = "请选择书";
                    dialog.Filter = "ePUB电子书(*.epub)|*.epub";
                    if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                        ReadBook(dialog.FileName);
                    }
                }
                try
                {
                    Util.DeleteDir(cachePath);
                }
                catch (Exception) { }
#if !DEBUG
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
#endif
        }

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : aerdogan

[STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new FrmMain());
        }

19 View Source File : Program.cs
License : Apache License 2.0
Project Creator : aequabit

[STAThread]
        static void Main()
        {
            /**
             * Check if the loader is already running.
             */
            bool result;
            var mutex = new System.Threading.Mutex(true, "tcp-moe-client", out result);
            if (!result)
            {
                UI.MsgBox.Show("Only one instance of tcp-moe can be running at a time.", "Only one instance", MessageBoxIcon.Error);
                return;
            }

            /**
             * Load the embedded replacedemblies.
             */
            AppDomain.CurrentDomain.replacedemblyResolve += new ResolveEventHandler(CurrentDomain_replacedemblyResolve);
            Embeddedreplacedembly.Load("tcp_moe_client.replacedemblies.Newtonsoft.Json.dll", "Newtonsoft.Json.dll");

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var worker = new Clreplacedes.Worker();
            Application.Run(worker.Satisfy());
        }

19 View Source File : Program.cs
License : GNU General Public License v3.0
Project Creator : AgentRev

[STAThread]
        static void Main()
        {
#if !DEBUG
            try
            {
#endif
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new MainForm());
#if !DEBUG
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString() + "\n\n\nPlease take a screenshot of this error and send it to [email protected]\n\nThe application will now close.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
#endif
        }

See More Examples