-add external tools menu (for stuff like errlook)

svn path=/trunk/tools/reactosdbg/; revision=1039
This commit is contained in:
Christoph von Wittich 2009-06-03 07:32:29 +00:00
parent 5c9713ed2f
commit 9ec4a52664
10 changed files with 707 additions and 69 deletions

View File

@ -18,7 +18,7 @@ namespace KDBGProtocol
Dictionary<string, ulong> mModuleList = new Dictionary<string, ulong>();
ulong []mRegisters = new ulong[32];
public KDBG(Pipe connection)
public KDBG(Pipe connection)
{
mConnection = connection;
mConnection.PipeReceiveEvent += PipeReceiveEvent;

209
RosDBG/ExtTools.Designer.cs generated Normal file
View File

@ -0,0 +1,209 @@
namespace RosDBG
{
partial class ExtTools
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.btnOK = new System.Windows.Forms.Button();
this.btnCancel = new System.Windows.Forms.Button();
this.ToolsListBox = new System.Windows.Forms.ListBox();
this.btnAdd = new System.Windows.Forms.Button();
this.btnRemove = new System.Windows.Forms.Button();
this.txtTitle = new System.Windows.Forms.TextBox();
this.titleLabel = new System.Windows.Forms.Label();
this.txtPath = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.btnBrowse = new System.Windows.Forms.Button();
this.btnUp = new System.Windows.Forms.Button();
this.btnDown = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// btnOK
//
this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
this.btnOK.Location = new System.Drawing.Point(171, 285);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(89, 27);
this.btnOK.TabIndex = 4;
this.btnOK.Text = "&OK";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
//
// btnCancel
//
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.btnCancel.Location = new System.Drawing.Point(266, 285);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(89, 27);
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "&Cancel";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// ToolsListBox
//
this.ToolsListBox.FormattingEnabled = true;
this.ToolsListBox.Location = new System.Drawing.Point(12, 12);
this.ToolsListBox.Name = "ToolsListBox";
this.ToolsListBox.Size = new System.Drawing.Size(248, 186);
this.ToolsListBox.TabIndex = 5;
this.ToolsListBox.SelectedIndexChanged += new System.EventHandler(this.ToolsListBox_SelectedIndexChanged);
//
// btnAdd
//
this.btnAdd.Location = new System.Drawing.Point(266, 12);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(89, 27);
this.btnAdd.TabIndex = 6;
this.btnAdd.Text = "&Add";
this.btnAdd.UseVisualStyleBackColor = true;
this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click);
//
// btnRemove
//
this.btnRemove.Location = new System.Drawing.Point(266, 45);
this.btnRemove.Name = "btnRemove";
this.btnRemove.Size = new System.Drawing.Size(89, 27);
this.btnRemove.TabIndex = 7;
this.btnRemove.Text = "&Remove";
this.btnRemove.UseVisualStyleBackColor = true;
this.btnRemove.Click += new System.EventHandler(this.btnRemove_Click);
//
// txtTitle
//
this.txtTitle.Enabled = false;
this.txtTitle.Location = new System.Drawing.Point(82, 218);
this.txtTitle.Name = "txtTitle";
this.txtTitle.Size = new System.Drawing.Size(273, 20);
this.txtTitle.TabIndex = 8;
this.txtTitle.TextChanged += new System.EventHandler(this.txtTitle_TextChanged);
//
// titleLabel
//
this.titleLabel.AutoSize = true;
this.titleLabel.Location = new System.Drawing.Point(12, 221);
this.titleLabel.Name = "titleLabel";
this.titleLabel.Size = new System.Drawing.Size(30, 13);
this.titleLabel.TabIndex = 9;
this.titleLabel.Text = "Title:";
//
// txtPath
//
this.txtPath.Enabled = false;
this.txtPath.Location = new System.Drawing.Point(82, 244);
this.txtPath.Name = "txtPath";
this.txtPath.Size = new System.Drawing.Size(235, 20);
this.txtPath.TabIndex = 10;
this.txtPath.TextChanged += new System.EventHandler(this.txtPath_TextChanged);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 251);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(32, 13);
this.label1.TabIndex = 11;
this.label1.Text = "Path:";
//
// btnBrowse
//
this.btnBrowse.Enabled = false;
this.btnBrowse.Location = new System.Drawing.Point(323, 244);
this.btnBrowse.Name = "btnBrowse";
this.btnBrowse.Size = new System.Drawing.Size(32, 21);
this.btnBrowse.TabIndex = 12;
this.btnBrowse.Text = "...";
this.btnBrowse.UseVisualStyleBackColor = true;
this.btnBrowse.Click += new System.EventHandler(this.btnBrowse_Click);
//
// btnUp
//
this.btnUp.Enabled = false;
this.btnUp.Location = new System.Drawing.Point(266, 135);
this.btnUp.Name = "btnUp";
this.btnUp.Size = new System.Drawing.Size(89, 27);
this.btnUp.TabIndex = 13;
this.btnUp.Text = "&Up";
this.btnUp.UseVisualStyleBackColor = true;
//
// btnDown
//
this.btnDown.Enabled = false;
this.btnDown.Location = new System.Drawing.Point(266, 168);
this.btnDown.Name = "btnDown";
this.btnDown.Size = new System.Drawing.Size(89, 27);
this.btnDown.TabIndex = 14;
this.btnDown.Text = "&Down";
this.btnDown.UseVisualStyleBackColor = true;
//
// ExtTools
//
this.AcceptButton = this.btnOK;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.btnCancel;
this.ClientSize = new System.Drawing.Size(367, 324);
this.Controls.Add(this.btnDown);
this.Controls.Add(this.btnUp);
this.Controls.Add(this.btnBrowse);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtPath);
this.Controls.Add(this.titleLabel);
this.Controls.Add(this.txtTitle);
this.Controls.Add(this.btnRemove);
this.Controls.Add(this.btnAdd);
this.Controls.Add(this.ToolsListBox);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.btnCancel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ExtTools";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "External Tools";
this.Load += new System.EventHandler(this.ExtTools_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.ListBox ToolsListBox;
private System.Windows.Forms.Button btnAdd;
private System.Windows.Forms.Button btnRemove;
private System.Windows.Forms.TextBox txtTitle;
private System.Windows.Forms.Label titleLabel;
private System.Windows.Forms.TextBox txtPath;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btnBrowse;
private System.Windows.Forms.Button btnUp;
private System.Windows.Forms.Button btnDown;
}
}

