private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); this.Icon = AppIcons.Default; this.Text = m_strTitle; m_nIconDim = m_tvFolders.ItemHeight; if (UIUtil.VistaStyleListsSupported) { UIUtil.SetExplorerTheme(m_tvFolders, true); UIUtil.SetExplorerTheme(m_lvFiles, true); } m_btnOK.Text = (m_bSaveMode ? KPRes.SaveCmd : KPRes.OpenCmd); Debug.Assert(!m_lblHint.AutoSize); // For RTL support m_lblHint.Text = m_strHint; if (UIUtil.ColorsEqual(m_lblHint.ForeColor, Color.Black)) { m_lblHint.ForeColor = Color.FromArgb(96, 96, 96); } int nWidth = m_lvFiles.ClientSize.Width - UIUtil.GetVScrollBarWidth(); m_lvFiles.Columns.Add(KPRes.Name, (nWidth * 3) / 4); m_lvFiles.Columns.Add(KPRes.Size, nWidth / 4, HorizontalAlignment.Right); InitialPopulateFolders(); string strWorkDir = Program.Config.Application.GetWorkingDirectory(m_strContext); if (string.IsNullOrEmpty(strWorkDir)) { strWorkDir = WinUtil.GetHomeDirectory(); } BrowseToFolder(strWorkDir); EnableControlsEx(); }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); this.Text = KPRes.Condition; this.Icon = AppIcons.Default; Debug.Assert(!m_lblParamHint.AutoSize); // For RTL support m_lblParamHint.Text = KPRes.ParamDescHelp; foreach (EcasConditionProvider cp in Program.EcasPool.ConditionProviders) { foreach (EcasConditionType t in cp.Conditions) { m_cmbConditions.Items.Add(t.Name); } } UpdateDataEx(m_condition, false, EcasTypeDxMode.Selection); m_cbNegate.Checked = m_condition.Negate; }
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_cbCacheDeleteOld.Checked = Program.Config.Application.Start.PluginCacheDeleteOld; 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_lblCacheSize.Text += " " + StrUtil.FormatDataSize( PlgxCache.GetUsedCacheSize()) + "."; m_lvPlugins.SmallImageList = m_ilIcons; UpdatePluginsList(); if (m_lvPlugins.Items.Count > 0) { m_lvPlugins.Items[0].Selected = true; m_lvPlugins.Focus(); } UpdatePluginDescription(); }
public QuickUnlockPromptForm() { InitializeComponent(); m_bInitializing = true; GlobalWindowManager.AddWindow(this); string strTitle = KeePassQuickUnlockExt.ShortProductName; string strDesc = "Unlock using QuickUnlock."; Text = strTitle; BannerFactory.CreateBannerEx(this, bannerImagePictureBox, Properties.Resources.B48x48_TimeLock, strTitle, strDesc); hideKeyCheckBox.Checked = true; keyTextBox.Text = string.Empty; OnCheckedHideKey(null, null); m_bInitializing = false; }
private void OnFormLoad(object sender, EventArgs e) { if (m_aceOvr == null) { throw new InvalidOperationException(); } m_aceTmp = m_aceOvr.CloneDeep(); GlobalWindowManager.AddWindow(this); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.UrlSchemeOverrides; UIUtil.SetExplorerTheme(m_lvOverrides, false); int nWidth = (m_lvOverrides.ClientSize.Width - UIUtil.GetVScrollBarWidth()) / 4; m_lvOverrides.Columns.Add(KPRes.Scheme, nWidth); m_lvOverrides.Columns.Add(KPRes.UrlOverride, nWidth * 3); UpdateOverridesList(); }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_psWord != null); if (m_psWord == null) { throw new InvalidOperationException(); } GlobalWindowManager.AddWindow(this); m_nFormHeight = this.Height; m_fontChars = new Font("Tahoma", 8.25f, FontStyle.Bold); this.Icon = Properties.Resources.KeePass; this.Text = KPRes.PickCharacters; m_secWord.Attach(m_tbSelected, OnSelectedTextChangedEx, true); AceColumn colPw = Program.Config.MainWindow.FindColumn(AceColumnType.Password); bool bHide = ((colPw != null) ? colPw.HideWithAsterisks : true); bHide |= !AppPolicy.Current.UnhidePasswords; m_cbHideChars.Checked = bHide; RecreateResizableWindowControls(); if (m_uCharCount > 0) { m_btnOK.Enabled = false; // m_btnOK.Visible = false; } if (m_bSetForeground) { this.BringToFront(); this.Activate(); } }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); Icon = PluginResources.Icon_OneDrive_16x16; UpdateBanner(); m_isInit = true; m_ilFiletypeIcons.Images.Add(PluginResources.Folder_16x16); foreach (var descriptor in StorageRegistry.Descriptors) { m_ilProviderIcons.Images.Add(descriptor.Type.ToString(), descriptor.SmallImage); } m_cbFilter.Items.Add("KeePass KDBX Files (*.kdbx)"); m_cbFilter.Items.Add("All Files (*.*)"); m_cbFilter.SelectedIndex = 0; m_lvDetails.Columns.Add("Name"); m_lvDetails.Columns.Add("Id"); m_lvDetails.Columns.Add("Type"); m_lvDetails.Columns.Add("Changed Date"); UIUtil.ResizeColumns(m_lvDetails, new int[] { 4, 1, 1, 1 }, true); m_isInit = false; UpdateAccountsCombobox(); SelectInitialAccount(); }
private void OnFormLoad(object sender, EventArgs e) { if (_yandexDiscConf == null) { throw new InvalidOperationException(); } GlobalWindowManager.AddWindow(this); string strTitle = "Configure Yandex Disc Sync"; string strDesc = "Sync database with Yandex Disc"; this.Text = strTitle; BannerFactory.CreateBannerEx(this, pb_Image1, Resources.YandexDiscSync.B48x48_YandexDisc, strTitle, strDesc); tb_Username.Text = _yandexDiscConf.Username; tb_Password.PasswordChar = '•'; if (!string.IsNullOrEmpty(_yandexDiscConf.Password?.ReadString())) { tb_Password.Text = NO_PASSWORD; } tb_Location.Text = _yandexDiscConf.Location; cb_AutoSync.Enabled = true; cb_AutoSync.Items.Clear(); foreach (var value in Enum.GetValues(typeof(AutoSyncMode))) { cb_AutoSync.Items.Add(value); } cb_AutoSync.SelectedIndex = Enum.GetValues(typeof(AutoSyncMode)) .Cast <AutoSyncMode>().ToList() .IndexOf(_yandexDiscConf.AutoSyncMode); EnableControlsEx(); }
public QuickUnlockPromptForm(bool isOnSecureDesktop) { InitializeComponent(); initializing = true; GlobalWindowManager.AddWindow(this); Text = KeePassQuickUnlockExt.ShortProductName; BannerFactory.CreateBannerEx(this, bannerImagePictureBox, Properties.Resources.B48x48_TimeLock, KeePassQuickUnlockExt.ShortProductName, "Unlock using QuickUnlock."); hideKeyCheckBox.Checked = true; keyTextBox.Text = string.Empty; secureEdit.SecureDesktopMode = isOnSecureDesktop; secureEdit.Attach(keyTextBox, null, true); hideKeyCheckBox.Checked = true; OnCheckedHideKey(null, null); initializing = false; }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); this.Text = IopDefs.ProductName + " Options"; AceCustomConfig cfg = IOProtocolExtExt.Host.CustomConfig; ulong uTimeout = cfg.GetULong(IopDefs.OptTimeout, 0); m_cbTimeout.Checked = (uTimeout > 0); if (uTimeout > 0) { try { m_numTimeout.Value = uTimeout; } catch (Exception) { Debug.Assert(false); } } m_cbFtpsImplicit.Checked = cfg.GetBool(IopDefs.OptFtpsImplicit, false); m_cbFtpsExplicitSsl.Checked = cfg.GetBool(IopDefs.OptFtpsExplicitSsl, false); m_cbFtpsExplicitTls.Checked = cfg.GetBool(IopDefs.OptFtpsExplicitTls, false); EnableControlsEx(); }
private void OnFormLoad(object sender, EventArgs e) { GlobalWindowManager.AddWindow(this); //this.Icon = Properties.Resources.KeePass; this.Text = KPRes.CreateMasterKey; //m_ttRect.SetToolTip(m_cbHidePassword, KPRes.TogglePasswordAsterisks); 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; ProcessTextChangedPassword(sender, e); // Update quality estimation CustomizeForScreenReader(); EnableUserControls(); }
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); BannerFactory.CreateBannerEx(this, m_bannerImage, Properties.Resources.B48x48_Run, strTitle, strDesc); this.Text = strTitle; this.Icon = AppIcons.Default; m_lvEvents.SmallImageList = m_ilIcons; m_lvConditions.SmallImageList = m_ilIcons; m_lvActions.SmallImageList = m_ilIcons; Debug.Assert((m_lvEvents.Width == m_lvConditions.Width) && (m_lvEvents.Width == m_lvActions.Width)); 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; UIUtil.SetMultilineText(m_tbComments, m_trigger.Comments); m_cbEnabled.Checked = m_trigger.Enabled; m_cbInitiallyOn.Checked = m_trigger.InitiallyOn; m_cbTurnOffAfterAction.Checked = m_trigger.TurnOffAfterAction; UpdateListsEx(false); EnableControlsEx(); UIUtil.SetFocus(m_tbName, this); }
private void OnFormLoad(object sender, EventArgs e) { if (m_triggers == null) { Debug.Assert(false); return; } GlobalWindowManager.AddWindow(this); BannerFactory.CreateBannerEx(this, m_bannerImage, Properties.Resources.B48x48_Make_KDevelop, KPRes.Triggers, KPRes.TriggersDesc); this.Text = KPRes.Triggers; this.Icon = AppIcons.Default; 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); EcasTriggerSystem ts = Program.TriggerSystem; EcasTriggerSystem tsCfg = Program.Config.Application.TriggerSystem; if (object.ReferenceEquals(m_triggersInOut, ts) && AppConfigEx.IsOptionEnforced(tsCfg, "Enabled")) { m_cbEnableTriggers.Enabled = false; } UIUtil.AccSetName(m_btnMoveUp, KPRes.MoveUp); UIUtil.AccSetName(m_btnMoveDown, KPRes.MoveDown); }
private void OnFormLoad(object sender, EventArgs e) { Debug.Assert(m_pwDatabase != null); if (m_pwDatabase == null) { throw new InvalidOperationException(); } GlobalWindowManager.AddWindow(this, this); BannerFactory.CreateBannerEx(this, m_bannerImage, Properties.Resources.B48x48_Package_Settings, KPRes.DatabaseMaintenance, KPRes.DatabaseMaintenanceDesc); this.Icon = AppIcons.Default; this.Text = KPRes.DatabaseMaintenance; m_numHistoryDays.Value = m_pwDatabase.MaintenanceHistoryDays; m_sdCustomData = m_pwDatabase.CustomData.CloneDeep(); UIUtil.StrDictListInit(m_lvCustomData); UIUtil.StrDictListUpdate(m_lvCustomData, m_sdCustomData); m_pbStatus.Visible = false; EnableControlsEx(); }
private void OnFormLoad(object sender, EventArgs e) { // Can be invoked by tray command; don't use CenterParent Debug.Assert(this.StartPosition == FormStartPosition.CenterScreen); GlobalWindowManager.AddWindow(this); BannerFactory.CreateBannerEx(this, m_bannerImage, Properties.Resources.B48x48_Binary, KPRes.EntropyTitle, KPRes.EntropyDesc); this.Icon = AppIcons.Default; this.Text = KPRes.EntropyTitle; m_bmpRandom = CreateRandomBitmap(m_picRandom.ClientSize); m_picRandom.Image = m_bmpRandom; m_h = new SHA256Managed(); byte[] pb = Guid.NewGuid().ToByteArray(); m_h.TransformBlock(pb, 0, pb.Length, pb, 0); UpdateUIState(); UIUtil.SetFocus(m_tbEdit, this); }
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; }