/// <summary> /// The frm config_ load. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> private void frmConfig_Load(object sender, EventArgs e) { // banner this.picBannerImage.Image = BannerFactory.CreateBanner( this.picBannerImage.Width, this.picBannerImage.Height, BannerStyle.Default, Resources.hd2_backup48x48, "Configuration", "Configure option for DBBackup"); this.Icon = Resources.hd2_backup; this.txtQtyBackup.Value = this._appConfig.HistoQty; if (this._appConfig.HistoFolder != null) { foreach (string it in this._appConfig.HistoFolder) { if (it != null) { this.lbFolder.Items.Add(it); } } } this.txtDateFormat.Text = this._appConfig.DateFormat; }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_triggers != null); if (m_triggers == null) { return; } GlobalWindowManager.AddWindow(this); GlobalWindowManager.CustomizeControl(m_ctxTools); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_Make_KDevelop, KPRes.Triggers, KPRes.TriggersDesc); this.Text = KPRes.Triggers; this.Icon = Properties.Resources.KeePass; int nWidth = (m_lvTriggers.ClientSize.Width - UIUtil.GetVScrollBarWidth() - 1); m_lvTriggers.Columns.Add(KPRes.Triggers, nWidth); m_lvTriggers.SmallImageList = m_ilIcons; m_cbEnableTriggers.Checked = m_triggers.Enabled; UpdateTriggerListEx(false); }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this, this); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_Folder_Download, KPRes.HelpSourceSelection, KPRes.HelpSourceSelectionDesc); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.HelpSourceSelection; if (AppHelp.LocalHelpAvailable == false) { m_radioLocal.Enabled = false; m_lblLocal.Text = KPRes.HelpSourceNoLocalOption; AppHelp.PreferredHelpSource = AppHelpSource.Online; } if (AppHelp.PreferredHelpSource == AppHelpSource.Local) { m_radioLocal.Checked = true; } else { m_radioOnline.Checked = true; } }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_mgr != null); if (m_mgr == null) { throw new ArgumentException(); } GlobalWindowManager.AddWindow(this, this); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_BlockDevice, KPRes.Plugins, KPRes.PluginsDesc); this.Icon = Properties.Resources.KeePass; m_lvPlugins.Columns.Add(KPRes.Plugin, 197); m_lvPlugins.Columns.Add(KPRes.Version, 106); m_lvPlugins.Columns.Add(KPRes.Author, 136); m_lvPlugins.Columns.Add(KPRes.Description, 0); m_lvPlugins.Columns.Add(KPRes.File, 119); m_ilIcons.ImageSize = new Size(16, 16); m_ilIcons.ColorDepth = ColorDepth.Depth32Bit; m_lvPlugins.SmallImageList = m_ilIcons; UpdatePluginsList(); if (m_lvPlugins.Items.Count > 0) { m_lvPlugins.Items[0].Selected = true; m_lvPlugins.Focus(); } UpdatePluginDescription(); }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); try { if (this.Owner == null) { this.Owner = Program.MainForm; } } catch (Exception) { Debug.Assert(false); } m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_Folder_Download, KPRes.ImportBehavior, KPRes.ImportBehaviorDesc); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.ImportBehavior; FontUtil.AssignDefaultBold(m_radioCreateNew); FontUtil.AssignDefaultBold(m_radioKeepExisting); FontUtil.AssignDefaultBold(m_radioOverwrite); FontUtil.AssignDefaultBold(m_radioOverwriteIfNewer); FontUtil.AssignDefaultBold(m_radioSynchronize); m_radioCreateNew.Checked = true; }
private void HIBPOfflineCheckOptions_Load(object sender, EventArgs e) { Icon = AppIcons.Default; pb_BannerImage.Image = BannerFactory.CreateBanner(pb_BannerImage.Width, pb_BannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_KOrganizer, "HIBP Offline Check Options", "Manage plugin settings."); options = ext.LoadOptions(); radioButtonOffline.Checked = (options.CheckMode == Options.CheckModeType.Offline); radioButtonOnline.Checked = (options.CheckMode == Options.CheckModeType.Online); radioButtonBloom.Checked = (options.CheckMode == Options.CheckModeType.BloomFilter); textBoxFileName.Text = options.HIBPFileName; textBoxColumnName.Text = options.ColumnName; textBoxSecureText.Text = options.SecureText; textBoxInsecureText.Text = options.InsecureText; textBoxExcludedText.Text = options.ExcludedText; checkBoxBreachCountDetails.Checked = options.BreachCountDetails; checkBoxWarningDialog.Checked = options.WarningDialog; checkBoxAutoCheck.Checked = options.AutoCheck; textBoxWarningDialog.Text = options.WarningDialogText; textBoxWarningDialog.Enabled = checkBoxWarningDialog.Checked; textBoxBloomFilter.Text = options.BloomFilter; textBoxBloomFilter.Enabled = radioButtonBloom.Checked; buttonCreateBloom.Enabled = radioButtonBloom.Checked; buttonBrowseBloom.Enabled = radioButtonBloom.Checked; textBoxFileName.Select(); textBoxFileName.Select(0, 0); }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_pwDatabase != null); if (m_pwDatabase == null) { throw new InvalidOperationException(); } Debug.Assert(m_pgStorage != null); if (m_pgStorage == null) { throw new InvalidOperationException(); } GlobalWindowManager.AddWindow(this); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, KeePass.Properties.Resources.B48x48_Wizard, KPRes.TanWizard, KPRes.TanWizardDesc); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.TanWizard; if ((m_pgStorage.Name != null) && (m_pgStorage.Name.Length > 0)) { m_lblToGroup.Text += ": " + m_pgStorage.Name + "."; } else { m_lblToGroup.Text += "."; } m_tbTanChars.Text = Program.Config.Defaults.TanCharacters; EnableControlsEx(); }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this, this); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_Keyboard_Layout, KPRes.SelectLanguage, KPRes.SelectLanguageDesc); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.SelectLanguage; int nWidth = m_lvLanguages.ClientRectangle.Width / 4; m_lvLanguages.Columns.Add(KPRes.AvailableLanguages, nWidth); m_lvLanguages.Columns.Add(KPRes.Version, nWidth); m_lvLanguages.Columns.Add(KPRes.Author, nWidth); m_lvLanguages.Columns.Add(KPRes.Contact, nWidth); ListViewItem lvi = m_lvLanguages.Items.Add("English", 0); lvi.SubItems.Add(PwDefs.VersionString); lvi.SubItems.Add(AppDefs.DefaultTrlAuthor); lvi.SubItems.Add(AppDefs.DefaultTrlContact); string strExe = WinUtil.GetExecutable(); string strPath = UrlUtil.GetFileDirectory(strExe, false); GetAvailableTranslations(strPath); }
private void doHeader() { this.Text = w_Title; m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, w_Icon.ToBitmap(), w_Title, w_Desc); }
private void HIBPOfflineCheckOptions_Load(object sender, EventArgs e) { this.Icon = AppIcons.Default; pb_BannerImage.Image = BannerFactory.CreateBanner(pb_BannerImage.Width, pb_BannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_KOrganizer, "HIBP Offline Check Options", "Manage plugin settings."); options = ext.LoadOptions(); textBoxFileName.Text = options.HIBPFileName; textBoxColumnName.Text = options.ColumnName; textBoxSecureText.Text = options.SecureText; textBoxInsecureText.Text = options.InsecureText; checkBoxBreachCountDetails.Checked = options.BreachCountDetails; checkBoxWarningDialog.Checked = options.WarningDialog; textBoxWarningDialog.Text = options.WarningDialogText; textBoxFileName.Select(); textBoxFileName.Select(0, 0); if (checkBoxWarningDialog.Checked == false) { textBoxWarningDialog.Enabled = false; } else { textBoxWarningDialog.Enabled = true; } }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this, this); m_lblCopyright.Text = PwDefs.Copyright + "."; string strTitle = PwDefs.ProductName; string strDesc = KPRes.Version + " " + PwDefs.VersionString; Icon icoNew = new Icon(Properties.Resources.KeePass, 48, 48); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, icoNew.ToBitmap(), strTitle, strDesc); this.Icon = Properties.Resources.KeePass; m_lvComponents.Columns.Add(KPRes.Components, 100, HorizontalAlignment.Left); m_lvComponents.Columns.Add(KPRes.Version, 100, HorizontalAlignment.Left); GetAppComponents(); int nWidth = m_lvComponents.ClientRectangle.Width / 2; int nMod = m_lvComponents.ClientRectangle.Width % 2; m_lvComponents.Columns[0].Width = nWidth; m_lvComponents.Columns[1].Width = nWidth + nMod; }
private void GeneratingForm_Load(object sender, EventArgs e) { string strTitle = "StrengthReport: Generating"; string strDesc = "Generating the report you requested"; Icon icoNew = new Icon(Resources.StrengthReportPrinting, 48, 48); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, icoNew.ToBitmap(), strTitle, strDesc); }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_KGPG_Sign, KPRes.CreateMasterKey, m_ioInfo.GetDisplayName()); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.CreateMasterKey; FontUtil.AssignDefaultBold(m_cbPassword); FontUtil.AssignDefaultBold(m_cbKeyFile); FontUtil.AssignDefaultBold(m_cbUserAccount); m_ttRect.SetToolTip(m_cbHidePassword, KPRes.TogglePasswordAsterisks); m_ttRect.SetToolTip(m_btnSaveKeyFile, KPRes.KeyFileCreate); m_ttRect.SetToolTip(m_btnOpenKeyFile, KPRes.KeyFileUseExisting); if (!m_bCreatingNew) { m_lblIntro.Text = KPRes.ChangeMasterKeyIntroShort; } m_secPassword.Attach(m_tbPassword, ProcessTextChangedPassword, true); m_secRepeat.Attach(m_tbRepeatPassword, null, true); m_cbHidePassword.Checked = true; m_cbPassword.Checked = true; ProcessTextChangedPassword(sender, e); // Update quality estimation m_cmbKeyFile.Items.Add(KPRes.NoKeyFileSpecifiedMeta); foreach (KeyProvider prov in Program.KeyProviderPool) { m_cmbKeyFile.Items.Add(prov.Name); } m_cmbKeyFile.SelectedIndex = 0; UIUtil.ApplyKeyUIFlags(Program.Config.UI.KeyCreationFlags, m_cbPassword, m_cbKeyFile, m_cbUserAccount, m_cbHidePassword); if (WinUtil.IsWindows9x || NativeLib.IsUnix()) { UIUtil.SetChecked(m_cbUserAccount, false); UIUtil.SetEnabled(m_cbUserAccount, false); UIUtil.SetEnabled(m_lblWindowsAccDesc, false); UIUtil.SetEnabled(m_lblWindowsAccDesc2, false); } CustomizeForScreenReader(); EnableUserControls(); }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_pwDatabase != null); if (m_pwDatabase == null) { throw new InvalidOperationException(); } GlobalWindowManager.AddWindow(this); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerFactory.BannerStyle.Default, Properties.Resources.B48x48_Folder_Download, KPRes.ImportFileTitle, KPRes.ImportFileDesc); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.ImportFileTitle; m_lvFormats.Columns.Add(string.Empty); m_lvFormats.ShowGroups = true; ImageList ilFormats = new ImageList(); ilFormats.ColorDepth = ColorDepth.Depth32Bit; ilFormats.ImageSize = new Size(16, 16); ListViewGroup lvg = new ListViewGroup(KPRes.General); m_lvFormats.Groups.Add(lvg); foreach (FormatImporter f in ImporterPool.Importers) { if (f.AppGroup != lvg.Header) { lvg = new ListViewGroup(f.AppGroup); m_lvFormats.Groups.Add(lvg); } ListViewItem lvi = new ListViewItem(f.DisplayName); lvi.Group = lvg; lvi.Tag = f; ilFormats.Images.Add(f.SmallIcon); lvi.ImageIndex = ilFormats.Images.Count - 1; m_lvFormats.Items.Add(lvi); } m_lvFormats.SmallImageList = ilFormats; m_lvFormats.Columns[0].Width = m_lvFormats.ClientRectangle.Width - 1; UpdateUIState(); }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_Binary, KPRes.EntropyTitle, KPRes.EntropyDesc); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.EntropyTitle; UpdateUIState(); }
private void CreateDialogBanner(BannerStyle bsStyle) { if (bsStyle == m_curBannerStyle) { return; } m_curBannerStyle = bsStyle; m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, bsStyle, Properties.Resources.B48x48_KCMSystem, KPRes.Options, KPRes.OptionsDesc); }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); string strTitle = (m_bSave ? KPRes.UrlSaveTitle : KPRes.UrlOpenTitle); string strDesc = (m_bSave ? KPRes.UrlSaveDesc : KPRes.UrlOpenDesc); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, KeePass.Properties.Resources.B48x48_WWW, strTitle, strDesc); this.Icon = Properties.Resources.KeePass; this.Text = strTitle; m_tbUrl.Text = (m_ioc.IsLocalFile() ? string.Empty : m_ioc.Path); m_tbUserName.Text = m_ioc.UserName; m_tbPassword.Text = m_ioc.Password; m_cmbCredSaveMode.Items.Add(KPRes.CredSaveNone); m_cmbCredSaveMode.Items.Add(KPRes.CredSaveUserOnly); m_cmbCredSaveMode.Items.Add(KPRes.CredSaveAll); if (m_ioc.CredSaveMode == IOCredSaveMode.UserNameOnly) { m_cmbCredSaveMode.SelectedIndex = 1; } else if (m_ioc.CredSaveMode == IOCredSaveMode.SaveCred) { m_cmbCredSaveMode.SelectedIndex = 2; } else { m_cmbCredSaveMode.SelectedIndex = 0; } if (m_bCanRememberCred == false) { m_cmbCredSaveMode.SelectedIndex = 0; m_cmbCredSaveMode.Enabled = false; } m_tbUrl.Focus(); // Give the user name field the focus, if URL is specified if (m_ioc.Path.Length > 0) { this.ActiveControl = m_tbUserName; m_tbUserName.Focus(); } }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_Folder_Download, KPRes.ImportBehavior, KPRes.ImportBehaviorDesc); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.ImportBehavior; m_radioCreateNew.Checked = true; }
private void RecreateResizableWindowControls() { string strTitle = KPRes.PickCharacters; if (m_uCharCount > 0) { strTitle += " (" + m_uCharCount.ToString() + ")"; } m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_KGPG_Key2, strTitle, KPRes.PickCharactersDesc); RemoveAllCharButtons(); string strWord = ((m_psWord != null) ? m_psWord.ReadString() : string.Empty); if (strWord.Length >= 1) { int x = 0; for (int i = 0; i < strWord.Length; ++i) { int w = ((m_pnlSelect.Width * (i + 1)) / strWord.Length) - x; Button btn = new Button(); btn.Location = new Point(x, 0); btn.Size = new Size(w, m_pnlSelect.Height / 2 - 1); btn.Font = m_fontChars; btn.Tag = strWord[i]; btn.Click += this.OnSelectCharacter; m_lButtons.Add(btn); m_pnlSelect.Controls.Add(btn); Label lbl = new Label(); lbl.Text = (i + 1).ToString(); lbl.TextAlign = ContentAlignment.MiddleCenter; lbl.Location = new Point(x, m_pnlSelect.Height / 2); lbl.Size = new Size(w + 1, m_pnlSelect.Height / 2 - 3); m_lLabels.Add(lbl); m_pnlSelect.Controls.Add(lbl); x += w; } } OnHideCharsCheckedChanged(null, EventArgs.Empty); }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_vStringDict != null); if (m_vStringDict == null) { throw new InvalidOperationException(); } GlobalWindowManager.AddWindow(this); m_ctxValue.Attach(m_richStringValue); string strTitle, strDesc; if (m_strStringName == null) { strTitle = KPRes.AddStringField; strDesc = KPRes.AddStringFieldDesc; } else { strTitle = KPRes.EditStringField; strDesc = KPRes.EditStringFieldDesc; } m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_Font, strTitle, strDesc); this.Icon = Properties.Resources.KeePass; m_clrNormalBackground = m_cmbStringName.BackColor; UIUtil.PrepareStandardMultilineControl(m_richStringValue); if (m_strStringName != null) { m_cmbStringName.Text = m_strStringName; } if (m_psStringValue != null) { m_richStringValue.Text = m_psStringValue.ReadString(); m_cbProtect.Checked = m_psStringValue.IsProtected; } ValidateStringName(); PopulateNamesComboBox(); m_cmbStringName.Focus(); }
public FormCredentialWizard(IPluginHost host) { this.successForm = new FormAuthorizationSuccess(host); InitializeComponent(); this.pictureBoxBanner.Image = BannerFactory.CreateBanner(this.pictureBoxBanner.Width, this.pictureBoxBanner.Height, BannerStyle.Default, Resource1.key_go, this.Text, "Select a service to go through the authentication process"); this.Icon = host.MainWindow.Icon; this.panelContainer.Controls.Add(this.selectionForm); }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_pgRoot != null); if (m_pgRoot == null) { throw new InvalidOperationException(); } GlobalWindowManager.AddWindow(this, this); string strTitle = KPRes.SearchTitle; if ((m_pgRoot != null) && (m_pgRoot.ParentGroup != null)) { strTitle += " - " + m_pgRoot.Name; } m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_XMag, strTitle, KPRes.SearchDesc); this.Icon = Properties.Resources.KeePass; SearchParameters sp = Program.Config.Defaults.SearchParameters; m_cbTitle.Checked = sp.SearchInTitles; m_cbUserName.Checked = sp.SearchInUserNames; m_cbURL.Checked = sp.SearchInUrls; m_cbPassword.Checked = sp.SearchInPasswords; m_cbNotes.Checked = sp.SearchInNotes; m_cbOtherFields.Checked = sp.SearchInOther; m_cbUuid.Checked = sp.SearchInUuids; m_cbGroupName.Checked = sp.SearchInGroupNames; m_cbTags.Checked = sp.SearchInTags; StringComparison sc = Program.Config.Defaults.SearchParameters.ComparisonMode; m_cbCaseSensitive.Checked = ((sc != StringComparison.CurrentCultureIgnoreCase) && (sc != StringComparison.InvariantCultureIgnoreCase) && (sc != StringComparison.OrdinalIgnoreCase)); m_cbRegEx.Checked = Program.Config.Defaults.SearchParameters.RegularExpression; m_cbExcludeExpired.Checked = Program.Config.Defaults.SearchParameters.ExcludeExpired; this.ActiveControl = m_tbSearch; m_tbSearch.Focus(); }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_strTitle.Length > 0); Debug.Assert(m_imgIcon != null); Debug.Assert(m_ilIcons != null); GlobalWindowManager.AddWindow(this); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, m_imgIcon, m_strTitle, m_strDescShort); m_lblText.Text = m_strDescLong; this.Text = m_strTitle; this.Icon = Properties.Resources.KeePass; if (m_ilIcons != null) { m_lvEntries.SmallImageList = m_ilIcons; } else { m_ilIcons = new ImageList(); } List <KeyValuePair <string, string> > vColumns = new List <KeyValuePair <string, string> >(); vColumns.Add(new KeyValuePair <string, string>(PwDefs.TitleField, KPRes.Title)); vColumns.Add(new KeyValuePair <string, string>(PwDefs.UserNameField, KPRes.UserName)); vColumns.Add(new KeyValuePair <string, string>(PwDefs.UrlField, KPRes.Url)); UIUtil.CreateEntryList(m_lvEntries, m_vEntries, vColumns, m_ilIcons); ProcessResize(); if (m_bEnsureForeground) { this.BringToFront(); this.Activate(); } EnableControlsEx(); }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_pwDatabase != null); if (m_pwDatabase == null) { throw new InvalidOperationException(); } GlobalWindowManager.AddWindow(this, this); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_Package_Settings, KPRes.DatabaseMaintenance, KPRes.DatabaseMaintenanceDesc); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.DatabaseMaintenance; m_numHistoryDays.Value = m_pwDatabase.MaintenanceHistoryDays; m_pbStatus.Visible = false; }
private void CreateDialogBanner() { string strTitle, strDesc; if (m_bPrintMode) { strTitle = KPRes.Print; strDesc = KPRes.PrintDesc; } else // HTML export mode { strTitle = KPRes.ExportHtml; strDesc = KPRes.ExportHtmlDesc; } m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_FilePrint, strTitle, strDesc); this.Text = strTitle; }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_View_Detailed, KPRes.ConfigureColumns, KPRes.ConfigureColumnsDesc); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.ConfigureColumns; int nWidth = (m_lvColumns.ClientRectangle.Width - UIUtil.GetVScrollBarWidth()) / 5; m_lvColumns.Columns.Add(KPRes.Column, nWidth * 3); m_lvColumns.Columns.Add(KPRes.Asterisks + " ***", nWidth); m_lvColumns.Columns.Add(KPRes.Toggle + " ***", nWidth); UIUtil.SetExplorerTheme(m_lvColumns.Handle); ThreadPool.QueueUserWorkItem(new WaitCallback(FillColumnsList)); EnableControlsEx(); }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); string strTitle = (m_bEditing ? KPRes.TriggerEdit : KPRes.TriggerAdd); string strDesc = (m_bEditing ? KPRes.TriggerEditDesc : KPRes.TriggerAddDesc); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_Run, strTitle, strDesc); this.Text = strTitle; this.Icon = Properties.Resources.KeePass; m_lvEvents.SmallImageList = m_ilIcons; m_lvConditions.SmallImageList = m_ilIcons; m_lvActions.SmallImageList = m_ilIcons; int nColWidth = ((m_lvEvents.ClientSize.Width - UIUtil.GetVScrollBarWidth()) / 2); m_lvEvents.Columns.Add(KPRes.Event, nColWidth); m_lvEvents.Columns.Add(string.Empty, nColWidth); m_lvConditions.Columns.Add(KPRes.Condition, nColWidth); m_lvConditions.Columns.Add(string.Empty, nColWidth); m_lvActions.Columns.Add(KPRes.Action, nColWidth); m_lvActions.Columns.Add(string.Empty, nColWidth); m_tbName.Text = m_trigger.Name; m_tbComments.Text = StrUtil.ToWindowsString(m_trigger.Comments); m_cbEnabled.Checked = m_trigger.Enabled; m_cbInitiallyOn.Checked = m_trigger.InitiallyOn; m_cbTurnOffAfterAction.Checked = m_trigger.TurnOffAfterAction; UpdateListsEx(false); EnableControlsEx(); this.ActiveControl = m_tbName; }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert((m_pwDatabaseInfo != null) || (m_pgRootInfo != null)); if ((m_pwDatabaseInfo == null) && (m_pgRootInfo == null)) { throw new InvalidOperationException(); } GlobalWindowManager.AddWindow(this); string strWndTitle = (m_bExport ? KPRes.ExportFileTitle : KPRes.ImportFileTitle); string strWndDesc = (m_bExport ? KPRes.ExportFileDesc : KPRes.ImportFileDesc); Bitmap bmpBanner = (m_bExport ? Properties.Resources.B48x48_Folder_Txt : Properties.Resources.B48x48_Folder_Download); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, bmpBanner, strWndTitle, strWndDesc); this.Icon = Properties.Resources.KeePass; this.Text = strWndTitle; if (m_bExport) { m_lblFile.Text = KPRes.ExportToPrompt; UIUtil.SetButtonImage(m_btnSelFile, Properties.Resources.B16x16_FileSaveAs, false); m_lnkFileFormats.Enabled = false; m_lnkFileFormats.Visible = false; } else // Import mode { m_lblFile.Text = KPRes.ImportFilesPrompt; UIUtil.SetButtonImage(m_btnSelFile, Properties.Resources.B16x16_Folder_Yellow_Open, false); } m_lvFormats.ShowGroups = true; m_lvFormats.Columns.Add(string.Empty); m_lvFormats.Columns[0].Width = m_lvFormats.ClientRectangle.Width - UIUtil.GetVScrollBarWidth() - 1; ImageList ilFormats = new ImageList(); ilFormats.ColorDepth = ColorDepth.Depth32Bit; ilFormats.ImageSize = new Size(16, 16); Dictionary <string, FormatGroupEx> dictGroups = new Dictionary <string, FormatGroupEx>(); foreach (FileFormatProvider f in Program.FileFormatPool) { if (m_bExport && (f.SupportsExport == false)) { continue; } if ((m_bExport == false) && (f.SupportsImport == false)) { continue; } string strDisplayName = f.DisplayName; if ((strDisplayName == null) || (strDisplayName.Length == 0)) { continue; } string strAppGroup = f.ApplicationGroup; if ((strAppGroup == null) || (strAppGroup.Length == 0)) { strAppGroup = KPRes.General; } FormatGroupEx grp; if (!dictGroups.TryGetValue(strAppGroup, out grp)) { grp = new FormatGroupEx(strAppGroup); dictGroups.Add(strAppGroup, grp); } ListViewItem lvi = new ListViewItem(strDisplayName); lvi.Group = grp.Group; lvi.Tag = f; Image imgSmallIcon = f.SmallIcon; if (imgSmallIcon == null) { imgSmallIcon = Properties.Resources.B16x16_Folder_Inbox; } ilFormats.Images.Add(imgSmallIcon); lvi.ImageIndex = ilFormats.Images.Count - 1; grp.Items.Add(lvi); } foreach (FormatGroupEx formatGroup in dictGroups.Values) { m_lvFormats.Groups.Add(formatGroup.Group); foreach (ListViewItem lvi in formatGroup.Items) { m_lvFormats.Items.Add(lvi); } } m_lvFormats.SmallImageList = ilFormats; CustomizeForScreenReader(); UpdateUIState(); }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_pwGroup != null); if (m_pwGroup == null) { throw new InvalidOperationException(); } Debug.Assert(m_pwDatabase != null); if (m_pwDatabase == null) { throw new InvalidOperationException(); } GlobalWindowManager.AddWindow(this); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_Folder_Txt, KPRes.EditGroup, KPRes.EditGroupDesc); this.Icon = Properties.Resources.KeePass; UIUtil.SetButtonImage(m_btnAutoTypeEdit, Properties.Resources.B16x16_Wizard, true); m_dtExpires.CustomFormat = DateTimeFormatInfo.CurrentInfo.ShortDatePattern + " " + DateTimeFormatInfo.CurrentInfo.LongTimePattern; m_pwIconIndex = m_pwGroup.IconId; m_pwCustomIconID = m_pwGroup.CustomIconUuid; m_tbName.Text = m_pwGroup.Name; m_tbNotes.Text = m_pwGroup.Notes; if (m_pwCustomIconID != PwUuid.Zero) { UIUtil.SetButtonImage(m_btnIcon, m_pwDatabase.GetCustomIcon( m_pwCustomIconID), true); } else { UIUtil.SetButtonImage(m_btnIcon, m_ilClientIcons.Images[ (int)m_pwIconIndex], true); } if (m_pwGroup.Expires) { m_dtExpires.Value = m_pwGroup.ExpiryTime; m_cbExpires.Checked = true; } else // Does not expire { m_dtExpires.Value = DateTime.Now; m_cbExpires.Checked = false; } UIUtil.MakeInheritableBoolComboBox(m_cmbEnableAutoType, m_pwGroup.EnableAutoType, m_pwGroup.GetAutoTypeEnabledInherited()); UIUtil.MakeInheritableBoolComboBox(m_cmbEnableSearching, m_pwGroup.EnableSearching, m_pwGroup.GetSearchingEnabledInherited()); m_tbDefaultAutoTypeSeq.Text = m_pwGroup.GetAutoTypeSequenceInherited(); if (m_pwGroup.DefaultAutoTypeSequence.Length == 0) { m_rbAutoTypeInherit.Checked = true; } else { m_rbAutoTypeOverride.Checked = true; } CustomizeForScreenReader(); EnableControlsEx(); }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); if (m_bRedirectActivation) { Program.MainForm.RedirectActivationPush(this); } m_bInitializing = true; string strBannerDesc = WinUtil.CompactPath(m_ioInfo.Path, 45); m_bannerImage.Image = BannerFactory.CreateBanner(m_bannerImage.Width, m_bannerImage.Height, BannerStyle.Default, Properties.Resources.B48x48_KGPG_Key2, KPRes.EnterCompositeKey, strBannerDesc); this.Icon = Properties.Resources.KeePass; FontUtil.AssignDefaultBold(m_cbPassword); FontUtil.AssignDefaultBold(m_cbKeyFile); FontUtil.AssignDefaultBold(m_cbUserAccount); m_ttRect.SetToolTip(m_cbHidePassword, KPRes.TogglePasswordAsterisks); m_ttRect.SetToolTip(m_btnOpenKeyFile, KPRes.KeyFileSelect); string strNameEx = UrlUtil.GetFileName(m_ioInfo.Path); if (strNameEx.Length > 0) { this.Text += " - " + strNameEx; } m_tbPassword.Text = string.Empty; m_secPassword.Attach(m_tbPassword, ProcessTextChangedPassword, true); m_cmbKeyFile.Items.Add(KPRes.NoKeyFileSpecifiedMeta); m_cmbKeyFile.SelectedIndex = 0; if ((Program.CommandLineArgs.FileName != null) && (m_ioInfo.Path == Program.CommandLineArgs.FileName)) { string str; str = Program.CommandLineArgs[AppDefs.CommandLineOptions.Password]; if (str != null) { m_cbPassword.Checked = true; m_tbPassword.Text = str; } str = Program.CommandLineArgs[AppDefs.CommandLineOptions.PasswordEncrypted]; if (str != null) { m_cbPassword.Checked = true; m_tbPassword.Text = StrUtil.DecryptString(str); } str = Program.CommandLineArgs[AppDefs.CommandLineOptions.KeyFile]; if (str != null) { m_cbKeyFile.Checked = true; m_cmbKeyFile.Items.Add(str); m_cmbKeyFile.SelectedIndex = m_cmbKeyFile.Items.Count - 1; } str = Program.CommandLineArgs[AppDefs.CommandLineOptions.PreSelect]; if (str != null) { m_cbKeyFile.Checked = true; m_cmbKeyFile.Items.Add(str); m_cmbKeyFile.SelectedIndex = m_cmbKeyFile.Items.Count - 1; } } m_cbHidePassword.Checked = true; OnCheckedHidePassword(sender, e); Debug.Assert(m_cmbKeyFile.Text.Length != 0); m_btnExit.Enabled = m_bCanExit; m_btnExit.Visible = m_bCanExit; UIUtil.ApplyKeyUIFlags(Program.Config.UI.KeyPromptFlags, m_cbPassword, m_cbKeyFile, m_cbUserAccount, m_cbHidePassword); if ((Program.Config.UI.KeyPromptFlags & (ulong)AceKeyUIFlags.DisableKeyFile) != 0) { UIUtil.SetEnabled(m_cmbKeyFile, m_cbKeyFile.Checked); UIUtil.SetEnabled(m_btnOpenKeyFile, m_cbKeyFile.Checked); } CustomizeForScreenReader(); EnableUserControls(); m_bInitializing = false; // Local, but thread will continue to run anyway Thread th = new Thread(new ThreadStart(this.AsyncFormLoad)); th.Start(); this.BringToFront(); this.Activate(); m_tbPassword.Focus(); }