Ejemplo n.º 1
0
        // This is the main entry point of the application.
        static void Main(string[] args)
        {
            if (NSProcessInfo.ProcessInfo.PhysicalMemory < 1536000000)
            {
                MedicalConfig.SetVirtualTextureMemoryUsageMode(MedicalConfig.VTMemoryMode.Small);
            }

            MedicalConfig.PlatformExtraScaling = 0.25f;

            iOSRuntimePlatformInfo.Initialize();
            OgrePlugin.OgreInterface.CompressedTextureSupport = OgrePlugin.CompressedTextureSupport.None;
            ServerConnection.HttpClientProvider    = () => new HttpClient(new NativeMessageHandler());
            RocketInterface.LoadImagesInBackground = false;

                        #if DEBUG
            Logging.Log.Default.addLogListener(new Logging.LogConsoleListener());
                        #endif

            OtherProcessManager.OpenUrlInBrowserOverride = openUrl;

            AnomalousController anomalous = null;
            try
            {
                anomalous = new AnomalousController()
                {
                    PrimaryArchive = Path.Combine(FolderFinder.ExecutableFolder, "AnomalousMedical.dat")
                };
                anomalous.OnInitCompleted      += HandleOnInitCompleted;
                anomalous.AddAdditionalPlugins += HandleAddAdditionalPlugins;
                anomalous.run();
            }
            catch (Exception e)
            {
                Logging.Log.Default.printException(e);
                Logging.Log.Error("{0} occured. Message: {1}", e.GetType().Name, e.Message);
            }
            finally
            {
                if (anomalous != null)
                {
                    anomalous.Dispose();
                }
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            NSApplication.Init();

            ServerConnection.HttpClientProvider = () => new HttpClient(new NativeMessageHandler());

            MacRuntimePlatformInfo.Initialize();
            OgrePlugin.OgreInterface.CompressedTextureSupport = OgrePlugin.CompressedTextureSupport.None;

            AnomalousController anomalous = null;

            try
            {
                anomalous = new AnomalousController()
                {
                    PrimaryArchive = Path.Combine(FolderFinder.ExecutableFolder, "../Resources/AnomalousMedical.dat")
                };
                anomalous.AddAdditionalPlugins += HandleAddAdditionalPlugins;
                anomalous.run();
            }
            catch (Exception e)
            {
                Logging.Log.Default.printException(e);
                if (anomalous != null)
                {
                    anomalous.saveCrashLog();
                }
                MessageDialog.showErrorDialog(String.Format("{0} occured. Message: {1}.\nPlease see log file for more information", e.GetType().Name, e.Message), "Anomalous Medical Has Crashed");
                MacRuntimePlatformInfo.AlertCrashing();
            }
            finally
            {
                if (anomalous != null)
                {
                    anomalous.Dispose();
                }
            }
        }
Ejemplo n.º 3
0
 protected override void OnDestroy()
 {
     base.OnDestroy();
     anomalousController.Dispose();
     this.killAppProcess();
 }