diff --git a/AutoTypeSearch/AutoTypeSearch.csproj b/AutoTypeSearch/AutoTypeSearch.csproj index c201baf..786cffd 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -44,7 +44,8 @@ - + + False ..\keepass_portable\KeePass.exe @@ -111,6 +112,9 @@ + + + IF $(ConfigurationName) == Release "$(ProjectDir)..\CreatePlgX.bat" diff --git a/AutoTypeSearch/AutoTypeSearch.csproj b/AutoTypeSearch/AutoTypeSearch.csproj index c201baf..786cffd 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -44,7 +44,8 @@ - + + False ..\keepass_portable\KeePass.exe @@ -111,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 c201baf..786cffd 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -44,7 +44,8 @@ - + + False ..\keepass_portable\KeePass.exe @@ -111,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 95c6992..cad79ae 100755 --- a/AutoTypeSearch/Options.Designer.cs +++ b/AutoTypeSearch/Options.Designer.cs @@ -1,4 +1,4 @@ -using KeePass.UI; +using KeePass.UI; namespace AutoTypeSearch { @@ -53,9 +53,11 @@ 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(); - this.mAdditionalSequences = new System.Windows.Forms.ListBox(); searchInGroup = new System.Windows.Forms.GroupBox(); actionsGroup = new System.Windows.Forms.GroupBox(); alternativeActionLabel = new System.Windows.Forms.Label(); @@ -77,11 +79,11 @@ searchInGroup.Controls.Add(this.mSearchInUrl); searchInGroup.Controls.Add(this.mSearchInUserName); searchInGroup.Controls.Add(this.mSearchInTitle); - searchInGroup.Location = new System.Drawing.Point(4, 196); - searchInGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(4, 5, 4, 5); - searchInGroup.Size = new System.Drawing.Size(764, 72); + 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"; @@ -89,10 +91,10 @@ // mSearchInTags // this.mSearchInTags.AutoSize = true; - this.mSearchInTags.Location = new System.Drawing.Point(387, 29); - this.mSearchInTags.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(70, 24); + this.mSearchInTags.Size = new System.Drawing.Size(92, 29); this.mSearchInTags.TabIndex = 4; this.mSearchInTags.Text = "Ta&gs"; this.mSearchInTags.UseVisualStyleBackColor = true; @@ -100,10 +102,10 @@ // mSearchInOtherFields // this.mSearchInOtherFields.AutoSize = true; - this.mSearchInOtherFields.Location = new System.Drawing.Point(471, 29); - this.mSearchInOtherFields.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(206, 24); + this.mSearchInOtherFields.Size = new System.Drawing.Size(274, 29); this.mSearchInOtherFields.TabIndex = 5; this.mSearchInOtherFields.Text = "&Other unprotected fields"; this.mSearchInOtherFields.UseVisualStyleBackColor = true; @@ -111,10 +113,10 @@ // mSearchInNotes // this.mSearchInNotes.AutoSize = true; - this.mSearchInNotes.Location = new System.Drawing.Point(297, 29); - this.mSearchInNotes.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(77, 24); + this.mSearchInNotes.Size = new System.Drawing.Size(100, 29); this.mSearchInNotes.TabIndex = 3; this.mSearchInNotes.Text = "Note&s"; this.mSearchInNotes.UseVisualStyleBackColor = true; @@ -122,10 +124,10 @@ // mSearchInUrl // this.mSearchInUrl.AutoSize = true; - this.mSearchInUrl.Location = new System.Drawing.Point(216, 29); - this.mSearchInUrl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(68, 24); + this.mSearchInUrl.Size = new System.Drawing.Size(86, 29); this.mSearchInUrl.TabIndex = 2; this.mSearchInUrl.Text = "&URL"; this.mSearchInUrl.UseVisualStyleBackColor = true; @@ -133,10 +135,10 @@ // mSearchInUserName // this.mSearchInUserName.AutoSize = true; - this.mSearchInUserName.Location = new System.Drawing.Point(92, 29); - this.mSearchInUserName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(113, 24); + this.mSearchInUserName.Size = new System.Drawing.Size(148, 29); this.mSearchInUserName.TabIndex = 1; this.mSearchInUserName.Text = "User &name"; this.mSearchInUserName.UseVisualStyleBackColor = true; @@ -144,10 +146,10 @@ // mSearchInTitle // this.mSearchInTitle.AutoSize = true; - this.mSearchInTitle.Location = new System.Drawing.Point(14, 29); - this.mSearchInTitle.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(64, 24); + this.mSearchInTitle.Size = new System.Drawing.Size(85, 29); this.mSearchInTitle.TabIndex = 0; this.mSearchInTitle.Text = "&Title"; this.mSearchInTitle.UseVisualStyleBackColor = true; @@ -158,11 +160,11 @@ actionsGroup.Controls.Add(this.mDefaultAction); actionsGroup.Controls.Add(alternativeActionLabel); actionsGroup.Controls.Add(defaultActionLabel); - actionsGroup.Location = new System.Drawing.Point(4, 357); - actionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(4, 5, 4, 5); - actionsGroup.Size = new System.Drawing.Size(764, 103); + 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"; @@ -170,38 +172,38 @@ // mAlternativeAction // this.mAlternativeAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.mAlternativeAction.Location = new System.Drawing.Point(392, 57); - this.mAlternativeAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(358, 28); + 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(16, 57); - this.mDefaultAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(358, 28); + this.mDefaultAction.Size = new System.Drawing.Size(476, 33); this.mDefaultAction.TabIndex = 1; // // alternativeActionLabel // alternativeActionLabel.AutoSize = true; - alternativeActionLabel.Location = new System.Drawing.Point(388, 31); - alternativeActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + 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(238, 20); + 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(12, 31); - defaultActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + 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(165, 20); + defaultActionLabel.Size = new System.Drawing.Size(221, 25); defaultActionLabel.TabIndex = 0; defaultActionLabel.Text = "De&fault action (Enter):"; // @@ -210,11 +212,11 @@ searchOptionsGroup.Controls.Add(this.mResolveReferences); searchOptionsGroup.Controls.Add(this.mExcludeExpired); searchOptionsGroup.Controls.Add(this.mCaseSensitive); - searchOptionsGroup.Location = new System.Drawing.Point(4, 278); - searchOptionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(4, 5, 4, 5); - searchOptionsGroup.Size = new System.Drawing.Size(764, 69); + 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"; @@ -222,10 +224,10 @@ // mResolveReferences // this.mResolveReferences.AutoSize = true; - this.mResolveReferences.Location = new System.Drawing.Point(376, 31); - this.mResolveReferences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(250, 24); + 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; @@ -233,10 +235,10 @@ // mExcludeExpired // this.mExcludeExpired.AutoSize = true; - this.mExcludeExpired.Location = new System.Drawing.Point(162, 31); - this.mExcludeExpired.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(198, 24); + this.mExcludeExpired.Size = new System.Drawing.Size(269, 29); this.mExcludeExpired.TabIndex = 1; this.mExcludeExpired.Text = "Exclude &expired entries"; this.mExcludeExpired.UseVisualStyleBackColor = true; @@ -244,10 +246,10 @@ // mCaseSensitive // this.mCaseSensitive.AutoSize = true; - this.mCaseSensitive.Location = new System.Drawing.Point(15, 31); - this.mCaseSensitive.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(138, 24); + this.mCaseSensitive.Size = new System.Drawing.Size(186, 29); this.mCaseSensitive.TabIndex = 0; this.mCaseSensitive.Text = "Case-sensiti&ve"; this.mCaseSensitive.UseVisualStyleBackColor = true; @@ -260,9 +262,10 @@ this.mPanel.Controls.Add(searchOptionsGroup); this.mPanel.Controls.Add(actionsGroup); this.mPanel.Controls.Add(searchInGroup); - this.mPanel.Location = new System.Drawing.Point(9, 18); + 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(808, 463); + this.mPanel.Size = new System.Drawing.Size(1077, 579); this.mPanel.TabIndex = 5; // // mShowSearchGroup @@ -273,11 +276,11 @@ 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(4, 5); - this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(4, 5, 4, 5); - this.mShowSearchGroup.Size = new System.Drawing.Size(549, 182); + this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowSearchGroup.Size = new System.Drawing.Size(747, 228); this.mShowSearchGroup.TabIndex = 0; this.mShowSearchGroup.TabStop = false; this.mShowSearchGroup.Text = "Show search window"; @@ -285,10 +288,10 @@ // mShowOnHotKey // this.mShowOnHotKey.AutoSize = true; - this.mShowOnHotKey.Location = new System.Drawing.Point(15, 68); - this.mShowOnHotKey.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(343, 24); + 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; @@ -296,19 +299,19 @@ // // mShowHotKeyControl // - this.mShowHotKeyControl.Location = new System.Drawing.Point(45, 100); - this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(182, 26); + 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(15, 143); - this.mShowOnIPC.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(574, 24); + 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; @@ -316,63 +319,90 @@ // mShowOnFailedSearch // this.mShowOnFailedSearch.AutoSize = true; - this.mShowOnFailedSearch.Location = new System.Drawing.Point(15, 32); - this.mShowOnFailedSearch.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(408, 24); + 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(4, 468); + this.mCustomSequences.Location = new System.Drawing.Point(5, 585); + this.mCustomSequences.Margin = new System.Windows.Forms.Padding(4); this.mCustomSequences.Name = "mCustomSequences"; - this.mCustomSequences.Size = new System.Drawing.Size(764, 206); + 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, 57); + this.mAdditionalSequenceDelete.Name = "mAdditionalSequenceDelete"; + this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(30, 30); + this.mAdditionalSequenceDelete.TabIndex = 11; + this.mAdditionalSequenceDelete.UseVisualStyleBackColor = true; + // + // mAdditionalSequenceEdit + // + this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(754, 68); + this.mAdditionalSequenceEdit.Name = "mAdditionalSequenceEdit"; + this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(100, 31); + this.mAdditionalSequenceEdit.TabIndex = 10; + this.mAdditionalSequenceEdit.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.mAdditionalSequenceEdit_KeyPress); + this.mAdditionalSequenceEdit.Leave += new System.EventHandler(this.mAdditionalSequenceEdit_Leave); + // + // mAdditionalSequences + // + 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.SelectedIndexChanged += new System.EventHandler(this.mAdditionalSequences_SelectedIndexChanged); + this.mAdditionalSequences.DoubleClick += new System.EventHandler(this.mAdditionalSequences_DoubleClick); + this.mAdditionalSequences.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.mAdditionalSequences_KeyPress); + // // mAdditionalSequencesTitle // this.mAdditionalSequencesTitle.AutoSize = true; - this.mAdditionalSequencesTitle.Location = new System.Drawing.Point(6, 61); + 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(221, 20); + 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(7, 27); - this.mAllowCustomSequences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(281, 24); + 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; // - // mAdditionalSequences - // - this.mAdditionalSequences.FormattingEnabled = true; - this.mAdditionalSequences.ItemHeight = 20; - this.mAdditionalSequences.Location = new System.Drawing.Point(7, 85); - this.mAdditionalSequences.Name = "mAdditionalSequences"; - this.mAdditionalSequences.Size = new System.Drawing.Size(743, 104); - this.mAdditionalSequences.TabIndex = 9; - // // Options // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + 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(4, 5, 4, 5); + this.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); this.Name = "Options"; - this.Size = new System.Drawing.Size(834, 499); + this.Size = new System.Drawing.Size(1112, 624); this.Paint += new System.Windows.Forms.PaintEventHandler(this.Options_Paint); searchInGroup.ResumeLayout(false); searchInGroup.PerformLayout(); @@ -412,5 +442,7 @@ private System.Windows.Forms.CheckBox mSearchInUserName; private System.Windows.Forms.CheckBox mSearchInTitle; 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 c201baf..786cffd 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -44,7 +44,8 @@ - + + False ..\keepass_portable\KeePass.exe @@ -111,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 95c6992..cad79ae 100755 --- a/AutoTypeSearch/Options.Designer.cs +++ b/AutoTypeSearch/Options.Designer.cs @@ -1,4 +1,4 @@ -using KeePass.UI; +using KeePass.UI; namespace AutoTypeSearch { @@ -53,9 +53,11 @@ 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(); - this.mAdditionalSequences = new System.Windows.Forms.ListBox(); searchInGroup = new System.Windows.Forms.GroupBox(); actionsGroup = new System.Windows.Forms.GroupBox(); alternativeActionLabel = new System.Windows.Forms.Label(); @@ -77,11 +79,11 @@ searchInGroup.Controls.Add(this.mSearchInUrl); searchInGroup.Controls.Add(this.mSearchInUserName); searchInGroup.Controls.Add(this.mSearchInTitle); - searchInGroup.Location = new System.Drawing.Point(4, 196); - searchInGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(4, 5, 4, 5); - searchInGroup.Size = new System.Drawing.Size(764, 72); + 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"; @@ -89,10 +91,10 @@ // mSearchInTags // this.mSearchInTags.AutoSize = true; - this.mSearchInTags.Location = new System.Drawing.Point(387, 29); - this.mSearchInTags.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(70, 24); + this.mSearchInTags.Size = new System.Drawing.Size(92, 29); this.mSearchInTags.TabIndex = 4; this.mSearchInTags.Text = "Ta&gs"; this.mSearchInTags.UseVisualStyleBackColor = true; @@ -100,10 +102,10 @@ // mSearchInOtherFields // this.mSearchInOtherFields.AutoSize = true; - this.mSearchInOtherFields.Location = new System.Drawing.Point(471, 29); - this.mSearchInOtherFields.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(206, 24); + this.mSearchInOtherFields.Size = new System.Drawing.Size(274, 29); this.mSearchInOtherFields.TabIndex = 5; this.mSearchInOtherFields.Text = "&Other unprotected fields"; this.mSearchInOtherFields.UseVisualStyleBackColor = true; @@ -111,10 +113,10 @@ // mSearchInNotes // this.mSearchInNotes.AutoSize = true; - this.mSearchInNotes.Location = new System.Drawing.Point(297, 29); - this.mSearchInNotes.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(77, 24); + this.mSearchInNotes.Size = new System.Drawing.Size(100, 29); this.mSearchInNotes.TabIndex = 3; this.mSearchInNotes.Text = "Note&s"; this.mSearchInNotes.UseVisualStyleBackColor = true; @@ -122,10 +124,10 @@ // mSearchInUrl // this.mSearchInUrl.AutoSize = true; - this.mSearchInUrl.Location = new System.Drawing.Point(216, 29); - this.mSearchInUrl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(68, 24); + this.mSearchInUrl.Size = new System.Drawing.Size(86, 29); this.mSearchInUrl.TabIndex = 2; this.mSearchInUrl.Text = "&URL"; this.mSearchInUrl.UseVisualStyleBackColor = true; @@ -133,10 +135,10 @@ // mSearchInUserName // this.mSearchInUserName.AutoSize = true; - this.mSearchInUserName.Location = new System.Drawing.Point(92, 29); - this.mSearchInUserName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(113, 24); + this.mSearchInUserName.Size = new System.Drawing.Size(148, 29); this.mSearchInUserName.TabIndex = 1; this.mSearchInUserName.Text = "User &name"; this.mSearchInUserName.UseVisualStyleBackColor = true; @@ -144,10 +146,10 @@ // mSearchInTitle // this.mSearchInTitle.AutoSize = true; - this.mSearchInTitle.Location = new System.Drawing.Point(14, 29); - this.mSearchInTitle.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(64, 24); + this.mSearchInTitle.Size = new System.Drawing.Size(85, 29); this.mSearchInTitle.TabIndex = 0; this.mSearchInTitle.Text = "&Title"; this.mSearchInTitle.UseVisualStyleBackColor = true; @@ -158,11 +160,11 @@ actionsGroup.Controls.Add(this.mDefaultAction); actionsGroup.Controls.Add(alternativeActionLabel); actionsGroup.Controls.Add(defaultActionLabel); - actionsGroup.Location = new System.Drawing.Point(4, 357); - actionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(4, 5, 4, 5); - actionsGroup.Size = new System.Drawing.Size(764, 103); + 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"; @@ -170,38 +172,38 @@ // mAlternativeAction // this.mAlternativeAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.mAlternativeAction.Location = new System.Drawing.Point(392, 57); - this.mAlternativeAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(358, 28); + 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(16, 57); - this.mDefaultAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(358, 28); + this.mDefaultAction.Size = new System.Drawing.Size(476, 33); this.mDefaultAction.TabIndex = 1; // // alternativeActionLabel // alternativeActionLabel.AutoSize = true; - alternativeActionLabel.Location = new System.Drawing.Point(388, 31); - alternativeActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + 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(238, 20); + 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(12, 31); - defaultActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + 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(165, 20); + defaultActionLabel.Size = new System.Drawing.Size(221, 25); defaultActionLabel.TabIndex = 0; defaultActionLabel.Text = "De&fault action (Enter):"; // @@ -210,11 +212,11 @@ searchOptionsGroup.Controls.Add(this.mResolveReferences); searchOptionsGroup.Controls.Add(this.mExcludeExpired); searchOptionsGroup.Controls.Add(this.mCaseSensitive); - searchOptionsGroup.Location = new System.Drawing.Point(4, 278); - searchOptionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(4, 5, 4, 5); - searchOptionsGroup.Size = new System.Drawing.Size(764, 69); + 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"; @@ -222,10 +224,10 @@ // mResolveReferences // this.mResolveReferences.AutoSize = true; - this.mResolveReferences.Location = new System.Drawing.Point(376, 31); - this.mResolveReferences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(250, 24); + 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; @@ -233,10 +235,10 @@ // mExcludeExpired // this.mExcludeExpired.AutoSize = true; - this.mExcludeExpired.Location = new System.Drawing.Point(162, 31); - this.mExcludeExpired.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(198, 24); + this.mExcludeExpired.Size = new System.Drawing.Size(269, 29); this.mExcludeExpired.TabIndex = 1; this.mExcludeExpired.Text = "Exclude &expired entries"; this.mExcludeExpired.UseVisualStyleBackColor = true; @@ -244,10 +246,10 @@ // mCaseSensitive // this.mCaseSensitive.AutoSize = true; - this.mCaseSensitive.Location = new System.Drawing.Point(15, 31); - this.mCaseSensitive.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(138, 24); + this.mCaseSensitive.Size = new System.Drawing.Size(186, 29); this.mCaseSensitive.TabIndex = 0; this.mCaseSensitive.Text = "Case-sensiti&ve"; this.mCaseSensitive.UseVisualStyleBackColor = true; @@ -260,9 +262,10 @@ this.mPanel.Controls.Add(searchOptionsGroup); this.mPanel.Controls.Add(actionsGroup); this.mPanel.Controls.Add(searchInGroup); - this.mPanel.Location = new System.Drawing.Point(9, 18); + 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(808, 463); + this.mPanel.Size = new System.Drawing.Size(1077, 579); this.mPanel.TabIndex = 5; // // mShowSearchGroup @@ -273,11 +276,11 @@ 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(4, 5); - this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(4, 5, 4, 5); - this.mShowSearchGroup.Size = new System.Drawing.Size(549, 182); + this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowSearchGroup.Size = new System.Drawing.Size(747, 228); this.mShowSearchGroup.TabIndex = 0; this.mShowSearchGroup.TabStop = false; this.mShowSearchGroup.Text = "Show search window"; @@ -285,10 +288,10 @@ // mShowOnHotKey // this.mShowOnHotKey.AutoSize = true; - this.mShowOnHotKey.Location = new System.Drawing.Point(15, 68); - this.mShowOnHotKey.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(343, 24); + 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; @@ -296,19 +299,19 @@ // // mShowHotKeyControl // - this.mShowHotKeyControl.Location = new System.Drawing.Point(45, 100); - this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(182, 26); + 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(15, 143); - this.mShowOnIPC.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(574, 24); + 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; @@ -316,63 +319,90 @@ // mShowOnFailedSearch // this.mShowOnFailedSearch.AutoSize = true; - this.mShowOnFailedSearch.Location = new System.Drawing.Point(15, 32); - this.mShowOnFailedSearch.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(408, 24); + 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(4, 468); + this.mCustomSequences.Location = new System.Drawing.Point(5, 585); + this.mCustomSequences.Margin = new System.Windows.Forms.Padding(4); this.mCustomSequences.Name = "mCustomSequences"; - this.mCustomSequences.Size = new System.Drawing.Size(764, 206); + 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, 57); + this.mAdditionalSequenceDelete.Name = "mAdditionalSequenceDelete"; + this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(30, 30); + this.mAdditionalSequenceDelete.TabIndex = 11; + this.mAdditionalSequenceDelete.UseVisualStyleBackColor = true; + // + // mAdditionalSequenceEdit + // + this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(754, 68); + this.mAdditionalSequenceEdit.Name = "mAdditionalSequenceEdit"; + this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(100, 31); + this.mAdditionalSequenceEdit.TabIndex = 10; + this.mAdditionalSequenceEdit.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.mAdditionalSequenceEdit_KeyPress); + this.mAdditionalSequenceEdit.Leave += new System.EventHandler(this.mAdditionalSequenceEdit_Leave); + // + // mAdditionalSequences + // + 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.SelectedIndexChanged += new System.EventHandler(this.mAdditionalSequences_SelectedIndexChanged); + this.mAdditionalSequences.DoubleClick += new System.EventHandler(this.mAdditionalSequences_DoubleClick); + this.mAdditionalSequences.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.mAdditionalSequences_KeyPress); + // // mAdditionalSequencesTitle // this.mAdditionalSequencesTitle.AutoSize = true; - this.mAdditionalSequencesTitle.Location = new System.Drawing.Point(6, 61); + 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(221, 20); + 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(7, 27); - this.mAllowCustomSequences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(281, 24); + 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; // - // mAdditionalSequences - // - this.mAdditionalSequences.FormattingEnabled = true; - this.mAdditionalSequences.ItemHeight = 20; - this.mAdditionalSequences.Location = new System.Drawing.Point(7, 85); - this.mAdditionalSequences.Name = "mAdditionalSequences"; - this.mAdditionalSequences.Size = new System.Drawing.Size(743, 104); - this.mAdditionalSequences.TabIndex = 9; - // // Options // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + 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(4, 5, 4, 5); + this.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); this.Name = "Options"; - this.Size = new System.Drawing.Size(834, 499); + this.Size = new System.Drawing.Size(1112, 624); this.Paint += new System.Windows.Forms.PaintEventHandler(this.Options_Paint); searchInGroup.ResumeLayout(false); searchInGroup.PerformLayout(); @@ -412,5 +442,7 @@ private System.Windows.Forms.CheckBox mSearchInUserName; private System.Windows.Forms.CheckBox mSearchInTitle; 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 e8e8583..dc1a930 100755 --- a/AutoTypeSearch/Options.cs +++ b/AutoTypeSearch/Options.cs @@ -19,6 +19,8 @@ private static int sRegisteredHotkeyId; + private int mNewSequenceIndex = -1; + // ReSharper disable once MemberCanBePrivate.Global - Public for forms designer public Options() { @@ -61,6 +63,9 @@ mDefaultAction.SelectedIndex = (int)Settings.Default.DefaultAction; mAlternativeAction.SelectedIndex = (int)Settings.Default.AlternativeAction; + mAdditionalSequenceEdit.Hide(); + mAdditionalSequenceDelete.Hide(); + mAdditionalSequences.BeginUpdate(); mAdditionalSequences.Items.Clear(); @@ -71,12 +76,17 @@ mAdditionalSequences.Items.Add(s); } } - - mAdditionalSequences.Items.Add("new sequence"); + + SetNewSequenceItem(); mAdditionalSequences.EndUpdate(); } + private void SetNewSequenceItem() + { + mNewSequenceIndex = mAdditionalSequences.Items.Add("new sequence"); + } + private Keys ShowHotKey { get { return mShowHotKeyControl.HotKey; } @@ -215,5 +225,101 @@ r.Height += 2; ControlPaint.DrawBorder(e.Graphics, r, SystemColors.GrayText, ButtonBorderStyle.Solid); } + + private void CreateAdditionalSequenceEditBox(object sender) + { + 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 - r.Height, r.Height - delta); + mAdditionalSequenceEdit.Show(); + mAdditionalSequences.Controls.AddRange(new System.Windows.Forms.Control[] { this.mAdditionalSequenceEdit }); + mAdditionalSequenceEdit.Text = itemText; + mAdditionalSequenceEdit.Focus(); + mAdditionalSequenceEdit.SelectAll(); + } + + private int mEditedSequenceIndex; + private void mAdditionalSequenceEdit_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == 13) + { + SetAdditionalSequenceItem(); + e.Handled = true; + } + } + + private void SetAdditionalSequenceItem() + { + mAdditionalSequences.BeginUpdate(); + if (mEditedSequenceIndex != mNewSequenceIndex) + { + mAdditionalSequences.Items.RemoveAt(mNewSequenceIndex); + } + if (mAdditionalSequenceEdit.Text.Trim().Length == 0) + { + mAdditionalSequences.Items.RemoveAt(mEditedSequenceIndex); + } + else + { + mAdditionalSequences.Items[mEditedSequenceIndex] = mAdditionalSequenceEdit.Text; + } + SetNewSequenceItem(); + mAdditionalSequences.EndUpdate(); + + mAdditionalSequenceEdit.Hide(); + } + + private void mAdditionalSequenceEdit_Leave(object sender, EventArgs e) + { + mAdditionalSequences.Items[mEditedSequenceIndex] = mAdditionalSequenceEdit.Text; + mAdditionalSequenceEdit.Hide(); + } + + private void mAdditionalSequences_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == 13) + { + CreateAdditionalSequenceEditBox(sender); + e.Handled = true; + } + } + + private void mAdditionalSequences_DoubleClick(object sender, EventArgs e) + { + CreateAdditionalSequenceEditBox(sender); + } + + private void mAdditionalSequences_SelectedIndexChanged(object sender, EventArgs e) + { + if (mAdditionalSequences.SelectedIndex < 0 || mAdditionalSequences.SelectedIndex >= mAdditionalSequences.Items.Count) + { + HideDeleteSequenceButton(); + } + else + { + ShowDeleteSequenceButton(); + } + } + + private void ShowDeleteSequenceButton() + { + throw new NotImplementedException(); + } + + private void HideDeleteSequenceButton() + { + throw new NotImplementedException(); + } } } diff --git a/AutoTypeSearch/AutoTypeSearch.csproj b/AutoTypeSearch/AutoTypeSearch.csproj index c201baf..786cffd 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -44,7 +44,8 @@ - + + False ..\keepass_portable\KeePass.exe @@ -111,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 95c6992..cad79ae 100755 --- a/AutoTypeSearch/Options.Designer.cs +++ b/AutoTypeSearch/Options.Designer.cs @@ -1,4 +1,4 @@ -using KeePass.UI; +using KeePass.UI; namespace AutoTypeSearch { @@ -53,9 +53,11 @@ 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(); - this.mAdditionalSequences = new System.Windows.Forms.ListBox(); searchInGroup = new System.Windows.Forms.GroupBox(); actionsGroup = new System.Windows.Forms.GroupBox(); alternativeActionLabel = new System.Windows.Forms.Label(); @@ -77,11 +79,11 @@ searchInGroup.Controls.Add(this.mSearchInUrl); searchInGroup.Controls.Add(this.mSearchInUserName); searchInGroup.Controls.Add(this.mSearchInTitle); - searchInGroup.Location = new System.Drawing.Point(4, 196); - searchInGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(4, 5, 4, 5); - searchInGroup.Size = new System.Drawing.Size(764, 72); + 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"; @@ -89,10 +91,10 @@ // mSearchInTags // this.mSearchInTags.AutoSize = true; - this.mSearchInTags.Location = new System.Drawing.Point(387, 29); - this.mSearchInTags.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(70, 24); + this.mSearchInTags.Size = new System.Drawing.Size(92, 29); this.mSearchInTags.TabIndex = 4; this.mSearchInTags.Text = "Ta&gs"; this.mSearchInTags.UseVisualStyleBackColor = true; @@ -100,10 +102,10 @@ // mSearchInOtherFields // this.mSearchInOtherFields.AutoSize = true; - this.mSearchInOtherFields.Location = new System.Drawing.Point(471, 29); - this.mSearchInOtherFields.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(206, 24); + this.mSearchInOtherFields.Size = new System.Drawing.Size(274, 29); this.mSearchInOtherFields.TabIndex = 5; this.mSearchInOtherFields.Text = "&Other unprotected fields"; this.mSearchInOtherFields.UseVisualStyleBackColor = true; @@ -111,10 +113,10 @@ // mSearchInNotes // this.mSearchInNotes.AutoSize = true; - this.mSearchInNotes.Location = new System.Drawing.Point(297, 29); - this.mSearchInNotes.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(77, 24); + this.mSearchInNotes.Size = new System.Drawing.Size(100, 29); this.mSearchInNotes.TabIndex = 3; this.mSearchInNotes.Text = "Note&s"; this.mSearchInNotes.UseVisualStyleBackColor = true; @@ -122,10 +124,10 @@ // mSearchInUrl // this.mSearchInUrl.AutoSize = true; - this.mSearchInUrl.Location = new System.Drawing.Point(216, 29); - this.mSearchInUrl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(68, 24); + this.mSearchInUrl.Size = new System.Drawing.Size(86, 29); this.mSearchInUrl.TabIndex = 2; this.mSearchInUrl.Text = "&URL"; this.mSearchInUrl.UseVisualStyleBackColor = true; @@ -133,10 +135,10 @@ // mSearchInUserName // this.mSearchInUserName.AutoSize = true; - this.mSearchInUserName.Location = new System.Drawing.Point(92, 29); - this.mSearchInUserName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(113, 24); + this.mSearchInUserName.Size = new System.Drawing.Size(148, 29); this.mSearchInUserName.TabIndex = 1; this.mSearchInUserName.Text = "User &name"; this.mSearchInUserName.UseVisualStyleBackColor = true; @@ -144,10 +146,10 @@ // mSearchInTitle // this.mSearchInTitle.AutoSize = true; - this.mSearchInTitle.Location = new System.Drawing.Point(14, 29); - this.mSearchInTitle.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(64, 24); + this.mSearchInTitle.Size = new System.Drawing.Size(85, 29); this.mSearchInTitle.TabIndex = 0; this.mSearchInTitle.Text = "&Title"; this.mSearchInTitle.UseVisualStyleBackColor = true; @@ -158,11 +160,11 @@ actionsGroup.Controls.Add(this.mDefaultAction); actionsGroup.Controls.Add(alternativeActionLabel); actionsGroup.Controls.Add(defaultActionLabel); - actionsGroup.Location = new System.Drawing.Point(4, 357); - actionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(4, 5, 4, 5); - actionsGroup.Size = new System.Drawing.Size(764, 103); + 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"; @@ -170,38 +172,38 @@ // mAlternativeAction // this.mAlternativeAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.mAlternativeAction.Location = new System.Drawing.Point(392, 57); - this.mAlternativeAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(358, 28); + 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(16, 57); - this.mDefaultAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(358, 28); + this.mDefaultAction.Size = new System.Drawing.Size(476, 33); this.mDefaultAction.TabIndex = 1; // // alternativeActionLabel // alternativeActionLabel.AutoSize = true; - alternativeActionLabel.Location = new System.Drawing.Point(388, 31); - alternativeActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + 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(238, 20); + 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(12, 31); - defaultActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + 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(165, 20); + defaultActionLabel.Size = new System.Drawing.Size(221, 25); defaultActionLabel.TabIndex = 0; defaultActionLabel.Text = "De&fault action (Enter):"; // @@ -210,11 +212,11 @@ searchOptionsGroup.Controls.Add(this.mResolveReferences); searchOptionsGroup.Controls.Add(this.mExcludeExpired); searchOptionsGroup.Controls.Add(this.mCaseSensitive); - searchOptionsGroup.Location = new System.Drawing.Point(4, 278); - searchOptionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(4, 5, 4, 5); - searchOptionsGroup.Size = new System.Drawing.Size(764, 69); + 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"; @@ -222,10 +224,10 @@ // mResolveReferences // this.mResolveReferences.AutoSize = true; - this.mResolveReferences.Location = new System.Drawing.Point(376, 31); - this.mResolveReferences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(250, 24); + 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; @@ -233,10 +235,10 @@ // mExcludeExpired // this.mExcludeExpired.AutoSize = true; - this.mExcludeExpired.Location = new System.Drawing.Point(162, 31); - this.mExcludeExpired.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(198, 24); + this.mExcludeExpired.Size = new System.Drawing.Size(269, 29); this.mExcludeExpired.TabIndex = 1; this.mExcludeExpired.Text = "Exclude &expired entries"; this.mExcludeExpired.UseVisualStyleBackColor = true; @@ -244,10 +246,10 @@ // mCaseSensitive // this.mCaseSensitive.AutoSize = true; - this.mCaseSensitive.Location = new System.Drawing.Point(15, 31); - this.mCaseSensitive.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(138, 24); + this.mCaseSensitive.Size = new System.Drawing.Size(186, 29); this.mCaseSensitive.TabIndex = 0; this.mCaseSensitive.Text = "Case-sensiti&ve"; this.mCaseSensitive.UseVisualStyleBackColor = true; @@ -260,9 +262,10 @@ this.mPanel.Controls.Add(searchOptionsGroup); this.mPanel.Controls.Add(actionsGroup); this.mPanel.Controls.Add(searchInGroup); - this.mPanel.Location = new System.Drawing.Point(9, 18); + 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(808, 463); + this.mPanel.Size = new System.Drawing.Size(1077, 579); this.mPanel.TabIndex = 5; // // mShowSearchGroup @@ -273,11 +276,11 @@ 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(4, 5); - this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(4, 5, 4, 5); - this.mShowSearchGroup.Size = new System.Drawing.Size(549, 182); + this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowSearchGroup.Size = new System.Drawing.Size(747, 228); this.mShowSearchGroup.TabIndex = 0; this.mShowSearchGroup.TabStop = false; this.mShowSearchGroup.Text = "Show search window"; @@ -285,10 +288,10 @@ // mShowOnHotKey // this.mShowOnHotKey.AutoSize = true; - this.mShowOnHotKey.Location = new System.Drawing.Point(15, 68); - this.mShowOnHotKey.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(343, 24); + 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; @@ -296,19 +299,19 @@ // // mShowHotKeyControl // - this.mShowHotKeyControl.Location = new System.Drawing.Point(45, 100); - this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(182, 26); + 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(15, 143); - this.mShowOnIPC.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(574, 24); + 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; @@ -316,63 +319,90 @@ // mShowOnFailedSearch // this.mShowOnFailedSearch.AutoSize = true; - this.mShowOnFailedSearch.Location = new System.Drawing.Point(15, 32); - this.mShowOnFailedSearch.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(408, 24); + 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(4, 468); + this.mCustomSequences.Location = new System.Drawing.Point(5, 585); + this.mCustomSequences.Margin = new System.Windows.Forms.Padding(4); this.mCustomSequences.Name = "mCustomSequences"; - this.mCustomSequences.Size = new System.Drawing.Size(764, 206); + 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, 57); + this.mAdditionalSequenceDelete.Name = "mAdditionalSequenceDelete"; + this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(30, 30); + this.mAdditionalSequenceDelete.TabIndex = 11; + this.mAdditionalSequenceDelete.UseVisualStyleBackColor = true; + // + // mAdditionalSequenceEdit + // + this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(754, 68); + this.mAdditionalSequenceEdit.Name = "mAdditionalSequenceEdit"; + this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(100, 31); + this.mAdditionalSequenceEdit.TabIndex = 10; + this.mAdditionalSequenceEdit.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.mAdditionalSequenceEdit_KeyPress); + this.mAdditionalSequenceEdit.Leave += new System.EventHandler(this.mAdditionalSequenceEdit_Leave); + // + // mAdditionalSequences + // + 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.SelectedIndexChanged += new System.EventHandler(this.mAdditionalSequences_SelectedIndexChanged); + this.mAdditionalSequences.DoubleClick += new System.EventHandler(this.mAdditionalSequences_DoubleClick); + this.mAdditionalSequences.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.mAdditionalSequences_KeyPress); + // // mAdditionalSequencesTitle // this.mAdditionalSequencesTitle.AutoSize = true; - this.mAdditionalSequencesTitle.Location = new System.Drawing.Point(6, 61); + 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(221, 20); + 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(7, 27); - this.mAllowCustomSequences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + 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(281, 24); + 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; // - // mAdditionalSequences - // - this.mAdditionalSequences.FormattingEnabled = true; - this.mAdditionalSequences.ItemHeight = 20; - this.mAdditionalSequences.Location = new System.Drawing.Point(7, 85); - this.mAdditionalSequences.Name = "mAdditionalSequences"; - this.mAdditionalSequences.Size = new System.Drawing.Size(743, 104); - this.mAdditionalSequences.TabIndex = 9; - // // Options // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); + 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(4, 5, 4, 5); + this.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); this.Name = "Options"; - this.Size = new System.Drawing.Size(834, 499); + this.Size = new System.Drawing.Size(1112, 624); this.Paint += new System.Windows.Forms.PaintEventHandler(this.Options_Paint); searchInGroup.ResumeLayout(false); searchInGroup.PerformLayout(); @@ -412,5 +442,7 @@ private System.Windows.Forms.CheckBox mSearchInUserName; private System.Windows.Forms.CheckBox mSearchInTitle; 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 e8e8583..dc1a930 100755 --- a/AutoTypeSearch/Options.cs +++ b/AutoTypeSearch/Options.cs @@ -19,6 +19,8 @@ private static int sRegisteredHotkeyId; + private int mNewSequenceIndex = -1; + // ReSharper disable once MemberCanBePrivate.Global - Public for forms designer public Options() { @@ -61,6 +63,9 @@ mDefaultAction.SelectedIndex = (int)Settings.Default.DefaultAction; mAlternativeAction.SelectedIndex = (int)Settings.Default.AlternativeAction; + mAdditionalSequenceEdit.Hide(); + mAdditionalSequenceDelete.Hide(); + mAdditionalSequences.BeginUpdate(); mAdditionalSequences.Items.Clear(); @@ -71,12 +76,17 @@ mAdditionalSequences.Items.Add(s); } } - - mAdditionalSequences.Items.Add("new sequence"); + + SetNewSequenceItem(); mAdditionalSequences.EndUpdate(); } + private void SetNewSequenceItem() + { + mNewSequenceIndex = mAdditionalSequences.Items.Add("new sequence"); + } + private Keys ShowHotKey { get { return mShowHotKeyControl.HotKey; } @@ -215,5 +225,101 @@ r.Height += 2; ControlPaint.DrawBorder(e.Graphics, r, SystemColors.GrayText, ButtonBorderStyle.Solid); } + + private void CreateAdditionalSequenceEditBox(object sender) + { + 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 - r.Height, r.Height - delta); + mAdditionalSequenceEdit.Show(); + mAdditionalSequences.Controls.AddRange(new System.Windows.Forms.Control[] { this.mAdditionalSequenceEdit }); + mAdditionalSequenceEdit.Text = itemText; + mAdditionalSequenceEdit.Focus(); + mAdditionalSequenceEdit.SelectAll(); + } + + private int mEditedSequenceIndex; + private void mAdditionalSequenceEdit_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == 13) + { + SetAdditionalSequenceItem(); + e.Handled = true; + } + } + + private void SetAdditionalSequenceItem() + { + mAdditionalSequences.BeginUpdate(); + if (mEditedSequenceIndex != mNewSequenceIndex) + { + mAdditionalSequences.Items.RemoveAt(mNewSequenceIndex); + } + if (mAdditionalSequenceEdit.Text.Trim().Length == 0) + { + mAdditionalSequences.Items.RemoveAt(mEditedSequenceIndex); + } + else + { + mAdditionalSequences.Items[mEditedSequenceIndex] = mAdditionalSequenceEdit.Text; + } + SetNewSequenceItem(); + mAdditionalSequences.EndUpdate(); + + mAdditionalSequenceEdit.Hide(); + } + + private void mAdditionalSequenceEdit_Leave(object sender, EventArgs e) + { + mAdditionalSequences.Items[mEditedSequenceIndex] = mAdditionalSequenceEdit.Text; + mAdditionalSequenceEdit.Hide(); + } + + private void mAdditionalSequences_KeyPress(object sender, KeyPressEventArgs e) + { + if (e.KeyChar == 13) + { + CreateAdditionalSequenceEditBox(sender); + e.Handled = true; + } + } + + private void mAdditionalSequences_DoubleClick(object sender, EventArgs e) + { + CreateAdditionalSequenceEditBox(sender); + } + + private void mAdditionalSequences_SelectedIndexChanged(object sender, EventArgs e) + { + if (mAdditionalSequences.SelectedIndex < 0 || mAdditionalSequences.SelectedIndex >= mAdditionalSequences.Items.Count) + { + HideDeleteSequenceButton(); + } + else + { + ShowDeleteSequenceButton(); + } + } + + private void ShowDeleteSequenceButton() + { + throw new NotImplementedException(); + } + + private void HideDeleteSequenceButton() + { + throw new NotImplementedException(); + } } } diff --git a/AutoTypeSearch/Options.resx b/AutoTypeSearch/Options.resx index 9ed14a5..34a3218 100755 --- a/AutoTypeSearch/Options.resx +++ b/AutoTypeSearch/Options.resx @@ -1,4 +1,4 @@ - +