Exemplo n.º 1
0
        static void Main()
        {
            //Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Platform.Instance = new AirVPN.Platforms.Linux();

            CommandLine.InitSystem(Environment.CommandLine);

            if (CommandLine.SystemEnvironment.Exists("cli"))
            {
                Core.Engine engine = new Core.Engine();

                if (engine.Initialization())
                {
                    engine.ConsoleStart();
                }
            }
            else
            {
                GuiUtils.Init();

                Gui.Engine engine = new Gui.Engine();

                if (engine.Initialization())
                {
                    engine.FormMain = new Gui.Forms.Main();

                    engine.UiStart();

                    Application.Run(engine.FormMain);
                }
            }
        }
Exemplo n.º 2
0
		static void Main()
		{
			//Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);

			Platform.Instance = new AirVPN.Platforms.Windows();
			
			CommandLine.InitSystem(Environment.CommandLine);

			if (CommandLine.SystemEnvironment.Exists("cli"))
			{
				Core.Engine engine = new Core.Engine();

				if (engine.Initialization())
				{
					engine.ConsoleStart();
				}
			}
			else
			{
				GuiUtils.Init();

				Gui.Engine engine = new Gui.Engine();

				if (engine.Initialization())
				{
					engine.FormMain = new Gui.Forms.Main();

					engine.UiStart();

					Application.Run(engine.FormMain);
				}
			}
		}
Exemplo n.º 3
0
        static void Main()
        {
            try
            {
                if (Environment.OSVersion.Version.Major >= 6)
                {
                    SetProcessDPIAware();
                }

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

                Platform.Instance = new Eddie.Platforms.Windows();

                CommandLine.InitSystem(Environment.CommandLine);

                if (CommandLine.SystemEnvironment.Exists("cli"))
                {
                    Core.Engine engine = new Core.Engine();

                    if (engine.Initialization(true))
                    {
                        engine.ConsoleStart();
                    }
                }
                else
                {
                    GuiUtils.Init();

                    Gui.Engine engine = new Gui.Engine();

                    engine.TerminateEvent += Engine_TerminateEvent;

                    if (engine.Initialization(false))
                    {
                        engine.FormMain = new Gui.Forms.Main();

                        engine.UiStart();

                        // Application.Run(engine.FormMain); // Removed in 2.11.9

                        engine.FormMain.LoadPhase();

                        m_context = new ApplicationContext();
                        Application.Run(m_context);
                    }
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, Constants.Name2, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 4
0
        static void Main()
        {
            try
            {
                if (Environment.OSVersion.Version.Major >= 6)
                    SetProcessDPIAware();

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

                Platform.Instance = new Eddie.Platforms.Windows();

                CommandLine.InitSystem(Environment.CommandLine);

                if (CommandLine.SystemEnvironment.Exists("cli"))
                {
                    Core.Engine engine = new Core.Engine();

                    if (engine.Initialization(true))
                    {
                        engine.ConsoleStart();
                    }
                }
                else
                {
                    GuiUtils.Init();

                    Gui.Engine engine = new Gui.Engine();

                    engine.TerminateEvent += Engine_TerminateEvent;

                    if (engine.Initialization(false))
                    {
                        engine.FormMain = new Gui.Forms.Main();

                        engine.UiStart();

                        // Application.Run(engine.FormMain); // Removed in 2.11.9

                        engine.FormMain.LoadPhase();

                        m_context = new ApplicationContext();
                        Application.Run(m_context);
                    }
                }
            }
            catch(Exception e)
            {
                MessageBox.Show(e.Message, Constants.Name2, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }