private void ConfigDialog2_Load(object sender, EventArgs e) { _settings = new AppSettings(false); _settings.Set <uint>("VersioningId", AppSettings.Current.Get <uint>("VersioningId")); _settings.AllowSaving = false; addLocalTrackBar.Value = AppSettings.Current.Get <int>("AddLocalOpacity"); splashTrackBar.Value = AppSettings.Current.Get <int>("SplashOpacity"); browserTrackBar.Value = AppSettings.Current.Get <int>("BrowserOpacity"); aboutTrackBar.Value = AppSettings.Current.Get <int>("AboutOpacity"); configTrackBar.Value = AppSettings.Current.Get <int>("ConfigOpacity"); clientPathBox.Text = AppSettings.Current.Get <string>("ClientPath"); patchPathBox.Text = AppSettings.Current.Get <string>("PatchingPath"); razorPathBox.Text = AppSettings.Current.Get <string>("RazorPath"); loadRazorChkBox.Checked = AppSettings.Current.Get <bool>("LoadRazor"); perPageBox.Text = AppSettings.Current.Get <int>("ServersPerPage").ToString();; templateBox.Text = AppSettings.Current.Get <string>("Template"); openBrowserBox.Checked = AppSettings.Current.Get <bool>("OpenBrowserOnStartup"); minimizeToTrayBox.Checked = AppSettings.Current.Get <bool>("MinimizeToTray"); loadWithWindowsBox.Checked = GetLoadWithWindows(); proxyEnabledChkBox.Checked = AppSettings.Current.Get <bool>("ProxyEnabled"); proxyHostBox.Text = AppSettings.Current.Get <string>("ProxyHostAddress"); proxyPortBox.Text = AppSettings.Current.Get <int>("ProxyHostPort").ToString(); proxyUsernameBox.Text = AppSettings.Current.Get <string>("ProxyUsername"); proxyPasswordBox.Text = AppSettings.Current.Get <string>("ProxyPassword"); proxyGroup.Enabled = proxyEnabledChkBox.Checked; List <string> keys = new List <string>(Templates.LoadedTemplates.Keys); for (int i = 0; i < keys.Count; i++) { templateBox.Items.Add(Templates.LoadedTemplates[keys[i]].Name); } }
private void SetDefaults() { _settings.SetDefaults(); _settings.Set <uint>("VersioningId", AppSettings.Current.Get <uint>("VersioningId")); _settings.AllowSaving = false; clientPathBox.Text = _settings.Get <string>("ClientPath"); patchPathBox.Text = _settings.Get <string>("PatchingPath"); razorPathBox.Text = _settings.Get <string>("RazorPath"); loadRazorChkBox.Checked = _settings.Get <bool>("LoadRazor"); perPageBox.Text = _settings.Get <int>("ServersPerPage").ToString();; templateBox.Text = _settings.Get <string>("Template"); openBrowserBox.Checked = _settings.Get <bool>("OpenBrowserOnStartup"); minimizeToTrayBox.Checked = _settings.Get <bool>("MinimizeToTray"); loadWithWindowsBox.Checked = GetLoadWithWindows(); addLocalTrackBar.Value = _settings.Get <int>("AddLocalOpacity"); splashTrackBar.Value = _settings.Get <int>("SplashOpacity"); browserTrackBar.Value = _settings.Get <int>("BrowserOpacity"); aboutTrackBar.Value = _settings.Get <int>("AboutOpacity"); configTrackBar.Value = _settings.Get <int>("ConfigOpacity"); proxyEnabledChkBox.Checked = _settings.Get <bool>("ProxyEnabled"); proxyHostBox.Text = _settings.Get <string>("ProxyHostAddress"); proxyPortBox.Text = _settings.Get <int>("ProxyHostPort").ToString(); proxyUsernameBox.Text = _settings.Get <string>("ProxyUsername"); proxyPasswordBox.Text = _settings.Get <string>("ProxyPassword"); }
private void ConfigDialog2_Load(object sender, EventArgs e) { _settings = new AppSettings(false); _settings.Set<uint>("VersioningId", AppSettings.Current.Get<uint>("VersioningId")); _settings.AllowSaving = false; addLocalTrackBar.Value = AppSettings.Current.Get<int>("AddLocalOpacity"); splashTrackBar.Value = AppSettings.Current.Get<int>("SplashOpacity"); browserTrackBar.Value = AppSettings.Current.Get<int>("BrowserOpacity"); aboutTrackBar.Value = AppSettings.Current.Get<int>("AboutOpacity"); configTrackBar.Value = AppSettings.Current.Get<int>("ConfigOpacity"); clientPathBox.Text = AppSettings.Current.Get<string>("ClientPath"); patchPathBox.Text = AppSettings.Current.Get<string>("PatchingPath"); razorPathBox.Text = AppSettings.Current.Get<string>("RazorPath"); loadRazorChkBox.Checked = AppSettings.Current.Get<bool>("LoadRazor"); perPageBox.Text = AppSettings.Current.Get<int>("ServersPerPage").ToString(); ; templateBox.Text = AppSettings.Current.Get<string>("Template"); openBrowserBox.Checked = AppSettings.Current.Get<bool>("OpenBrowserOnStartup"); minimizeToTrayBox.Checked = AppSettings.Current.Get<bool>("MinimizeToTray"); loadWithWindowsBox.Checked = GetLoadWithWindows(); proxyEnabledChkBox.Checked = AppSettings.Current.Get<bool>("ProxyEnabled"); proxyHostBox.Text = AppSettings.Current.Get<string>("ProxyHostAddress"); proxyPortBox.Text = AppSettings.Current.Get<int>("ProxyHostPort").ToString(); proxyUsernameBox.Text = AppSettings.Current.Get<string>("ProxyUsername"); proxyPasswordBox.Text = AppSettings.Current.Get<string>("ProxyPassword"); proxyGroup.Enabled = proxyEnabledChkBox.Checked; List<string> keys = new List<string>(Templates.LoadedTemplates.Keys); for (int i = 0; i < keys.Count; i++) templateBox.Items.Add(Templates.LoadedTemplates[keys[i]].Name); }