public override bool Init() { base.Init(); Instance = this; Engine = new Engine(); if (Engine.Initialization(false) == false) { return(false); } Engine.UiManager.Add(this); return(true); }
static void Main(string[] args) { NSApplication.Init(); Core.Platform.Instance = new Eddie.Platform.MacOS.Platform(); 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.LoadString(Assembly.GetEntryAssembly(), "AirVPN.xml", "AirVPN.xml"); Core.ResourcesFiles.LoadString(Assembly.GetEntryAssembly(), "OpenVPN.xml", "OpenVPN.xml"); 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.Main(args); } }