private async void Refresh() { config = DeepCloneObject(App.config.MainConfig); debugCheckBox.DataContext = config.Launcher; javaPathComboBox.ItemsSource = App.javaList; environmentGrid.DataContext = config.Environment; memorySlider.Maximum = SystemTools.GetTotalMemory(); customGrid.DataContext = config.Customize; AccentColorComboBox.ItemsSource = ThemeManager.Accents; appThmeComboBox.ItemsSource = ThemeManager.AppThemes; serverGroupBox.DataContext = config.Server; authtypeCombobox.ItemsSource = authTypes; authtypeCombobox.SelectedItem = authTypes.Where(x => { return(x.Type == config.User.AuthenticationType); }).FirstOrDefault(); userGrid.DataContext = config.User; VersionsComboBox.ItemsSource = await App.handler.GetVersionsAsync(); if (App.config.MainConfig.Environment.VersionIsolation) { VersionsComboBox.IsEnabled = true; } else { VersionsComboBox.IsEnabled = false; versionOptionsGrid.ItemsSource = await GameHelper.GetOptionsAsync(App.handler, new Core.Modules.Version() { ID = "null" }); } }
private void FillData() { Config.FillDropDownList(this.cmbTimeZone); Config.MainConfig m = Config.Main; this.txtConStr.Text = m.ConnectionString; this.txtRedirectAll.Text = m.RedirectAll; this.chkEnableAuth.Checked = m.AuthorizationEnabled; this.txtExt.Text = m.Extension; this.txtPageCache.Text = m.PageCache.ToString(); this.txtOnline.Text = m.OnlineTimeOut.ToString(); this.txtSeparator.Text = m.TitleSeparator; this.txtAdminPass.Text = m.AdminPassword; this.txtManagerPass.Text = m.ManagerPassword; this.txtLoginPath.Text = m.LoginPage; this.txtImg.Text = m.Images; this.txtCss.Text = m.Css; this.txtScript.Text = m.Script; this.txtFiles.Text = m.Files; this.chkLogError.Checked = m.LogError; this.chkLogRedirect.Checked = m.LogRedirect; this.chkLogDownload.Checked = m.LogDownload; this.chkOff.Checked = m.Off; this.chkSeoError.Checked = m.SeoError; this.txtEncKey.Text = m.GetConfig(Keys.KeyEncryptionKey); this.txtEncVI.Text = m.GetConfig(Keys.KeyEncryptionVI); SetDDLValue(this.cmbTimeZone, m.TimeZone.ToString()); SetDDLValue(this.cmbEncLevel, m.GetConfig(Keys.KeyEncryptionLevel)); }