コード例 #1
0
 private void CreateOverrideTaskItem_OnClicked(CallbackTask item)
 {
     MessageBox.show($"This will override the file at {MedicalConfig.OverrideBackingFile}. Are you sure you want to continue?", "Create Override?", MessageBoxStyle.Yes | MessageBoxStyle.No | MessageBoxStyle.IconQuest, result =>
     {
         MedicalConfig.saveOverride();
         MessageBox.show($"Created override file at {MedicalConfig.OverrideBackingFile}", "Override Created", MessageBoxStyle.Ok | MessageBoxStyle.IconInfo);
     });
 }
コード例 #2
0
        protected override void createApp()
        {
            ActivityManager actManager = GetSystemService(ActivityService) as ActivityManager;
            var             memoryInfo = new ActivityManager.MemoryInfo();

            actManager.GetMemoryInfo(memoryInfo);

            if (memoryInfo.TotalMem < 1536000000)
            {
                MedicalConfig.SetVirtualTextureMemoryUsageMode(MedicalConfig.VTMemoryMode.Small);
            }

            MedicalConfig.PlatformExtraScaling = 0.25f;

            OgrePlugin.OgreInterface.CompressedTextureSupport = OgrePlugin.CompressedTextureSupport.None;
            OgrePlugin.OgreInterface.InitialClearColor        = new Color(0.156f, 0.156f, 0.156f);

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

            OtherProcessManager.OpenUrlInBrowserOverride = openUrl;

            String archiveName = null;

            #if ALLOW_DATA_FILE
            String testingArtFile = "/storage/emulated/0/AnomalousMedical.dat";
            if (File.Exists(testingArtFile))
            {
                archiveName = testingArtFile;
            }
            else
            {
            #endif

            archiveName = findExpansionFile();

            #if ALLOW_DATA_FILE
        }

        Logging.Log.Debug("Archive Name {0}", archiveName);
            #endif

            anomalousController = new AnomalousController()
            {
                PrimaryArchive = archiveName
            };
            anomalousController.OnInitCompleted += HandleOnInitCompleted;
            //anomalousController.DataFileMissing += HandleDataFileMissing;
            anomalousController.AddAdditionalPlugins += HandleAddAdditionalPlugins;
            anomalousController.run();
        }
コード例 #3
0
ファイル: Main.cs プロジェクト: AnomalousMedical/Medical
        // 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();
                }
            }
        }