add "search online" menu item

git-svn-id: svn://svn.code.sf.net/p/processhacker/code@86 21ef857c-d57f-4fe0-8362-d861dc6d29cd
This commit is contained in:
wj32
2008-11-21 07:18:54 +00:00
parent 4b14aae03c
commit ebea940034
8 changed files with 160 additions and 71 deletions
+1
View File
@@ -2,6 +2,7 @@ Process Hacker
1.2.0.0
* Added PE Inspector (can read exe/dll/sys files and their properties)
* Added "Search Online" menu item
1.1.5.0
* Fixed memory leak with process icons
+85 -67
View File
@@ -50,6 +50,7 @@
this.resumeMenuItem = new System.Windows.Forms.MenuItem();
this.closeActiveWindowMenuItem = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem();
this.inspectProcessMenuItem = new System.Windows.Forms.MenuItem();
this.privilegesMenuItem = new System.Windows.Forms.MenuItem();
this.groupsMenuItem = new System.Windows.Forms.MenuItem();
this.priorityMenuItem = new System.Windows.Forms.MenuItem();
@@ -60,6 +61,7 @@
this.belowNormalMenuItem = new System.Windows.Forms.MenuItem();
this.idleMenuItem = new System.Windows.Forms.MenuItem();
this.menuItem7 = new System.Windows.Forms.MenuItem();
this.searchProcessMenuItem = new System.Windows.Forms.MenuItem();
this.copyProcessMenuItem = new System.Windows.Forms.MenuItem();
this.selectAllMenuItem = new System.Windows.Forms.MenuItem();
this.menuThread = new System.Windows.Forms.ContextMenu();
@@ -91,7 +93,9 @@
this.getFuncAddressMenuItem = new System.Windows.Forms.MenuItem();
this.changeMemoryProtectionModuleMenuItem = new System.Windows.Forms.MenuItem();
this.readMemoryModuleMenuItem = new System.Windows.Forms.MenuItem();
this.inspectModuleMenuItem = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.searchModuleMenuItem = new System.Windows.Forms.MenuItem();
this.copyFileNameMenuItem = new System.Windows.Forms.MenuItem();
this.copyModuleMenuItem = new System.Windows.Forms.MenuItem();
this.openContainingFolderMenuItem = new System.Windows.Forms.MenuItem();
@@ -106,9 +110,11 @@
this.copyMemoryMenuItem = new System.Windows.Forms.MenuItem();
this.selectAllMemoryMenuItem = new System.Windows.Forms.MenuItem();
this.splitMain = new System.Windows.Forms.SplitContainer();
this.listProcesses = new ProcessHacker.ProcessList();
this.tabControl = new System.Windows.Forms.TabControl();
this.tabProcess = new System.Windows.Forms.TabPage();
this.groupSearch = new System.Windows.Forms.GroupBox();
this.buttonSearch = new wyDay.Controls.SplitButton();
this.menuSearch = new System.Windows.Forms.ContextMenu();
this.newResultsWindowMenuItem = new System.Windows.Forms.MenuItem();
this.literalSearchMenuItem = new System.Windows.Forms.MenuItem();
@@ -117,6 +123,7 @@
this.heapScanMenuItem = new System.Windows.Forms.MenuItem();
this.treeMisc = new System.Windows.Forms.TreeView();
this.tabThreads = new System.Windows.Forms.TabPage();
this.listThreads = new ProcessHacker.ThreadList();
this.tabModules = new System.Windows.Forms.TabPage();
this.listModules = new System.Windows.Forms.ListView();
this.columnModuleName = new System.Windows.Forms.ColumnHeader();
@@ -140,11 +147,6 @@
this.helpMenuItem = new System.Windows.Forms.MenuItem();
this.exitMenuItem = new System.Windows.Forms.MenuItem();
this.windowMenuItem = new System.Windows.Forms.MenuItem();
this.inspectProcessMenuItem = new System.Windows.Forms.MenuItem();
this.inspectModuleMenuItem = new System.Windows.Forms.MenuItem();
this.listProcesses = new ProcessHacker.ProcessList();
this.buttonSearch = new wyDay.Controls.SplitButton();
this.listThreads = new ProcessHacker.ThreadList();
this.vistaMenu = new wyDay.Controls.VistaMenu(this.components);
this.panelProc.SuspendLayout();
this.panelVirtualProtect.SuspendLayout();
@@ -312,6 +314,7 @@
this.groupsMenuItem,
this.priorityMenuItem,
this.menuItem7,
this.searchProcessMenuItem,
this.copyProcessMenuItem,
this.selectAllMenuItem});
this.menuProcess.Popup += new System.EventHandler(this.menuProcess_Popup);
@@ -350,6 +353,13 @@
this.menuItem5.Index = 4;
this.menuItem5.Text = "-";
//
// inspectProcessMenuItem
//
this.vistaMenu.SetImage(this.inspectProcessMenuItem, global::ProcessHacker.Properties.Resources.application_form_magnify);
this.inspectProcessMenuItem.Index = 5;
this.inspectProcessMenuItem.Text = "&Inspect...";
this.inspectProcessMenuItem.Click += new System.EventHandler(this.inspectProcessMenuItem_Click);
//
// privilegesMenuItem
//
this.vistaMenu.SetImage(this.privilegesMenuItem, global::ProcessHacker.Properties.Resources.lock_edit);
@@ -424,15 +434,21 @@
this.menuItem7.Index = 9;
this.menuItem7.Text = "-";
//
// searchProcessMenuItem
//
this.searchProcessMenuItem.Index = 10;
this.searchProcessMenuItem.Text = "&Search Online...";
this.searchProcessMenuItem.Click += new System.EventHandler(this.searchProcessMenuItem_Click);
//
// copyProcessMenuItem
//
this.vistaMenu.SetImage(this.copyProcessMenuItem, global::ProcessHacker.Properties.Resources.page_copy);
this.copyProcessMenuItem.Index = 10;
this.copyProcessMenuItem.Index = 11;
this.copyProcessMenuItem.Text = "C&opy";
//
// selectAllMenuItem
//
this.selectAllMenuItem.Index = 11;
this.selectAllMenuItem.Index = 12;
this.selectAllMenuItem.Text = "Select &All";
this.selectAllMenuItem.Click += new System.EventHandler(this.selectAllMenuItem_Click);
//
@@ -616,6 +632,7 @@
this.readMemoryModuleMenuItem,
this.inspectModuleMenuItem,
this.menuItem3,
this.searchModuleMenuItem,
this.copyFileNameMenuItem,
this.copyModuleMenuItem,
this.openContainingFolderMenuItem,
@@ -652,45 +669,58 @@
this.readMemoryModuleMenuItem.Text = "Read Memory...";
this.readMemoryModuleMenuItem.Click += new System.EventHandler(this.readMemoryModuleMenuItem_Click);
//
// inspectModuleMenuItem
//
this.vistaMenu.SetImage(this.inspectModuleMenuItem, global::ProcessHacker.Properties.Resources.application_form_magnify);
this.inspectModuleMenuItem.Index = 4;
this.inspectModuleMenuItem.Text = "&Inspect...";
this.inspectModuleMenuItem.Click += new System.EventHandler(this.inspectModuleMenuItem_Click);
//
// menuItem3
//
this.menuItem3.Index = 5;
this.menuItem3.Text = "-";
//
// searchModuleMenuItem
//
this.searchModuleMenuItem.Index = 6;
this.searchModuleMenuItem.Text = "&Search Online...";
this.searchModuleMenuItem.Click += new System.EventHandler(this.searchModuleMenuItem_Click);
//
// copyFileNameMenuItem
//
this.copyFileNameMenuItem.Index = 6;
this.copyFileNameMenuItem.Index = 7;
this.copyFileNameMenuItem.Text = "&Copy File Name(s)";
this.copyFileNameMenuItem.Click += new System.EventHandler(this.copyFileNameMenuItem_Click);
//
// copyModuleMenuItem
//
this.vistaMenu.SetImage(this.copyModuleMenuItem, global::ProcessHacker.Properties.Resources.page_copy);
this.copyModuleMenuItem.Index = 7;
this.copyModuleMenuItem.Index = 8;
this.copyModuleMenuItem.Text = "Copy";
//
// openContainingFolderMenuItem
//
this.vistaMenu.SetImage(this.openContainingFolderMenuItem, global::ProcessHacker.Properties.Resources.folder_explore);
this.openContainingFolderMenuItem.Index = 8;
this.openContainingFolderMenuItem.Index = 9;
this.openContainingFolderMenuItem.Text = "&Open Containing Folder";
this.openContainingFolderMenuItem.Click += new System.EventHandler(this.openContainingFolderMenuItem_Click);
//
// propertiesMenuItem
//
this.vistaMenu.SetImage(this.propertiesMenuItem, global::ProcessHacker.Properties.Resources.application_view_detail);
this.propertiesMenuItem.Index = 9;
this.propertiesMenuItem.Index = 10;
this.propertiesMenuItem.Text = "Prope&rties...";
this.propertiesMenuItem.Click += new System.EventHandler(this.propertiesMenuItem_Click);
//
// menuItem6
//
this.menuItem6.Index = 10;
this.menuItem6.Index = 11;
this.menuItem6.Text = "-";
//
// selectAllModuleMenuItem
//
this.selectAllModuleMenuItem.Index = 11;
this.selectAllModuleMenuItem.Index = 12;
this.selectAllModuleMenuItem.Text = "Select &All";
this.selectAllModuleMenuItem.Click += new System.EventHandler(this.selectAllModuleMenuItem_Click);
//
@@ -762,6 +792,18 @@
this.splitMain.SplitterDistance = 355;
this.splitMain.TabIndex = 3;
//
// listProcesses
//
this.listProcesses.Dock = System.Windows.Forms.DockStyle.Fill;
this.listProcesses.DoubleBuffered = true;
this.listProcesses.Location = new System.Drawing.Point(0, 0);
this.listProcesses.Name = "listProcesses";
this.listProcesses.Provider = null;
this.listProcesses.Size = new System.Drawing.Size(355, 488);
this.listProcesses.TabIndex = 4;
this.listProcesses.SelectedIndexChanged += new System.EventHandler(this.listProcesses_SelectedIndexChanged);
this.listProcesses.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listProcesses_KeyDown);
//
// tabControl
//
this.tabControl.Controls.Add(this.tabProcess);
@@ -799,6 +841,18 @@
this.groupSearch.TabStop = false;
this.groupSearch.Text = "Search";
//
// buttonSearch
//
this.buttonSearch.AutoSize = true;
this.buttonSearch.Location = new System.Drawing.Point(6, 19);
this.buttonSearch.Name = "buttonSearch";
this.buttonSearch.Size = new System.Drawing.Size(102, 23);
this.buttonSearch.SplitMenu = this.menuSearch;
this.buttonSearch.TabIndex = 3;
this.buttonSearch.Text = "Search button";
this.buttonSearch.UseVisualStyleBackColor = true;
this.buttonSearch.Click += new System.EventHandler(this.buttonSearch_Click);
//
// menuSearch
//
this.menuSearch.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
@@ -853,18 +907,29 @@
this.tabThreads.Location = new System.Drawing.Point(4, 22);
this.tabThreads.Name = "tabThreads";
this.tabThreads.Padding = new System.Windows.Forms.Padding(3);
this.tabThreads.Size = new System.Drawing.Size(437, 229);
this.tabThreads.Size = new System.Drawing.Size(437, 463);
this.tabThreads.TabIndex = 6;
this.tabThreads.Text = "Threads";
this.tabThreads.UseVisualStyleBackColor = true;
//
// listThreads
//
this.listThreads.Dock = System.Windows.Forms.DockStyle.Fill;
this.listThreads.DoubleBuffered = true;
this.listThreads.Location = new System.Drawing.Point(3, 3);
this.listThreads.Name = "listThreads";
this.listThreads.Provider = null;
this.listThreads.Size = new System.Drawing.Size(431, 457);
this.listThreads.TabIndex = 0;
this.listThreads.DoubleClick += new System.EventHandler(this.listThreads_DoubleClick);
//
// tabModules
//
this.tabModules.Controls.Add(this.listModules);
this.tabModules.Location = new System.Drawing.Point(4, 22);
this.tabModules.Name = "tabModules";
this.tabModules.Padding = new System.Windows.Forms.Padding(3);
this.tabModules.Size = new System.Drawing.Size(437, 229);
this.tabModules.Size = new System.Drawing.Size(437, 463);
this.tabModules.TabIndex = 0;
this.tabModules.Text = "Modules";
this.tabModules.UseVisualStyleBackColor = true;
@@ -883,7 +948,7 @@
this.listModules.Location = new System.Drawing.Point(3, 3);
this.listModules.Name = "listModules";
this.listModules.ShowItemToolTips = true;
this.listModules.Size = new System.Drawing.Size(431, 223);
this.listModules.Size = new System.Drawing.Size(431, 457);
this.listModules.TabIndex = 1;
this.listModules.UseCompatibleStateImageBehavior = false;
this.listModules.View = System.Windows.Forms.View.Details;
@@ -915,7 +980,7 @@
this.tabMemory.Location = new System.Drawing.Point(4, 22);
this.tabMemory.Name = "tabMemory";
this.tabMemory.Padding = new System.Windows.Forms.Padding(3);
this.tabMemory.Size = new System.Drawing.Size(437, 229);
this.tabMemory.Size = new System.Drawing.Size(437, 463);
this.tabMemory.TabIndex = 1;
this.tabMemory.Text = "Memory";
this.tabMemory.UseVisualStyleBackColor = true;
@@ -935,7 +1000,7 @@
this.listMemory.Location = new System.Drawing.Point(3, 3);
this.listMemory.Name = "listMemory";
this.listMemory.ShowItemToolTips = true;
this.listMemory.Size = new System.Drawing.Size(431, 223);
this.listMemory.Size = new System.Drawing.Size(431, 457);
this.listMemory.TabIndex = 2;
this.listMemory.UseCompatibleStateImageBehavior = false;
this.listMemory.View = System.Windows.Forms.View.Details;
@@ -1037,55 +1102,6 @@
this.windowMenuItem.Index = 1;
this.windowMenuItem.Text = "&Window";
//
// inspectProcessMenuItem
//
this.vistaMenu.SetImage(this.inspectProcessMenuItem, global::ProcessHacker.Properties.Resources.application_form_magnify);
this.inspectProcessMenuItem.Index = 5;
this.inspectProcessMenuItem.Text = "&Inspect...";
this.inspectProcessMenuItem.Click += new System.EventHandler(this.inspectProcessMenuItem_Click);
//
// inspectModuleMenuItem
//
this.vistaMenu.SetImage(this.inspectModuleMenuItem, global::ProcessHacker.Properties.Resources.application_form_magnify);
this.inspectModuleMenuItem.Index = 4;
this.inspectModuleMenuItem.Text = "&Inspect...";
this.inspectModuleMenuItem.Click += new System.EventHandler(this.inspectModuleMenuItem_Click);
//
// listProcesses
//
this.listProcesses.Dock = System.Windows.Forms.DockStyle.Fill;
this.listProcesses.DoubleBuffered = true;
this.listProcesses.Location = new System.Drawing.Point(0, 0);
this.listProcesses.Name = "listProcesses";
this.listProcesses.Provider = null;
this.listProcesses.Size = new System.Drawing.Size(355, 488);
this.listProcesses.TabIndex = 4;
this.listProcesses.SelectedIndexChanged += new System.EventHandler(this.listProcesses_SelectedIndexChanged);
this.listProcesses.KeyDown += new System.Windows.Forms.KeyEventHandler(this.listProcesses_KeyDown);
//
// buttonSearch
//
this.buttonSearch.AutoSize = true;
this.buttonSearch.Location = new System.Drawing.Point(6, 19);
this.buttonSearch.Name = "buttonSearch";
this.buttonSearch.Size = new System.Drawing.Size(102, 23);
this.buttonSearch.SplitMenu = this.menuSearch;
this.buttonSearch.TabIndex = 3;
this.buttonSearch.Text = "Search button";
this.buttonSearch.UseVisualStyleBackColor = true;
this.buttonSearch.Click += new System.EventHandler(this.buttonSearch_Click);
//
// listThreads
//
this.listThreads.Dock = System.Windows.Forms.DockStyle.Fill;
this.listThreads.DoubleBuffered = true;
this.listThreads.Location = new System.Drawing.Point(3, 3);
this.listThreads.Name = "listThreads";
this.listThreads.Provider = null;
this.listThreads.Size = new System.Drawing.Size(431, 223);
this.listThreads.TabIndex = 0;
this.listThreads.DoubleClick += new System.EventHandler(this.listThreads_DoubleClick);
//
// vistaMenu
//
this.vistaMenu.ContainerControl = this;
@@ -1243,6 +1259,8 @@
private System.Windows.Forms.MenuItem inspectPEFileMenuItem;
private System.Windows.Forms.MenuItem inspectProcessMenuItem;
private System.Windows.Forms.MenuItem inspectModuleMenuItem;
private System.Windows.Forms.MenuItem searchProcessMenuItem;
private System.Windows.Forms.MenuItem searchModuleMenuItem;
}
}
+26
View File
@@ -514,6 +514,19 @@ namespace ProcessHacker
}
}
private void searchModuleMenuItem_Click(object sender, EventArgs e)
{
try
{
Process.Start(Properties.Settings.Default.SearchEngine.Replace("%s",
listModules.SelectedItems[0].Text));
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Process Hacker", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void copyFileNameMenuItem_Click(object sender, EventArgs e)
{
string text = "";
@@ -1001,6 +1014,19 @@ namespace ProcessHacker
#endregion
private void searchProcessMenuItem_Click(object sender, EventArgs e)
{
try
{
Process.Start(Properties.Settings.Default.SearchEngine.Replace("%s",
listProcesses.SelectedItems[0].Text));
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Process Hacker", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void selectAllMenuItem_Click(object sender, EventArgs e)
{
Misc.SelectAll(listProcesses.Items);
+28 -4
View File
@@ -33,6 +33,8 @@
this.buttonClose = new System.Windows.Forms.Button();
this.checkShowProcessDomains = new System.Windows.Forms.CheckBox();
this.checkWarnDangerous = new System.Windows.Forms.CheckBox();
this.label2 = new System.Windows.Forms.Label();
this.textSearchEngine = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.textUpdateInterval)).BeginInit();
this.SuspendLayout();
//
@@ -67,7 +69,7 @@
//
this.buttonClose.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.buttonClose.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.buttonClose.Location = new System.Drawing.Point(217, 94);
this.buttonClose.Location = new System.Drawing.Point(217, 114);
this.buttonClose.Name = "buttonClose";
this.buttonClose.Size = new System.Drawing.Size(75, 23);
this.buttonClose.TabIndex = 2;
@@ -79,7 +81,7 @@
//
this.checkShowProcessDomains.AutoSize = true;
this.checkShowProcessDomains.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.checkShowProcessDomains.Location = new System.Drawing.Point(12, 61);
this.checkShowProcessDomains.Location = new System.Drawing.Point(11, 88);
this.checkShowProcessDomains.Name = "checkShowProcessDomains";
this.checkShowProcessDomains.Size = new System.Drawing.Size(156, 18);
this.checkShowProcessDomains.TabIndex = 3;
@@ -90,19 +92,39 @@
//
this.checkWarnDangerous.AutoSize = true;
this.checkWarnDangerous.FlatStyle = System.Windows.Forms.FlatStyle.System;
this.checkWarnDangerous.Location = new System.Drawing.Point(12, 38);
this.checkWarnDangerous.Location = new System.Drawing.Point(12, 64);
this.checkWarnDangerous.Name = "checkWarnDangerous";
this.checkWarnDangerous.Size = new System.Drawing.Size(228, 18);
this.checkWarnDangerous.TabIndex = 4;
this.checkWarnDangerous.Text = "Warn about potentially dangerous actions";
this.checkWarnDangerous.UseVisualStyleBackColor = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 41);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(80, 13);
this.label2.TabIndex = 5;
this.label2.Text = "Search Engine:";
//
// textSearchEngine
//
this.textSearchEngine.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textSearchEngine.Location = new System.Drawing.Point(98, 38);
this.textSearchEngine.Name = "textSearchEngine";
this.textSearchEngine.Size = new System.Drawing.Size(194, 20);
this.textSearchEngine.TabIndex = 6;
//
// OptionsWindow
//
this.AcceptButton = this.buttonClose;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(304, 129);
this.ClientSize = new System.Drawing.Size(304, 149);
this.Controls.Add(this.textSearchEngine);
this.Controls.Add(this.label2);
this.Controls.Add(this.checkWarnDangerous);
this.Controls.Add(this.checkShowProcessDomains);
this.Controls.Add(this.buttonClose);
@@ -129,5 +151,7 @@
private System.Windows.Forms.Button buttonClose;
private System.Windows.Forms.CheckBox checkShowProcessDomains;
private System.Windows.Forms.CheckBox checkWarnDangerous;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textSearchEngine;
}
}
@@ -37,6 +37,7 @@ namespace ProcessHacker
InitializeComponent();
textUpdateInterval.Value = Properties.Settings.Default.RefreshInterval;
textSearchEngine.Text = Properties.Settings.Default.SearchEngine;
checkWarnDangerous.Checked = Properties.Settings.Default.WarnDangerous;
checkShowProcessDomains.Checked = Properties.Settings.Default.ShowAccountDomains;
}
@@ -58,6 +59,7 @@ namespace ProcessHacker
private void buttonClose_Click(object sender, EventArgs e)
{
Properties.Settings.Default.SearchEngine = textSearchEngine.Text;
Properties.Settings.Default.WarnDangerous = checkWarnDangerous.Checked;
Properties.Settings.Default.ShowAccountDomains = checkShowProcessDomains.Checked;
+12
View File
@@ -382,5 +382,17 @@ namespace ProcessHacker.Properties {
this["PEImportsColumns"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("http://www.google.com/search?q=%s")]
public string SearchEngine {
get {
return ((string)(this["SearchEngine"]));
}
set {
this["SearchEngine"] = value;
}
}
}
}
@@ -92,5 +92,8 @@
<Setting Name="PEImportsColumns" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="SearchEngine" Type="System.String" Scope="User">
<Value Profile="(Default)">http://www.google.com/search?q=%s</Value>
</Setting>
</Settings>
</SettingsFile>
+3
View File
@@ -97,6 +97,9 @@
<setting name="PEImportsColumns" serializeAs="String">
<value />
</setting>
<setting name="SearchEngine" serializeAs="String">
<value>http://www.google.com/search?q=%s</value>
</setting>
</ProcessHacker.Properties.Settings>
</userSettings>
</configuration>