213
RosDBG/ExtTools.cs Normal file
View File

@ -0,0 +1,213 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Xml;
using System.Xml.Serialization;
using System.Windows.Forms;
namespace RosDBG
{
public partial class ExtTools : Form
{
private ExternalToolList mExternalToolsList;
private bool mUpdatingList = false;
public ExtTools()
{
InitializeComponent();
}
private void btnCancel_Click(object sender, EventArgs e)
{
Close();
}
private void btnOK_Click(object sender, EventArgs e)
{
Settings.ExternalTools = mExternalToolsList;
Close();
}
private void btnAdd_Click(object sender, EventArgs e)
{
ExternalTool t = new ExternalTool();
mExternalToolsList.Add(t);
ToolsListBox.Items.Add(t);
ToolsListBox.SelectedIndex = ToolsListBox.Items.Count - 1;
btnRemove.Enabled = true;
}
private void ExtTools_Load(object sender, EventArgs e)
{
mExternalToolsList = Settings.ExternalTools;
if (mExternalToolsList == null)
mExternalToolsList = new ExternalToolList();
foreach (object o in mExternalToolsList)
ToolsListBox.Items.Add(o);
}
private void btnRemove_Click(object sender, EventArgs e)
{
if ((ToolsListBox.Items.Count > 0) && (ToolsListBox.SelectedIndex != -1))
{
int Idx = ToolsListBox.SelectedIndex;
ToolsListBox.Items.RemoveAt(Idx);
mExternalToolsList.RemoveAt(Idx);
if ((ToolsListBox.Items.Count > 0) && (Idx > 0))
ToolsListBox.SelectedIndex = Idx - 1;
else
btnRemove.Enabled = false;
}
}
private void SaveItem(ExternalTool item, int Idx)
{
mUpdatingList = true;
item.Title = txtTitle.Text;
item.Path = txtPath.Text;
ToolsListBox.Items[Idx] = item;
mUpdatingList = false;
}
private void ToolsListBox_SelectedIndexChanged(object sender, EventArgs e)
{
if (!mUpdatingList)
{
ExternalTool et = (ExternalTool)ToolsListBox.SelectedItem;
if (et != null)
{
txtTitle.Enabled = true;
txtPath.Enabled = true;
btnBrowse.Enabled = true;
txtTitle.Text = et.Title;
txtPath.Text = et.Path;
btnUp.Enabled = (ToolsListBox.SelectedIndex != 0);
btnDown.Enabled = (ToolsListBox.SelectedIndex != ToolsListBox.Items.Count - 1);
}
else
{
txtTitle.Enabled = false;
txtPath.Enabled = false;
btnBrowse.Enabled = false;
txtTitle.Text = "";
txtPath.Text = "";
}
}
}
private void btnBrowse_Click(object sender, EventArgs e)
{
FileDialog fd = new OpenFileDialog();
fd.Filter = "Executable files (*.exe)|*.exe";
if (fd.ShowDialog() == DialogResult.OK)
{
txtPath.Text = fd.FileName;
}
}
private void txtTitle_TextChanged(object sender, EventArgs e)
{
if (ToolsListBox.SelectedItem != null)
SaveItem((ExternalTool)ToolsListBox.SelectedItem, ToolsListBox.SelectedIndex);
}
private void txtPath_TextChanged(object sender, EventArgs e)
{
if (ToolsListBox.SelectedItem != null)
SaveItem((ExternalTool)ToolsListBox.SelectedItem, ToolsListBox.SelectedIndex);
}
}
[Serializable]
public class ExternalToolList : ArrayList, IXmlSerializable
{
public System.Xml.Schema.XmlSchema GetSchema()
{
return null;
}
public void ReadXml(System.Xml.XmlReader reader)
{
this.Clear();
XmlSerializer x = new XmlSerializer(typeof(ExternalTool));
while (reader.ReadToFollowing("ExternalTool"))
{
object o = x.Deserialize(reader);
if (o is ExternalTool) this.Add(o);
}
}
public void WriteXml(System.Xml.XmlWriter writer)
{
XmlSerializer x = new XmlSerializer(typeof(ExternalTool));
foreach (ExternalTool et in this)
x.Serialize(writer, et);
}
}
public class ExternalTool : IXmlSerializable
{
private string mTitle;
private string mPath;
public ExternalTool()
{
mTitle = "[New Tool]";
mPath = "";
}
public ExternalTool(string Title, string Path)
{
mTitle = Title;
mPath = Path;
}
public string Title
{
get { return mTitle; }
set { mTitle = value; }
}
public string Path
{
get { return mPath; }
set { mPath = value; }
}
public override string ToString()
{
return mTitle;
}
public System.Xml.Schema.XmlSchema GetSchema()
{
return null;
}
public void ReadXml(System.Xml.XmlReader reader)
{
if (reader.MoveToAttribute("Title"))
mTitle = reader.Value;
else
throw new Exception();
if (reader.MoveToAttribute("Path"))
mPath = reader.Value;
else
throw new Exception();
}
public void WriteXml(System.Xml.XmlWriter writer)
{
writer.WriteAttributeString("Title", mTitle);
writer.WriteAttributeString("Path", mPath);
}
}
}

