/// <summary> /// Store the settings, ok button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnOk_Click(object sender, EventArgs e) { // Global Key support _settings.IsShortKeySupport = chkShortKeySupport.Checked; _settings.SqlPaths = txtSqlSearchPath.Text; SaveServices(); SaveSearch(); _addinControl.ParameterizeMenusAndButtons(); // hide / unhide Menus & Buttons _settings.UpdateKeysAndToolbarsServices(); // update dynamic informations like method, texts from configuration _addinControl.ParameterizeToolbarSearchButton(); // sets the SearchButtoms _addinControl.ParameterizeToolbarServiceButton(); // sets the ServiceButtons _settings.Save(); Close(); }
/// <summary> /// Store the settings, ok button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void btnOk_Click(object sender, EventArgs e) { #region store shortcuts search var sh = (EaAddinShortcutSearch)_settings.ButtonsConfigSearch[0]; sh.KeyText = txtBtn1Text.Text; sh.KeySearchName = txtBtn1SearchName.Text; sh.KeySearchTerm = txtBtn1SearchTerm.Text; sh.KeySearchTooltip = txtBtn1SearchTooltip.Text; _settings.ButtonsConfigSearch[0] = sh; sh = (EaAddinShortcutSearch)_settings.ButtonsConfigSearch[1]; sh.KeyText = txtBtn2Text.Text; sh.KeySearchName = txtBtn2SearchName.Text; sh.KeySearchTerm = txtBtn2SearchTerm.Text; sh.KeySearchTooltip = txtBtn2SearchTooltip.Text; _settings.ButtonsConfigSearch[1] = sh; sh = (EaAddinShortcutSearch)_settings.ButtonsConfigSearch[2]; sh.KeyText = txtBtn3Text.Text; sh.KeySearchName = txtBtn3SearchName.Text; sh.KeySearchTerm = txtBtn3SearchTerm.Text; sh.KeySearchTooltip = txtBtn3SearchTooltip.Text; _settings.ButtonsConfigSearch[2] = sh; sh = (EaAddinShortcutSearch)_settings.ButtonsConfigSearch[3]; sh.KeyText = txtBtn4Text.Text; sh.KeySearchName = txtBtn4SearchName.Text; sh.KeySearchTerm = txtBtn4SearchTerm.Text; sh.KeySearchTooltip = txtBtn4SearchTooltip.Text; _settings.ButtonsConfigSearch[3] = sh; sh = (EaAddinShortcutSearch)_settings.ButtonsConfigSearch[4]; sh.KeyText = txtBtn5Text.Text; sh.KeySearchName = txtBtn5SearchName.Text; sh.KeySearchTerm = txtBtn5SearchTerm.Text; sh.KeySearchTooltip = txtBtn5SearchTooltip.Text; _settings.ButtonsConfigSearch[4] = sh; #endregion #region store shortcut services _settings.ButtonsServiceConfig[0].Id = cmbService1.SelectedValue.ToString(); _settings.ButtonsServiceConfig[0].ButtonText = txtButton1TextService.Text; _settings.ButtonsServiceConfig[1].Id = cmbService2.SelectedValue.ToString(); _settings.ButtonsServiceConfig[1].ButtonText = txtButton2TextService.Text; _settings.ButtonsServiceConfig[2].Id = cmbService3.SelectedValue.ToString(); _settings.ButtonsServiceConfig[2].ButtonText = txtButton3TextService.Text; _settings.ButtonsServiceConfig[3].Id = cmbService4.SelectedValue.ToString(); _settings.ButtonsServiceConfig[3].ButtonText = txtButton4TextService.Text; _settings.ButtonsServiceConfig[4].Id = cmbService5.SelectedValue.ToString(); _settings.ButtonsServiceConfig[4].ButtonText = txtButton5TextService.Text; #endregion _addinControl.ParameterizeMenusAndButtons(); // hide / unhide Menus & Buttons // Toolbar _settings.UpdateKeysAndToolbarsServices(); // update dynamic informations like method, texts from configuration _addinControl.ParameterizeToolbarSearchButton(); // sets the EA Model Search Buttons on Toolbar _addinControl.ParameterizeToolbarServiceButton(); // sets the Services Buttons on Toolbar // Button support for Service and Search _settings.IsShortKeySupport = chkShowQueryButtons.Checked; _settings.IsShowServiceButton = chkShowServiceButtons.Checked; // SQL paths _settings.SqlPaths = txtSqlSearchPath.Text; _settings.Save(); Close(); }