Example #1
0
 public void TestInitialize()
 {
     this.path     = new TemporayPath();
     this.settings = new UserInterfaceSettings();
     this.settings.BasicSettingController      = new BasicSettingController.SettingsData();
     this.settings.BasicSettingController.Data = new BasicSettingController.BasicSettingsData();
     this.settings.BasicSettingController.Data.ProgramToRun = "programToRun";
 }
Example #2
0
 UltimaGameSettings()
 {
     _login        = CreateOrOpenSection <LoginSettings>();
     _ultimaOnline = CreateOrOpenSection <UltimaOnlineSettings>();
     _engine       = CreateOrOpenSection <EngineSettings>();
     _ui           = CreateOrOpenSection <UserInterfaceSettings>();
     _gumps        = CreateOrOpenSection <GumpSettings>();
     _audio        = CreateOrOpenSection <AudioSettings>();
 }
Example #3
0
 Settings()
 {
     m_Debug        = CreateOrOpenSection <DebugSettings>();
     m_Login        = CreateOrOpenSection <LoginSettings>();
     m_UltimaOnline = CreateOrOpenSection <UltimaOnlineSettings>();
     m_Engine       = CreateOrOpenSection <EngineSettings>();
     m_UI           = CreateOrOpenSection <UserInterfaceSettings>();
     m_Gumps        = CreateOrOpenSection <GumpSettings>();
     m_Audio        = CreateOrOpenSection <AudioSettings>();
 }
Example #4
0
        public SessionContext Restore()
        {
            var ufp = new UserFolderPath();

            OpenedContentTabs = _file.Contents.Select(x => new PartsPath(ufp.Parts, x.Parts));
            OpenedQueriesTabs = _file.Queries.Select(x => new SearchQuery(_library, x)).ToArray();
            InterfaceSettings = _file.Settings;

            return(this);
        }
Example #5
0
        //---------------------------------------------------------------------
        public string Save(
            string optionalProjectPath,
            string optionalSolutionConfigurationName,
            UserInterfaceSettings settings)
        {
            var json = JsonConvert.SerializeObject(settings);

            this.CreateConfigfolder(optionalProjectPath);
            var configPath = GetConfigPath(optionalProjectPath, optionalSolutionConfigurationName);

            File.WriteAllText(configPath, json);
            return(configPath);
        }
Example #6
0
        public static UserInterfaceSettings readUserInterfaceSettings(String fileName)
        {
            UserInterfaceSettings settings = null;

            try
            {
                if (!File.Exists(fileName))
                {
                    writeUserInterfaceSettings(fileName, new UserInterfaceSettings());
                }
                settings = xmlReader <UserInterfaceSettings>(fileName);
            }
            catch (Exception ex)
            {
                logger.Error("Error reading settings", ex);
            }

            return(settings);
        }
Example #7
0
 public static void writeUserInterfaceSettings(String fileName, UserInterfaceSettings settings)
 {
     xmlWriter <UserInterfaceSettings>(fileName, settings);
 }
Example #8
0
 //---------------------------------------------------------------------
 static void AssertEqual(UserInterfaceSettings settings1, UserInterfaceSettings settings2)
 {
     Assert.AreEqual(
         settings1?.BasicSettingController?.Data?.ProgramToRun,
         settings2?.BasicSettingController?.Data?.ProgramToRun);
 }