120
RosDBG/ExtTools.resx Normal file
View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -30,21 +30,21 @@
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainWindow));
WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin1 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient1 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient2 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient3 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient4 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient5 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient3 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient6 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient7 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin2 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin();
WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin2 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin();
WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient4 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient8 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin();
WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient9 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient5 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient10 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient11 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient12 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient6 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient13 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient14 = new WeifenLuo.WinFormsUI.Docking.TabGradient();
this.menuStrip = new System.Windows.Forms.MenuStrip();
this.fileMenu = new System.Windows.Forms.ToolStripMenuItem();
this.openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -77,6 +77,8 @@
this.toolBarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.statusBarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolsMenu = new System.Windows.Forms.ToolStripMenuItem();
this.externalToolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripSeparator();
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.helpMenu = new System.Windows.Forms.ToolStripMenuItem();
this.contentsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@ -369,15 +371,29 @@
// toolsMenu
//
this.toolsMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.externalToolsToolStripMenuItem,
this.toolStripMenuItem5,
this.optionsToolStripMenuItem});
this.toolsMenu.Name = "toolsMenu";
this.toolsMenu.Size = new System.Drawing.Size(49, 20);
this.toolsMenu.Text = "&Extras";
//
// externalToolsToolStripMenuItem
//
this.externalToolsToolStripMenuItem.Name = "externalToolsToolStripMenuItem";
this.externalToolsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.externalToolsToolStripMenuItem.Text = "Exte&rnal Tools";
this.externalToolsToolStripMenuItem.Click += new System.EventHandler(this.externalToolsToolStripMenuItem_Click);
//
// toolStripMenuItem5
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(149, 6);
//
// optionsToolStripMenuItem
//
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(116, 22);
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.optionsToolStripMenuItem.Text = "&Settings";
this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click);
//
@ -533,50 +549,50 @@
this.dockPanel.Location = new System.Drawing.Point(0, 49);
this.dockPanel.Name = "dockPanel";
this.dockPanel.Size = new System.Drawing.Size(784, 490);
dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight;
dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight;
autoHideStripSkin1.DockStripGradient = dockPanelGradient1;
tabGradient1.EndColor = System.Drawing.SystemColors.Control;
tabGradient1.StartColor = System.Drawing.SystemColors.Control;
tabGradient1.TextColor = System.Drawing.SystemColors.ControlDarkDark;
autoHideStripSkin1.TabGradient = tabGradient1;
dockPanelSkin1.AutoHideStripSkin = autoHideStripSkin1;
tabGradient2.EndColor = System.Drawing.SystemColors.ControlLightLight;
tabGradient2.StartColor = System.Drawing.SystemColors.ControlLightLight;
tabGradient2.TextColor = System.Drawing.SystemColors.ControlText;
dockPaneStripGradient1.ActiveTabGradient = tabGradient2;
dockPanelGradient2.EndColor = System.Drawing.SystemColors.Control;
dockPanelGradient2.StartColor = System.Drawing.SystemColors.Control;
dockPaneStripGradient1.DockStripGradient = dockPanelGradient2;
tabGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
tabGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
tabGradient3.TextColor = System.Drawing.SystemColors.ControlText;
dockPaneStripGradient1.InactiveTabGradient = tabGradient3;
dockPaneStripSkin1.DocumentGradient = dockPaneStripGradient1;
tabGradient4.EndColor = System.Drawing.SystemColors.ActiveCaption;
tabGradient4.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
tabGradient4.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
tabGradient4.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
dockPaneStripToolWindowGradient1.ActiveCaptionGradient = tabGradient4;
tabGradient5.EndColor = System.Drawing.SystemColors.Control;
tabGradient5.StartColor = System.Drawing.SystemColors.Control;
tabGradient5.TextColor = System.Drawing.SystemColors.ControlText;
dockPaneStripToolWindowGradient1.ActiveTabGradient = tabGradient5;
dockPanelGradient3.EndColor = System.Drawing.SystemColors.ControlLight;
dockPanelGradient3.StartColor = System.Drawing.SystemColors.ControlLight;
dockPaneStripToolWindowGradient1.DockStripGradient = dockPanelGradient3;
tabGradient6.EndColor = System.Drawing.SystemColors.GradientInactiveCaption;
tabGradient6.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
tabGradient6.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
tabGradient6.TextColor = System.Drawing.SystemColors.ControlText;
dockPaneStripToolWindowGradient1.InactiveCaptionGradient = tabGradient6;
tabGradient7.EndColor = System.Drawing.Color.Transparent;
tabGradient7.StartColor = System.Drawing.Color.Transparent;
tabGradient7.TextColor = System.Drawing.SystemColors.ControlDarkDark;
dockPaneStripToolWindowGradient1.InactiveTabGradient = tabGradient7;
dockPaneStripSkin1.ToolWindowGradient = dockPaneStripToolWindowGradient1;
dockPanelSkin1.DockPaneStripSkin = dockPaneStripSkin1;
this.dockPanel.Skin = dockPanelSkin1;
dockPanelGradient4.EndColor = System.Drawing.SystemColors.ControlLight;
dockPanelGradient4.StartColor = System.Drawing.SystemColors.ControlLight;
autoHideStripSkin2.DockStripGradient = dockPanelGradient4;
tabGradient8.EndColor = System.Drawing.SystemColors.Control;
tabGradient8.StartColor = System.Drawing.SystemColors.Control;
tabGradient8.TextColor = System.Drawing.SystemColors.ControlDarkDark;
autoHideStripSkin2.TabGradient = tabGradient8;
dockPanelSkin2.AutoHideStripSkin = autoHideStripSkin2;
tabGradient9.EndColor = System.Drawing.SystemColors.ControlLightLight;
tabGradient9.StartColor = System.Drawing.SystemColors.ControlLightLight;
tabGradient9.TextColor = System.Drawing.SystemColors.ControlText;
dockPaneStripGradient2.ActiveTabGradient = tabGradient9;
dockPanelGradient5.EndColor = System.Drawing.SystemColors.Control;
dockPanelGradient5.StartColor = System.Drawing.SystemColors.Control;
dockPaneStripGradient2.DockStripGradient = dockPanelGradient5;
tabGradient10.EndColor = System.Drawing.SystemColors.ControlLight;
tabGradient10.StartColor = System.Drawing.SystemColors.ControlLight;
tabGradient10.TextColor = System.Drawing.SystemColors.ControlText;
dockPaneStripGradient2.InactiveTabGradient = tabGradient10;
dockPaneStripSkin2.DocumentGradient = dockPaneStripGradient2;
tabGradient11.EndColor = System.Drawing.SystemColors.ActiveCaption;
tabGradient11.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
tabGradient11.StartColor = System.Drawing.SystemColors.GradientActiveCaption;
tabGradient11.TextColor = System.Drawing.SystemColors.ActiveCaptionText;
dockPaneStripToolWindowGradient2.ActiveCaptionGradient = tabGradient11;
tabGradient12.EndColor = System.Drawing.SystemColors.Control;
tabGradient12.StartColor = System.Drawing.SystemColors.Control;
tabGradient12.TextColor = System.Drawing.SystemColors.ControlText;
dockPaneStripToolWindowGradient2.ActiveTabGradient = tabGradient12;
dockPanelGradient6.EndColor = System.Drawing.SystemColors.ControlLight;
dockPanelGradient6.StartColor = System.Drawing.SystemColors.ControlLight;
dockPaneStripToolWindowGradient2.DockStripGradient = dockPanelGradient6;
tabGradient13.EndColor = System.Drawing.SystemColors.GradientInactiveCaption;
tabGradient13.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical;
tabGradient13.StartColor = System.Drawing.SystemColors.GradientInactiveCaption;
tabGradient13.TextColor = System.Drawing.SystemColors.ControlText;
dockPaneStripToolWindowGradient2.InactiveCaptionGradient = tabGradient13;
tabGradient14.EndColor = System.Drawing.Color.Transparent;
tabGradient14.StartColor = System.Drawing.Color.Transparent;
tabGradient14.TextColor = System.Drawing.SystemColors.ControlDarkDark;
dockPaneStripToolWindowGradient2.InactiveTabGradient = tabGradient14;
dockPaneStripSkin2.ToolWindowGradient = dockPaneStripToolWindowGradient2;
dockPanelSkin2.DockPaneStripSkin = dockPaneStripSkin2;
this.dockPanel.Skin = dockPanelSkin2;
this.dockPanel.TabIndex = 4;
this.dockPanel.ActiveDocumentChanged += new System.EventHandler(this.dockPanel_ActiveDocumentChanged);
//
@ -594,6 +610,7 @@
this.MainMenuStrip = this.menuStrip;
this.Name = "MainWindow";
this.Text = "ReactOS Remote Debugger";
this.Load += new System.EventHandler(this.MainWindow_Load);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainWindowMDI_FormClosing);
this.menuStrip.ResumeLayout(false);
this.menuStrip.PerformLayout();
@ -630,7 +647,6 @@
private System.Windows.Forms.ToolStripMenuItem toolBarToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem statusBarToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem toolsMenu;
private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem helpMenu;
private System.Windows.Forms.ToolStripMenuItem contentsToolStripMenuItem;
private System.Windows.Forms.ToolStripButton openToolStripButton;
@ -659,6 +675,9 @@
private System.Windows.Forms.ToolStripSeparator toolStripSeparator6;
private System.Windows.Forms.ToolStripButton continueToolStripButton;
private System.Windows.Forms.ToolStripButton breakToolStripButton;
private System.Windows.Forms.ToolStripMenuItem externalToolsToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem5;
private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;
}
}

