/// <summary> /// Primary entry function into the system. This processes the /// commands, sets up the internal logging, and generates the /// various needed methods. /// </summary> public static void Main(string [] args) { // Create ourselve and start ToolEntry tool = new ToolEntry(); tool.Process(args); }
private void ToolButtonClick(ToolEntry toolEntry) { if (string.IsNullOrEmpty(toolEntry.cmd)) { //TODO TabIndex => To Enum OpenSettings(2); return; } if (CurrentLogWindow != null) { ILogLine line = CurrentLogWindow.GetCurrentLine(); ILogFileInfo info = CurrentLogWindow.GetCurrentFileInfo(); if (line != null && info != null) { ArgParser parser = new ArgParser(toolEntry.args); string argLine = parser.BuildArgs(line, CurrentLogWindow.GetRealLineNum() + 1, info, this); if (argLine != null) { StartTool(toolEntry.cmd, argLine, toolEntry.sysout, toolEntry.columnizerName, toolEntry.workingDir); } } } }
private void SetToolIcon(ToolEntry entry, ToolStripItem item) { Icon icon = Win32.LoadIconFromExe(entry.iconFile, entry.iconIndex); if (icon != null) { item.Image = icon.ToBitmap(); if (item is ToolStripMenuItem) { item.DisplayStyle = ToolStripItemDisplayStyle.ImageAndText; } else { item.DisplayStyle = ToolStripItemDisplayStyle.Image; } DestroyIcon(icon.Handle); icon.Dispose(); } if (!string.IsNullOrEmpty(entry.cmd)) { item.ToolTipText = entry.name; } }
private void toolListBox_SelectedIndexChanged(object sender, EventArgs e) { GetCurrentToolValues(); this.selectedTool = this.toolListBox.SelectedItem as ToolEntry; ShowCurrentToolValues(); this.toolListBox.Refresh(); FillColumnizerForToolsList(); DisplayCurrentIcon(); }