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"; }
UltimaGameSettings() { _login = CreateOrOpenSection <LoginSettings>(); _ultimaOnline = CreateOrOpenSection <UltimaOnlineSettings>(); _engine = CreateOrOpenSection <EngineSettings>(); _ui = CreateOrOpenSection <UserInterfaceSettings>(); _gumps = CreateOrOpenSection <GumpSettings>(); _audio = CreateOrOpenSection <AudioSettings>(); }
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>(); }
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); }
//--------------------------------------------------------------------- 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); }
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); }
public static void writeUserInterfaceSettings(String fileName, UserInterfaceSettings settings) { xmlWriter <UserInterfaceSettings>(fileName, settings); }
//--------------------------------------------------------------------- static void AssertEqual(UserInterfaceSettings settings1, UserInterfaceSettings settings2) { Assert.AreEqual( settings1?.BasicSettingController?.Data?.ProgramToRun, settings2?.BasicSettingController?.Data?.ProgramToRun); }