public async Task <ActionResult> Index() { int?impersonatorTenantId; int value; if (this.AbpSession.ImpersonatorTenantId.HasValue) { impersonatorTenantId = this.AbpSession.ImpersonatorTenantId; value = impersonatorTenantId.Value; } else { impersonatorTenantId = this.AbpSession.TenantId; value = impersonatorTenantId.Value; } int num = value; IRepository <FuelCastSetting> repository = this._fuelCastSettingRepository; List <FuelCastSetting> allListAsync = await repository.GetAllListAsync((FuelCastSetting m) => m.TenantId == num); List <FuelCastSetting> fuelCastSettings = allListAsync; GetSettingsOutput getSettingsOutput = new GetSettingsOutput() { Settings = new SettingsEditDto() }; ManageSettings manageSetting = new ManageSettings(getSettingsOutput); if (fuelCastSettings.Count == 1) { manageSetting.Settings = fuelCastSettings[0].MapTo <SettingsEditDto>(); } return(this.View(manageSetting)); }
//Calls the options form and checks if favorites or settings have changed //Visits a new URL if the user asked to visit a favorite / history website private void optionsButton_Click(object sender, EventArgs e) { Options opt = new Options(); previousUrl = actualUrl; opt.ShowDialog(); if (actualizeSettings) { browserName = ManageSettings.GetBrowserName(); this.Text = browserName; homeUrl = ManageSettings.GetHomeURL(); withHistory = ManageSettings.GetHistoryBoolean(); actualizeSettings = false; } if (actualizeFavsBar) { SetFavoritesBar(); actualizeFavsBar = false; } if (actualUrl != previousUrl) { WebBrowser web = tabControl.SelectedTab.Controls[0] as WebBrowser; if (web != null) { web.Navigate(actualUrl); } } }
private void simpleButton1_Click(object sender, EventArgs e) { if (dxValidationProvider1.Validate()) { ManageSettings.SetBrowserName(textEdit1.Text); ManageSettings.SetHomeURL(textEdit2.Text); if (checkEdit1.Checked) { ManageSettings.SetHistoryBoolean("True"); } else { ManageSettings.SetHistoryBoolean("False"); } this.Dispose(); } }
private void InitializeBrowser() { ManageFavorites.Initialize(); ManageHistory.Initialize(); ManageSettings.Initialize(); SetFavoritesBar(); browserName = ManageSettings.GetBrowserName(); this.Text = browserName; homeUrl = ManageSettings.GetHomeURL(); withHistory = ManageSettings.GetHistoryBoolean(); webBrowser.Navigate(homeUrl); actualUrl = homeUrl; urlTextEdit.Text = homeUrl; tabControl.TabPages[0].Text = webBrowser.DocumentTitle; webBrowser.ScriptErrorsSuppressed = true; webBrowser.IsWebBrowserContextMenuEnabled = false; }