예제 #1
0
 public Options(UserAppConfig userAppConfig)
 {
     InitializeComponent();
     _userAppConfig     = userAppConfig;
     txtBoxAppName.Text = userAppConfig.AppName;
     checkBoxShowAppInTaskBar.Checked      = userAppConfig.ShowAppInTaskBar;
     checkBoxMinimizeWhenAppLocked.Checked = userAppConfig.MinimizeWhenAppLocked;
     checkBoxMinimizeToTray.Checked        = userAppConfig.MinimizeToTray;
     checkBoxSyncOGameCredentials.Checked  = userAppConfig.SynchronizeOGameCredentials;
     checkBoxDoNotShowTrayToolTip.Checked  = userAppConfig.DoNotShowMinimizeToolTip;
     try
     {
         comboBoxWebBrowser.SelectedItem = userAppConfig.ExternalWebBrowser;
         if (comboBoxWebBrowser.SelectedItem == null)
         {
             throw new Exception("Invalid browser selection");
         }
     }
     catch
     {
         comboBoxWebBrowser.SelectedItem  = "Internet Explorer";
         userAppConfig.ExternalWebBrowser = "Internet Explorer";
     }
     _settingsLoaded = true;
 }
예제 #2
0
 private void ResetAppSettings()
 {
     if (_gameManager != null)
     {
         _userAppConfig = _gameManager.GetUserApplicationConfig();
         if (_userAppConfig == null)
         {
             return;
         }
         this.Text          = _userAppConfig.AppName;
         this.ShowInTaskbar = _userAppConfig.ShowAppInTaskBar;
     }
 }
예제 #3
0
        /// <summary>
        /// 加载配置
        /// </summary>
        /// <param name="path"></param>
        public void LoadConfigs(IConfigParam param)
        {
            AppConfigParam configParam = param as AppConfigParam;

            //用户应用程序配置加载
            _appConfig = new UserAppConfig();
            _appConfig.LoadConfigs(new UserAppConfigParam()
            {
                ConfigPath = configParam.UserConfigPath
            });

            //缓存配置加载
            _cacheLogConfig = new CacheLogConfig();
            _cacheLogConfig.LoadConfigs(new CacheLogConfigParam()
            {
                公共缓存配置目录  = _appConfig.公共缓存配置目录,
                衍生品缓存配置目录 = _appConfig.衍生品缓存配置目录,
                权益缓存配置目录  = _appConfig.权益缓存配置目录,
                固收缓存配置目录  = _appConfig.固收缓存配置目录
            });
        }