diff --git a/AutoTypeSearch/AutoTypeSearch.csproj b/AutoTypeSearch/AutoTypeSearch.csproj index 786cffd..e763fc4 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -46,7 +46,7 @@ False - ..\keepass_portable\KeePass.exe + C:\Program Files (x86)\KeePass Password Safe 2\KeePass.exe diff --git a/AutoTypeSearch/AutoTypeSearch.csproj b/AutoTypeSearch/AutoTypeSearch.csproj index 786cffd..e763fc4 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -46,7 +46,7 @@ False - ..\keepass_portable\KeePass.exe + C:\Program Files (x86)\KeePass Password Safe 2\KeePass.exe diff --git a/AutoTypeSearch/Options.Designer.cs b/AutoTypeSearch/Options.Designer.cs index cad79ae..c641ec4 100755 --- a/AutoTypeSearch/Options.Designer.cs +++ b/AutoTypeSearch/Options.Designer.cs @@ -79,11 +79,11 @@ 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.Location = new System.Drawing.Point(4, 196); + searchInGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); searchInGroup.Name = "searchInGroup"; - searchInGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - searchInGroup.Size = new System.Drawing.Size(1019, 90); + searchInGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + searchInGroup.Size = new System.Drawing.Size(764, 72); searchInGroup.TabIndex = 1; searchInGroup.TabStop = false; searchInGroup.Text = "Search in"; @@ -91,10 +91,10 @@ // 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.Location = new System.Drawing.Point(387, 29); + this.mSearchInTags.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInTags.Name = "mSearchInTags"; - this.mSearchInTags.Size = new System.Drawing.Size(92, 29); + this.mSearchInTags.Size = new System.Drawing.Size(70, 24); this.mSearchInTags.TabIndex = 4; this.mSearchInTags.Text = "Ta&gs"; this.mSearchInTags.UseVisualStyleBackColor = true; @@ -102,10 +102,10 @@ // 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.Location = new System.Drawing.Point(471, 29); + this.mSearchInOtherFields.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInOtherFields.Name = "mSearchInOtherFields"; - this.mSearchInOtherFields.Size = new System.Drawing.Size(274, 29); + this.mSearchInOtherFields.Size = new System.Drawing.Size(206, 24); this.mSearchInOtherFields.TabIndex = 5; this.mSearchInOtherFields.Text = "&Other unprotected fields"; this.mSearchInOtherFields.UseVisualStyleBackColor = true; @@ -113,10 +113,10 @@ // 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.Location = new System.Drawing.Point(297, 29); + this.mSearchInNotes.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInNotes.Name = "mSearchInNotes"; - this.mSearchInNotes.Size = new System.Drawing.Size(100, 29); + this.mSearchInNotes.Size = new System.Drawing.Size(77, 24); this.mSearchInNotes.TabIndex = 3; this.mSearchInNotes.Text = "Note&s"; this.mSearchInNotes.UseVisualStyleBackColor = true; @@ -124,10 +124,10 @@ // 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.Location = new System.Drawing.Point(216, 29); + this.mSearchInUrl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInUrl.Name = "mSearchInUrl"; - this.mSearchInUrl.Size = new System.Drawing.Size(86, 29); + this.mSearchInUrl.Size = new System.Drawing.Size(68, 24); this.mSearchInUrl.TabIndex = 2; this.mSearchInUrl.Text = "&URL"; this.mSearchInUrl.UseVisualStyleBackColor = true; @@ -135,10 +135,10 @@ // 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.Location = new System.Drawing.Point(92, 29); + this.mSearchInUserName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInUserName.Name = "mSearchInUserName"; - this.mSearchInUserName.Size = new System.Drawing.Size(148, 29); + this.mSearchInUserName.Size = new System.Drawing.Size(113, 24); this.mSearchInUserName.TabIndex = 1; this.mSearchInUserName.Text = "User &name"; this.mSearchInUserName.UseVisualStyleBackColor = true; @@ -146,10 +146,10 @@ // 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.Location = new System.Drawing.Point(14, 29); + this.mSearchInTitle.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInTitle.Name = "mSearchInTitle"; - this.mSearchInTitle.Size = new System.Drawing.Size(85, 29); + this.mSearchInTitle.Size = new System.Drawing.Size(64, 24); this.mSearchInTitle.TabIndex = 0; this.mSearchInTitle.Text = "&Title"; this.mSearchInTitle.UseVisualStyleBackColor = true; @@ -160,11 +160,11 @@ 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.Location = new System.Drawing.Point(4, 357); + actionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); actionsGroup.Name = "actionsGroup"; - actionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - actionsGroup.Size = new System.Drawing.Size(1019, 129); + actionsGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + actionsGroup.Size = new System.Drawing.Size(764, 103); actionsGroup.TabIndex = 3; actionsGroup.TabStop = false; actionsGroup.Text = "Actions"; @@ -172,38 +172,38 @@ // 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.Location = new System.Drawing.Point(392, 57); + this.mAlternativeAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mAlternativeAction.Name = "mAlternativeAction"; - this.mAlternativeAction.Size = new System.Drawing.Size(476, 33); + this.mAlternativeAction.Size = new System.Drawing.Size(358, 28); 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.Location = new System.Drawing.Point(16, 57); + this.mDefaultAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mDefaultAction.Name = "mDefaultAction"; - this.mDefaultAction.Size = new System.Drawing.Size(476, 33); + this.mDefaultAction.Size = new System.Drawing.Size(358, 28); 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.Location = new System.Drawing.Point(388, 31); + alternativeActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); alternativeActionLabel.Name = "alternativeActionLabel"; - alternativeActionLabel.Size = new System.Drawing.Size(322, 25); + alternativeActionLabel.Size = new System.Drawing.Size(238, 20); 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.Location = new System.Drawing.Point(12, 31); + defaultActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); defaultActionLabel.Name = "defaultActionLabel"; - defaultActionLabel.Size = new System.Drawing.Size(221, 25); + defaultActionLabel.Size = new System.Drawing.Size(165, 20); defaultActionLabel.TabIndex = 0; defaultActionLabel.Text = "De&fault action (Enter):"; // @@ -212,11 +212,11 @@ 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.Location = new System.Drawing.Point(4, 278); + searchOptionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); searchOptionsGroup.Name = "searchOptionsGroup"; - searchOptionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - searchOptionsGroup.Size = new System.Drawing.Size(1019, 86); + searchOptionsGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + searchOptionsGroup.Size = new System.Drawing.Size(764, 69); searchOptionsGroup.TabIndex = 2; searchOptionsGroup.TabStop = false; searchOptionsGroup.Text = "Search options"; @@ -224,10 +224,10 @@ // 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.Location = new System.Drawing.Point(376, 31); + this.mResolveReferences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mResolveReferences.Name = "mResolveReferences"; - this.mResolveReferences.Size = new System.Drawing.Size(339, 29); + this.mResolveReferences.Size = new System.Drawing.Size(250, 24); this.mResolveReferences.TabIndex = 2; this.mResolveReferences.Text = "Resolve fiel&d references (slow)"; this.mResolveReferences.UseVisualStyleBackColor = true; @@ -235,10 +235,10 @@ // 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.Location = new System.Drawing.Point(162, 31); + this.mExcludeExpired.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mExcludeExpired.Name = "mExcludeExpired"; - this.mExcludeExpired.Size = new System.Drawing.Size(269, 29); + this.mExcludeExpired.Size = new System.Drawing.Size(198, 24); this.mExcludeExpired.TabIndex = 1; this.mExcludeExpired.Text = "Exclude &expired entries"; this.mExcludeExpired.UseVisualStyleBackColor = true; @@ -246,10 +246,10 @@ // 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.Location = new System.Drawing.Point(15, 31); + this.mCaseSensitive.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mCaseSensitive.Name = "mCaseSensitive"; - this.mCaseSensitive.Size = new System.Drawing.Size(186, 29); + this.mCaseSensitive.Size = new System.Drawing.Size(138, 24); this.mCaseSensitive.TabIndex = 0; this.mCaseSensitive.Text = "Case-sensiti&ve"; this.mCaseSensitive.UseVisualStyleBackColor = true; @@ -262,10 +262,9 @@ 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.Location = new System.Drawing.Point(9, 18); this.mPanel.Name = "mPanel"; - this.mPanel.Size = new System.Drawing.Size(1077, 579); + this.mPanel.Size = new System.Drawing.Size(808, 463); this.mPanel.TabIndex = 5; // // mShowSearchGroup @@ -276,11 +275,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(5, 6); - this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowSearchGroup.Location = new System.Drawing.Point(4, 5); + this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowSearchGroup.Name = "mShowSearchGroup"; - this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - this.mShowSearchGroup.Size = new System.Drawing.Size(747, 228); + this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.mShowSearchGroup.Size = new System.Drawing.Size(378, 182); this.mShowSearchGroup.TabIndex = 0; this.mShowSearchGroup.TabStop = false; this.mShowSearchGroup.Text = "Show search window"; @@ -288,10 +287,10 @@ // 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.Location = new System.Drawing.Point(15, 68); + this.mShowOnHotKey.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowOnHotKey.Name = "mShowOnHotKey"; - this.mShowOnHotKey.Size = new System.Drawing.Size(466, 29); + this.mShowOnHotKey.Size = new System.Drawing.Size(343, 24); this.mShowOnHotKey.TabIndex = 1; this.mShowOnHotKey.Text = "Show when system-wide &hot key is pressed:"; this.mShowOnHotKey.UseVisualStyleBackColor = true; @@ -299,19 +298,19 @@ // // mShowHotKeyControl // - this.mShowHotKeyControl.Location = new System.Drawing.Point(60, 125); - this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowHotKeyControl.Location = new System.Drawing.Point(45, 100); + this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowHotKeyControl.Name = "mShowHotKeyControl"; - this.mShowHotKeyControl.Size = new System.Drawing.Size(241, 31); + this.mShowHotKeyControl.Size = new System.Drawing.Size(182, 26); 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.Location = new System.Drawing.Point(15, 143); + this.mShowOnIPC.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowOnIPC.Name = "mShowOnIPC"; - this.mShowOnIPC.Size = new System.Drawing.Size(775, 29); + this.mShowOnIPC.Size = new System.Drawing.Size(574, 24); this.mShowOnIPC.TabIndex = 3; this.mShowOnIPC.Text = "Show when \"/e1:AutoTypeSearch\" is passed as a ¶meter to KeePass.exe"; this.mShowOnIPC.UseVisualStyleBackColor = true; @@ -319,10 +318,10 @@ // 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.Location = new System.Drawing.Point(15, 32); + this.mShowOnFailedSearch.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowOnFailedSearch.Name = "mShowOnFailedSearch"; - this.mShowOnFailedSearch.Size = new System.Drawing.Size(552, 29); + this.mShowOnFailedSearch.Size = new System.Drawing.Size(408, 24); this.mShowOnFailedSearch.TabIndex = 0; this.mShowOnFailedSearch.Text = "Show &automatically if global auto-type finds no match"; this.mShowOnFailedSearch.UseVisualStyleBackColor = true; @@ -334,11 +333,9 @@ 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.Location = new System.Drawing.Point(4, 468); this.mCustomSequences.Name = "mCustomSequences"; - this.mCustomSequences.Padding = new System.Windows.Forms.Padding(4); - this.mCustomSequences.Size = new System.Drawing.Size(1019, 258); + this.mCustomSequences.Size = new System.Drawing.Size(764, 206); this.mCustomSequences.TabIndex = 4; this.mCustomSequences.TabStop = false; this.mCustomSequences.Text = "Custom Sequences"; @@ -346,17 +343,19 @@ // mAdditionalSequenceDelete // this.mAdditionalSequenceDelete.Image = global::AutoTypeSearch.Properties.Resources.Delete; - this.mAdditionalSequenceDelete.Location = new System.Drawing.Point(889, 57); + this.mAdditionalSequenceDelete.Location = new System.Drawing.Point(667, 46); + this.mAdditionalSequenceDelete.Margin = new System.Windows.Forms.Padding(2); this.mAdditionalSequenceDelete.Name = "mAdditionalSequenceDelete"; - this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(30, 30); + this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(22, 24); this.mAdditionalSequenceDelete.TabIndex = 11; this.mAdditionalSequenceDelete.UseVisualStyleBackColor = true; // // mAdditionalSequenceEdit // - this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(754, 68); + this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(566, 54); + this.mAdditionalSequenceEdit.Margin = new System.Windows.Forms.Padding(2); this.mAdditionalSequenceEdit.Name = "mAdditionalSequenceEdit"; - this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(100, 31); + this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(76, 26); this.mAdditionalSequenceEdit.TabIndex = 10; this.mAdditionalSequenceEdit.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.mAdditionalSequenceEdit_KeyPress); this.mAdditionalSequenceEdit.Leave += new System.EventHandler(this.mAdditionalSequenceEdit_Leave); @@ -364,45 +363,45 @@ // 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.ItemHeight = 20; + this.mAdditionalSequences.Location = new System.Drawing.Point(7, 85); this.mAdditionalSequences.Name = "mAdditionalSequences"; - this.mAdditionalSequences.Size = new System.Drawing.Size(989, 129); + this.mAdditionalSequences.Size = new System.Drawing.Size(743, 104); 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); + 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.Location = new System.Drawing.Point(6, 61); this.mAdditionalSequencesTitle.Name = "mAdditionalSequencesTitle"; - this.mAdditionalSequencesTitle.Size = new System.Drawing.Size(299, 25); + this.mAdditionalSequencesTitle.Size = new System.Drawing.Size(221, 20); 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.Location = new System.Drawing.Point(7, 27); + this.mAllowCustomSequences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mAllowCustomSequences.Name = "mAllowCustomSequences"; - this.mAllowCustomSequences.Size = new System.Drawing.Size(377, 29); + this.mAllowCustomSequences.Size = new System.Drawing.Size(281, 24); 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.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.mPanel); - this.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Name = "Options"; - this.Size = new System.Drawing.Size(1112, 624); + this.Size = new System.Drawing.Size(834, 499); this.Paint += new System.Windows.Forms.PaintEventHandler(this.Options_Paint); searchInGroup.ResumeLayout(false); searchInGroup.PerformLayout(); diff --git a/AutoTypeSearch/AutoTypeSearch.csproj b/AutoTypeSearch/AutoTypeSearch.csproj index 786cffd..e763fc4 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -46,7 +46,7 @@ False - ..\keepass_portable\KeePass.exe + C:\Program Files (x86)\KeePass Password Safe 2\KeePass.exe diff --git a/AutoTypeSearch/Options.Designer.cs b/AutoTypeSearch/Options.Designer.cs index cad79ae..c641ec4 100755 --- a/AutoTypeSearch/Options.Designer.cs +++ b/AutoTypeSearch/Options.Designer.cs @@ -79,11 +79,11 @@ 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.Location = new System.Drawing.Point(4, 196); + searchInGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); searchInGroup.Name = "searchInGroup"; - searchInGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - searchInGroup.Size = new System.Drawing.Size(1019, 90); + searchInGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + searchInGroup.Size = new System.Drawing.Size(764, 72); searchInGroup.TabIndex = 1; searchInGroup.TabStop = false; searchInGroup.Text = "Search in"; @@ -91,10 +91,10 @@ // 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.Location = new System.Drawing.Point(387, 29); + this.mSearchInTags.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInTags.Name = "mSearchInTags"; - this.mSearchInTags.Size = new System.Drawing.Size(92, 29); + this.mSearchInTags.Size = new System.Drawing.Size(70, 24); this.mSearchInTags.TabIndex = 4; this.mSearchInTags.Text = "Ta&gs"; this.mSearchInTags.UseVisualStyleBackColor = true; @@ -102,10 +102,10 @@ // 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.Location = new System.Drawing.Point(471, 29); + this.mSearchInOtherFields.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInOtherFields.Name = "mSearchInOtherFields"; - this.mSearchInOtherFields.Size = new System.Drawing.Size(274, 29); + this.mSearchInOtherFields.Size = new System.Drawing.Size(206, 24); this.mSearchInOtherFields.TabIndex = 5; this.mSearchInOtherFields.Text = "&Other unprotected fields"; this.mSearchInOtherFields.UseVisualStyleBackColor = true; @@ -113,10 +113,10 @@ // 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.Location = new System.Drawing.Point(297, 29); + this.mSearchInNotes.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInNotes.Name = "mSearchInNotes"; - this.mSearchInNotes.Size = new System.Drawing.Size(100, 29); + this.mSearchInNotes.Size = new System.Drawing.Size(77, 24); this.mSearchInNotes.TabIndex = 3; this.mSearchInNotes.Text = "Note&s"; this.mSearchInNotes.UseVisualStyleBackColor = true; @@ -124,10 +124,10 @@ // 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.Location = new System.Drawing.Point(216, 29); + this.mSearchInUrl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInUrl.Name = "mSearchInUrl"; - this.mSearchInUrl.Size = new System.Drawing.Size(86, 29); + this.mSearchInUrl.Size = new System.Drawing.Size(68, 24); this.mSearchInUrl.TabIndex = 2; this.mSearchInUrl.Text = "&URL"; this.mSearchInUrl.UseVisualStyleBackColor = true; @@ -135,10 +135,10 @@ // 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.Location = new System.Drawing.Point(92, 29); + this.mSearchInUserName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInUserName.Name = "mSearchInUserName"; - this.mSearchInUserName.Size = new System.Drawing.Size(148, 29); + this.mSearchInUserName.Size = new System.Drawing.Size(113, 24); this.mSearchInUserName.TabIndex = 1; this.mSearchInUserName.Text = "User &name"; this.mSearchInUserName.UseVisualStyleBackColor = true; @@ -146,10 +146,10 @@ // 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.Location = new System.Drawing.Point(14, 29); + this.mSearchInTitle.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInTitle.Name = "mSearchInTitle"; - this.mSearchInTitle.Size = new System.Drawing.Size(85, 29); + this.mSearchInTitle.Size = new System.Drawing.Size(64, 24); this.mSearchInTitle.TabIndex = 0; this.mSearchInTitle.Text = "&Title"; this.mSearchInTitle.UseVisualStyleBackColor = true; @@ -160,11 +160,11 @@ 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.Location = new System.Drawing.Point(4, 357); + actionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); actionsGroup.Name = "actionsGroup"; - actionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - actionsGroup.Size = new System.Drawing.Size(1019, 129); + actionsGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + actionsGroup.Size = new System.Drawing.Size(764, 103); actionsGroup.TabIndex = 3; actionsGroup.TabStop = false; actionsGroup.Text = "Actions"; @@ -172,38 +172,38 @@ // 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.Location = new System.Drawing.Point(392, 57); + this.mAlternativeAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mAlternativeAction.Name = "mAlternativeAction"; - this.mAlternativeAction.Size = new System.Drawing.Size(476, 33); + this.mAlternativeAction.Size = new System.Drawing.Size(358, 28); 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.Location = new System.Drawing.Point(16, 57); + this.mDefaultAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mDefaultAction.Name = "mDefaultAction"; - this.mDefaultAction.Size = new System.Drawing.Size(476, 33); + this.mDefaultAction.Size = new System.Drawing.Size(358, 28); 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.Location = new System.Drawing.Point(388, 31); + alternativeActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); alternativeActionLabel.Name = "alternativeActionLabel"; - alternativeActionLabel.Size = new System.Drawing.Size(322, 25); + alternativeActionLabel.Size = new System.Drawing.Size(238, 20); 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.Location = new System.Drawing.Point(12, 31); + defaultActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); defaultActionLabel.Name = "defaultActionLabel"; - defaultActionLabel.Size = new System.Drawing.Size(221, 25); + defaultActionLabel.Size = new System.Drawing.Size(165, 20); defaultActionLabel.TabIndex = 0; defaultActionLabel.Text = "De&fault action (Enter):"; // @@ -212,11 +212,11 @@ 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.Location = new System.Drawing.Point(4, 278); + searchOptionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); searchOptionsGroup.Name = "searchOptionsGroup"; - searchOptionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - searchOptionsGroup.Size = new System.Drawing.Size(1019, 86); + searchOptionsGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + searchOptionsGroup.Size = new System.Drawing.Size(764, 69); searchOptionsGroup.TabIndex = 2; searchOptionsGroup.TabStop = false; searchOptionsGroup.Text = "Search options"; @@ -224,10 +224,10 @@ // 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.Location = new System.Drawing.Point(376, 31); + this.mResolveReferences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mResolveReferences.Name = "mResolveReferences"; - this.mResolveReferences.Size = new System.Drawing.Size(339, 29); + this.mResolveReferences.Size = new System.Drawing.Size(250, 24); this.mResolveReferences.TabIndex = 2; this.mResolveReferences.Text = "Resolve fiel&d references (slow)"; this.mResolveReferences.UseVisualStyleBackColor = true; @@ -235,10 +235,10 @@ // 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.Location = new System.Drawing.Point(162, 31); + this.mExcludeExpired.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mExcludeExpired.Name = "mExcludeExpired"; - this.mExcludeExpired.Size = new System.Drawing.Size(269, 29); + this.mExcludeExpired.Size = new System.Drawing.Size(198, 24); this.mExcludeExpired.TabIndex = 1; this.mExcludeExpired.Text = "Exclude &expired entries"; this.mExcludeExpired.UseVisualStyleBackColor = true; @@ -246,10 +246,10 @@ // 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.Location = new System.Drawing.Point(15, 31); + this.mCaseSensitive.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mCaseSensitive.Name = "mCaseSensitive"; - this.mCaseSensitive.Size = new System.Drawing.Size(186, 29); + this.mCaseSensitive.Size = new System.Drawing.Size(138, 24); this.mCaseSensitive.TabIndex = 0; this.mCaseSensitive.Text = "Case-sensiti&ve"; this.mCaseSensitive.UseVisualStyleBackColor = true; @@ -262,10 +262,9 @@ 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.Location = new System.Drawing.Point(9, 18); this.mPanel.Name = "mPanel"; - this.mPanel.Size = new System.Drawing.Size(1077, 579); + this.mPanel.Size = new System.Drawing.Size(808, 463); this.mPanel.TabIndex = 5; // // mShowSearchGroup @@ -276,11 +275,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(5, 6); - this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowSearchGroup.Location = new System.Drawing.Point(4, 5); + this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowSearchGroup.Name = "mShowSearchGroup"; - this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - this.mShowSearchGroup.Size = new System.Drawing.Size(747, 228); + this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.mShowSearchGroup.Size = new System.Drawing.Size(378, 182); this.mShowSearchGroup.TabIndex = 0; this.mShowSearchGroup.TabStop = false; this.mShowSearchGroup.Text = "Show search window"; @@ -288,10 +287,10 @@ // 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.Location = new System.Drawing.Point(15, 68); + this.mShowOnHotKey.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowOnHotKey.Name = "mShowOnHotKey"; - this.mShowOnHotKey.Size = new System.Drawing.Size(466, 29); + this.mShowOnHotKey.Size = new System.Drawing.Size(343, 24); this.mShowOnHotKey.TabIndex = 1; this.mShowOnHotKey.Text = "Show when system-wide &hot key is pressed:"; this.mShowOnHotKey.UseVisualStyleBackColor = true; @@ -299,19 +298,19 @@ // // mShowHotKeyControl // - this.mShowHotKeyControl.Location = new System.Drawing.Point(60, 125); - this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowHotKeyControl.Location = new System.Drawing.Point(45, 100); + this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowHotKeyControl.Name = "mShowHotKeyControl"; - this.mShowHotKeyControl.Size = new System.Drawing.Size(241, 31); + this.mShowHotKeyControl.Size = new System.Drawing.Size(182, 26); 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.Location = new System.Drawing.Point(15, 143); + this.mShowOnIPC.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowOnIPC.Name = "mShowOnIPC"; - this.mShowOnIPC.Size = new System.Drawing.Size(775, 29); + this.mShowOnIPC.Size = new System.Drawing.Size(574, 24); this.mShowOnIPC.TabIndex = 3; this.mShowOnIPC.Text = "Show when \"/e1:AutoTypeSearch\" is passed as a ¶meter to KeePass.exe"; this.mShowOnIPC.UseVisualStyleBackColor = true; @@ -319,10 +318,10 @@ // 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.Location = new System.Drawing.Point(15, 32); + this.mShowOnFailedSearch.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowOnFailedSearch.Name = "mShowOnFailedSearch"; - this.mShowOnFailedSearch.Size = new System.Drawing.Size(552, 29); + this.mShowOnFailedSearch.Size = new System.Drawing.Size(408, 24); this.mShowOnFailedSearch.TabIndex = 0; this.mShowOnFailedSearch.Text = "Show &automatically if global auto-type finds no match"; this.mShowOnFailedSearch.UseVisualStyleBackColor = true; @@ -334,11 +333,9 @@ 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.Location = new System.Drawing.Point(4, 468); this.mCustomSequences.Name = "mCustomSequences"; - this.mCustomSequences.Padding = new System.Windows.Forms.Padding(4); - this.mCustomSequences.Size = new System.Drawing.Size(1019, 258); + this.mCustomSequences.Size = new System.Drawing.Size(764, 206); this.mCustomSequences.TabIndex = 4; this.mCustomSequences.TabStop = false; this.mCustomSequences.Text = "Custom Sequences"; @@ -346,17 +343,19 @@ // mAdditionalSequenceDelete // this.mAdditionalSequenceDelete.Image = global::AutoTypeSearch.Properties.Resources.Delete; - this.mAdditionalSequenceDelete.Location = new System.Drawing.Point(889, 57); + this.mAdditionalSequenceDelete.Location = new System.Drawing.Point(667, 46); + this.mAdditionalSequenceDelete.Margin = new System.Windows.Forms.Padding(2); this.mAdditionalSequenceDelete.Name = "mAdditionalSequenceDelete"; - this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(30, 30); + this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(22, 24); this.mAdditionalSequenceDelete.TabIndex = 11; this.mAdditionalSequenceDelete.UseVisualStyleBackColor = true; // // mAdditionalSequenceEdit // - this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(754, 68); + this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(566, 54); + this.mAdditionalSequenceEdit.Margin = new System.Windows.Forms.Padding(2); this.mAdditionalSequenceEdit.Name = "mAdditionalSequenceEdit"; - this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(100, 31); + this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(76, 26); this.mAdditionalSequenceEdit.TabIndex = 10; this.mAdditionalSequenceEdit.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.mAdditionalSequenceEdit_KeyPress); this.mAdditionalSequenceEdit.Leave += new System.EventHandler(this.mAdditionalSequenceEdit_Leave); @@ -364,45 +363,45 @@ // 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.ItemHeight = 20; + this.mAdditionalSequences.Location = new System.Drawing.Point(7, 85); this.mAdditionalSequences.Name = "mAdditionalSequences"; - this.mAdditionalSequences.Size = new System.Drawing.Size(989, 129); + this.mAdditionalSequences.Size = new System.Drawing.Size(743, 104); 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); + 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.Location = new System.Drawing.Point(6, 61); this.mAdditionalSequencesTitle.Name = "mAdditionalSequencesTitle"; - this.mAdditionalSequencesTitle.Size = new System.Drawing.Size(299, 25); + this.mAdditionalSequencesTitle.Size = new System.Drawing.Size(221, 20); 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.Location = new System.Drawing.Point(7, 27); + this.mAllowCustomSequences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mAllowCustomSequences.Name = "mAllowCustomSequences"; - this.mAllowCustomSequences.Size = new System.Drawing.Size(377, 29); + this.mAllowCustomSequences.Size = new System.Drawing.Size(281, 24); 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.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.mPanel); - this.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Name = "Options"; - this.Size = new System.Drawing.Size(1112, 624); + this.Size = new System.Drawing.Size(834, 499); this.Paint += new System.Windows.Forms.PaintEventHandler(this.Options_Paint); searchInGroup.ResumeLayout(false); searchInGroup.PerformLayout(); diff --git a/AutoTypeSearch/Options.cs b/AutoTypeSearch/Options.cs index dc1a930..277282a 100755 --- a/AutoTypeSearch/Options.cs +++ b/AutoTypeSearch/Options.cs @@ -188,8 +188,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; @@ -226,8 +228,21 @@ ControlPaint.DrawBorder(e.Graphics, r, SystemColors.GrayText, ButtonBorderStyle.Solid); } + private bool mAdditionalSequenceEditing = false; + + private IButtonControl mOldOptionsAcceptButton; + 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; @@ -241,12 +256,38 @@ } 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.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; + sOptionsForm.AcceptButton = null; + } + } + + private void RestoreFormAcceptButton() + { + if (mSavedOldOptionsAcceptButton > 0) + { + mSavedOldOptionsAcceptButton--; + if (sOptionsForm != null && mSavedOldOptionsAcceptButton == 0) + { + sOptionsForm.AcceptButton = mOldOptionsAcceptButton; + } + } } private int mEditedSequenceIndex; @@ -254,13 +295,15 @@ { if (e.KeyChar == 13) { - SetAdditionalSequenceItem(); + FinishEditingAdditionalSequenceItem(); e.Handled = true; } } - - private void SetAdditionalSequenceItem() + + private void FinishEditingAdditionalSequenceItem() { + if (!mAdditionalSequenceEditing) return; + mAdditionalSequences.BeginUpdate(); if (mEditedSequenceIndex != mNewSequenceIndex) { @@ -278,21 +321,18 @@ mAdditionalSequences.EndUpdate(); mAdditionalSequenceEdit.Hide(); + + if (sOptionsForm != null) + { + sOptionsForm.AcceptButton = mOldOptionsAcceptButton; + } + + mAdditionalSequenceEditing = false; } 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; - } + FinishEditingAdditionalSequenceItem(); } private void mAdditionalSequences_DoubleClick(object sender, EventArgs e) @@ -302,24 +342,45 @@ private void mAdditionalSequences_SelectedIndexChanged(object sender, EventArgs e) { - if (mAdditionalSequences.SelectedIndex < 0 || mAdditionalSequences.SelectedIndex >= mAdditionalSequences.Items.Count) + SetDeleteSequenceButton(); + mPanel.ScrollControlIntoView(mAdditionalSequences); + } + + private void SetDeleteSequenceButton() + { + int selected = mAdditionalSequences.SelectedIndex; + if (selected < 0 || selected >= mAdditionalSequences.Items.Count || selected == mNewSequenceIndex) { - HideDeleteSequenceButton(); + mAdditionalSequenceDelete.Hide(); } else { - ShowDeleteSequenceButton(); + 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 ShowDeleteSequenceButton() + private void mAdditionalSequences_KeyDown(object sender, KeyEventArgs e) { - throw new NotImplementedException(); + if (e.KeyCode == Keys.Enter) + { + + } } - private void HideDeleteSequenceButton() + private void mAdditionalSequences_Enter(object sender, EventArgs e) { - throw new NotImplementedException(); + SaveFormAcceptButton(); + } + + private void mAdditionalSequences_Leave(object sender, EventArgs e) + { + RestoreFormAcceptButton(); } } } diff --git a/AutoTypeSearch/AutoTypeSearch.csproj b/AutoTypeSearch/AutoTypeSearch.csproj index 786cffd..e763fc4 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -46,7 +46,7 @@ False - ..\keepass_portable\KeePass.exe + C:\Program Files (x86)\KeePass Password Safe 2\KeePass.exe diff --git a/AutoTypeSearch/Options.Designer.cs b/AutoTypeSearch/Options.Designer.cs index cad79ae..c641ec4 100755 --- a/AutoTypeSearch/Options.Designer.cs +++ b/AutoTypeSearch/Options.Designer.cs @@ -79,11 +79,11 @@ 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.Location = new System.Drawing.Point(4, 196); + searchInGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); searchInGroup.Name = "searchInGroup"; - searchInGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - searchInGroup.Size = new System.Drawing.Size(1019, 90); + searchInGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + searchInGroup.Size = new System.Drawing.Size(764, 72); searchInGroup.TabIndex = 1; searchInGroup.TabStop = false; searchInGroup.Text = "Search in"; @@ -91,10 +91,10 @@ // 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.Location = new System.Drawing.Point(387, 29); + this.mSearchInTags.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInTags.Name = "mSearchInTags"; - this.mSearchInTags.Size = new System.Drawing.Size(92, 29); + this.mSearchInTags.Size = new System.Drawing.Size(70, 24); this.mSearchInTags.TabIndex = 4; this.mSearchInTags.Text = "Ta&gs"; this.mSearchInTags.UseVisualStyleBackColor = true; @@ -102,10 +102,10 @@ // 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.Location = new System.Drawing.Point(471, 29); + this.mSearchInOtherFields.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInOtherFields.Name = "mSearchInOtherFields"; - this.mSearchInOtherFields.Size = new System.Drawing.Size(274, 29); + this.mSearchInOtherFields.Size = new System.Drawing.Size(206, 24); this.mSearchInOtherFields.TabIndex = 5; this.mSearchInOtherFields.Text = "&Other unprotected fields"; this.mSearchInOtherFields.UseVisualStyleBackColor = true; @@ -113,10 +113,10 @@ // 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.Location = new System.Drawing.Point(297, 29); + this.mSearchInNotes.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInNotes.Name = "mSearchInNotes"; - this.mSearchInNotes.Size = new System.Drawing.Size(100, 29); + this.mSearchInNotes.Size = new System.Drawing.Size(77, 24); this.mSearchInNotes.TabIndex = 3; this.mSearchInNotes.Text = "Note&s"; this.mSearchInNotes.UseVisualStyleBackColor = true; @@ -124,10 +124,10 @@ // 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.Location = new System.Drawing.Point(216, 29); + this.mSearchInUrl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInUrl.Name = "mSearchInUrl"; - this.mSearchInUrl.Size = new System.Drawing.Size(86, 29); + this.mSearchInUrl.Size = new System.Drawing.Size(68, 24); this.mSearchInUrl.TabIndex = 2; this.mSearchInUrl.Text = "&URL"; this.mSearchInUrl.UseVisualStyleBackColor = true; @@ -135,10 +135,10 @@ // 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.Location = new System.Drawing.Point(92, 29); + this.mSearchInUserName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInUserName.Name = "mSearchInUserName"; - this.mSearchInUserName.Size = new System.Drawing.Size(148, 29); + this.mSearchInUserName.Size = new System.Drawing.Size(113, 24); this.mSearchInUserName.TabIndex = 1; this.mSearchInUserName.Text = "User &name"; this.mSearchInUserName.UseVisualStyleBackColor = true; @@ -146,10 +146,10 @@ // 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.Location = new System.Drawing.Point(14, 29); + this.mSearchInTitle.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInTitle.Name = "mSearchInTitle"; - this.mSearchInTitle.Size = new System.Drawing.Size(85, 29); + this.mSearchInTitle.Size = new System.Drawing.Size(64, 24); this.mSearchInTitle.TabIndex = 0; this.mSearchInTitle.Text = "&Title"; this.mSearchInTitle.UseVisualStyleBackColor = true; @@ -160,11 +160,11 @@ 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.Location = new System.Drawing.Point(4, 357); + actionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); actionsGroup.Name = "actionsGroup"; - actionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - actionsGroup.Size = new System.Drawing.Size(1019, 129); + actionsGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + actionsGroup.Size = new System.Drawing.Size(764, 103); actionsGroup.TabIndex = 3; actionsGroup.TabStop = false; actionsGroup.Text = "Actions"; @@ -172,38 +172,38 @@ // 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.Location = new System.Drawing.Point(392, 57); + this.mAlternativeAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mAlternativeAction.Name = "mAlternativeAction"; - this.mAlternativeAction.Size = new System.Drawing.Size(476, 33); + this.mAlternativeAction.Size = new System.Drawing.Size(358, 28); 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.Location = new System.Drawing.Point(16, 57); + this.mDefaultAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mDefaultAction.Name = "mDefaultAction"; - this.mDefaultAction.Size = new System.Drawing.Size(476, 33); + this.mDefaultAction.Size = new System.Drawing.Size(358, 28); 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.Location = new System.Drawing.Point(388, 31); + alternativeActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); alternativeActionLabel.Name = "alternativeActionLabel"; - alternativeActionLabel.Size = new System.Drawing.Size(322, 25); + alternativeActionLabel.Size = new System.Drawing.Size(238, 20); 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.Location = new System.Drawing.Point(12, 31); + defaultActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); defaultActionLabel.Name = "defaultActionLabel"; - defaultActionLabel.Size = new System.Drawing.Size(221, 25); + defaultActionLabel.Size = new System.Drawing.Size(165, 20); defaultActionLabel.TabIndex = 0; defaultActionLabel.Text = "De&fault action (Enter):"; // @@ -212,11 +212,11 @@ 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.Location = new System.Drawing.Point(4, 278); + searchOptionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); searchOptionsGroup.Name = "searchOptionsGroup"; - searchOptionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - searchOptionsGroup.Size = new System.Drawing.Size(1019, 86); + searchOptionsGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + searchOptionsGroup.Size = new System.Drawing.Size(764, 69); searchOptionsGroup.TabIndex = 2; searchOptionsGroup.TabStop = false; searchOptionsGroup.Text = "Search options"; @@ -224,10 +224,10 @@ // 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.Location = new System.Drawing.Point(376, 31); + this.mResolveReferences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mResolveReferences.Name = "mResolveReferences"; - this.mResolveReferences.Size = new System.Drawing.Size(339, 29); + this.mResolveReferences.Size = new System.Drawing.Size(250, 24); this.mResolveReferences.TabIndex = 2; this.mResolveReferences.Text = "Resolve fiel&d references (slow)"; this.mResolveReferences.UseVisualStyleBackColor = true; @@ -235,10 +235,10 @@ // 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.Location = new System.Drawing.Point(162, 31); + this.mExcludeExpired.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mExcludeExpired.Name = "mExcludeExpired"; - this.mExcludeExpired.Size = new System.Drawing.Size(269, 29); + this.mExcludeExpired.Size = new System.Drawing.Size(198, 24); this.mExcludeExpired.TabIndex = 1; this.mExcludeExpired.Text = "Exclude &expired entries"; this.mExcludeExpired.UseVisualStyleBackColor = true; @@ -246,10 +246,10 @@ // 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.Location = new System.Drawing.Point(15, 31); + this.mCaseSensitive.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mCaseSensitive.Name = "mCaseSensitive"; - this.mCaseSensitive.Size = new System.Drawing.Size(186, 29); + this.mCaseSensitive.Size = new System.Drawing.Size(138, 24); this.mCaseSensitive.TabIndex = 0; this.mCaseSensitive.Text = "Case-sensiti&ve"; this.mCaseSensitive.UseVisualStyleBackColor = true; @@ -262,10 +262,9 @@ 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.Location = new System.Drawing.Point(9, 18); this.mPanel.Name = "mPanel"; - this.mPanel.Size = new System.Drawing.Size(1077, 579); + this.mPanel.Size = new System.Drawing.Size(808, 463); this.mPanel.TabIndex = 5; // // mShowSearchGroup @@ -276,11 +275,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(5, 6); - this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowSearchGroup.Location = new System.Drawing.Point(4, 5); + this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowSearchGroup.Name = "mShowSearchGroup"; - this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - this.mShowSearchGroup.Size = new System.Drawing.Size(747, 228); + this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.mShowSearchGroup.Size = new System.Drawing.Size(378, 182); this.mShowSearchGroup.TabIndex = 0; this.mShowSearchGroup.TabStop = false; this.mShowSearchGroup.Text = "Show search window"; @@ -288,10 +287,10 @@ // 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.Location = new System.Drawing.Point(15, 68); + this.mShowOnHotKey.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowOnHotKey.Name = "mShowOnHotKey"; - this.mShowOnHotKey.Size = new System.Drawing.Size(466, 29); + this.mShowOnHotKey.Size = new System.Drawing.Size(343, 24); this.mShowOnHotKey.TabIndex = 1; this.mShowOnHotKey.Text = "Show when system-wide &hot key is pressed:"; this.mShowOnHotKey.UseVisualStyleBackColor = true; @@ -299,19 +298,19 @@ // // mShowHotKeyControl // - this.mShowHotKeyControl.Location = new System.Drawing.Point(60, 125); - this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowHotKeyControl.Location = new System.Drawing.Point(45, 100); + this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowHotKeyControl.Name = "mShowHotKeyControl"; - this.mShowHotKeyControl.Size = new System.Drawing.Size(241, 31); + this.mShowHotKeyControl.Size = new System.Drawing.Size(182, 26); 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.Location = new System.Drawing.Point(15, 143); + this.mShowOnIPC.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowOnIPC.Name = "mShowOnIPC"; - this.mShowOnIPC.Size = new System.Drawing.Size(775, 29); + this.mShowOnIPC.Size = new System.Drawing.Size(574, 24); this.mShowOnIPC.TabIndex = 3; this.mShowOnIPC.Text = "Show when \"/e1:AutoTypeSearch\" is passed as a ¶meter to KeePass.exe"; this.mShowOnIPC.UseVisualStyleBackColor = true; @@ -319,10 +318,10 @@ // 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.Location = new System.Drawing.Point(15, 32); + this.mShowOnFailedSearch.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowOnFailedSearch.Name = "mShowOnFailedSearch"; - this.mShowOnFailedSearch.Size = new System.Drawing.Size(552, 29); + this.mShowOnFailedSearch.Size = new System.Drawing.Size(408, 24); this.mShowOnFailedSearch.TabIndex = 0; this.mShowOnFailedSearch.Text = "Show &automatically if global auto-type finds no match"; this.mShowOnFailedSearch.UseVisualStyleBackColor = true; @@ -334,11 +333,9 @@ 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.Location = new System.Drawing.Point(4, 468); this.mCustomSequences.Name = "mCustomSequences"; - this.mCustomSequences.Padding = new System.Windows.Forms.Padding(4); - this.mCustomSequences.Size = new System.Drawing.Size(1019, 258); + this.mCustomSequences.Size = new System.Drawing.Size(764, 206); this.mCustomSequences.TabIndex = 4; this.mCustomSequences.TabStop = false; this.mCustomSequences.Text = "Custom Sequences"; @@ -346,17 +343,19 @@ // mAdditionalSequenceDelete // this.mAdditionalSequenceDelete.Image = global::AutoTypeSearch.Properties.Resources.Delete; - this.mAdditionalSequenceDelete.Location = new System.Drawing.Point(889, 57); + this.mAdditionalSequenceDelete.Location = new System.Drawing.Point(667, 46); + this.mAdditionalSequenceDelete.Margin = new System.Windows.Forms.Padding(2); this.mAdditionalSequenceDelete.Name = "mAdditionalSequenceDelete"; - this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(30, 30); + this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(22, 24); this.mAdditionalSequenceDelete.TabIndex = 11; this.mAdditionalSequenceDelete.UseVisualStyleBackColor = true; // // mAdditionalSequenceEdit // - this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(754, 68); + this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(566, 54); + this.mAdditionalSequenceEdit.Margin = new System.Windows.Forms.Padding(2); this.mAdditionalSequenceEdit.Name = "mAdditionalSequenceEdit"; - this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(100, 31); + this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(76, 26); this.mAdditionalSequenceEdit.TabIndex = 10; this.mAdditionalSequenceEdit.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.mAdditionalSequenceEdit_KeyPress); this.mAdditionalSequenceEdit.Leave += new System.EventHandler(this.mAdditionalSequenceEdit_Leave); @@ -364,45 +363,45 @@ // 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.ItemHeight = 20; + this.mAdditionalSequences.Location = new System.Drawing.Point(7, 85); this.mAdditionalSequences.Name = "mAdditionalSequences"; - this.mAdditionalSequences.Size = new System.Drawing.Size(989, 129); + this.mAdditionalSequences.Size = new System.Drawing.Size(743, 104); 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); + 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.Location = new System.Drawing.Point(6, 61); this.mAdditionalSequencesTitle.Name = "mAdditionalSequencesTitle"; - this.mAdditionalSequencesTitle.Size = new System.Drawing.Size(299, 25); + this.mAdditionalSequencesTitle.Size = new System.Drawing.Size(221, 20); 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.Location = new System.Drawing.Point(7, 27); + this.mAllowCustomSequences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mAllowCustomSequences.Name = "mAllowCustomSequences"; - this.mAllowCustomSequences.Size = new System.Drawing.Size(377, 29); + this.mAllowCustomSequences.Size = new System.Drawing.Size(281, 24); 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.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.mPanel); - this.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Name = "Options"; - this.Size = new System.Drawing.Size(1112, 624); + this.Size = new System.Drawing.Size(834, 499); this.Paint += new System.Windows.Forms.PaintEventHandler(this.Options_Paint); searchInGroup.ResumeLayout(false); searchInGroup.PerformLayout(); diff --git a/AutoTypeSearch/Options.cs b/AutoTypeSearch/Options.cs index dc1a930..277282a 100755 --- a/AutoTypeSearch/Options.cs +++ b/AutoTypeSearch/Options.cs @@ -188,8 +188,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; @@ -226,8 +228,21 @@ ControlPaint.DrawBorder(e.Graphics, r, SystemColors.GrayText, ButtonBorderStyle.Solid); } + private bool mAdditionalSequenceEditing = false; + + private IButtonControl mOldOptionsAcceptButton; + 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; @@ -241,12 +256,38 @@ } 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.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; + sOptionsForm.AcceptButton = null; + } + } + + private void RestoreFormAcceptButton() + { + if (mSavedOldOptionsAcceptButton > 0) + { + mSavedOldOptionsAcceptButton--; + if (sOptionsForm != null && mSavedOldOptionsAcceptButton == 0) + { + sOptionsForm.AcceptButton = mOldOptionsAcceptButton; + } + } } private int mEditedSequenceIndex; @@ -254,13 +295,15 @@ { if (e.KeyChar == 13) { - SetAdditionalSequenceItem(); + FinishEditingAdditionalSequenceItem(); e.Handled = true; } } - - private void SetAdditionalSequenceItem() + + private void FinishEditingAdditionalSequenceItem() { + if (!mAdditionalSequenceEditing) return; + mAdditionalSequences.BeginUpdate(); if (mEditedSequenceIndex != mNewSequenceIndex) { @@ -278,21 +321,18 @@ mAdditionalSequences.EndUpdate(); mAdditionalSequenceEdit.Hide(); + + if (sOptionsForm != null) + { + sOptionsForm.AcceptButton = mOldOptionsAcceptButton; + } + + mAdditionalSequenceEditing = false; } 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; - } + FinishEditingAdditionalSequenceItem(); } private void mAdditionalSequences_DoubleClick(object sender, EventArgs e) @@ -302,24 +342,45 @@ private void mAdditionalSequences_SelectedIndexChanged(object sender, EventArgs e) { - if (mAdditionalSequences.SelectedIndex < 0 || mAdditionalSequences.SelectedIndex >= mAdditionalSequences.Items.Count) + SetDeleteSequenceButton(); + mPanel.ScrollControlIntoView(mAdditionalSequences); + } + + private void SetDeleteSequenceButton() + { + int selected = mAdditionalSequences.SelectedIndex; + if (selected < 0 || selected >= mAdditionalSequences.Items.Count || selected == mNewSequenceIndex) { - HideDeleteSequenceButton(); + mAdditionalSequenceDelete.Hide(); } else { - ShowDeleteSequenceButton(); + 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 ShowDeleteSequenceButton() + private void mAdditionalSequences_KeyDown(object sender, KeyEventArgs e) { - throw new NotImplementedException(); + if (e.KeyCode == Keys.Enter) + { + + } } - private void HideDeleteSequenceButton() + private void mAdditionalSequences_Enter(object sender, EventArgs e) { - throw new NotImplementedException(); + SaveFormAcceptButton(); + } + + private void mAdditionalSequences_Leave(object sender, EventArgs e) + { + RestoreFormAcceptButton(); } } } diff --git a/AutoTypeSearch/Options.resx b/AutoTypeSearch/Options.resx index 34a3218..26b90a2 100755 --- a/AutoTypeSearch/Options.resx +++ b/AutoTypeSearch/Options.resx @@ -129,6 +129,12 @@ False + + False + + + False + False diff --git a/AutoTypeSearch/AutoTypeSearch.csproj b/AutoTypeSearch/AutoTypeSearch.csproj index 786cffd..e763fc4 100755 --- a/AutoTypeSearch/AutoTypeSearch.csproj +++ b/AutoTypeSearch/AutoTypeSearch.csproj @@ -46,7 +46,7 @@ False - ..\keepass_portable\KeePass.exe + C:\Program Files (x86)\KeePass Password Safe 2\KeePass.exe diff --git a/AutoTypeSearch/Options.Designer.cs b/AutoTypeSearch/Options.Designer.cs index cad79ae..c641ec4 100755 --- a/AutoTypeSearch/Options.Designer.cs +++ b/AutoTypeSearch/Options.Designer.cs @@ -79,11 +79,11 @@ 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.Location = new System.Drawing.Point(4, 196); + searchInGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); searchInGroup.Name = "searchInGroup"; - searchInGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - searchInGroup.Size = new System.Drawing.Size(1019, 90); + searchInGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + searchInGroup.Size = new System.Drawing.Size(764, 72); searchInGroup.TabIndex = 1; searchInGroup.TabStop = false; searchInGroup.Text = "Search in"; @@ -91,10 +91,10 @@ // 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.Location = new System.Drawing.Point(387, 29); + this.mSearchInTags.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInTags.Name = "mSearchInTags"; - this.mSearchInTags.Size = new System.Drawing.Size(92, 29); + this.mSearchInTags.Size = new System.Drawing.Size(70, 24); this.mSearchInTags.TabIndex = 4; this.mSearchInTags.Text = "Ta&gs"; this.mSearchInTags.UseVisualStyleBackColor = true; @@ -102,10 +102,10 @@ // 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.Location = new System.Drawing.Point(471, 29); + this.mSearchInOtherFields.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInOtherFields.Name = "mSearchInOtherFields"; - this.mSearchInOtherFields.Size = new System.Drawing.Size(274, 29); + this.mSearchInOtherFields.Size = new System.Drawing.Size(206, 24); this.mSearchInOtherFields.TabIndex = 5; this.mSearchInOtherFields.Text = "&Other unprotected fields"; this.mSearchInOtherFields.UseVisualStyleBackColor = true; @@ -113,10 +113,10 @@ // 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.Location = new System.Drawing.Point(297, 29); + this.mSearchInNotes.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInNotes.Name = "mSearchInNotes"; - this.mSearchInNotes.Size = new System.Drawing.Size(100, 29); + this.mSearchInNotes.Size = new System.Drawing.Size(77, 24); this.mSearchInNotes.TabIndex = 3; this.mSearchInNotes.Text = "Note&s"; this.mSearchInNotes.UseVisualStyleBackColor = true; @@ -124,10 +124,10 @@ // 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.Location = new System.Drawing.Point(216, 29); + this.mSearchInUrl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInUrl.Name = "mSearchInUrl"; - this.mSearchInUrl.Size = new System.Drawing.Size(86, 29); + this.mSearchInUrl.Size = new System.Drawing.Size(68, 24); this.mSearchInUrl.TabIndex = 2; this.mSearchInUrl.Text = "&URL"; this.mSearchInUrl.UseVisualStyleBackColor = true; @@ -135,10 +135,10 @@ // 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.Location = new System.Drawing.Point(92, 29); + this.mSearchInUserName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInUserName.Name = "mSearchInUserName"; - this.mSearchInUserName.Size = new System.Drawing.Size(148, 29); + this.mSearchInUserName.Size = new System.Drawing.Size(113, 24); this.mSearchInUserName.TabIndex = 1; this.mSearchInUserName.Text = "User &name"; this.mSearchInUserName.UseVisualStyleBackColor = true; @@ -146,10 +146,10 @@ // 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.Location = new System.Drawing.Point(14, 29); + this.mSearchInTitle.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mSearchInTitle.Name = "mSearchInTitle"; - this.mSearchInTitle.Size = new System.Drawing.Size(85, 29); + this.mSearchInTitle.Size = new System.Drawing.Size(64, 24); this.mSearchInTitle.TabIndex = 0; this.mSearchInTitle.Text = "&Title"; this.mSearchInTitle.UseVisualStyleBackColor = true; @@ -160,11 +160,11 @@ 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.Location = new System.Drawing.Point(4, 357); + actionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); actionsGroup.Name = "actionsGroup"; - actionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - actionsGroup.Size = new System.Drawing.Size(1019, 129); + actionsGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + actionsGroup.Size = new System.Drawing.Size(764, 103); actionsGroup.TabIndex = 3; actionsGroup.TabStop = false; actionsGroup.Text = "Actions"; @@ -172,38 +172,38 @@ // 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.Location = new System.Drawing.Point(392, 57); + this.mAlternativeAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mAlternativeAction.Name = "mAlternativeAction"; - this.mAlternativeAction.Size = new System.Drawing.Size(476, 33); + this.mAlternativeAction.Size = new System.Drawing.Size(358, 28); 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.Location = new System.Drawing.Point(16, 57); + this.mDefaultAction.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mDefaultAction.Name = "mDefaultAction"; - this.mDefaultAction.Size = new System.Drawing.Size(476, 33); + this.mDefaultAction.Size = new System.Drawing.Size(358, 28); 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.Location = new System.Drawing.Point(388, 31); + alternativeActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); alternativeActionLabel.Name = "alternativeActionLabel"; - alternativeActionLabel.Size = new System.Drawing.Size(322, 25); + alternativeActionLabel.Size = new System.Drawing.Size(238, 20); 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.Location = new System.Drawing.Point(12, 31); + defaultActionLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); defaultActionLabel.Name = "defaultActionLabel"; - defaultActionLabel.Size = new System.Drawing.Size(221, 25); + defaultActionLabel.Size = new System.Drawing.Size(165, 20); defaultActionLabel.TabIndex = 0; defaultActionLabel.Text = "De&fault action (Enter):"; // @@ -212,11 +212,11 @@ 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.Location = new System.Drawing.Point(4, 278); + searchOptionsGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); searchOptionsGroup.Name = "searchOptionsGroup"; - searchOptionsGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - searchOptionsGroup.Size = new System.Drawing.Size(1019, 86); + searchOptionsGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + searchOptionsGroup.Size = new System.Drawing.Size(764, 69); searchOptionsGroup.TabIndex = 2; searchOptionsGroup.TabStop = false; searchOptionsGroup.Text = "Search options"; @@ -224,10 +224,10 @@ // 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.Location = new System.Drawing.Point(376, 31); + this.mResolveReferences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mResolveReferences.Name = "mResolveReferences"; - this.mResolveReferences.Size = new System.Drawing.Size(339, 29); + this.mResolveReferences.Size = new System.Drawing.Size(250, 24); this.mResolveReferences.TabIndex = 2; this.mResolveReferences.Text = "Resolve fiel&d references (slow)"; this.mResolveReferences.UseVisualStyleBackColor = true; @@ -235,10 +235,10 @@ // 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.Location = new System.Drawing.Point(162, 31); + this.mExcludeExpired.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mExcludeExpired.Name = "mExcludeExpired"; - this.mExcludeExpired.Size = new System.Drawing.Size(269, 29); + this.mExcludeExpired.Size = new System.Drawing.Size(198, 24); this.mExcludeExpired.TabIndex = 1; this.mExcludeExpired.Text = "Exclude &expired entries"; this.mExcludeExpired.UseVisualStyleBackColor = true; @@ -246,10 +246,10 @@ // 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.Location = new System.Drawing.Point(15, 31); + this.mCaseSensitive.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mCaseSensitive.Name = "mCaseSensitive"; - this.mCaseSensitive.Size = new System.Drawing.Size(186, 29); + this.mCaseSensitive.Size = new System.Drawing.Size(138, 24); this.mCaseSensitive.TabIndex = 0; this.mCaseSensitive.Text = "Case-sensiti&ve"; this.mCaseSensitive.UseVisualStyleBackColor = true; @@ -262,10 +262,9 @@ 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.Location = new System.Drawing.Point(9, 18); this.mPanel.Name = "mPanel"; - this.mPanel.Size = new System.Drawing.Size(1077, 579); + this.mPanel.Size = new System.Drawing.Size(808, 463); this.mPanel.TabIndex = 5; // // mShowSearchGroup @@ -276,11 +275,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(5, 6); - this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowSearchGroup.Location = new System.Drawing.Point(4, 5); + this.mShowSearchGroup.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowSearchGroup.Name = "mShowSearchGroup"; - this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(5, 6, 5, 6); - this.mShowSearchGroup.Size = new System.Drawing.Size(747, 228); + this.mShowSearchGroup.Padding = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.mShowSearchGroup.Size = new System.Drawing.Size(378, 182); this.mShowSearchGroup.TabIndex = 0; this.mShowSearchGroup.TabStop = false; this.mShowSearchGroup.Text = "Show search window"; @@ -288,10 +287,10 @@ // 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.Location = new System.Drawing.Point(15, 68); + this.mShowOnHotKey.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowOnHotKey.Name = "mShowOnHotKey"; - this.mShowOnHotKey.Size = new System.Drawing.Size(466, 29); + this.mShowOnHotKey.Size = new System.Drawing.Size(343, 24); this.mShowOnHotKey.TabIndex = 1; this.mShowOnHotKey.Text = "Show when system-wide &hot key is pressed:"; this.mShowOnHotKey.UseVisualStyleBackColor = true; @@ -299,19 +298,19 @@ // // mShowHotKeyControl // - this.mShowHotKeyControl.Location = new System.Drawing.Point(60, 125); - this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.mShowHotKeyControl.Location = new System.Drawing.Point(45, 100); + this.mShowHotKeyControl.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowHotKeyControl.Name = "mShowHotKeyControl"; - this.mShowHotKeyControl.Size = new System.Drawing.Size(241, 31); + this.mShowHotKeyControl.Size = new System.Drawing.Size(182, 26); 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.Location = new System.Drawing.Point(15, 143); + this.mShowOnIPC.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowOnIPC.Name = "mShowOnIPC"; - this.mShowOnIPC.Size = new System.Drawing.Size(775, 29); + this.mShowOnIPC.Size = new System.Drawing.Size(574, 24); this.mShowOnIPC.TabIndex = 3; this.mShowOnIPC.Text = "Show when \"/e1:AutoTypeSearch\" is passed as a ¶meter to KeePass.exe"; this.mShowOnIPC.UseVisualStyleBackColor = true; @@ -319,10 +318,10 @@ // 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.Location = new System.Drawing.Point(15, 32); + this.mShowOnFailedSearch.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mShowOnFailedSearch.Name = "mShowOnFailedSearch"; - this.mShowOnFailedSearch.Size = new System.Drawing.Size(552, 29); + this.mShowOnFailedSearch.Size = new System.Drawing.Size(408, 24); this.mShowOnFailedSearch.TabIndex = 0; this.mShowOnFailedSearch.Text = "Show &automatically if global auto-type finds no match"; this.mShowOnFailedSearch.UseVisualStyleBackColor = true; @@ -334,11 +333,9 @@ 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.Location = new System.Drawing.Point(4, 468); this.mCustomSequences.Name = "mCustomSequences"; - this.mCustomSequences.Padding = new System.Windows.Forms.Padding(4); - this.mCustomSequences.Size = new System.Drawing.Size(1019, 258); + this.mCustomSequences.Size = new System.Drawing.Size(764, 206); this.mCustomSequences.TabIndex = 4; this.mCustomSequences.TabStop = false; this.mCustomSequences.Text = "Custom Sequences"; @@ -346,17 +343,19 @@ // mAdditionalSequenceDelete // this.mAdditionalSequenceDelete.Image = global::AutoTypeSearch.Properties.Resources.Delete; - this.mAdditionalSequenceDelete.Location = new System.Drawing.Point(889, 57); + this.mAdditionalSequenceDelete.Location = new System.Drawing.Point(667, 46); + this.mAdditionalSequenceDelete.Margin = new System.Windows.Forms.Padding(2); this.mAdditionalSequenceDelete.Name = "mAdditionalSequenceDelete"; - this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(30, 30); + this.mAdditionalSequenceDelete.Size = new System.Drawing.Size(22, 24); this.mAdditionalSequenceDelete.TabIndex = 11; this.mAdditionalSequenceDelete.UseVisualStyleBackColor = true; // // mAdditionalSequenceEdit // - this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(754, 68); + this.mAdditionalSequenceEdit.Location = new System.Drawing.Point(566, 54); + this.mAdditionalSequenceEdit.Margin = new System.Windows.Forms.Padding(2); this.mAdditionalSequenceEdit.Name = "mAdditionalSequenceEdit"; - this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(100, 31); + this.mAdditionalSequenceEdit.Size = new System.Drawing.Size(76, 26); this.mAdditionalSequenceEdit.TabIndex = 10; this.mAdditionalSequenceEdit.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.mAdditionalSequenceEdit_KeyPress); this.mAdditionalSequenceEdit.Leave += new System.EventHandler(this.mAdditionalSequenceEdit_Leave); @@ -364,45 +363,45 @@ // 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.ItemHeight = 20; + this.mAdditionalSequences.Location = new System.Drawing.Point(7, 85); this.mAdditionalSequences.Name = "mAdditionalSequences"; - this.mAdditionalSequences.Size = new System.Drawing.Size(989, 129); + this.mAdditionalSequences.Size = new System.Drawing.Size(743, 104); 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); + 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.Location = new System.Drawing.Point(6, 61); this.mAdditionalSequencesTitle.Name = "mAdditionalSequencesTitle"; - this.mAdditionalSequencesTitle.Size = new System.Drawing.Size(299, 25); + this.mAdditionalSequencesTitle.Size = new System.Drawing.Size(221, 20); 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.Location = new System.Drawing.Point(7, 27); + this.mAllowCustomSequences.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.mAllowCustomSequences.Name = "mAllowCustomSequences"; - this.mAllowCustomSequences.Size = new System.Drawing.Size(377, 29); + this.mAllowCustomSequences.Size = new System.Drawing.Size(281, 24); 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.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.mPanel); - this.Margin = new System.Windows.Forms.Padding(5, 6, 5, 6); + this.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.Name = "Options"; - this.Size = new System.Drawing.Size(1112, 624); + this.Size = new System.Drawing.Size(834, 499); this.Paint += new System.Windows.Forms.PaintEventHandler(this.Options_Paint); searchInGroup.ResumeLayout(false); searchInGroup.PerformLayout(); diff --git a/AutoTypeSearch/Options.cs b/AutoTypeSearch/Options.cs index dc1a930..277282a 100755 --- a/AutoTypeSearch/Options.cs +++ b/AutoTypeSearch/Options.cs @@ -188,8 +188,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; @@ -226,8 +228,21 @@ ControlPaint.DrawBorder(e.Graphics, r, SystemColors.GrayText, ButtonBorderStyle.Solid); } + private bool mAdditionalSequenceEditing = false; + + private IButtonControl mOldOptionsAcceptButton; + 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; @@ -241,12 +256,38 @@ } 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.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; + sOptionsForm.AcceptButton = null; + } + } + + private void RestoreFormAcceptButton() + { + if (mSavedOldOptionsAcceptButton > 0) + { + mSavedOldOptionsAcceptButton--; + if (sOptionsForm != null && mSavedOldOptionsAcceptButton == 0) + { + sOptionsForm.AcceptButton = mOldOptionsAcceptButton; + } + } } private int mEditedSequenceIndex; @@ -254,13 +295,15 @@ { if (e.KeyChar == 13) { - SetAdditionalSequenceItem(); + FinishEditingAdditionalSequenceItem(); e.Handled = true; } } - - private void SetAdditionalSequenceItem() + + private void FinishEditingAdditionalSequenceItem() { + if (!mAdditionalSequenceEditing) return; + mAdditionalSequences.BeginUpdate(); if (mEditedSequenceIndex != mNewSequenceIndex) { @@ -278,21 +321,18 @@ mAdditionalSequences.EndUpdate(); mAdditionalSequenceEdit.Hide(); + + if (sOptionsForm != null) + { + sOptionsForm.AcceptButton = mOldOptionsAcceptButton; + } + + mAdditionalSequenceEditing = false; } 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; - } + FinishEditingAdditionalSequenceItem(); } private void mAdditionalSequences_DoubleClick(object sender, EventArgs e) @@ -302,24 +342,45 @@ private void mAdditionalSequences_SelectedIndexChanged(object sender, EventArgs e) { - if (mAdditionalSequences.SelectedIndex < 0 || mAdditionalSequences.SelectedIndex >= mAdditionalSequences.Items.Count) + SetDeleteSequenceButton(); + mPanel.ScrollControlIntoView(mAdditionalSequences); + } + + private void SetDeleteSequenceButton() + { + int selected = mAdditionalSequences.SelectedIndex; + if (selected < 0 || selected >= mAdditionalSequences.Items.Count || selected == mNewSequenceIndex) { - HideDeleteSequenceButton(); + mAdditionalSequenceDelete.Hide(); } else { - ShowDeleteSequenceButton(); + 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 ShowDeleteSequenceButton() + private void mAdditionalSequences_KeyDown(object sender, KeyEventArgs e) { - throw new NotImplementedException(); + if (e.KeyCode == Keys.Enter) + { + + } } - private void HideDeleteSequenceButton() + private void mAdditionalSequences_Enter(object sender, EventArgs e) { - throw new NotImplementedException(); + SaveFormAcceptButton(); + } + + private void mAdditionalSequences_Leave(object sender, EventArgs e) + { + RestoreFormAcceptButton(); } } } diff --git a/AutoTypeSearch/Options.resx b/AutoTypeSearch/Options.resx index 34a3218..26b90a2 100755 --- a/AutoTypeSearch/Options.resx +++ b/AutoTypeSearch/Options.resx @@ -129,6 +129,12 @@ False + + False + + + False + False diff --git a/AutoTypeSearch/install.bat b/AutoTypeSearch/install.bat new file mode 100755 index 0000000..b537637 --- /dev/null +++ b/AutoTypeSearch/install.bat @@ -0,0 +1,4 @@ +taskkill /IM keepass.exe /F +copy /Y "obj\Debug\AutoTypeSearch.dll" "c:\Program Files (x86)\KeePass Password Safe 2\" +copy /Y "obj\Debug\AutoTypeSearch.pdb" "c:\Program Files (x86)\KeePass Password Safe 2\" +runas /user:Mark /savecred "cmd /C start \"\" \"c:\Program Files (x86)\KeePass Password Safe 2\keepass.exe\"" \ No newline at end of file