diff --git a/AutoTypeSearch/AutoTypeSearch.csproj b/AutoTypeSearch/AutoTypeSearch.csproj index c55c5b8..786cffd 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -1,4 +1,4 @@ - + @@ -44,7 +44,8 @@ - + + False ..\keepass_portable\KeePass.exe @@ -82,6 +83,9 @@ SearchWindow.cs + + Component + @@ -108,6 +112,9 @@ + + + IF $(ConfigurationName) == Release "$(ProjectDir)..\CreatePlgX.bat" diff --git a/AutoTypeSearch/AutoTypeSearch.csproj b/AutoTypeSearch/AutoTypeSearch.csproj index c55c5b8..786cffd 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -1,4 +1,4 @@ - + @@ -44,7 +44,8 @@ - + + False ..\keepass_portable\KeePass.exe @@ -82,6 +83,9 @@ SearchWindow.cs + + Component + @@ -108,6 +112,9 @@ + + + IF $(ConfigurationName) == Release "$(ProjectDir)..\CreatePlgX.bat" diff --git a/AutoTypeSearch/Delete.png b/AutoTypeSearch/Delete.png new file mode 100644 index 0000000..9d61fb8 --- /dev/null +++ b/AutoTypeSearch/Delete.png Binary files differ diff --git a/AutoTypeSearch/AutoTypeSearch.csproj b/AutoTypeSearch/AutoTypeSearch.csproj index c55c5b8..786cffd 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -1,4 +1,4 @@ - + @@ -44,7 +44,8 @@ - + + False ..\keepass_portable\KeePass.exe @@ -82,6 +83,9 @@ SearchWindow.cs + + Component + @@ -108,6 +112,9 @@ + + + IF $(ConfigurationName) == Release "$(ProjectDir)..\CreatePlgX.bat" diff --git a/AutoTypeSearch/Delete.png b/AutoTypeSearch/Delete.png new file mode 100644 index 0000000..9d61fb8 --- /dev/null +++ b/AutoTypeSearch/Delete.png Binary files differ diff --git a/AutoTypeSearch/Options.Designer.cs b/AutoTypeSearch/Options.Designer.cs index 4886b6d..305d8e4 100755 --- a/AutoTypeSearch/Options.Designer.cs +++ b/AutoTypeSearch/Options.Designer.cs @@ -1,4 +1,4 @@ -using KeePass.UI; +using KeePass.UI; namespace AutoTypeSearch { @@ -30,295 +30,427 @@ /// private void InitializeComponent() { - System.Windows.Forms.GroupBox searchOptionsGroup; - System.Windows.Forms.GroupBox searchInGroup; - System.Windows.Forms.GroupBox actionsGroup; - System.Windows.Forms.Label alternativeActionLabel; - System.Windows.Forms.Label defaultActionLabel; - this.mResolveReferences = new System.Windows.Forms.CheckBox(); - this.mExcludeExpired = new System.Windows.Forms.CheckBox(); - this.mCaseSensitive = new System.Windows.Forms.CheckBox(); - this.mSearchInTags = new System.Windows.Forms.CheckBox(); - this.mSearchInOtherFields = new System.Windows.Forms.CheckBox(); - this.mSearchInNotes = new System.Windows.Forms.CheckBox(); - this.mSearchInUrl = new System.Windows.Forms.CheckBox(); - this.mSearchInUserName = new System.Windows.Forms.CheckBox(); - this.mSearchInTitle = new System.Windows.Forms.CheckBox(); - this.mAlternativeAction = new System.Windows.Forms.ComboBox(); - this.mDefaultAction = new System.Windows.Forms.ComboBox(); - this.mShowHotKeyControl = new KeePass.UI.HotKeyControlEx(); - this.mShowSearchGroup = new System.Windows.Forms.GroupBox(); - this.mShowOnHotKey = new System.Windows.Forms.CheckBox(); - this.mShowOnIPC = new System.Windows.Forms.CheckBox(); - this.mShowOnFailedSearch = new System.Windows.Forms.CheckBox(); - searchOptionsGroup = new System.Windows.Forms.GroupBox(); - searchInGroup = new System.Windows.Forms.GroupBox(); - actionsGroup = new System.Windows.Forms.GroupBox(); - alternativeActionLabel = new System.Windows.Forms.Label(); - defaultActionLabel = new System.Windows.Forms.Label(); - searchOptionsGroup.SuspendLayout(); - searchInGroup.SuspendLayout(); - actionsGroup.SuspendLayout(); - this.mShowSearchGroup.SuspendLayout(); - this.SuspendLayout(); - // - // searchOptionsGroup - // - searchOptionsGroup.Controls.Add(this.mResolveReferences); - searchOptionsGroup.Controls.Add(this.mExcludeExpired); - searchOptionsGroup.Controls.Add(this.mCaseSensitive); - searchOptionsGroup.Location = new System.Drawing.Point(6, 189); - searchOptionsGroup.Name = "searchOptionsGroup"; - searchOptionsGroup.Size = new System.Drawing.Size(540, 45); - searchOptionsGroup.TabIndex = 2; - searchOptionsGroup.TabStop = false; - searchOptionsGroup.Text = "Search options"; - // - // mResolveReferences - // - this.mResolveReferences.AutoSize = true; - this.mResolveReferences.Location = new System.Drawing.Point(251, 20); - this.mResolveReferences.Name = "mResolveReferences"; - this.mResolveReferences.Size = new System.Drawing.Size(170, 17); - this.mResolveReferences.TabIndex = 2; - this.mResolveReferences.Text = "Resolve fiel&d references (slow)"; - this.mResolveReferences.UseVisualStyleBackColor = true; - // - // mExcludeExpired - // - this.mExcludeExpired.AutoSize = true; - this.mExcludeExpired.Location = new System.Drawing.Point(108, 20); - this.mExcludeExpired.Name = "mExcludeExpired"; - this.mExcludeExpired.Size = new System.Drawing.Size(135, 17); - this.mExcludeExpired.TabIndex = 1; - this.mExcludeExpired.Text = "Exclude &expired entries"; - this.mExcludeExpired.UseVisualStyleBackColor = true; - // - // mCaseSensitive - // - this.mCaseSensitive.AutoSize = true; - this.mCaseSensitive.Location = new System.Drawing.Point(10, 20); - this.mCaseSensitive.Name = "mCaseSensitive"; - this.mCaseSensitive.Size = new System.Drawing.Size(94, 17); - this.mCaseSensitive.TabIndex = 0; - this.mCaseSensitive.Text = "Case-sensiti&ve"; - this.mCaseSensitive.UseVisualStyleBackColor = true; - // - // searchInGroup - // - searchInGroup.Controls.Add(this.mSearchInTags); - searchInGroup.Controls.Add(this.mSearchInOtherFields); - searchInGroup.Controls.Add(this.mSearchInNotes); - searchInGroup.Controls.Add(this.mSearchInUrl); - searchInGroup.Controls.Add(this.mSearchInUserName); - searchInGroup.Controls.Add(this.mSearchInTitle); - searchInGroup.Location = new System.Drawing.Point(6, 136); - searchInGroup.Name = "searchInGroup"; - searchInGroup.Size = new System.Drawing.Size(540, 47); - searchInGroup.TabIndex = 1; - searchInGroup.TabStop = false; - searchInGroup.Text = "Search in"; - // - // mSearchInTags - // - this.mSearchInTags.AutoSize = true; - this.mSearchInTags.Location = new System.Drawing.Point(258, 19); - this.mSearchInTags.Name = "mSearchInTags"; - this.mSearchInTags.Size = new System.Drawing.Size(50, 17); - this.mSearchInTags.TabIndex = 4; - this.mSearchInTags.Text = "Ta&gs"; - this.mSearchInTags.UseVisualStyleBackColor = true; - // - // mSearchInOtherFields - // - this.mSearchInOtherFields.AutoSize = true; - this.mSearchInOtherFields.Location = new System.Drawing.Point(314, 19); - this.mSearchInOtherFields.Name = "mSearchInOtherFields"; - this.mSearchInOtherFields.Size = new System.Drawing.Size(139, 17); - this.mSearchInOtherFields.TabIndex = 5; - this.mSearchInOtherFields.Text = "&Other unprotected fields"; - this.mSearchInOtherFields.UseVisualStyleBackColor = true; - // - // mSearchInNotes - // - this.mSearchInNotes.AutoSize = true; - this.mSearchInNotes.Location = new System.Drawing.Point(198, 19); - this.mSearchInNotes.Name = "mSearchInNotes"; - this.mSearchInNotes.Size = new System.Drawing.Size(54, 17); - this.mSearchInNotes.TabIndex = 3; - this.mSearchInNotes.Text = "Note&s"; - this.mSearchInNotes.UseVisualStyleBackColor = true; - // - // mSearchInUrl - // - this.mSearchInUrl.AutoSize = true; - this.mSearchInUrl.Location = new System.Drawing.Point(144, 19); - this.mSearchInUrl.Name = "mSearchInUrl"; - this.mSearchInUrl.Size = new System.Drawing.Size(48, 17); - this.mSearchInUrl.TabIndex = 2; - this.mSearchInUrl.Text = "&URL"; - this.mSearchInUrl.UseVisualStyleBackColor = true; - // - // mSearchInUserName - // - this.mSearchInUserName.AutoSize = true; - this.mSearchInUserName.Location = new System.Drawing.Point(61, 19); - this.mSearchInUserName.Name = "mSearchInUserName"; - this.mSearchInUserName.Size = new System.Drawing.Size(77, 17); - this.mSearchInUserName.TabIndex = 1; - this.mSearchInUserName.Text = "User &name"; - this.mSearchInUserName.UseVisualStyleBackColor = true; - // - // mSearchInTitle - // - this.mSearchInTitle.AutoSize = true; - this.mSearchInTitle.Location = new System.Drawing.Point(9, 19); - this.mSearchInTitle.Name = "mSearchInTitle"; - this.mSearchInTitle.Size = new System.Drawing.Size(46, 17); - this.mSearchInTitle.TabIndex = 0; - this.mSearchInTitle.Text = "&Title"; - this.mSearchInTitle.UseVisualStyleBackColor = true; - // - // actionsGroup - // - actionsGroup.Controls.Add(this.mAlternativeAction); - actionsGroup.Controls.Add(this.mDefaultAction); - actionsGroup.Controls.Add(alternativeActionLabel); - actionsGroup.Controls.Add(defaultActionLabel); - actionsGroup.Location = new System.Drawing.Point(6, 241); - actionsGroup.Name = "actionsGroup"; - actionsGroup.Size = new System.Drawing.Size(540, 67); - actionsGroup.TabIndex = 3; - actionsGroup.TabStop = false; - actionsGroup.Text = "Actions"; - // - // mAlternativeAction - // - this.mAlternativeAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.mAlternativeAction.Location = new System.Drawing.Point(288, 37); - this.mAlternativeAction.Name = "mAlternativeAction"; - this.mAlternativeAction.Size = new System.Drawing.Size(240, 21); - this.mAlternativeAction.TabIndex = 3; - // - // mDefaultAction - // - this.mDefaultAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.mDefaultAction.Location = new System.Drawing.Point(11, 37); - this.mDefaultAction.Name = "mDefaultAction"; - this.mDefaultAction.Size = new System.Drawing.Size(240, 21); - this.mDefaultAction.TabIndex = 1; - // - // alternativeActionLabel - // - alternativeActionLabel.AutoSize = true; - alternativeActionLabel.Location = new System.Drawing.Point(285, 20); - alternativeActionLabel.Name = "alternativeActionLabel"; - alternativeActionLabel.Size = new System.Drawing.Size(159, 13); - alternativeActionLabel.TabIndex = 2; - alternativeActionLabel.Text = "A<ernative action (Shift + Enter):"; - // - // defaultActionLabel - // - defaultActionLabel.AutoSize = true; - defaultActionLabel.Location = new System.Drawing.Point(8, 20); - defaultActionLabel.Name = "defaultActionLabel"; - defaultActionLabel.Size = new System.Drawing.Size(110, 13); - defaultActionLabel.TabIndex = 0; - defaultActionLabel.Text = "De&fault action (Enter):"; - // - // mShowHotKeyControl - // - this.mShowHotKeyControl.Location = new System.Drawing.Point(30, 65); - this.mShowHotKeyControl.Name = "mShowHotKeyControl"; - this.mShowHotKeyControl.Size = new System.Drawing.Size(123, 20); - this.mShowHotKeyControl.TabIndex = 2; - // - // mShowSearchGroup - // - this.mShowSearchGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + System.Windows.Forms.GroupBox searchInGroup; + System.Windows.Forms.GroupBox actionsGroup; + System.Windows.Forms.Label alternativeActionLabel; + System.Windows.Forms.Label defaultActionLabel; + System.Windows.Forms.GroupBox searchOptionsGroup; + this.mSearchInTags = new System.Windows.Forms.CheckBox(); + this.mSearchInOtherFields = new System.Windows.Forms.CheckBox(); + this.mSearchInNotes = new System.Windows.Forms.CheckBox(); + this.mSearchInUrl = new System.Windows.Forms.CheckBox(); + this.mSearchInUserName = new System.Windows.Forms.CheckBox(); + this.mSearchInTitle = new System.Windows.Forms.CheckBox(); + this.mAlternativeAction = new System.Windows.Forms.ComboBox(); + this.mDefaultAction = new System.Windows.Forms.ComboBox(); + this.mResolveReferences = new System.Windows.Forms.CheckBox(); + this.mExcludeExpired = new System.Windows.Forms.CheckBox(); + this.mCaseSensitive = new System.Windows.Forms.CheckBox(); + this.mPanel = new System.Windows.Forms.Panel(); + this.mShowSearchGroup = new System.Windows.Forms.GroupBox(); + this.mShowOnHotKey = new System.Windows.Forms.CheckBox(); + this.mShowHotKeyControl = new KeePass.UI.HotKeyControlEx(); + this.mShowOnIPC = new System.Windows.Forms.CheckBox(); + this.mShowOnFailedSearch = new System.Windows.Forms.CheckBox(); + this.mCustomSequences = new System.Windows.Forms.GroupBox(); + this.mAdditionalSequenceDelete = new System.Windows.Forms.Button(); + this.mAdditionalSequenceEdit = new System.Windows.Forms.TextBox(); + this.mAdditionalSequences = new System.Windows.Forms.ListBox(); + this.mAdditionalSequencesTitle = new System.Windows.Forms.Label(); + this.mAllowCustomSequences = new System.Windows.Forms.CheckBox(); + searchInGroup = new System.Windows.Forms.GroupBox(); + actionsGroup = new System.Windows.Forms.GroupBox(); + alternativeActionLabel = new System.Windows.Forms.Label(); + defaultActionLabel = new System.Windows.Forms.Label(); + searchOptionsGroup = new System.Windows.Forms.GroupBox(); + searchInGroup.SuspendLayout(); + actionsGroup.SuspendLayout(); + searchOptionsGroup.SuspendLayout(); + this.mPanel.SuspendLayout(); + this.mShowSearchGroup.SuspendLayout(); + this.mCustomSequences.SuspendLayout(); + this.SuspendLayout(); + // + // searchInGroup + // + searchInGroup.Controls.Add(this.mSearchInTags); + searchInGroup.Controls.Add(this.mSearchInOtherFields); + searchInGroup.Controls.Add(this.mSearchInNotes); + searchInGroup.Controls.Add(this.mSearchInUrl); + searchInGroup.Controls.Add(this.mSearchInUserName); + searchInGroup.Controls.Add(this.mSearchInTitle); + searchInGroup.Location = new System.Drawing.Point(5, 245); + searchInGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + searchInGroup.Name = "searchInGroup"; + searchInGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + searchInGroup.Size = new System.Drawing.Size(1019, 90); + searchInGroup.TabIndex = 1; + searchInGroup.TabStop = false; + searchInGroup.Text = "Search in"; + // + // mSearchInTags + // + this.mSearchInTags.AutoSize = true; + this.mSearchInTags.Location = new System.Drawing.Point(516, 36); + this.mSearchInTags.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInTags.Name = "mSearchInTags"; + this.mSearchInTags.Size = new System.Drawing.Size(92, 29); + this.mSearchInTags.TabIndex = 4; + this.mSearchInTags.Text = "Ta&gs"; + this.mSearchInTags.UseVisualStyleBackColor = true; + // + // mSearchInOtherFields + // + this.mSearchInOtherFields.AutoSize = true; + this.mSearchInOtherFields.Location = new System.Drawing.Point(628, 36); + this.mSearchInOtherFields.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInOtherFields.Name = "mSearchInOtherFields"; + this.mSearchInOtherFields.Size = new System.Drawing.Size(274, 29); + this.mSearchInOtherFields.TabIndex = 5; + this.mSearchInOtherFields.Text = "&Other unprotected fields"; + this.mSearchInOtherFields.UseVisualStyleBackColor = true; + // + // mSearchInNotes + // + this.mSearchInNotes.AutoSize = true; + this.mSearchInNotes.Location = new System.Drawing.Point(396, 36); + this.mSearchInNotes.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInNotes.Name = "mSearchInNotes"; + this.mSearchInNotes.Size = new System.Drawing.Size(100, 29); + this.mSearchInNotes.TabIndex = 3; + this.mSearchInNotes.Text = "Note&s"; + this.mSearchInNotes.UseVisualStyleBackColor = true; + // + // mSearchInUrl + // + this.mSearchInUrl.AutoSize = true; + this.mSearchInUrl.Location = new System.Drawing.Point(288, 36); + this.mSearchInUrl.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInUrl.Name = "mSearchInUrl"; + this.mSearchInUrl.Size = new System.Drawing.Size(86, 29); + this.mSearchInUrl.TabIndex = 2; + this.mSearchInUrl.Text = "&URL"; + this.mSearchInUrl.UseVisualStyleBackColor = true; + // + // mSearchInUserName + // + this.mSearchInUserName.AutoSize = true; + this.mSearchInUserName.Location = new System.Drawing.Point(123, 36); + this.mSearchInUserName.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInUserName.Name = "mSearchInUserName"; + this.mSearchInUserName.Size = new System.Drawing.Size(148, 29); + this.mSearchInUserName.TabIndex = 1; + this.mSearchInUserName.Text = "User &name"; + this.mSearchInUserName.UseVisualStyleBackColor = true; + // + // mSearchInTitle + // + this.mSearchInTitle.AutoSize = true; + this.mSearchInTitle.Location = new System.Drawing.Point(19, 36); + this.mSearchInTitle.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInTitle.Name = "mSearchInTitle"; + this.mSearchInTitle.Size = new System.Drawing.Size(85, 29); + this.mSearchInTitle.TabIndex = 0; + this.mSearchInTitle.Text = "&Title"; + this.mSearchInTitle.UseVisualStyleBackColor = true; + // + // actionsGroup + // + actionsGroup.Controls.Add(this.mAlternativeAction); + actionsGroup.Controls.Add(this.mDefaultAction); + actionsGroup.Controls.Add(alternativeActionLabel); + actionsGroup.Controls.Add(defaultActionLabel); + actionsGroup.Location = new System.Drawing.Point(5, 446); + actionsGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + actionsGroup.Name = "actionsGroup"; + actionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + actionsGroup.Size = new System.Drawing.Size(1019, 129); + actionsGroup.TabIndex = 3; + actionsGroup.TabStop = false; + actionsGroup.Text = "Actions"; + // + // mAlternativeAction + // + this.mAlternativeAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.mAlternativeAction.Location = new System.Drawing.Point(523, 71); + this.mAlternativeAction.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mAlternativeAction.Name = "mAlternativeAction"; + this.mAlternativeAction.Size = new System.Drawing.Size(476, 33); + this.mAlternativeAction.TabIndex = 3; + // + // mDefaultAction + // + this.mDefaultAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.mDefaultAction.Location = new System.Drawing.Point(21, 71); + this.mDefaultAction.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mDefaultAction.Name = "mDefaultAction"; + this.mDefaultAction.Size = new System.Drawing.Size(476, 33); + this.mDefaultAction.TabIndex = 1; + // + // alternativeActionLabel + // + alternativeActionLabel.AutoSize = true; + alternativeActionLabel.Location = new System.Drawing.Point(517, 39); + alternativeActionLabel.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + alternativeActionLabel.Name = "alternativeActionLabel"; + alternativeActionLabel.Size = new System.Drawing.Size(322, 25); + alternativeActionLabel.TabIndex = 2; + alternativeActionLabel.Text = "A<ernative action (Shift + Enter):"; + // + // defaultActionLabel + // + defaultActionLabel.AutoSize = true; + defaultActionLabel.Location = new System.Drawing.Point(16, 39); + defaultActionLabel.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + defaultActionLabel.Name = "defaultActionLabel"; + defaultActionLabel.Size = new System.Drawing.Size(221, 25); + defaultActionLabel.TabIndex = 0; + defaultActionLabel.Text = "De&fault action (Enter):"; + // + // searchOptionsGroup + // + searchOptionsGroup.Controls.Add(this.mResolveReferences); + searchOptionsGroup.Controls.Add(this.mExcludeExpired); + searchOptionsGroup.Controls.Add(this.mCaseSensitive); + searchOptionsGroup.Location = new System.Drawing.Point(5, 348); + searchOptionsGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + searchOptionsGroup.Name = "searchOptionsGroup"; + searchOptionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + searchOptionsGroup.Size = new System.Drawing.Size(1019, 86); + searchOptionsGroup.TabIndex = 2; + searchOptionsGroup.TabStop = false; + searchOptionsGroup.Text = "Search options"; + // + // mResolveReferences + // + this.mResolveReferences.AutoSize = true; + this.mResolveReferences.Location = new System.Drawing.Point(501, 39); + this.mResolveReferences.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mResolveReferences.Name = "mResolveReferences"; + this.mResolveReferences.Size = new System.Drawing.Size(339, 29); + this.mResolveReferences.TabIndex = 2; + this.mResolveReferences.Text = "Resolve fiel&d references (slow)"; + this.mResolveReferences.UseVisualStyleBackColor = true; + // + // mExcludeExpired + // + this.mExcludeExpired.AutoSize = true; + this.mExcludeExpired.Location = new System.Drawing.Point(216, 39); + this.mExcludeExpired.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mExcludeExpired.Name = "mExcludeExpired"; + this.mExcludeExpired.Size = new System.Drawing.Size(269, 29); + this.mExcludeExpired.TabIndex = 1; + this.mExcludeExpired.Text = "Exclude &expired entries"; + this.mExcludeExpired.UseVisualStyleBackColor = true; + // + // mCaseSensitive + // + this.mCaseSensitive.AutoSize = true; + this.mCaseSensitive.Location = new System.Drawing.Point(20, 39); + this.mCaseSensitive.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mCaseSensitive.Name = "mCaseSensitive"; + this.mCaseSensitive.Size = new System.Drawing.Size(186, 29); + this.mCaseSensitive.TabIndex = 0; + this.mCaseSensitive.Text = "Case-sensiti&ve"; + this.mCaseSensitive.UseVisualStyleBackColor = true; + // + // mPanel + // + this.mPanel.AutoScroll = true; + this.mPanel.Controls.Add(this.mShowSearchGroup); + this.mPanel.Controls.Add(this.mCustomSequences); + this.mPanel.Controls.Add(searchOptionsGroup); + this.mPanel.Controls.Add(actionsGroup); + this.mPanel.Controls.Add(searchInGroup); + this.mPanel.Location = new System.Drawing.Point(12, 22); + this.mPanel.Margin = new System.Windows.Forms.Padding(4); + this.mPanel.Name = "mPanel"; + this.mPanel.Size = new System.Drawing.Size(1077, 579); + this.mPanel.TabIndex = 5; + // + // mShowSearchGroup + // + this.mShowSearchGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.mShowSearchGroup.Controls.Add(this.mShowOnHotKey); - this.mShowSearchGroup.Controls.Add(this.mShowHotKeyControl); - this.mShowSearchGroup.Controls.Add(this.mShowOnIPC); - this.mShowSearchGroup.Controls.Add(this.mShowOnFailedSearch); - this.mShowSearchGroup.Location = new System.Drawing.Point(6, 12); - this.mShowSearchGroup.Name = "mShowSearchGroup"; - this.mShowSearchGroup.Size = new System.Drawing.Size(540, 118); - this.mShowSearchGroup.TabIndex = 0; - this.mShowSearchGroup.TabStop = false; - this.mShowSearchGroup.Text = "Show search window"; - // - // mShowOnHotKey - // - this.mShowOnHotKey.AutoSize = true; - this.mShowOnHotKey.Location = new System.Drawing.Point(10, 44); - this.mShowOnHotKey.Name = "mShowOnHotKey"; - this.mShowOnHotKey.Size = new System.Drawing.Size(233, 17); - this.mShowOnHotKey.TabIndex = 1; - this.mShowOnHotKey.Text = "Show when system-wide &hot key is pressed:"; - this.mShowOnHotKey.UseVisualStyleBackColor = true; - this.mShowOnHotKey.CheckedChanged += new System.EventHandler(this.mShowOnHotKey_CheckedChanged); - // - // mShowOnIPC - // - this.mShowOnIPC.AutoSize = true; - this.mShowOnIPC.Location = new System.Drawing.Point(10, 93); - this.mShowOnIPC.Name = "mShowOnIPC"; - this.mShowOnIPC.Size = new System.Drawing.Size(386, 17); - this.mShowOnIPC.TabIndex = 3; - this.mShowOnIPC.Text = "Show when \"/e1:AutoTypeSearch\" is passed as a ¶meter to KeePass.exe"; - this.mShowOnIPC.UseVisualStyleBackColor = true; - // - // mShowOnFailedSearch - // - this.mShowOnFailedSearch.AutoSize = true; - this.mShowOnFailedSearch.Location = new System.Drawing.Point(10, 21); - this.mShowOnFailedSearch.Name = "mShowOnFailedSearch"; - this.mShowOnFailedSearch.Size = new System.Drawing.Size(275, 17); - this.mShowOnFailedSearch.TabIndex = 0; - this.mShowOnFailedSearch.Text = "Show &automatically if global auto-type finds no match"; - this.mShowOnFailedSearch.UseVisualStyleBackColor = true; - // - // Options - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(actionsGroup); - this.Controls.Add(searchInGroup); - this.Controls.Add(searchOptionsGroup); - this.Controls.Add(this.mShowSearchGroup); - this.Name = "Options"; - this.Size = new System.Drawing.Size(551, 311); - searchOptionsGroup.ResumeLayout(false); - searchOptionsGroup.PerformLayout(); - searchInGroup.ResumeLayout(false); - searchInGroup.PerformLayout(); - actionsGroup.ResumeLayout(false); - actionsGroup.PerformLayout(); - this.mShowSearchGroup.ResumeLayout(false); - this.mShowSearchGroup.PerformLayout(); - this.ResumeLayout(false); + this.mShowSearchGroup.Controls.Add(this.mShowOnHotKey); + this.mShowSearchGroup.Controls.Add(this.mShowHotKeyControl); + this.mShowSearchGroup.Controls.Add(this.mShowOnIPC); + this.mShowSearchGroup.Controls.Add(this.mShowOnFailedSearch); + this.mShowSearchGroup.Location = new System.Drawing.Point(5, 6); + this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowSearchGroup.Name = "mShowSearchGroup"; + this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowSearchGroup.Size = new System.Drawing.Size(368, 228); + this.mShowSearchGroup.TabIndex = 0; + this.mShowSearchGroup.TabStop = false; + this.mShowSearchGroup.Text = "Show search window"; + // + // mShowOnHotKey + // + this.mShowOnHotKey.AutoSize = true; + this.mShowOnHotKey.Location = new System.Drawing.Point(20, 85); + this.mShowOnHotKey.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowOnHotKey.Name = "mShowOnHotKey"; + this.mShowOnHotKey.Size = new System.Drawing.Size(466, 29); + this.mShowOnHotKey.TabIndex = 1; + this.mShowOnHotKey.Text = "Show when system-wide &hot key is pressed:"; + this.mShowOnHotKey.UseVisualStyleBackColor = true; + this.mShowOnHotKey.CheckedChanged += new System.EventHandler(this.mShowOnHotKey_CheckedChanged); + // + // mShowHotKeyControl + // + this.mShowHotKeyControl.Location = new System.Drawing.Point(60, 125); + this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowHotKeyControl.Name = "mShowHotKeyControl"; + this.mShowHotKeyControl.Size = new System.Drawing.Size(241, 31); + this.mShowHotKeyControl.TabIndex = 2; + // + // mShowOnIPC + // + this.mShowOnIPC.AutoSize = true; + this.mShowOnIPC.Location = new System.Drawing.Point(20, 179); + this.mShowOnIPC.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowOnIPC.Name = "mShowOnIPC"; + this.mShowOnIPC.Size = new System.Drawing.Size(775, 29); + this.mShowOnIPC.TabIndex = 3; + this.mShowOnIPC.Text = "Show when \"/e1:AutoTypeSearch\" is passed as a ¶meter to KeePass.exe"; + this.mShowOnIPC.UseVisualStyleBackColor = true; + // + // mShowOnFailedSearch + // + this.mShowOnFailedSearch.AutoSize = true; + this.mShowOnFailedSearch.Location = new System.Drawing.Point(20, 40); + this.mShowOnFailedSearch.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowOnFailedSearch.Name = "mShowOnFailedSearch"; + this.mShowOnFailedSearch.Size = new System.Drawing.Size(552, 29); + this.mShowOnFailedSearch.TabIndex = 0; + this.mShowOnFailedSearch.Text = "Show &automatically if global auto-type finds no match"; + this.mShowOnFailedSearch.UseVisualStyleBackColor = true; + // + // mCustomSequences + // + this.mCustomSequences.Controls.Add(this.mAdditionalSequenceDelete); + this.mCustomSequences.Controls.Add(this.mAdditionalSequenceEdit); + this.mCustomSequences.Controls.Add(this.mAdditionalSequences); + this.mCustomSequences.Controls.Add(this.mAdditionalSequencesTitle); + this.mCustomSequences.Controls.Add(this.mAllowCustomSequences); + this.mCustomSequences.Location = new System.Drawing.Point(5, 585); + this.mCustomSequences.Margin = new System.Windows.Forms.Padding(4); + this.mCustomSequences.Name = "mCustomSequences"; + this.mCustomSequences.Padding = new System.Windows.Forms.Padding(4); + this.mCustomSequences.Size = new System.Drawing.Size(1019, 258); + this.mCustomSequences.TabIndex = 4; + this.mCustomSequences.TabStop = false; + this.mCustomSequences.Text = "Custom Sequences"; + // + // mAdditionalSequenceDelete + // + this.mAdditionalSequenceDelete.Image = global::AutoTypeSearch.Properties.Resources.Delete; + this.mAdditionalSequenceDelete.Location = new System.Drawing.Point(889, 58); + this.mAdditionalSequenceDelete.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.mAdditionalSequenceDelete.Name = "mAdditionalSequenceDelete"; + this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(29, 30); + this.mAdditionalSequenceDelete.TabIndex = 11; + this.mAdditionalSequenceDelete.UseVisualStyleBackColor = true; + this.mAdditionalSequenceDelete.Click += new System.EventHandler(this.mAdditionalSequenceDelete_Click); + // + // mAdditionalSequenceEdit + // + this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(755, 68); + this.mAdditionalSequenceEdit.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.mAdditionalSequenceEdit.Name = "mAdditionalSequenceEdit"; + this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(100, 31); + this.mAdditionalSequenceEdit.TabIndex = 10; + this.mAdditionalSequenceEdit.KeyDown += new System.Windows.Forms.KeyEventHandler(this.mAdditionalSequenceEdit_KeyDown); + this.mAdditionalSequenceEdit.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.mAdditionalSequenceEdit_KeyPress); + this.mAdditionalSequenceEdit.Leave += new System.EventHandler(this.mAdditionalSequenceEdit_Leave); + // + // mAdditionalSequences + // + this.mAdditionalSequences.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.mAdditionalSequences.FormattingEnabled = true; + this.mAdditionalSequences.ItemHeight = 25; + this.mAdditionalSequences.Location = new System.Drawing.Point(9, 106); + this.mAdditionalSequences.Margin = new System.Windows.Forms.Padding(4); + this.mAdditionalSequences.Name = "mAdditionalSequences"; + this.mAdditionalSequences.Size = new System.Drawing.Size(989, 129); + this.mAdditionalSequences.TabIndex = 9; + this.mAdditionalSequences.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.mAdditionalSequences_DrawItem); + this.mAdditionalSequences.SelectedIndexChanged += new System.EventHandler(this.mAdditionalSequences_SelectedIndexChanged); + this.mAdditionalSequences.DoubleClick += new System.EventHandler(this.mAdditionalSequences_DoubleClick); + this.mAdditionalSequences.Enter += new System.EventHandler(this.mAdditionalSequences_Enter); + this.mAdditionalSequences.KeyDown += new System.Windows.Forms.KeyEventHandler(this.mAdditionalSequences_KeyDown); + this.mAdditionalSequences.Leave += new System.EventHandler(this.mAdditionalSequences_Leave); + // + // mAdditionalSequencesTitle + // + this.mAdditionalSequencesTitle.AutoSize = true; + this.mAdditionalSequencesTitle.Location = new System.Drawing.Point(8, 76); + this.mAdditionalSequencesTitle.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.mAdditionalSequencesTitle.Name = "mAdditionalSequencesTitle"; + this.mAdditionalSequencesTitle.Size = new System.Drawing.Size(299, 25); + this.mAdditionalSequencesTitle.TabIndex = 8; + this.mAdditionalSequencesTitle.Text = "Add&itional custom sequences:"; + // + // mAllowCustomSequences + // + this.mAllowCustomSequences.AutoSize = true; + this.mAllowCustomSequences.Location = new System.Drawing.Point(9, 34); + this.mAllowCustomSequences.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mAllowCustomSequences.Name = "mAllowCustomSequences"; + this.mAllowCustomSequences.Size = new System.Drawing.Size(377, 29); + this.mAllowCustomSequences.TabIndex = 6; + this.mAllowCustomSequences.Text = "Allow &custom auto-type sequences"; + this.mAllowCustomSequences.UseVisualStyleBackColor = true; + // + // Options + // + this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.mPanel); + this.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.Name = "Options"; + this.Size = new System.Drawing.Size(1112, 624); + this.Paint += new System.Windows.Forms.PaintEventHandler(this.Options_Paint); + searchInGroup.ResumeLayout(false); + searchInGroup.PerformLayout(); + actionsGroup.ResumeLayout(false); + actionsGroup.PerformLayout(); + searchOptionsGroup.ResumeLayout(false); + searchOptionsGroup.PerformLayout(); + this.mPanel.ResumeLayout(false); + this.mShowSearchGroup.ResumeLayout(false); + this.mShowSearchGroup.PerformLayout(); + this.mCustomSequences.ResumeLayout(false); + this.mCustomSequences.PerformLayout(); + this.ResumeLayout(false); } #endregion - private KeePass.UI.HotKeyControlEx mShowHotKeyControl; + private System.Windows.Forms.Panel mPanel; + private System.Windows.Forms.GroupBox mShowSearchGroup; private System.Windows.Forms.CheckBox mShowOnHotKey; + private HotKeyControlEx mShowHotKeyControl; private System.Windows.Forms.CheckBox mShowOnIPC; private System.Windows.Forms.CheckBox mShowOnFailedSearch; + private System.Windows.Forms.GroupBox mCustomSequences; + private System.Windows.Forms.Label mAdditionalSequencesTitle; + private System.Windows.Forms.CheckBox mAllowCustomSequences; + private System.Windows.Forms.CheckBox mResolveReferences; + private System.Windows.Forms.CheckBox mExcludeExpired; private System.Windows.Forms.CheckBox mCaseSensitive; + private System.Windows.Forms.ComboBox mAlternativeAction; + private System.Windows.Forms.ComboBox mDefaultAction; private System.Windows.Forms.CheckBox mSearchInTags; private System.Windows.Forms.CheckBox mSearchInOtherFields; private System.Windows.Forms.CheckBox mSearchInNotes; private System.Windows.Forms.CheckBox mSearchInUrl; private System.Windows.Forms.CheckBox mSearchInUserName; private System.Windows.Forms.CheckBox mSearchInTitle; - private System.Windows.Forms.CheckBox mResolveReferences; - private System.Windows.Forms.CheckBox mExcludeExpired; - private System.Windows.Forms.ComboBox mAlternativeAction; - private System.Windows.Forms.ComboBox mDefaultAction; - private System.Windows.Forms.GroupBox mShowSearchGroup; - + private System.Windows.Forms.ListBox mAdditionalSequences; + private System.Windows.Forms.TextBox mAdditionalSequenceEdit; + private System.Windows.Forms.Button mAdditionalSequenceDelete; } } diff --git a/AutoTypeSearch/AutoTypeSearch.csproj b/AutoTypeSearch/AutoTypeSearch.csproj index c55c5b8..786cffd 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -1,4 +1,4 @@ - + @@ -44,7 +44,8 @@ - + + False ..\keepass_portable\KeePass.exe @@ -82,6 +83,9 @@ SearchWindow.cs + + Component + @@ -108,6 +112,9 @@ + + + IF $(ConfigurationName) == Release "$(ProjectDir)..\CreatePlgX.bat" diff --git a/AutoTypeSearch/Delete.png b/AutoTypeSearch/Delete.png new file mode 100644 index 0000000..9d61fb8 --- /dev/null +++ b/AutoTypeSearch/Delete.png Binary files differ diff --git a/AutoTypeSearch/Options.Designer.cs b/AutoTypeSearch/Options.Designer.cs index 4886b6d..305d8e4 100755 --- a/AutoTypeSearch/Options.Designer.cs +++ b/AutoTypeSearch/Options.Designer.cs @@ -1,4 +1,4 @@ -using KeePass.UI; +using KeePass.UI; namespace AutoTypeSearch { @@ -30,295 +30,427 @@ /// private void InitializeComponent() { - System.Windows.Forms.GroupBox searchOptionsGroup; - System.Windows.Forms.GroupBox searchInGroup; - System.Windows.Forms.GroupBox actionsGroup; - System.Windows.Forms.Label alternativeActionLabel; - System.Windows.Forms.Label defaultActionLabel; - this.mResolveReferences = new System.Windows.Forms.CheckBox(); - this.mExcludeExpired = new System.Windows.Forms.CheckBox(); - this.mCaseSensitive = new System.Windows.Forms.CheckBox(); - this.mSearchInTags = new System.Windows.Forms.CheckBox(); - this.mSearchInOtherFields = new System.Windows.Forms.CheckBox(); - this.mSearchInNotes = new System.Windows.Forms.CheckBox(); - this.mSearchInUrl = new System.Windows.Forms.CheckBox(); - this.mSearchInUserName = new System.Windows.Forms.CheckBox(); - this.mSearchInTitle = new System.Windows.Forms.CheckBox(); - this.mAlternativeAction = new System.Windows.Forms.ComboBox(); - this.mDefaultAction = new System.Windows.Forms.ComboBox(); - this.mShowHotKeyControl = new KeePass.UI.HotKeyControlEx(); - this.mShowSearchGroup = new System.Windows.Forms.GroupBox(); - this.mShowOnHotKey = new System.Windows.Forms.CheckBox(); - this.mShowOnIPC = new System.Windows.Forms.CheckBox(); - this.mShowOnFailedSearch = new System.Windows.Forms.CheckBox(); - searchOptionsGroup = new System.Windows.Forms.GroupBox(); - searchInGroup = new System.Windows.Forms.GroupBox(); - actionsGroup = new System.Windows.Forms.GroupBox(); - alternativeActionLabel = new System.Windows.Forms.Label(); - defaultActionLabel = new System.Windows.Forms.Label(); - searchOptionsGroup.SuspendLayout(); - searchInGroup.SuspendLayout(); - actionsGroup.SuspendLayout(); - this.mShowSearchGroup.SuspendLayout(); - this.SuspendLayout(); - // - // searchOptionsGroup - // - searchOptionsGroup.Controls.Add(this.mResolveReferences); - searchOptionsGroup.Controls.Add(this.mExcludeExpired); - searchOptionsGroup.Controls.Add(this.mCaseSensitive); - searchOptionsGroup.Location = new System.Drawing.Point(6, 189); - searchOptionsGroup.Name = "searchOptionsGroup"; - searchOptionsGroup.Size = new System.Drawing.Size(540, 45); - searchOptionsGroup.TabIndex = 2; - searchOptionsGroup.TabStop = false; - searchOptionsGroup.Text = "Search options"; - // - // mResolveReferences - // - this.mResolveReferences.AutoSize = true; - this.mResolveReferences.Location = new System.Drawing.Point(251, 20); - this.mResolveReferences.Name = "mResolveReferences"; - this.mResolveReferences.Size = new System.Drawing.Size(170, 17); - this.mResolveReferences.TabIndex = 2; - this.mResolveReferences.Text = "Resolve fiel&d references (slow)"; - this.mResolveReferences.UseVisualStyleBackColor = true; - // - // mExcludeExpired - // - this.mExcludeExpired.AutoSize = true; - this.mExcludeExpired.Location = new System.Drawing.Point(108, 20); - this.mExcludeExpired.Name = "mExcludeExpired"; - this.mExcludeExpired.Size = new System.Drawing.Size(135, 17); - this.mExcludeExpired.TabIndex = 1; - this.mExcludeExpired.Text = "Exclude &expired entries"; - this.mExcludeExpired.UseVisualStyleBackColor = true; - // - // mCaseSensitive - // - this.mCaseSensitive.AutoSize = true; - this.mCaseSensitive.Location = new System.Drawing.Point(10, 20); - this.mCaseSensitive.Name = "mCaseSensitive"; - this.mCaseSensitive.Size = new System.Drawing.Size(94, 17); - this.mCaseSensitive.TabIndex = 0; - this.mCaseSensitive.Text = "Case-sensiti&ve"; - this.mCaseSensitive.UseVisualStyleBackColor = true; - // - // searchInGroup - // - searchInGroup.Controls.Add(this.mSearchInTags); - searchInGroup.Controls.Add(this.mSearchInOtherFields); - searchInGroup.Controls.Add(this.mSearchInNotes); - searchInGroup.Controls.Add(this.mSearchInUrl); - searchInGroup.Controls.Add(this.mSearchInUserName); - searchInGroup.Controls.Add(this.mSearchInTitle); - searchInGroup.Location = new System.Drawing.Point(6, 136); - searchInGroup.Name = "searchInGroup"; - searchInGroup.Size = new System.Drawing.Size(540, 47); - searchInGroup.TabIndex = 1; - searchInGroup.TabStop = false; - searchInGroup.Text = "Search in"; - // - // mSearchInTags - // - this.mSearchInTags.AutoSize = true; - this.mSearchInTags.Location = new System.Drawing.Point(258, 19); - this.mSearchInTags.Name = "mSearchInTags"; - this.mSearchInTags.Size = new System.Drawing.Size(50, 17); - this.mSearchInTags.TabIndex = 4; - this.mSearchInTags.Text = "Ta&gs"; - this.mSearchInTags.UseVisualStyleBackColor = true; - // - // mSearchInOtherFields - // - this.mSearchInOtherFields.AutoSize = true; - this.mSearchInOtherFields.Location = new System.Drawing.Point(314, 19); - this.mSearchInOtherFields.Name = "mSearchInOtherFields"; - this.mSearchInOtherFields.Size = new System.Drawing.Size(139, 17); - this.mSearchInOtherFields.TabIndex = 5; - this.mSearchInOtherFields.Text = "&Other unprotected fields"; - this.mSearchInOtherFields.UseVisualStyleBackColor = true; - // - // mSearchInNotes - // - this.mSearchInNotes.AutoSize = true; - this.mSearchInNotes.Location = new System.Drawing.Point(198, 19); - this.mSearchInNotes.Name = "mSearchInNotes"; - this.mSearchInNotes.Size = new System.Drawing.Size(54, 17); - this.mSearchInNotes.TabIndex = 3; - this.mSearchInNotes.Text = "Note&s"; - this.mSearchInNotes.UseVisualStyleBackColor = true; - // - // mSearchInUrl - // - this.mSearchInUrl.AutoSize = true; - this.mSearchInUrl.Location = new System.Drawing.Point(144, 19); - this.mSearchInUrl.Name = "mSearchInUrl"; - this.mSearchInUrl.Size = new System.Drawing.Size(48, 17); - this.mSearchInUrl.TabIndex = 2; - this.mSearchInUrl.Text = "&URL"; - this.mSearchInUrl.UseVisualStyleBackColor = true; - // - // mSearchInUserName - // - this.mSearchInUserName.AutoSize = true; - this.mSearchInUserName.Location = new System.Drawing.Point(61, 19); - this.mSearchInUserName.Name = "mSearchInUserName"; - this.mSearchInUserName.Size = new System.Drawing.Size(77, 17); - this.mSearchInUserName.TabIndex = 1; - this.mSearchInUserName.Text = "User &name"; - this.mSearchInUserName.UseVisualStyleBackColor = true; - // - // mSearchInTitle - // - this.mSearchInTitle.AutoSize = true; - this.mSearchInTitle.Location = new System.Drawing.Point(9, 19); - this.mSearchInTitle.Name = "mSearchInTitle"; - this.mSearchInTitle.Size = new System.Drawing.Size(46, 17); - this.mSearchInTitle.TabIndex = 0; - this.mSearchInTitle.Text = "&Title"; - this.mSearchInTitle.UseVisualStyleBackColor = true; - // - // actionsGroup - // - actionsGroup.Controls.Add(this.mAlternativeAction); - actionsGroup.Controls.Add(this.mDefaultAction); - actionsGroup.Controls.Add(alternativeActionLabel); - actionsGroup.Controls.Add(defaultActionLabel); - actionsGroup.Location = new System.Drawing.Point(6, 241); - actionsGroup.Name = "actionsGroup"; - actionsGroup.Size = new System.Drawing.Size(540, 67); - actionsGroup.TabIndex = 3; - actionsGroup.TabStop = false; - actionsGroup.Text = "Actions"; - // - // mAlternativeAction - // - this.mAlternativeAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.mAlternativeAction.Location = new System.Drawing.Point(288, 37); - this.mAlternativeAction.Name = "mAlternativeAction"; - this.mAlternativeAction.Size = new System.Drawing.Size(240, 21); - this.mAlternativeAction.TabIndex = 3; - // - // mDefaultAction - // - this.mDefaultAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.mDefaultAction.Location = new System.Drawing.Point(11, 37); - this.mDefaultAction.Name = "mDefaultAction"; - this.mDefaultAction.Size = new System.Drawing.Size(240, 21); - this.mDefaultAction.TabIndex = 1; - // - // alternativeActionLabel - // - alternativeActionLabel.AutoSize = true; - alternativeActionLabel.Location = new System.Drawing.Point(285, 20); - alternativeActionLabel.Name = "alternativeActionLabel"; - alternativeActionLabel.Size = new System.Drawing.Size(159, 13); - alternativeActionLabel.TabIndex = 2; - alternativeActionLabel.Text = "A<ernative action (Shift + Enter):"; - // - // defaultActionLabel - // - defaultActionLabel.AutoSize = true; - defaultActionLabel.Location = new System.Drawing.Point(8, 20); - defaultActionLabel.Name = "defaultActionLabel"; - defaultActionLabel.Size = new System.Drawing.Size(110, 13); - defaultActionLabel.TabIndex = 0; - defaultActionLabel.Text = "De&fault action (Enter):"; - // - // mShowHotKeyControl - // - this.mShowHotKeyControl.Location = new System.Drawing.Point(30, 65); - this.mShowHotKeyControl.Name = "mShowHotKeyControl"; - this.mShowHotKeyControl.Size = new System.Drawing.Size(123, 20); - this.mShowHotKeyControl.TabIndex = 2; - // - // mShowSearchGroup - // - this.mShowSearchGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + System.Windows.Forms.GroupBox searchInGroup; + System.Windows.Forms.GroupBox actionsGroup; + System.Windows.Forms.Label alternativeActionLabel; + System.Windows.Forms.Label defaultActionLabel; + System.Windows.Forms.GroupBox searchOptionsGroup; + this.mSearchInTags = new System.Windows.Forms.CheckBox(); + this.mSearchInOtherFields = new System.Windows.Forms.CheckBox(); + this.mSearchInNotes = new System.Windows.Forms.CheckBox(); + this.mSearchInUrl = new System.Windows.Forms.CheckBox(); + this.mSearchInUserName = new System.Windows.Forms.CheckBox(); + this.mSearchInTitle = new System.Windows.Forms.CheckBox(); + this.mAlternativeAction = new System.Windows.Forms.ComboBox(); + this.mDefaultAction = new System.Windows.Forms.ComboBox(); + this.mResolveReferences = new System.Windows.Forms.CheckBox(); + this.mExcludeExpired = new System.Windows.Forms.CheckBox(); + this.mCaseSensitive = new System.Windows.Forms.CheckBox(); + this.mPanel = new System.Windows.Forms.Panel(); + this.mShowSearchGroup = new System.Windows.Forms.GroupBox(); + this.mShowOnHotKey = new System.Windows.Forms.CheckBox(); + this.mShowHotKeyControl = new KeePass.UI.HotKeyControlEx(); + this.mShowOnIPC = new System.Windows.Forms.CheckBox(); + this.mShowOnFailedSearch = new System.Windows.Forms.CheckBox(); + this.mCustomSequences = new System.Windows.Forms.GroupBox(); + this.mAdditionalSequenceDelete = new System.Windows.Forms.Button(); + this.mAdditionalSequenceEdit = new System.Windows.Forms.TextBox(); + this.mAdditionalSequences = new System.Windows.Forms.ListBox(); + this.mAdditionalSequencesTitle = new System.Windows.Forms.Label(); + this.mAllowCustomSequences = new System.Windows.Forms.CheckBox(); + searchInGroup = new System.Windows.Forms.GroupBox(); + actionsGroup = new System.Windows.Forms.GroupBox(); + alternativeActionLabel = new System.Windows.Forms.Label(); + defaultActionLabel = new System.Windows.Forms.Label(); + searchOptionsGroup = new System.Windows.Forms.GroupBox(); + searchInGroup.SuspendLayout(); + actionsGroup.SuspendLayout(); + searchOptionsGroup.SuspendLayout(); + this.mPanel.SuspendLayout(); + this.mShowSearchGroup.SuspendLayout(); + this.mCustomSequences.SuspendLayout(); + this.SuspendLayout(); + // + // searchInGroup + // + searchInGroup.Controls.Add(this.mSearchInTags); + searchInGroup.Controls.Add(this.mSearchInOtherFields); + searchInGroup.Controls.Add(this.mSearchInNotes); + searchInGroup.Controls.Add(this.mSearchInUrl); + searchInGroup.Controls.Add(this.mSearchInUserName); + searchInGroup.Controls.Add(this.mSearchInTitle); + searchInGroup.Location = new System.Drawing.Point(5, 245); + searchInGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + searchInGroup.Name = "searchInGroup"; + searchInGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + searchInGroup.Size = new System.Drawing.Size(1019, 90); + searchInGroup.TabIndex = 1; + searchInGroup.TabStop = false; + searchInGroup.Text = "Search in"; + // + // mSearchInTags + // + this.mSearchInTags.AutoSize = true; + this.mSearchInTags.Location = new System.Drawing.Point(516, 36); + this.mSearchInTags.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInTags.Name = "mSearchInTags"; + this.mSearchInTags.Size = new System.Drawing.Size(92, 29); + this.mSearchInTags.TabIndex = 4; + this.mSearchInTags.Text = "Ta&gs"; + this.mSearchInTags.UseVisualStyleBackColor = true; + // + // mSearchInOtherFields + // + this.mSearchInOtherFields.AutoSize = true; + this.mSearchInOtherFields.Location = new System.Drawing.Point(628, 36); + this.mSearchInOtherFields.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInOtherFields.Name = "mSearchInOtherFields"; + this.mSearchInOtherFields.Size = new System.Drawing.Size(274, 29); + this.mSearchInOtherFields.TabIndex = 5; + this.mSearchInOtherFields.Text = "&Other unprotected fields"; + this.mSearchInOtherFields.UseVisualStyleBackColor = true; + // + // mSearchInNotes + // + this.mSearchInNotes.AutoSize = true; + this.mSearchInNotes.Location = new System.Drawing.Point(396, 36); + this.mSearchInNotes.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInNotes.Name = "mSearchInNotes"; + this.mSearchInNotes.Size = new System.Drawing.Size(100, 29); + this.mSearchInNotes.TabIndex = 3; + this.mSearchInNotes.Text = "Note&s"; + this.mSearchInNotes.UseVisualStyleBackColor = true; + // + // mSearchInUrl + // + this.mSearchInUrl.AutoSize = true; + this.mSearchInUrl.Location = new System.Drawing.Point(288, 36); + this.mSearchInUrl.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInUrl.Name = "mSearchInUrl"; + this.mSearchInUrl.Size = new System.Drawing.Size(86, 29); + this.mSearchInUrl.TabIndex = 2; + this.mSearchInUrl.Text = "&URL"; + this.mSearchInUrl.UseVisualStyleBackColor = true; + // + // mSearchInUserName + // + this.mSearchInUserName.AutoSize = true; + this.mSearchInUserName.Location = new System.Drawing.Point(123, 36); + this.mSearchInUserName.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInUserName.Name = "mSearchInUserName"; + this.mSearchInUserName.Size = new System.Drawing.Size(148, 29); + this.mSearchInUserName.TabIndex = 1; + this.mSearchInUserName.Text = "User &name"; + this.mSearchInUserName.UseVisualStyleBackColor = true; + // + // mSearchInTitle + // + this.mSearchInTitle.AutoSize = true; + this.mSearchInTitle.Location = new System.Drawing.Point(19, 36); + this.mSearchInTitle.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInTitle.Name = "mSearchInTitle"; + this.mSearchInTitle.Size = new System.Drawing.Size(85, 29); + this.mSearchInTitle.TabIndex = 0; + this.mSearchInTitle.Text = "&Title"; + this.mSearchInTitle.UseVisualStyleBackColor = true; + // + // actionsGroup + // + actionsGroup.Controls.Add(this.mAlternativeAction); + actionsGroup.Controls.Add(this.mDefaultAction); + actionsGroup.Controls.Add(alternativeActionLabel); + actionsGroup.Controls.Add(defaultActionLabel); + actionsGroup.Location = new System.Drawing.Point(5, 446); + actionsGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + actionsGroup.Name = "actionsGroup"; + actionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + actionsGroup.Size = new System.Drawing.Size(1019, 129); + actionsGroup.TabIndex = 3; + actionsGroup.TabStop = false; + actionsGroup.Text = "Actions"; + // + // mAlternativeAction + // + this.mAlternativeAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.mAlternativeAction.Location = new System.Drawing.Point(523, 71); + this.mAlternativeAction.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mAlternativeAction.Name = "mAlternativeAction"; + this.mAlternativeAction.Size = new System.Drawing.Size(476, 33); + this.mAlternativeAction.TabIndex = 3; + // + // mDefaultAction + // + this.mDefaultAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.mDefaultAction.Location = new System.Drawing.Point(21, 71); + this.mDefaultAction.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mDefaultAction.Name = "mDefaultAction"; + this.mDefaultAction.Size = new System.Drawing.Size(476, 33); + this.mDefaultAction.TabIndex = 1; + // + // alternativeActionLabel + // + alternativeActionLabel.AutoSize = true; + alternativeActionLabel.Location = new System.Drawing.Point(517, 39); + alternativeActionLabel.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + alternativeActionLabel.Name = "alternativeActionLabel"; + alternativeActionLabel.Size = new System.Drawing.Size(322, 25); + alternativeActionLabel.TabIndex = 2; + alternativeActionLabel.Text = "A<ernative action (Shift + Enter):"; + // + // defaultActionLabel + // + defaultActionLabel.AutoSize = true; + defaultActionLabel.Location = new System.Drawing.Point(16, 39); + defaultActionLabel.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + defaultActionLabel.Name = "defaultActionLabel"; + defaultActionLabel.Size = new System.Drawing.Size(221, 25); + defaultActionLabel.TabIndex = 0; + defaultActionLabel.Text = "De&fault action (Enter):"; + // + // searchOptionsGroup + // + searchOptionsGroup.Controls.Add(this.mResolveReferences); + searchOptionsGroup.Controls.Add(this.mExcludeExpired); + searchOptionsGroup.Controls.Add(this.mCaseSensitive); + searchOptionsGroup.Location = new System.Drawing.Point(5, 348); + searchOptionsGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + searchOptionsGroup.Name = "searchOptionsGroup"; + searchOptionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + searchOptionsGroup.Size = new System.Drawing.Size(1019, 86); + searchOptionsGroup.TabIndex = 2; + searchOptionsGroup.TabStop = false; + searchOptionsGroup.Text = "Search options"; + // + // mResolveReferences + // + this.mResolveReferences.AutoSize = true; + this.mResolveReferences.Location = new System.Drawing.Point(501, 39); + this.mResolveReferences.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mResolveReferences.Name = "mResolveReferences"; + this.mResolveReferences.Size = new System.Drawing.Size(339, 29); + this.mResolveReferences.TabIndex = 2; + this.mResolveReferences.Text = "Resolve fiel&d references (slow)"; + this.mResolveReferences.UseVisualStyleBackColor = true; + // + // mExcludeExpired + // + this.mExcludeExpired.AutoSize = true; + this.mExcludeExpired.Location = new System.Drawing.Point(216, 39); + this.mExcludeExpired.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mExcludeExpired.Name = "mExcludeExpired"; + this.mExcludeExpired.Size = new System.Drawing.Size(269, 29); + this.mExcludeExpired.TabIndex = 1; + this.mExcludeExpired.Text = "Exclude &expired entries"; + this.mExcludeExpired.UseVisualStyleBackColor = true; + // + // mCaseSensitive + // + this.mCaseSensitive.AutoSize = true; + this.mCaseSensitive.Location = new System.Drawing.Point(20, 39); + this.mCaseSensitive.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mCaseSensitive.Name = "mCaseSensitive"; + this.mCaseSensitive.Size = new System.Drawing.Size(186, 29); + this.mCaseSensitive.TabIndex = 0; + this.mCaseSensitive.Text = "Case-sensiti&ve"; + this.mCaseSensitive.UseVisualStyleBackColor = true; + // + // mPanel + // + this.mPanel.AutoScroll = true; + this.mPanel.Controls.Add(this.mShowSearchGroup); + this.mPanel.Controls.Add(this.mCustomSequences); + this.mPanel.Controls.Add(searchOptionsGroup); + this.mPanel.Controls.Add(actionsGroup); + this.mPanel.Controls.Add(searchInGroup); + this.mPanel.Location = new System.Drawing.Point(12, 22); + this.mPanel.Margin = new System.Windows.Forms.Padding(4); + this.mPanel.Name = "mPanel"; + this.mPanel.Size = new System.Drawing.Size(1077, 579); + this.mPanel.TabIndex = 5; + // + // mShowSearchGroup + // + this.mShowSearchGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.mShowSearchGroup.Controls.Add(this.mShowOnHotKey); - this.mShowSearchGroup.Controls.Add(this.mShowHotKeyControl); - this.mShowSearchGroup.Controls.Add(this.mShowOnIPC); - this.mShowSearchGroup.Controls.Add(this.mShowOnFailedSearch); - this.mShowSearchGroup.Location = new System.Drawing.Point(6, 12); - this.mShowSearchGroup.Name = "mShowSearchGroup"; - this.mShowSearchGroup.Size = new System.Drawing.Size(540, 118); - this.mShowSearchGroup.TabIndex = 0; - this.mShowSearchGroup.TabStop = false; - this.mShowSearchGroup.Text = "Show search window"; - // - // mShowOnHotKey - // - this.mShowOnHotKey.AutoSize = true; - this.mShowOnHotKey.Location = new System.Drawing.Point(10, 44); - this.mShowOnHotKey.Name = "mShowOnHotKey"; - this.mShowOnHotKey.Size = new System.Drawing.Size(233, 17); - this.mShowOnHotKey.TabIndex = 1; - this.mShowOnHotKey.Text = "Show when system-wide &hot key is pressed:"; - this.mShowOnHotKey.UseVisualStyleBackColor = true; - this.mShowOnHotKey.CheckedChanged += new System.EventHandler(this.mShowOnHotKey_CheckedChanged); - // - // mShowOnIPC - // - this.mShowOnIPC.AutoSize = true; - this.mShowOnIPC.Location = new System.Drawing.Point(10, 93); - this.mShowOnIPC.Name = "mShowOnIPC"; - this.mShowOnIPC.Size = new System.Drawing.Size(386, 17); - this.mShowOnIPC.TabIndex = 3; - this.mShowOnIPC.Text = "Show when \"/e1:AutoTypeSearch\" is passed as a ¶meter to KeePass.exe"; - this.mShowOnIPC.UseVisualStyleBackColor = true; - // - // mShowOnFailedSearch - // - this.mShowOnFailedSearch.AutoSize = true; - this.mShowOnFailedSearch.Location = new System.Drawing.Point(10, 21); - this.mShowOnFailedSearch.Name = "mShowOnFailedSearch"; - this.mShowOnFailedSearch.Size = new System.Drawing.Size(275, 17); - this.mShowOnFailedSearch.TabIndex = 0; - this.mShowOnFailedSearch.Text = "Show &automatically if global auto-type finds no match"; - this.mShowOnFailedSearch.UseVisualStyleBackColor = true; - // - // Options - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(actionsGroup); - this.Controls.Add(searchInGroup); - this.Controls.Add(searchOptionsGroup); - this.Controls.Add(this.mShowSearchGroup); - this.Name = "Options"; - this.Size = new System.Drawing.Size(551, 311); - searchOptionsGroup.ResumeLayout(false); - searchOptionsGroup.PerformLayout(); - searchInGroup.ResumeLayout(false); - searchInGroup.PerformLayout(); - actionsGroup.ResumeLayout(false); - actionsGroup.PerformLayout(); - this.mShowSearchGroup.ResumeLayout(false); - this.mShowSearchGroup.PerformLayout(); - this.ResumeLayout(false); + this.mShowSearchGroup.Controls.Add(this.mShowOnHotKey); + this.mShowSearchGroup.Controls.Add(this.mShowHotKeyControl); + this.mShowSearchGroup.Controls.Add(this.mShowOnIPC); + this.mShowSearchGroup.Controls.Add(this.mShowOnFailedSearch); + this.mShowSearchGroup.Location = new System.Drawing.Point(5, 6); + this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowSearchGroup.Name = "mShowSearchGroup"; + this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowSearchGroup.Size = new System.Drawing.Size(368, 228); + this.mShowSearchGroup.TabIndex = 0; + this.mShowSearchGroup.TabStop = false; + this.mShowSearchGroup.Text = "Show search window"; + // + // mShowOnHotKey + // + this.mShowOnHotKey.AutoSize = true; + this.mShowOnHotKey.Location = new System.Drawing.Point(20, 85); + this.mShowOnHotKey.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowOnHotKey.Name = "mShowOnHotKey"; + this.mShowOnHotKey.Size = new System.Drawing.Size(466, 29); + this.mShowOnHotKey.TabIndex = 1; + this.mShowOnHotKey.Text = "Show when system-wide &hot key is pressed:"; + this.mShowOnHotKey.UseVisualStyleBackColor = true; + this.mShowOnHotKey.CheckedChanged += new System.EventHandler(this.mShowOnHotKey_CheckedChanged); + // + // mShowHotKeyControl + // + this.mShowHotKeyControl.Location = new System.Drawing.Point(60, 125); + this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowHotKeyControl.Name = "mShowHotKeyControl"; + this.mShowHotKeyControl.Size = new System.Drawing.Size(241, 31); + this.mShowHotKeyControl.TabIndex = 2; + // + // mShowOnIPC + // + this.mShowOnIPC.AutoSize = true; + this.mShowOnIPC.Location = new System.Drawing.Point(20, 179); + this.mShowOnIPC.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowOnIPC.Name = "mShowOnIPC"; + this.mShowOnIPC.Size = new System.Drawing.Size(775, 29); + this.mShowOnIPC.TabIndex = 3; + this.mShowOnIPC.Text = "Show when \"/e1:AutoTypeSearch\" is passed as a ¶meter to KeePass.exe"; + this.mShowOnIPC.UseVisualStyleBackColor = true; + // + // mShowOnFailedSearch + // + this.mShowOnFailedSearch.AutoSize = true; + this.mShowOnFailedSearch.Location = new System.Drawing.Point(20, 40); + this.mShowOnFailedSearch.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowOnFailedSearch.Name = "mShowOnFailedSearch"; + this.mShowOnFailedSearch.Size = new System.Drawing.Size(552, 29); + this.mShowOnFailedSearch.TabIndex = 0; + this.mShowOnFailedSearch.Text = "Show &automatically if global auto-type finds no match"; + this.mShowOnFailedSearch.UseVisualStyleBackColor = true; + // + // mCustomSequences + // + this.mCustomSequences.Controls.Add(this.mAdditionalSequenceDelete); + this.mCustomSequences.Controls.Add(this.mAdditionalSequenceEdit); + this.mCustomSequences.Controls.Add(this.mAdditionalSequences); + this.mCustomSequences.Controls.Add(this.mAdditionalSequencesTitle); + this.mCustomSequences.Controls.Add(this.mAllowCustomSequences); + this.mCustomSequences.Location = new System.Drawing.Point(5, 585); + this.mCustomSequences.Margin = new System.Windows.Forms.Padding(4); + this.mCustomSequences.Name = "mCustomSequences"; + this.mCustomSequences.Padding = new System.Windows.Forms.Padding(4); + this.mCustomSequences.Size = new System.Drawing.Size(1019, 258); + this.mCustomSequences.TabIndex = 4; + this.mCustomSequences.TabStop = false; + this.mCustomSequences.Text = "Custom Sequences"; + // + // mAdditionalSequenceDelete + // + this.mAdditionalSequenceDelete.Image = global::AutoTypeSearch.Properties.Resources.Delete; + this.mAdditionalSequenceDelete.Location = new System.Drawing.Point(889, 58); + this.mAdditionalSequenceDelete.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.mAdditionalSequenceDelete.Name = "mAdditionalSequenceDelete"; + this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(29, 30); + this.mAdditionalSequenceDelete.TabIndex = 11; + this.mAdditionalSequenceDelete.UseVisualStyleBackColor = true; + this.mAdditionalSequenceDelete.Click += new System.EventHandler(this.mAdditionalSequenceDelete_Click); + // + // mAdditionalSequenceEdit + // + this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(755, 68); + this.mAdditionalSequenceEdit.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.mAdditionalSequenceEdit.Name = "mAdditionalSequenceEdit"; + this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(100, 31); + this.mAdditionalSequenceEdit.TabIndex = 10; + this.mAdditionalSequenceEdit.KeyDown += new System.Windows.Forms.KeyEventHandler(this.mAdditionalSequenceEdit_KeyDown); + this.mAdditionalSequenceEdit.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.mAdditionalSequenceEdit_KeyPress); + this.mAdditionalSequenceEdit.Leave += new System.EventHandler(this.mAdditionalSequenceEdit_Leave); + // + // mAdditionalSequences + // + this.mAdditionalSequences.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.mAdditionalSequences.FormattingEnabled = true; + this.mAdditionalSequences.ItemHeight = 25; + this.mAdditionalSequences.Location = new System.Drawing.Point(9, 106); + this.mAdditionalSequences.Margin = new System.Windows.Forms.Padding(4); + this.mAdditionalSequences.Name = "mAdditionalSequences"; + this.mAdditionalSequences.Size = new System.Drawing.Size(989, 129); + this.mAdditionalSequences.TabIndex = 9; + this.mAdditionalSequences.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.mAdditionalSequences_DrawItem); + this.mAdditionalSequences.SelectedIndexChanged += new System.EventHandler(this.mAdditionalSequences_SelectedIndexChanged); + this.mAdditionalSequences.DoubleClick += new System.EventHandler(this.mAdditionalSequences_DoubleClick); + this.mAdditionalSequences.Enter += new System.EventHandler(this.mAdditionalSequences_Enter); + this.mAdditionalSequences.KeyDown += new System.Windows.Forms.KeyEventHandler(this.mAdditionalSequences_KeyDown); + this.mAdditionalSequences.Leave += new System.EventHandler(this.mAdditionalSequences_Leave); + // + // mAdditionalSequencesTitle + // + this.mAdditionalSequencesTitle.AutoSize = true; + this.mAdditionalSequencesTitle.Location = new System.Drawing.Point(8, 76); + this.mAdditionalSequencesTitle.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.mAdditionalSequencesTitle.Name = "mAdditionalSequencesTitle"; + this.mAdditionalSequencesTitle.Size = new System.Drawing.Size(299, 25); + this.mAdditionalSequencesTitle.TabIndex = 8; + this.mAdditionalSequencesTitle.Text = "Add&itional custom sequences:"; + // + // mAllowCustomSequences + // + this.mAllowCustomSequences.AutoSize = true; + this.mAllowCustomSequences.Location = new System.Drawing.Point(9, 34); + this.mAllowCustomSequences.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mAllowCustomSequences.Name = "mAllowCustomSequences"; + this.mAllowCustomSequences.Size = new System.Drawing.Size(377, 29); + this.mAllowCustomSequences.TabIndex = 6; + this.mAllowCustomSequences.Text = "Allow &custom auto-type sequences"; + this.mAllowCustomSequences.UseVisualStyleBackColor = true; + // + // Options + // + this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.mPanel); + this.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.Name = "Options"; + this.Size = new System.Drawing.Size(1112, 624); + this.Paint += new System.Windows.Forms.PaintEventHandler(this.Options_Paint); + searchInGroup.ResumeLayout(false); + searchInGroup.PerformLayout(); + actionsGroup.ResumeLayout(false); + actionsGroup.PerformLayout(); + searchOptionsGroup.ResumeLayout(false); + searchOptionsGroup.PerformLayout(); + this.mPanel.ResumeLayout(false); + this.mShowSearchGroup.ResumeLayout(false); + this.mShowSearchGroup.PerformLayout(); + this.mCustomSequences.ResumeLayout(false); + this.mCustomSequences.PerformLayout(); + this.ResumeLayout(false); } #endregion - private KeePass.UI.HotKeyControlEx mShowHotKeyControl; + private System.Windows.Forms.Panel mPanel; + private System.Windows.Forms.GroupBox mShowSearchGroup; private System.Windows.Forms.CheckBox mShowOnHotKey; + private HotKeyControlEx mShowHotKeyControl; private System.Windows.Forms.CheckBox mShowOnIPC; private System.Windows.Forms.CheckBox mShowOnFailedSearch; + private System.Windows.Forms.GroupBox mCustomSequences; + private System.Windows.Forms.Label mAdditionalSequencesTitle; + private System.Windows.Forms.CheckBox mAllowCustomSequences; + private System.Windows.Forms.CheckBox mResolveReferences; + private System.Windows.Forms.CheckBox mExcludeExpired; private System.Windows.Forms.CheckBox mCaseSensitive; + private System.Windows.Forms.ComboBox mAlternativeAction; + private System.Windows.Forms.ComboBox mDefaultAction; private System.Windows.Forms.CheckBox mSearchInTags; private System.Windows.Forms.CheckBox mSearchInOtherFields; private System.Windows.Forms.CheckBox mSearchInNotes; private System.Windows.Forms.CheckBox mSearchInUrl; private System.Windows.Forms.CheckBox mSearchInUserName; private System.Windows.Forms.CheckBox mSearchInTitle; - private System.Windows.Forms.CheckBox mResolveReferences; - private System.Windows.Forms.CheckBox mExcludeExpired; - private System.Windows.Forms.ComboBox mAlternativeAction; - private System.Windows.Forms.ComboBox mDefaultAction; - private System.Windows.Forms.GroupBox mShowSearchGroup; - + private System.Windows.Forms.ListBox mAdditionalSequences; + private System.Windows.Forms.TextBox mAdditionalSequenceEdit; + private System.Windows.Forms.Button mAdditionalSequenceDelete; } } diff --git a/AutoTypeSearch/Options.cs b/AutoTypeSearch/Options.cs index b99561c..8c4609a 100755 --- a/AutoTypeSearch/Options.cs +++ b/AutoTypeSearch/Options.cs @@ -1,7 +1,10 @@ using System; using System.Configuration; using System.Diagnostics; +using System.Drawing; +using System.IO; using System.Linq; +using System.Net.NetworkInformation; using System.Windows.Forms; using AutoTypeSearch.Properties; using KeePass.Forms; @@ -17,6 +20,8 @@ private static int sRegisteredHotkeyId; + private int mNewSequenceIndex = -1; + // ReSharper disable once MemberCanBePrivate.Global - Public for forms designer public Options() { @@ -29,7 +34,7 @@ // Read options mShowOnFailedSearch.Checked = Settings.Default.ShowOnFailedAutoType; - + if (NativeLib.IsUnix()) { mShowOnHotKey.Enabled = false; @@ -51,13 +56,41 @@ mSearchInNotes.Checked = Settings.Default.SearchNotes; mSearchInTags.Checked = Settings.Default.SearchTags; mSearchInOtherFields.Checked = Settings.Default.SearchCustomFields; - + mCaseSensitive.Checked = Settings.Default.CaseSensitive; mExcludeExpired.Checked = Settings.Default.ExcludeExpired; mResolveReferences.Checked = Settings.Default.ResolveReferences; mDefaultAction.SelectedIndex = (int)Settings.Default.DefaultAction; mAlternativeAction.SelectedIndex = (int)Settings.Default.AlternativeAction; + + mAdditionalSequenceEdit.Hide(); + mAdditionalSequenceDelete.Hide(); + + mAdditionalSequences.BeginUpdate(); + mAdditionalSequences.Items.Clear(); + + if (Settings.Default.AdditionalCustomSequences != null) + { + foreach (string s in Settings.Default.AdditionalCustomSequences) + { + mAdditionalSequences.Items.Add(s); + } + } + + SetNewSequenceItem(); + + mAdditionalSequences.EndUpdate(); + } + + private void SetNewSequenceItem() + { + mNewSequenceIndex = mAdditionalSequences.Items.Add("+ new sequence"); + Control control = mAdditionalSequences.Items[mNewSequenceIndex] as Control; + if (control != null) + { + control.ForeColor = SystemColors.GrayText; + } } private Keys ShowHotKey @@ -90,6 +123,15 @@ Settings.Default.AlternativeAction = (Actions)mAlternativeAction.SelectedIndex; Settings.Default.ShowHotKey = ShowHotKey; + Settings.Default.AdditionalCustomSequences = new System.Collections.Specialized.StringCollection(); + for (int i = 0; i < mAdditionalSequences.Items.Count; i++) + { + if (i != mNewSequenceIndex) + { + Settings.Default.AdditionalCustomSequences.Add(mAdditionalSequences.Items[i].ToString()); + } + } + ApplyHotKey(); } @@ -161,8 +203,10 @@ } #endregion + private static OptionsForm sOptionsForm; public static void AddToWindow(OptionsForm optionsForm) { + Options.sOptionsForm = optionsForm; var tabControl = optionsForm.Controls.Find("m_tabMain", false).FirstOrDefault() as TabControl; var okButton = optionsForm.Controls.Find("m_btnOK", false).FirstOrDefault() as Button; @@ -187,5 +231,250 @@ options.ApplySettings(); }; } + + private void Options_Paint(object sender, PaintEventArgs e) + { + Rectangle r = new Rectangle(mPanel.Location, mPanel.ClientSize); + //r.Offset(mPanel.Location); + r.X -= 1; + r.Y -= 1; + r.Width += 2 + SystemInformation.VerticalScrollBarWidth; + r.Height += 2; + ControlPaint.DrawBorder(e.Graphics, r, SystemColors.GrayText, ButtonBorderStyle.Solid); + } + + private bool mAdditionalSequenceEditing = false; + + private IButtonControl mOldOptionsAcceptButton; + private IButtonControl mOldOptionsCancelButton; + private int mSavedOldOptionsAcceptButton = 0; + + private void CreateAdditionalSequenceEditBox(object sender) + { + if (mAdditionalSequenceEditing) return; + + if (mAdditionalSequences.SelectedIndex < 0 || mAdditionalSequences.SelectedIndex >= mAdditionalSequences.Items.Count) return; + + mAdditionalSequenceEditing = true; + + SaveFormAcceptButton(); + + int delta = 0; + + mEditedSequenceIndex = mAdditionalSequences.SelectedIndex; + + Rectangle r = mAdditionalSequences.GetItemRectangle(mEditedSequenceIndex); + + string itemText = (string)mAdditionalSequences.Items[mEditedSequenceIndex]; + if (mEditedSequenceIndex == mNewSequenceIndex) + { + itemText = ""; + } + + mAdditionalSequenceEdit.Location = new System.Drawing.Point(r.X + delta, r.Y + delta); + mAdditionalSequenceEdit.Size = new System.Drawing.Size(r.Width - (mEditedSequenceIndex == mNewSequenceIndex ? 0 : r.Height), r.Height - delta); + mAdditionalSequenceEdit.Show(); + mAdditionalSequences.Controls.AddRange(new System.Windows.Forms.Control[] { this.mAdditionalSequenceEdit }); + mAdditionalSequenceEdit.Text = itemText; + mAdditionalSequenceEdit.Focus(); + mAdditionalSequenceEdit.SelectAll(); + + SetDeleteSequenceButton(); + + mPanel.ScrollControlIntoView(mAdditionalSequenceEdit); + } + + private void SaveFormAcceptButton() + { + mSavedOldOptionsAcceptButton++; + if (sOptionsForm != null && mSavedOldOptionsAcceptButton == 1) + { + mOldOptionsAcceptButton = sOptionsForm.AcceptButton; + mOldOptionsCancelButton = sOptionsForm.CancelButton; + + sOptionsForm.AcceptButton = null; + sOptionsForm.CancelButton = null; + } + } + + private void RestoreFormAcceptButton() + { + if (mSavedOldOptionsAcceptButton > 0) + { + mSavedOldOptionsAcceptButton--; + if (sOptionsForm != null && mSavedOldOptionsAcceptButton == 0) + { + sOptionsForm.AcceptButton = mOldOptionsAcceptButton; + sOptionsForm.CancelButton = mOldOptionsCancelButton; + } + } + } + + private int mEditedSequenceIndex; + private void mAdditionalSequenceEdit_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == 13) + { + FinishEditingAdditionalSequenceItem(); + } + } + + private bool mLeavingAdditionalSequenceEditing = false; + private void FinishEditingAdditionalSequenceItem(bool accepted = true) + { + if (!mAdditionalSequenceEditing || mLeavingAdditionalSequenceEditing) return; + mLeavingAdditionalSequenceEditing = true; + + + mAdditionalSequences.BeginUpdate(); + if (mEditedSequenceIndex != mNewSequenceIndex) + { + mAdditionalSequences.Items.RemoveAt(mNewSequenceIndex); + } + if (mAdditionalSequenceEdit.Text.Trim().Length == 0) + { + mAdditionalSequences.Items.RemoveAt(mEditedSequenceIndex); + } + else if (accepted) + { + mAdditionalSequences.Items[mEditedSequenceIndex] = mAdditionalSequenceEdit.Text; + } + SetNewSequenceItem(); + mAdditionalSequences.EndUpdate(); + + mAdditionalSequences.Focus(); + + mAdditionalSequenceEdit.Hide(); + + RestoreFormAcceptButton(); + + SetDeleteSequenceButton(); + + mAdditionalSequenceEditing = false; + mLeavingAdditionalSequenceEditing = false; + } + + private void mAdditionalSequenceEdit_Leave(object sender, EventArgs e) + { + FinishEditingAdditionalSequenceItem(); + } + + private void mAdditionalSequences_DoubleClick(object sender, EventArgs e) + { + CreateAdditionalSequenceEditBox(sender); + } + + private void mAdditionalSequences_SelectedIndexChanged(object sender, EventArgs e) + { + SetDeleteSequenceButton(); + mPanel.ScrollControlIntoView(mAdditionalSequences); + + if (mAdditionalSequences.SelectedIndex == mNewSequenceIndex) + { + CreateAdditionalSequenceEditBox(sender); + } + } + + private void SetDeleteSequenceButton() + { + int selected = mAdditionalSequences.SelectedIndex; + if (selected < 0 || selected >= mAdditionalSequences.Items.Count || selected == mNewSequenceIndex) + { + mAdditionalSequenceDelete.Hide(); + } + else + { + mAdditionalSequences.Controls.AddRange(new System.Windows.Forms.Control[] { this.mAdditionalSequenceDelete }); + mAdditionalSequenceDelete.Show(); + + Rectangle r = mAdditionalSequences.GetItemRectangle(selected); + + mAdditionalSequenceDelete.Location = new Point(r.Right - r.Height, r.Y); + mAdditionalSequenceDelete.Size = new Size(r.Height, r.Height); + } + } + + private void mAdditionalSequences_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + CreateAdditionalSequenceEditBox(sender); + } + else if (e.KeyCode == Keys.Delete) + { + RemoveAdditionalSequence(); + } + } + + private void RemoveAdditionalSequence() + { + int selected = mAdditionalSequences.SelectedIndex; + if (selected >= 0 && selected < mAdditionalSequences.Items.Count && selected != mNewSequenceIndex) + { + mAdditionalSequences.Items.RemoveAt(selected); + mNewSequenceIndex--; + } + } + + private bool mAdditionalSequencesFocused = false; + private void mAdditionalSequences_Enter(object sender, EventArgs e) + { + if (mAdditionalSequencesFocused) return; + mAdditionalSequencesFocused = true; + + SaveFormAcceptButton(); + } + + private void mAdditionalSequences_Leave(object sender, EventArgs e) + { + if (!mAdditionalSequencesFocused) return; + mAdditionalSequencesFocused = false; + + RestoreFormAcceptButton(); + } + + private void mAdditionalSequences_DrawItem(object sender, DrawItemEventArgs e) + { + e.DrawBackground(); + Color fontColor = mAdditionalSequences.ForeColor; + if (e.Index == mNewSequenceIndex) + { + fontColor = SystemColors.GrayText; + } + if (mAdditionalSequences.Items.Count > 0) // Without this, I receive errors + { + e.Graphics.DrawString(mAdditionalSequences.Items[e.Index].ToString(), mAdditionalSequences.Font, new SolidBrush(fontColor), e.Bounds); + } + e.DrawFocusRectangle(); + } + + private void mAdditionalSequenceEdit_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Up) + { + FinishEditingAdditionalSequenceItem(); + if (mAdditionalSequences.SelectedIndex > 0) + { + mAdditionalSequences.SelectedIndex--; + } + } + else if (e.KeyCode == Keys.Down) + { + FinishEditingAdditionalSequenceItem(); + if (mAdditionalSequences.SelectedIndex < mAdditionalSequences.Items.Count - 1) + { + mAdditionalSequences.SelectedIndex++; + } + } + else if (e.KeyCode == Keys.Escape) + { + FinishEditingAdditionalSequenceItem(false); + } + } + + private void mAdditionalSequenceDelete_Click(object sender, EventArgs e) + { + RemoveAdditionalSequence(); + } } } diff --git a/AutoTypeSearch/AutoTypeSearch.csproj b/AutoTypeSearch/AutoTypeSearch.csproj index c55c5b8..786cffd 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -1,4 +1,4 @@ - + @@ -44,7 +44,8 @@ - + + False ..\keepass_portable\KeePass.exe @@ -82,6 +83,9 @@ SearchWindow.cs + + Component + @@ -108,6 +112,9 @@ + + + IF $(ConfigurationName) == Release "$(ProjectDir)..\CreatePlgX.bat" diff --git a/AutoTypeSearch/Delete.png b/AutoTypeSearch/Delete.png new file mode 100644 index 0000000..9d61fb8 --- /dev/null +++ b/AutoTypeSearch/Delete.png Binary files differ diff --git a/AutoTypeSearch/Options.Designer.cs b/AutoTypeSearch/Options.Designer.cs index 4886b6d..305d8e4 100755 --- a/AutoTypeSearch/Options.Designer.cs +++ b/AutoTypeSearch/Options.Designer.cs @@ -1,4 +1,4 @@ -using KeePass.UI; +using KeePass.UI; namespace AutoTypeSearch { @@ -30,295 +30,427 @@ /// private void InitializeComponent() { - System.Windows.Forms.GroupBox searchOptionsGroup; - System.Windows.Forms.GroupBox searchInGroup; - System.Windows.Forms.GroupBox actionsGroup; - System.Windows.Forms.Label alternativeActionLabel; - System.Windows.Forms.Label defaultActionLabel; - this.mResolveReferences = new System.Windows.Forms.CheckBox(); - this.mExcludeExpired = new System.Windows.Forms.CheckBox(); - this.mCaseSensitive = new System.Windows.Forms.CheckBox(); - this.mSearchInTags = new System.Windows.Forms.CheckBox(); - this.mSearchInOtherFields = new System.Windows.Forms.CheckBox(); - this.mSearchInNotes = new System.Windows.Forms.CheckBox(); - this.mSearchInUrl = new System.Windows.Forms.CheckBox(); - this.mSearchInUserName = new System.Windows.Forms.CheckBox(); - this.mSearchInTitle = new System.Windows.Forms.CheckBox(); - this.mAlternativeAction = new System.Windows.Forms.ComboBox(); - this.mDefaultAction = new System.Windows.Forms.ComboBox(); - this.mShowHotKeyControl = new KeePass.UI.HotKeyControlEx(); - this.mShowSearchGroup = new System.Windows.Forms.GroupBox(); - this.mShowOnHotKey = new System.Windows.Forms.CheckBox(); - this.mShowOnIPC = new System.Windows.Forms.CheckBox(); - this.mShowOnFailedSearch = new System.Windows.Forms.CheckBox(); - searchOptionsGroup = new System.Windows.Forms.GroupBox(); - searchInGroup = new System.Windows.Forms.GroupBox(); - actionsGroup = new System.Windows.Forms.GroupBox(); - alternativeActionLabel = new System.Windows.Forms.Label(); - defaultActionLabel = new System.Windows.Forms.Label(); - searchOptionsGroup.SuspendLayout(); - searchInGroup.SuspendLayout(); - actionsGroup.SuspendLayout(); - this.mShowSearchGroup.SuspendLayout(); - this.SuspendLayout(); - // - // searchOptionsGroup - // - searchOptionsGroup.Controls.Add(this.mResolveReferences); - searchOptionsGroup.Controls.Add(this.mExcludeExpired); - searchOptionsGroup.Controls.Add(this.mCaseSensitive); - searchOptionsGroup.Location = new System.Drawing.Point(6, 189); - searchOptionsGroup.Name = "searchOptionsGroup"; - searchOptionsGroup.Size = new System.Drawing.Size(540, 45); - searchOptionsGroup.TabIndex = 2; - searchOptionsGroup.TabStop = false; - searchOptionsGroup.Text = "Search options"; - // - // mResolveReferences - // - this.mResolveReferences.AutoSize = true; - this.mResolveReferences.Location = new System.Drawing.Point(251, 20); - this.mResolveReferences.Name = "mResolveReferences"; - this.mResolveReferences.Size = new System.Drawing.Size(170, 17); - this.mResolveReferences.TabIndex = 2; - this.mResolveReferences.Text = "Resolve fiel&d references (slow)"; - this.mResolveReferences.UseVisualStyleBackColor = true; - // - // mExcludeExpired - // - this.mExcludeExpired.AutoSize = true; - this.mExcludeExpired.Location = new System.Drawing.Point(108, 20); - this.mExcludeExpired.Name = "mExcludeExpired"; - this.mExcludeExpired.Size = new System.Drawing.Size(135, 17); - this.mExcludeExpired.TabIndex = 1; - this.mExcludeExpired.Text = "Exclude &expired entries"; - this.mExcludeExpired.UseVisualStyleBackColor = true; - // - // mCaseSensitive - // - this.mCaseSensitive.AutoSize = true; - this.mCaseSensitive.Location = new System.Drawing.Point(10, 20); - this.mCaseSensitive.Name = "mCaseSensitive"; - this.mCaseSensitive.Size = new System.Drawing.Size(94, 17); - this.mCaseSensitive.TabIndex = 0; - this.mCaseSensitive.Text = "Case-sensiti&ve"; - this.mCaseSensitive.UseVisualStyleBackColor = true; - // - // searchInGroup - // - searchInGroup.Controls.Add(this.mSearchInTags); - searchInGroup.Controls.Add(this.mSearchInOtherFields); - searchInGroup.Controls.Add(this.mSearchInNotes); - searchInGroup.Controls.Add(this.mSearchInUrl); - searchInGroup.Controls.Add(this.mSearchInUserName); - searchInGroup.Controls.Add(this.mSearchInTitle); - searchInGroup.Location = new System.Drawing.Point(6, 136); - searchInGroup.Name = "searchInGroup"; - searchInGroup.Size = new System.Drawing.Size(540, 47); - searchInGroup.TabIndex = 1; - searchInGroup.TabStop = false; - searchInGroup.Text = "Search in"; - // - // mSearchInTags - // - this.mSearchInTags.AutoSize = true; - this.mSearchInTags.Location = new System.Drawing.Point(258, 19); - this.mSearchInTags.Name = "mSearchInTags"; - this.mSearchInTags.Size = new System.Drawing.Size(50, 17); - this.mSearchInTags.TabIndex = 4; - this.mSearchInTags.Text = "Ta&gs"; - this.mSearchInTags.UseVisualStyleBackColor = true; - // - // mSearchInOtherFields - // - this.mSearchInOtherFields.AutoSize = true; - this.mSearchInOtherFields.Location = new System.Drawing.Point(314, 19); - this.mSearchInOtherFields.Name = "mSearchInOtherFields"; - this.mSearchInOtherFields.Size = new System.Drawing.Size(139, 17); - this.mSearchInOtherFields.TabIndex = 5; - this.mSearchInOtherFields.Text = "&Other unprotected fields"; - this.mSearchInOtherFields.UseVisualStyleBackColor = true; - // - // mSearchInNotes - // - this.mSearchInNotes.AutoSize = true; - this.mSearchInNotes.Location = new System.Drawing.Point(198, 19); - this.mSearchInNotes.Name = "mSearchInNotes"; - this.mSearchInNotes.Size = new System.Drawing.Size(54, 17); - this.mSearchInNotes.TabIndex = 3; - this.mSearchInNotes.Text = "Note&s"; - this.mSearchInNotes.UseVisualStyleBackColor = true; - // - // mSearchInUrl - // - this.mSearchInUrl.AutoSize = true; - this.mSearchInUrl.Location = new System.Drawing.Point(144, 19); - this.mSearchInUrl.Name = "mSearchInUrl"; - this.mSearchInUrl.Size = new System.Drawing.Size(48, 17); - this.mSearchInUrl.TabIndex = 2; - this.mSearchInUrl.Text = "&URL"; - this.mSearchInUrl.UseVisualStyleBackColor = true; - // - // mSearchInUserName - // - this.mSearchInUserName.AutoSize = true; - this.mSearchInUserName.Location = new System.Drawing.Point(61, 19); - this.mSearchInUserName.Name = "mSearchInUserName"; - this.mSearchInUserName.Size = new System.Drawing.Size(77, 17); - this.mSearchInUserName.TabIndex = 1; - this.mSearchInUserName.Text = "User &name"; - this.mSearchInUserName.UseVisualStyleBackColor = true; - // - // mSearchInTitle - // - this.mSearchInTitle.AutoSize = true; - this.mSearchInTitle.Location = new System.Drawing.Point(9, 19); - this.mSearchInTitle.Name = "mSearchInTitle"; - this.mSearchInTitle.Size = new System.Drawing.Size(46, 17); - this.mSearchInTitle.TabIndex = 0; - this.mSearchInTitle.Text = "&Title"; - this.mSearchInTitle.UseVisualStyleBackColor = true; - // - // actionsGroup - // - actionsGroup.Controls.Add(this.mAlternativeAction); - actionsGroup.Controls.Add(this.mDefaultAction); - actionsGroup.Controls.Add(alternativeActionLabel); - actionsGroup.Controls.Add(defaultActionLabel); - actionsGroup.Location = new System.Drawing.Point(6, 241); - actionsGroup.Name = "actionsGroup"; - actionsGroup.Size = new System.Drawing.Size(540, 67); - actionsGroup.TabIndex = 3; - actionsGroup.TabStop = false; - actionsGroup.Text = "Actions"; - // - // mAlternativeAction - // - this.mAlternativeAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.mAlternativeAction.Location = new System.Drawing.Point(288, 37); - this.mAlternativeAction.Name = "mAlternativeAction"; - this.mAlternativeAction.Size = new System.Drawing.Size(240, 21); - this.mAlternativeAction.TabIndex = 3; - // - // mDefaultAction - // - this.mDefaultAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.mDefaultAction.Location = new System.Drawing.Point(11, 37); - this.mDefaultAction.Name = "mDefaultAction"; - this.mDefaultAction.Size = new System.Drawing.Size(240, 21); - this.mDefaultAction.TabIndex = 1; - // - // alternativeActionLabel - // - alternativeActionLabel.AutoSize = true; - alternativeActionLabel.Location = new System.Drawing.Point(285, 20); - alternativeActionLabel.Name = "alternativeActionLabel"; - alternativeActionLabel.Size = new System.Drawing.Size(159, 13); - alternativeActionLabel.TabIndex = 2; - alternativeActionLabel.Text = "A<ernative action (Shift + Enter):"; - // - // defaultActionLabel - // - defaultActionLabel.AutoSize = true; - defaultActionLabel.Location = new System.Drawing.Point(8, 20); - defaultActionLabel.Name = "defaultActionLabel"; - defaultActionLabel.Size = new System.Drawing.Size(110, 13); - defaultActionLabel.TabIndex = 0; - defaultActionLabel.Text = "De&fault action (Enter):"; - // - // mShowHotKeyControl - // - this.mShowHotKeyControl.Location = new System.Drawing.Point(30, 65); - this.mShowHotKeyControl.Name = "mShowHotKeyControl"; - this.mShowHotKeyControl.Size = new System.Drawing.Size(123, 20); - this.mShowHotKeyControl.TabIndex = 2; - // - // mShowSearchGroup - // - this.mShowSearchGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + System.Windows.Forms.GroupBox searchInGroup; + System.Windows.Forms.GroupBox actionsGroup; + System.Windows.Forms.Label alternativeActionLabel; + System.Windows.Forms.Label defaultActionLabel; + System.Windows.Forms.GroupBox searchOptionsGroup; + this.mSearchInTags = new System.Windows.Forms.CheckBox(); + this.mSearchInOtherFields = new System.Windows.Forms.CheckBox(); + this.mSearchInNotes = new System.Windows.Forms.CheckBox(); + this.mSearchInUrl = new System.Windows.Forms.CheckBox(); + this.mSearchInUserName = new System.Windows.Forms.CheckBox(); + this.mSearchInTitle = new System.Windows.Forms.CheckBox(); + this.mAlternativeAction = new System.Windows.Forms.ComboBox(); + this.mDefaultAction = new System.Windows.Forms.ComboBox(); + this.mResolveReferences = new System.Windows.Forms.CheckBox(); + this.mExcludeExpired = new System.Windows.Forms.CheckBox(); + this.mCaseSensitive = new System.Windows.Forms.CheckBox(); + this.mPanel = new System.Windows.Forms.Panel(); + this.mShowSearchGroup = new System.Windows.Forms.GroupBox(); + this.mShowOnHotKey = new System.Windows.Forms.CheckBox(); + this.mShowHotKeyControl = new KeePass.UI.HotKeyControlEx(); + this.mShowOnIPC = new System.Windows.Forms.CheckBox(); + this.mShowOnFailedSearch = new System.Windows.Forms.CheckBox(); + this.mCustomSequences = new System.Windows.Forms.GroupBox(); + this.mAdditionalSequenceDelete = new System.Windows.Forms.Button(); + this.mAdditionalSequenceEdit = new System.Windows.Forms.TextBox(); + this.mAdditionalSequences = new System.Windows.Forms.ListBox(); + this.mAdditionalSequencesTitle = new System.Windows.Forms.Label(); + this.mAllowCustomSequences = new System.Windows.Forms.CheckBox(); + searchInGroup = new System.Windows.Forms.GroupBox(); + actionsGroup = new System.Windows.Forms.GroupBox(); + alternativeActionLabel = new System.Windows.Forms.Label(); + defaultActionLabel = new System.Windows.Forms.Label(); + searchOptionsGroup = new System.Windows.Forms.GroupBox(); + searchInGroup.SuspendLayout(); + actionsGroup.SuspendLayout(); + searchOptionsGroup.SuspendLayout(); + this.mPanel.SuspendLayout(); + this.mShowSearchGroup.SuspendLayout(); + this.mCustomSequences.SuspendLayout(); + this.SuspendLayout(); + // + // searchInGroup + // + searchInGroup.Controls.Add(this.mSearchInTags); + searchInGroup.Controls.Add(this.mSearchInOtherFields); + searchInGroup.Controls.Add(this.mSearchInNotes); + searchInGroup.Controls.Add(this.mSearchInUrl); + searchInGroup.Controls.Add(this.mSearchInUserName); + searchInGroup.Controls.Add(this.mSearchInTitle); + searchInGroup.Location = new System.Drawing.Point(5, 245); + searchInGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + searchInGroup.Name = "searchInGroup"; + searchInGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + searchInGroup.Size = new System.Drawing.Size(1019, 90); + searchInGroup.TabIndex = 1; + searchInGroup.TabStop = false; + searchInGroup.Text = "Search in"; + // + // mSearchInTags + // + this.mSearchInTags.AutoSize = true; + this.mSearchInTags.Location = new System.Drawing.Point(516, 36); + this.mSearchInTags.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInTags.Name = "mSearchInTags"; + this.mSearchInTags.Size = new System.Drawing.Size(92, 29); + this.mSearchInTags.TabIndex = 4; + this.mSearchInTags.Text = "Ta&gs"; + this.mSearchInTags.UseVisualStyleBackColor = true; + // + // mSearchInOtherFields + // + this.mSearchInOtherFields.AutoSize = true; + this.mSearchInOtherFields.Location = new System.Drawing.Point(628, 36); + this.mSearchInOtherFields.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInOtherFields.Name = "mSearchInOtherFields"; + this.mSearchInOtherFields.Size = new System.Drawing.Size(274, 29); + this.mSearchInOtherFields.TabIndex = 5; + this.mSearchInOtherFields.Text = "&Other unprotected fields"; + this.mSearchInOtherFields.UseVisualStyleBackColor = true; + // + // mSearchInNotes + // + this.mSearchInNotes.AutoSize = true; + this.mSearchInNotes.Location = new System.Drawing.Point(396, 36); + this.mSearchInNotes.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInNotes.Name = "mSearchInNotes"; + this.mSearchInNotes.Size = new System.Drawing.Size(100, 29); + this.mSearchInNotes.TabIndex = 3; + this.mSearchInNotes.Text = "Note&s"; + this.mSearchInNotes.UseVisualStyleBackColor = true; + // + // mSearchInUrl + // + this.mSearchInUrl.AutoSize = true; + this.mSearchInUrl.Location = new System.Drawing.Point(288, 36); + this.mSearchInUrl.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInUrl.Name = "mSearchInUrl"; + this.mSearchInUrl.Size = new System.Drawing.Size(86, 29); + this.mSearchInUrl.TabIndex = 2; + this.mSearchInUrl.Text = "&URL"; + this.mSearchInUrl.UseVisualStyleBackColor = true; + // + // mSearchInUserName + // + this.mSearchInUserName.AutoSize = true; + this.mSearchInUserName.Location = new System.Drawing.Point(123, 36); + this.mSearchInUserName.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInUserName.Name = "mSearchInUserName"; + this.mSearchInUserName.Size = new System.Drawing.Size(148, 29); + this.mSearchInUserName.TabIndex = 1; + this.mSearchInUserName.Text = "User &name"; + this.mSearchInUserName.UseVisualStyleBackColor = true; + // + // mSearchInTitle + // + this.mSearchInTitle.AutoSize = true; + this.mSearchInTitle.Location = new System.Drawing.Point(19, 36); + this.mSearchInTitle.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mSearchInTitle.Name = "mSearchInTitle"; + this.mSearchInTitle.Size = new System.Drawing.Size(85, 29); + this.mSearchInTitle.TabIndex = 0; + this.mSearchInTitle.Text = "&Title"; + this.mSearchInTitle.UseVisualStyleBackColor = true; + // + // actionsGroup + // + actionsGroup.Controls.Add(this.mAlternativeAction); + actionsGroup.Controls.Add(this.mDefaultAction); + actionsGroup.Controls.Add(alternativeActionLabel); + actionsGroup.Controls.Add(defaultActionLabel); + actionsGroup.Location = new System.Drawing.Point(5, 446); + actionsGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + actionsGroup.Name = "actionsGroup"; + actionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + actionsGroup.Size = new System.Drawing.Size(1019, 129); + actionsGroup.TabIndex = 3; + actionsGroup.TabStop = false; + actionsGroup.Text = "Actions"; + // + // mAlternativeAction + // + this.mAlternativeAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.mAlternativeAction.Location = new System.Drawing.Point(523, 71); + this.mAlternativeAction.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mAlternativeAction.Name = "mAlternativeAction"; + this.mAlternativeAction.Size = new System.Drawing.Size(476, 33); + this.mAlternativeAction.TabIndex = 3; + // + // mDefaultAction + // + this.mDefaultAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.mDefaultAction.Location = new System.Drawing.Point(21, 71); + this.mDefaultAction.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mDefaultAction.Name = "mDefaultAction"; + this.mDefaultAction.Size = new System.Drawing.Size(476, 33); + this.mDefaultAction.TabIndex = 1; + // + // alternativeActionLabel + // + alternativeActionLabel.AutoSize = true; + alternativeActionLabel.Location = new System.Drawing.Point(517, 39); + alternativeActionLabel.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + alternativeActionLabel.Name = "alternativeActionLabel"; + alternativeActionLabel.Size = new System.Drawing.Size(322, 25); + alternativeActionLabel.TabIndex = 2; + alternativeActionLabel.Text = "A<ernative action (Shift + Enter):"; + // + // defaultActionLabel + // + defaultActionLabel.AutoSize = true; + defaultActionLabel.Location = new System.Drawing.Point(16, 39); + defaultActionLabel.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + defaultActionLabel.Name = "defaultActionLabel"; + defaultActionLabel.Size = new System.Drawing.Size(221, 25); + defaultActionLabel.TabIndex = 0; + defaultActionLabel.Text = "De&fault action (Enter):"; + // + // searchOptionsGroup + // + searchOptionsGroup.Controls.Add(this.mResolveReferences); + searchOptionsGroup.Controls.Add(this.mExcludeExpired); + searchOptionsGroup.Controls.Add(this.mCaseSensitive); + searchOptionsGroup.Location = new System.Drawing.Point(5, 348); + searchOptionsGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + searchOptionsGroup.Name = "searchOptionsGroup"; + searchOptionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + searchOptionsGroup.Size = new System.Drawing.Size(1019, 86); + searchOptionsGroup.TabIndex = 2; + searchOptionsGroup.TabStop = false; + searchOptionsGroup.Text = "Search options"; + // + // mResolveReferences + // + this.mResolveReferences.AutoSize = true; + this.mResolveReferences.Location = new System.Drawing.Point(501, 39); + this.mResolveReferences.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mResolveReferences.Name = "mResolveReferences"; + this.mResolveReferences.Size = new System.Drawing.Size(339, 29); + this.mResolveReferences.TabIndex = 2; + this.mResolveReferences.Text = "Resolve fiel&d references (slow)"; + this.mResolveReferences.UseVisualStyleBackColor = true; + // + // mExcludeExpired + // + this.mExcludeExpired.AutoSize = true; + this.mExcludeExpired.Location = new System.Drawing.Point(216, 39); + this.mExcludeExpired.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mExcludeExpired.Name = "mExcludeExpired"; + this.mExcludeExpired.Size = new System.Drawing.Size(269, 29); + this.mExcludeExpired.TabIndex = 1; + this.mExcludeExpired.Text = "Exclude &expired entries"; + this.mExcludeExpired.UseVisualStyleBackColor = true; + // + // mCaseSensitive + // + this.mCaseSensitive.AutoSize = true; + this.mCaseSensitive.Location = new System.Drawing.Point(20, 39); + this.mCaseSensitive.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mCaseSensitive.Name = "mCaseSensitive"; + this.mCaseSensitive.Size = new System.Drawing.Size(186, 29); + this.mCaseSensitive.TabIndex = 0; + this.mCaseSensitive.Text = "Case-sensiti&ve"; + this.mCaseSensitive.UseVisualStyleBackColor = true; + // + // mPanel + // + this.mPanel.AutoScroll = true; + this.mPanel.Controls.Add(this.mShowSearchGroup); + this.mPanel.Controls.Add(this.mCustomSequences); + this.mPanel.Controls.Add(searchOptionsGroup); + this.mPanel.Controls.Add(actionsGroup); + this.mPanel.Controls.Add(searchInGroup); + this.mPanel.Location = new System.Drawing.Point(12, 22); + this.mPanel.Margin = new System.Windows.Forms.Padding(4); + this.mPanel.Name = "mPanel"; + this.mPanel.Size = new System.Drawing.Size(1077, 579); + this.mPanel.TabIndex = 5; + // + // mShowSearchGroup + // + this.mShowSearchGroup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.mShowSearchGroup.Controls.Add(this.mShowOnHotKey); - this.mShowSearchGroup.Controls.Add(this.mShowHotKeyControl); - this.mShowSearchGroup.Controls.Add(this.mShowOnIPC); - this.mShowSearchGroup.Controls.Add(this.mShowOnFailedSearch); - this.mShowSearchGroup.Location = new System.Drawing.Point(6, 12); - this.mShowSearchGroup.Name = "mShowSearchGroup"; - this.mShowSearchGroup.Size = new System.Drawing.Size(540, 118); - this.mShowSearchGroup.TabIndex = 0; - this.mShowSearchGroup.TabStop = false; - this.mShowSearchGroup.Text = "Show search window"; - // - // mShowOnHotKey - // - this.mShowOnHotKey.AutoSize = true; - this.mShowOnHotKey.Location = new System.Drawing.Point(10, 44); - this.mShowOnHotKey.Name = "mShowOnHotKey"; - this.mShowOnHotKey.Size = new System.Drawing.Size(233, 17); - this.mShowOnHotKey.TabIndex = 1; - this.mShowOnHotKey.Text = "Show when system-wide &hot key is pressed:"; - this.mShowOnHotKey.UseVisualStyleBackColor = true; - this.mShowOnHotKey.CheckedChanged += new System.EventHandler(this.mShowOnHotKey_CheckedChanged); - // - // mShowOnIPC - // - this.mShowOnIPC.AutoSize = true; - this.mShowOnIPC.Location = new System.Drawing.Point(10, 93); - this.mShowOnIPC.Name = "mShowOnIPC"; - this.mShowOnIPC.Size = new System.Drawing.Size(386, 17); - this.mShowOnIPC.TabIndex = 3; - this.mShowOnIPC.Text = "Show when \"/e1:AutoTypeSearch\" is passed as a ¶meter to KeePass.exe"; - this.mShowOnIPC.UseVisualStyleBackColor = true; - // - // mShowOnFailedSearch - // - this.mShowOnFailedSearch.AutoSize = true; - this.mShowOnFailedSearch.Location = new System.Drawing.Point(10, 21); - this.mShowOnFailedSearch.Name = "mShowOnFailedSearch"; - this.mShowOnFailedSearch.Size = new System.Drawing.Size(275, 17); - this.mShowOnFailedSearch.TabIndex = 0; - this.mShowOnFailedSearch.Text = "Show &automatically if global auto-type finds no match"; - this.mShowOnFailedSearch.UseVisualStyleBackColor = true; - // - // Options - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(actionsGroup); - this.Controls.Add(searchInGroup); - this.Controls.Add(searchOptionsGroup); - this.Controls.Add(this.mShowSearchGroup); - this.Name = "Options"; - this.Size = new System.Drawing.Size(551, 311); - searchOptionsGroup.ResumeLayout(false); - searchOptionsGroup.PerformLayout(); - searchInGroup.ResumeLayout(false); - searchInGroup.PerformLayout(); - actionsGroup.ResumeLayout(false); - actionsGroup.PerformLayout(); - this.mShowSearchGroup.ResumeLayout(false); - this.mShowSearchGroup.PerformLayout(); - this.ResumeLayout(false); + this.mShowSearchGroup.Controls.Add(this.mShowOnHotKey); + this.mShowSearchGroup.Controls.Add(this.mShowHotKeyControl); + this.mShowSearchGroup.Controls.Add(this.mShowOnIPC); + this.mShowSearchGroup.Controls.Add(this.mShowOnFailedSearch); + this.mShowSearchGroup.Location = new System.Drawing.Point(5, 6); + this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowSearchGroup.Name = "mShowSearchGroup"; + this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowSearchGroup.Size = new System.Drawing.Size(368, 228); + this.mShowSearchGroup.TabIndex = 0; + this.mShowSearchGroup.TabStop = false; + this.mShowSearchGroup.Text = "Show search window"; + // + // mShowOnHotKey + // + this.mShowOnHotKey.AutoSize = true; + this.mShowOnHotKey.Location = new System.Drawing.Point(20, 85); + this.mShowOnHotKey.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowOnHotKey.Name = "mShowOnHotKey"; + this.mShowOnHotKey.Size = new System.Drawing.Size(466, 29); + this.mShowOnHotKey.TabIndex = 1; + this.mShowOnHotKey.Text = "Show when system-wide &hot key is pressed:"; + this.mShowOnHotKey.UseVisualStyleBackColor = true; + this.mShowOnHotKey.CheckedChanged += new System.EventHandler(this.mShowOnHotKey_CheckedChanged); + // + // mShowHotKeyControl + // + this.mShowHotKeyControl.Location = new System.Drawing.Point(60, 125); + this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowHotKeyControl.Name = "mShowHotKeyControl"; + this.mShowHotKeyControl.Size = new System.Drawing.Size(241, 31); + this.mShowHotKeyControl.TabIndex = 2; + // + // mShowOnIPC + // + this.mShowOnIPC.AutoSize = true; + this.mShowOnIPC.Location = new System.Drawing.Point(20, 179); + this.mShowOnIPC.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowOnIPC.Name = "mShowOnIPC"; + this.mShowOnIPC.Size = new System.Drawing.Size(775, 29); + this.mShowOnIPC.TabIndex = 3; + this.mShowOnIPC.Text = "Show when \"/e1:AutoTypeSearch\" is passed as a ¶meter to KeePass.exe"; + this.mShowOnIPC.UseVisualStyleBackColor = true; + // + // mShowOnFailedSearch + // + this.mShowOnFailedSearch.AutoSize = true; + this.mShowOnFailedSearch.Location = new System.Drawing.Point(20, 40); + this.mShowOnFailedSearch.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowOnFailedSearch.Name = "mShowOnFailedSearch"; + this.mShowOnFailedSearch.Size = new System.Drawing.Size(552, 29); + this.mShowOnFailedSearch.TabIndex = 0; + this.mShowOnFailedSearch.Text = "Show &automatically if global auto-type finds no match"; + this.mShowOnFailedSearch.UseVisualStyleBackColor = true; + // + // mCustomSequences + // + this.mCustomSequences.Controls.Add(this.mAdditionalSequenceDelete); + this.mCustomSequences.Controls.Add(this.mAdditionalSequenceEdit); + this.mCustomSequences.Controls.Add(this.mAdditionalSequences); + this.mCustomSequences.Controls.Add(this.mAdditionalSequencesTitle); + this.mCustomSequences.Controls.Add(this.mAllowCustomSequences); + this.mCustomSequences.Location = new System.Drawing.Point(5, 585); + this.mCustomSequences.Margin = new System.Windows.Forms.Padding(4); + this.mCustomSequences.Name = "mCustomSequences"; + this.mCustomSequences.Padding = new System.Windows.Forms.Padding(4); + this.mCustomSequences.Size = new System.Drawing.Size(1019, 258); + this.mCustomSequences.TabIndex = 4; + this.mCustomSequences.TabStop = false; + this.mCustomSequences.Text = "Custom Sequences"; + // + // mAdditionalSequenceDelete + // + this.mAdditionalSequenceDelete.Image = global::AutoTypeSearch.Properties.Resources.Delete; + this.mAdditionalSequenceDelete.Location = new System.Drawing.Point(889, 58); + this.mAdditionalSequenceDelete.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.mAdditionalSequenceDelete.Name = "mAdditionalSequenceDelete"; + this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(29, 30); + this.mAdditionalSequenceDelete.TabIndex = 11; + this.mAdditionalSequenceDelete.UseVisualStyleBackColor = true; + this.mAdditionalSequenceDelete.Click += new System.EventHandler(this.mAdditionalSequenceDelete_Click); + // + // mAdditionalSequenceEdit + // + this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(755, 68); + this.mAdditionalSequenceEdit.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.mAdditionalSequenceEdit.Name = "mAdditionalSequenceEdit"; + this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(100, 31); + this.mAdditionalSequenceEdit.TabIndex = 10; + this.mAdditionalSequenceEdit.KeyDown += new System.Windows.Forms.KeyEventHandler(this.mAdditionalSequenceEdit_KeyDown); + this.mAdditionalSequenceEdit.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.mAdditionalSequenceEdit_KeyPress); + this.mAdditionalSequenceEdit.Leave += new System.EventHandler(this.mAdditionalSequenceEdit_Leave); + // + // mAdditionalSequences + // + this.mAdditionalSequences.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed; + this.mAdditionalSequences.FormattingEnabled = true; + this.mAdditionalSequences.ItemHeight = 25; + this.mAdditionalSequences.Location = new System.Drawing.Point(9, 106); + this.mAdditionalSequences.Margin = new System.Windows.Forms.Padding(4); + this.mAdditionalSequences.Name = "mAdditionalSequences"; + this.mAdditionalSequences.Size = new System.Drawing.Size(989, 129); + this.mAdditionalSequences.TabIndex = 9; + this.mAdditionalSequences.DrawItem += new System.Windows.Forms.DrawItemEventHandler(this.mAdditionalSequences_DrawItem); + this.mAdditionalSequences.SelectedIndexChanged += new System.EventHandler(this.mAdditionalSequences_SelectedIndexChanged); + this.mAdditionalSequences.DoubleClick += new System.EventHandler(this.mAdditionalSequences_DoubleClick); + this.mAdditionalSequences.Enter += new System.EventHandler(this.mAdditionalSequences_Enter); + this.mAdditionalSequences.KeyDown += new System.Windows.Forms.KeyEventHandler(this.mAdditionalSequences_KeyDown); + this.mAdditionalSequences.Leave += new System.EventHandler(this.mAdditionalSequences_Leave); + // + // mAdditionalSequencesTitle + // + this.mAdditionalSequencesTitle.AutoSize = true; + this.mAdditionalSequencesTitle.Location = new System.Drawing.Point(8, 76); + this.mAdditionalSequencesTitle.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + this.mAdditionalSequencesTitle.Name = "mAdditionalSequencesTitle"; + this.mAdditionalSequencesTitle.Size = new System.Drawing.Size(299, 25); + this.mAdditionalSequencesTitle.TabIndex = 8; + this.mAdditionalSequencesTitle.Text = "Add&itional custom sequences:"; + // + // mAllowCustomSequences + // + this.mAllowCustomSequences.AutoSize = true; + this.mAllowCustomSequences.Location = new System.Drawing.Point(9, 34); + this.mAllowCustomSequences.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mAllowCustomSequences.Name = "mAllowCustomSequences"; + this.mAllowCustomSequences.Size = new System.Drawing.Size(377, 29); + this.mAllowCustomSequences.TabIndex = 6; + this.mAllowCustomSequences.Text = "Allow &custom auto-type sequences"; + this.mAllowCustomSequences.UseVisualStyleBackColor = true; + // + // Options + // + this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.mPanel); + this.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.Name = "Options"; + this.Size = new System.Drawing.Size(1112, 624); + this.Paint += new System.Windows.Forms.PaintEventHandler(this.Options_Paint); + searchInGroup.ResumeLayout(false); + searchInGroup.PerformLayout(); + actionsGroup.ResumeLayout(false); + actionsGroup.PerformLayout(); + searchOptionsGroup.ResumeLayout(false); + searchOptionsGroup.PerformLayout(); + this.mPanel.ResumeLayout(false); + this.mShowSearchGroup.ResumeLayout(false); + this.mShowSearchGroup.PerformLayout(); + this.mCustomSequences.ResumeLayout(false); + this.mCustomSequences.PerformLayout(); + this.ResumeLayout(false); } #endregion - private KeePass.UI.HotKeyControlEx mShowHotKeyControl; + private System.Windows.Forms.Panel mPanel; + private System.Windows.Forms.GroupBox mShowSearchGroup; private System.Windows.Forms.CheckBox mShowOnHotKey; + private HotKeyControlEx mShowHotKeyControl; private System.Windows.Forms.CheckBox mShowOnIPC; private System.Windows.Forms.CheckBox mShowOnFailedSearch; + private System.Windows.Forms.GroupBox mCustomSequences; + private System.Windows.Forms.Label mAdditionalSequencesTitle; + private System.Windows.Forms.CheckBox mAllowCustomSequences; + private System.Windows.Forms.CheckBox mResolveReferences; + private System.Windows.Forms.CheckBox mExcludeExpired; private System.Windows.Forms.CheckBox mCaseSensitive; + private System.Windows.Forms.ComboBox mAlternativeAction; + private System.Windows.Forms.ComboBox mDefaultAction; private System.Windows.Forms.CheckBox mSearchInTags; private System.Windows.Forms.CheckBox mSearchInOtherFields; private System.Windows.Forms.CheckBox mSearchInNotes; private System.Windows.Forms.CheckBox mSearchInUrl; private System.Windows.Forms.CheckBox mSearchInUserName; private System.Windows.Forms.CheckBox mSearchInTitle; - private System.Windows.Forms.CheckBox mResolveReferences; - private System.Windows.Forms.CheckBox mExcludeExpired; - private System.Windows.Forms.ComboBox mAlternativeAction; - private System.Windows.Forms.ComboBox mDefaultAction; - private System.Windows.Forms.GroupBox mShowSearchGroup; - + private System.Windows.Forms.ListBox mAdditionalSequences; + private System.Windows.Forms.TextBox mAdditionalSequenceEdit; + private System.Windows.Forms.Button mAdditionalSequenceDelete; } } diff --git a/AutoTypeSearch/Options.cs b/AutoTypeSearch/Options.cs index b99561c..8c4609a 100755 --- a/AutoTypeSearch/Options.cs +++ b/AutoTypeSearch/Options.cs @@ -1,7 +1,10 @@ using System; using System.Configuration; using System.Diagnostics; +using System.Drawing; +using System.IO; using System.Linq; +using System.Net.NetworkInformation; using System.Windows.Forms; using AutoTypeSearch.Properties; using KeePass.Forms; @@ -17,6 +20,8 @@ private static int sRegisteredHotkeyId; + private int mNewSequenceIndex = -1; + // ReSharper disable once MemberCanBePrivate.Global - Public for forms designer public Options() { @@ -29,7 +34,7 @@ // Read options mShowOnFailedSearch.Checked = Settings.Default.ShowOnFailedAutoType; - + if (NativeLib.IsUnix()) { mShowOnHotKey.Enabled = false; @@ -51,13 +56,41 @@ mSearchInNotes.Checked = Settings.Default.SearchNotes; mSearchInTags.Checked = Settings.Default.SearchTags; mSearchInOtherFields.Checked = Settings.Default.SearchCustomFields; - + mCaseSensitive.Checked = Settings.Default.CaseSensitive; mExcludeExpired.Checked = Settings.Default.ExcludeExpired; mResolveReferences.Checked = Settings.Default.ResolveReferences; mDefaultAction.SelectedIndex = (int)Settings.Default.DefaultAction; mAlternativeAction.SelectedIndex = (int)Settings.Default.AlternativeAction; + + mAdditionalSequenceEdit.Hide(); + mAdditionalSequenceDelete.Hide(); + + mAdditionalSequences.BeginUpdate(); + mAdditionalSequences.Items.Clear(); + + if (Settings.Default.AdditionalCustomSequences != null) + { + foreach (string s in Settings.Default.AdditionalCustomSequences) + { + mAdditionalSequences.Items.Add(s); + } + } + + SetNewSequenceItem(); + + mAdditionalSequences.EndUpdate(); + } + + private void SetNewSequenceItem() + { + mNewSequenceIndex = mAdditionalSequences.Items.Add("+ new sequence"); + Control control = mAdditionalSequences.Items[mNewSequenceIndex] as Control; + if (control != null) + { + control.ForeColor = SystemColors.GrayText; + } } private Keys ShowHotKey @@ -90,6 +123,15 @@ Settings.Default.AlternativeAction = (Actions)mAlternativeAction.SelectedIndex; Settings.Default.ShowHotKey = ShowHotKey; + Settings.Default.AdditionalCustomSequences = new System.Collections.Specialized.StringCollection(); + for (int i = 0; i < mAdditionalSequences.Items.Count; i++) + { + if (i != mNewSequenceIndex) + { + Settings.Default.AdditionalCustomSequences.Add(mAdditionalSequences.Items[i].ToString()); + } + } + ApplyHotKey(); } @@ -161,8 +203,10 @@ } #endregion + private static OptionsForm sOptionsForm; public static void AddToWindow(OptionsForm optionsForm) { + Options.sOptionsForm = optionsForm; var tabControl = optionsForm.Controls.Find("m_tabMain", false).FirstOrDefault() as TabControl; var okButton = optionsForm.Controls.Find("m_btnOK", false).FirstOrDefault() as Button; @@ -187,5 +231,250 @@ options.ApplySettings(); }; } + + private void Options_Paint(object sender, PaintEventArgs e) + { + Rectangle r = new Rectangle(mPanel.Location, mPanel.ClientSize); + //r.Offset(mPanel.Location); + r.X -= 1; + r.Y -= 1; + r.Width += 2 + SystemInformation.VerticalScrollBarWidth; + r.Height += 2; + ControlPaint.DrawBorder(e.Graphics, r, SystemColors.GrayText, ButtonBorderStyle.Solid); + } + + private bool mAdditionalSequenceEditing = false; + + private IButtonControl mOldOptionsAcceptButton; + private IButtonControl mOldOptionsCancelButton; + private int mSavedOldOptionsAcceptButton = 0; + + private void CreateAdditionalSequenceEditBox(object sender) + { + if (mAdditionalSequenceEditing) return; + + if (mAdditionalSequences.SelectedIndex < 0 || mAdditionalSequences.SelectedIndex >= mAdditionalSequences.Items.Count) return; + + mAdditionalSequenceEditing = true; + + SaveFormAcceptButton(); + + int delta = 0; + + mEditedSequenceIndex = mAdditionalSequences.SelectedIndex; + + Rectangle r = mAdditionalSequences.GetItemRectangle(mEditedSequenceIndex); + + string itemText = (string)mAdditionalSequences.Items[mEditedSequenceIndex]; + if (mEditedSequenceIndex == mNewSequenceIndex) + { + itemText = ""; + } + + mAdditionalSequenceEdit.Location = new System.Drawing.Point(r.X + delta, r.Y + delta); + mAdditionalSequenceEdit.Size = new System.Drawing.Size(r.Width - (mEditedSequenceIndex == mNewSequenceIndex ? 0 : r.Height), r.Height - delta); + mAdditionalSequenceEdit.Show(); + mAdditionalSequences.Controls.AddRange(new System.Windows.Forms.Control[] { this.mAdditionalSequenceEdit }); + mAdditionalSequenceEdit.Text = itemText; + mAdditionalSequenceEdit.Focus(); + mAdditionalSequenceEdit.SelectAll(); + + SetDeleteSequenceButton(); + + mPanel.ScrollControlIntoView(mAdditionalSequenceEdit); + } + + private void SaveFormAcceptButton() + { + mSavedOldOptionsAcceptButton++; + if (sOptionsForm != null && mSavedOldOptionsAcceptButton == 1) + { + mOldOptionsAcceptButton = sOptionsForm.AcceptButton; + mOldOptionsCancelButton = sOptionsForm.CancelButton; + + sOptionsForm.AcceptButton = null; + sOptionsForm.CancelButton = null; + } + } + + private void RestoreFormAcceptButton() + { + if (mSavedOldOptionsAcceptButton > 0) + { + mSavedOldOptionsAcceptButton--; + if (sOptionsForm != null && mSavedOldOptionsAcceptButton == 0) + { + sOptionsForm.AcceptButton = mOldOptionsAcceptButton; + sOptionsForm.CancelButton = mOldOptionsCancelButton; + } + } + } + + private int mEditedSequenceIndex; + private void mAdditionalSequenceEdit_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == 13) + { + FinishEditingAdditionalSequenceItem(); + } + } + + private bool mLeavingAdditionalSequenceEditing = false; + private void FinishEditingAdditionalSequenceItem(bool accepted = true) + { + if (!mAdditionalSequenceEditing || mLeavingAdditionalSequenceEditing) return; + mLeavingAdditionalSequenceEditing = true; + + + mAdditionalSequences.BeginUpdate(); + if (mEditedSequenceIndex != mNewSequenceIndex) + { + mAdditionalSequences.Items.RemoveAt(mNewSequenceIndex); + } + if (mAdditionalSequenceEdit.Text.Trim().Length == 0) + { + mAdditionalSequences.Items.RemoveAt(mEditedSequenceIndex); + } + else if (accepted) + { + mAdditionalSequences.Items[mEditedSequenceIndex] = mAdditionalSequenceEdit.Text; + } + SetNewSequenceItem(); + mAdditionalSequences.EndUpdate(); + + mAdditionalSequences.Focus(); + + mAdditionalSequenceEdit.Hide(); + + RestoreFormAcceptButton(); + + SetDeleteSequenceButton(); + + mAdditionalSequenceEditing = false; + mLeavingAdditionalSequenceEditing = false; + } + + private void mAdditionalSequenceEdit_Leave(object sender, EventArgs e) + { + FinishEditingAdditionalSequenceItem(); + } + + private void mAdditionalSequences_DoubleClick(object sender, EventArgs e) + { + CreateAdditionalSequenceEditBox(sender); + } + + private void mAdditionalSequences_SelectedIndexChanged(object sender, EventArgs e) + { + SetDeleteSequenceButton(); + mPanel.ScrollControlIntoView(mAdditionalSequences); + + if (mAdditionalSequences.SelectedIndex == mNewSequenceIndex) + { + CreateAdditionalSequenceEditBox(sender); + } + } + + private void SetDeleteSequenceButton() + { + int selected = mAdditionalSequences.SelectedIndex; + if (selected < 0 || selected >= mAdditionalSequences.Items.Count || selected == mNewSequenceIndex) + { + mAdditionalSequenceDelete.Hide(); + } + else + { + mAdditionalSequences.Controls.AddRange(new System.Windows.Forms.Control[] { this.mAdditionalSequenceDelete }); + mAdditionalSequenceDelete.Show(); + + Rectangle r = mAdditionalSequences.GetItemRectangle(selected); + + mAdditionalSequenceDelete.Location = new Point(r.Right - r.Height, r.Y); + mAdditionalSequenceDelete.Size = new Size(r.Height, r.Height); + } + } + + private void mAdditionalSequences_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) + { + CreateAdditionalSequenceEditBox(sender); + } + else if (e.KeyCode == Keys.Delete) + { + RemoveAdditionalSequence(); + } + } + + private void RemoveAdditionalSequence() + { + int selected = mAdditionalSequences.SelectedIndex; + if (selected >= 0 && selected < mAdditionalSequences.Items.Count && selected != mNewSequenceIndex) + { + mAdditionalSequences.Items.RemoveAt(selected); + mNewSequenceIndex--; + } + } + + private bool mAdditionalSequencesFocused = false; + private void mAdditionalSequences_Enter(object sender, EventArgs e) + { + if (mAdditionalSequencesFocused) return; + mAdditionalSequencesFocused = true; + + SaveFormAcceptButton(); + } + + private void mAdditionalSequences_Leave(object sender, EventArgs e) + { + if (!mAdditionalSequencesFocused) return; + mAdditionalSequencesFocused = false; + + RestoreFormAcceptButton(); + } + + private void mAdditionalSequences_DrawItem(object sender, DrawItemEventArgs e) + { + e.DrawBackground(); + Color fontColor = mAdditionalSequences.ForeColor; + if (e.Index == mNewSequenceIndex) + { + fontColor = SystemColors.GrayText; + } + if (mAdditionalSequences.Items.Count > 0) // Without this, I receive errors + { + e.Graphics.DrawString(mAdditionalSequences.Items[e.Index].ToString(), mAdditionalSequences.Font, new SolidBrush(fontColor), e.Bounds); + } + e.DrawFocusRectangle(); + } + + private void mAdditionalSequenceEdit_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Up) + { + FinishEditingAdditionalSequenceItem(); + if (mAdditionalSequences.SelectedIndex > 0) + { + mAdditionalSequences.SelectedIndex--; + } + } + else if (e.KeyCode == Keys.Down) + { + FinishEditingAdditionalSequenceItem(); + if (mAdditionalSequences.SelectedIndex < mAdditionalSequences.Items.Count - 1) + { + mAdditionalSequences.SelectedIndex++; + } + } + else if (e.KeyCode == Keys.Escape) + { + FinishEditingAdditionalSequenceItem(false); + } + } + + private void mAdditionalSequenceDelete_Click(object sender, EventArgs e) + { + RemoveAdditionalSequence(); + } } } diff --git a/AutoTypeSearch/Options.resx b/AutoTypeSearch/Options.resx index 4601c27..34a3218 100755 --- a/AutoTypeSearch/Options.resx +++ b/AutoTypeSearch/Options.resx @@ -1,4 +1,4 @@ - +