예제 #1
0
 private void SaveConfig()
 {
     using (FileStream outputStream = new FileStream(ViewerConfigPath, FileMode.Create))
     {
         AppVM.ViewerConfig.InternalGameEngineConfig.CopyOptionsFrom(InternalGameEngineConfig.GetOptionsClone()); // Repopulate with current engine values
         AppVM.ViewerConfig.SaveConfig(outputStream);
     }
 }
예제 #2
0
        private ViewerConfig LoadConfig()
        {
            using (FileStream inputStream = new FileStream(ViewerConfigPath, FileMode.OpenOrCreate))
            {
                ViewerConfig viewerConfig = new ViewerConfig();
                viewerConfig.InternalGameEngineConfig = InternalGameEngineConfig.GetOptionsClone(); // Create clone to store user values

                try
                {
                    viewerConfig.LoadConfig(inputStream);
                }
                catch (Exception) { }

                return(viewerConfig);
            }
        }