View File

@ -384,6 +384,58 @@ namespace RosDBG
((ToolWindow)dockPanel.ActiveDocument.DockHandler.Form).Print(false);
}
private void externalToolsToolStripMenuItem_Click(object sender, EventArgs e)
{
ExtTools exTools = new ExtTools();
if (exTools.ShowDialog(this) == DialogResult.OK)
{
Settings.Save();
UpdateExternalToolsMenu();
}
}
private void UpdateExternalToolsMenu()
{
int i = 0;
bool bFirst = true;
while (true)
{
if ((toolsMenu.DropDownItems[i].Tag != null) &&
(toolsMenu.DropDownItems[i].Tag.ToString() == "tool"))
toolsMenu.DropDownItems.Remove(toolsMenu.DropDownItems[i]);
else
i++;
if (i >= toolsMenu.DropDownItems.Count - 1)
break;
}
foreach (object o in Settings.ExternalTools)
{
ToolStripMenuItem item = new ToolStripMenuItem(o.ToString(), null,
new System.EventHandler(this.LaunchExternalToolToolStripMenuItem_Click),
((ExternalTool)o).Path);
item.Tag = "tool";
toolsMenu.DropDownItems.Insert(bFirst ? 0 : 1, item);
bFirst = false;
}
}
private void MainWindow_Load(object sender, EventArgs e)
{
UpdateExternalToolsMenu();
}
private void LaunchExternalToolToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
Process.Start(((ToolStripMenuItem)sender).Name);
}
catch (Exception ex)
{
}
}
}
}

