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); } } }
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); } } }
static void Main(string[] args) { Core.Platform.Instance = new Eddie.Platforms.Osx(); CommandLine.InitSystem(Environment.CommandLine); // Due to a bug in Xamarin, that don't recognize resources inside Core library if Mono is bundled, we embed some resources in entry assembly. Core.ResourcesFiles.LoadString (Assembly.GetEntryAssembly (), "license.txt", "License.txt"); Core.ResourcesFiles.LoadString (Assembly.GetEntryAssembly (), "thirdparty.txt", "ThirdParty.txt"); Core.ResourcesFiles.LoadString (Assembly.GetEntryAssembly (), "tos.txt", "TOS.txt"); Core.ResourcesFiles.Count (); if (CommandLine.SystemEnvironment.Exists ("cli")) { Core.Engine engine = new Core.Engine (); if (engine.Initialization (true)) { engine.ConsoleStart (); engine.Join (); } } else { Engine engine = new Engine (); if (engine.Initialization (false) == false) return; NSApplication.Init (); NSApplication.Main (args); } }
static void Main() { try { if (Environment.OSVersion.Version.Major >= 6) { NativeMethods.SetProcessDPIAware(); } //Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Core.Platform.Instance = new Eddie.Platform.Windows.Platform(); CommandLine.InitSystem(Environment.CommandLine); if (CommandLine.SystemEnvironment.Exists("cli")) { Core.Engine engine = new Core.Engine(); if (engine.Initialization(true)) { engine.ConsoleStart(); } } else { GuiUtils.Init(); m_engine = new Eddie.Forms.Engine(); m_engine.CommandEvent += Engine_CommandEvent; m_engine.TerminateEvent += Engine_TerminateEvent; if (m_engine.Initialization(false)) { m_engine.FormMain = new Eddie.Forms.Forms.Main(); m_engine.UiStart(); // Application.Run(engine.FormMain); // Removed in 2.11.9 m_engine.FormMain.LoadPhase(); m_context = new ApplicationContext(); } } } catch (Exception e) { MessageBox.Show(e.Message, Constants.Name, MessageBoxButtons.OK, MessageBoxIcon.Error); } // Application.Run must be outside the catch above, otherwise it's not unhandled if (m_context != null) { Application.Run(m_context); } }
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); } }
static void Main(string[] args) { Core.Platform.Instance = new Eddie.Platform.Windows.Platform(); CommandLine.InitSystem(Environment.CommandLine); Core.Engine engine = new Core.Engine(); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); if (engine.Initialization(true)) { engine.ConsoleStart(); } }
static void Main(string[] args) { Platform.Instance = new Eddie.Platforms.Windows(); CommandLine.InitSystem(Environment.CommandLine); Core.Engine engine = new Core.Engine(); AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); if (engine.Initialization(true)) { engine.ConsoleStart(); } }
static void Main() { try { //Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Platform.Instance = new Eddie.Platforms.Linux(); 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); } }
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(); if (engine.Initialization(false)) { engine.FormMain = new Gui.Forms.Main(); engine.UiStart(); Application.Run(engine.FormMain); } } } catch (Exception e) { MessageBox.Show(e.Message, Constants.Name2, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
static void Main(string[] args) { Core.Platform.Instance = new AirVPN.Platforms.Osx(); CommandLine.InitSystem(Environment.CommandLine); // Due to a bug in Xamarin, that don't recognize resources inside Core library if Mono is bundled, we embed some resources in entry assembly. Core.ResourcesFiles.LoadString(Assembly.GetEntryAssembly(), "manifest.xml", "manifest.xml"); Core.ResourcesFiles.LoadString(Assembly.GetEntryAssembly(), "auth.xml", "auth.xml"); Core.ResourcesFiles.LoadString(Assembly.GetEntryAssembly(), "license.txt", "License.txt"); Core.ResourcesFiles.LoadString(Assembly.GetEntryAssembly(), "thirdparty.txt", "ThirdParty.txt"); Core.ResourcesFiles.LoadString(Assembly.GetEntryAssembly(), "tos.txt", "TOS.txt"); Core.ResourcesFiles.Count(); if (CommandLine.SystemEnvironment.Exists("cli")) { Core.Engine engine = new Core.Engine(); if (engine.Initialization()) { engine.ConsoleStart(); engine.Join(); } } else { Engine engine = new Engine(); if (engine.Initialization() == false) { return; } engine.UiStart(); NSApplication.Init(); NSApplication.Main(args); } }
static void Main() { try { if (Environment.OSVersion.Version.Major >= 6) { NativeMethods.SetProcessDPIAware(); } //Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Core.Platform.Instance = new Eddie.Platform.Windows.Platform(); CommandLine.InitSystem(Environment.CommandLine); if (CommandLine.SystemEnvironment.Exists("cli")) { Core.Engine engine = new Core.Engine(); if (engine.Initialization(true)) { engine.ConsoleStart(); } } else { m_client = new Eddie.Forms.UiClient(); m_client.Init(); } } catch (Exception e) { MessageBox.Show(e.Message, Constants.Name, MessageBoxButtons.OK, MessageBoxIcon.Error); } // Application.Run must be outside the catch above, otherwise it's not unhandled if ((m_client != null) && (m_client.AppContext != null)) { Application.Run(m_client.AppContext); } }