View File

@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
// will be increased as well. MSI installers must not be generated with the same Build Number
// otherwise they won't upgrade the old installation!
[assembly: AssemblyVersion("1.0.2.43")]
[assembly: AssemblyFileVersion("1.0.2.43")]
[assembly: AssemblyVersion("1.0.2.51")]
[assembly: AssemblyFileVersion("1.0.2.51")]

View File

@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:2.0.50727.4016
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------

View File

@ -108,6 +108,12 @@
<SubType>Code</SubType>
</Compile>
<Compile Include="DebugInfoFile.cs" />
<Compile Include="ExtTools.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ExtTools.Designer.cs">
<DependentUpon>ExtTools.cs</DependentUpon>
</Compile>
<Compile Include="FileDirChooser.cs">
</Compile>
<Compile Include="Dockable Objects\ToolWindow.cs">
@ -168,6 +174,9 @@
<DependentUpon>Locals.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="ExtTools.resx">
<DependentUpon>ExtTools.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainWindow.resx">
<DependentUpon>MainWindow.cs</DependentUpon>
</EmbeddedResource>
@ -305,6 +314,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="app-rosdbg.ico" />
<None Include="app.config" />
<None Include="Resources\copyToolStripMenuItem.Image.png" />
<None Include="Resources\Run.bmp" />
<None Include="Resources\Pause.bmp" />

View File

@ -1,4 +1,5 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@ -20,6 +21,14 @@ namespace RosDBG
private SerialConnSettings _serialconnsettings;
private PipeConnSettings _pipeconnsettings;
[UserScopedSetting()]
[Browsable(false)]
public ExternalToolList ExternalTools
{
get { return (ExternalToolList)this["ExternalTools"]; }
set { this["ExternalTools"] = (ExternalToolList)value; }
}
[UserScopedSetting, DefaultSettingValue("0")]
[Browsable(false)]
public Connect.ConnectionType SelectedConnType
@ -262,10 +271,16 @@ namespace RosDBG
public static string Baudrate { get { return mProperties.Baudrate; } }
public static string AppLogging { get { return mProperties.AppLogging; } }
public static string AppLogFile { get { return mProperties.AppLogFile; } }
public static Connect.ConnectionType SelectedConnType {
public static Connect.ConnectionType SelectedConnType
{
get { return mProperties.SelectedConnType; }
set { mProperties.SelectedConnType = value; }
}
public static ExternalToolList ExternalTools
{
get { return mProperties.ExternalTools; }
set { mProperties.ExternalTools = value; }
}
public Settings()
{