Add Interactive/script running python shell window

This commit is contained in:
baldurk
2014-10-10 21:30:40 +01:00
parent 1c306fb155
commit 29894e4db3
9 changed files with 1048 additions and 37 deletions
+10
View File
@@ -260,6 +260,16 @@ namespace renderdocui.Properties {
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap folder_page {
get {
object obj = ResourceManager.GetObject("folder_page", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
+23 -20
View File
@@ -130,15 +130,18 @@
<data name="stepnext" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\stepnext.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="arrow_undo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\arrow_undo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="accept" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\accept.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="timeline_marker" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\timeline_marker.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="runback" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\runback.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="page_white_link" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\page_white_link.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="page_white_database" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\page_white_database.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@@ -163,18 +166,12 @@
<data name="logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\128.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="disconnect" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\disconnect.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="red_x_16" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\red_x_16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\icon.ico;System.Drawing.Icon, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="wrench" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\wrench.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="wand" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\wand.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@@ -184,9 +181,15 @@
<data name="stepprev" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\stepprev.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="runfwd" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\runfwd.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="tick" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\tick.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="asterisk_orange" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\asterisk_orange.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="add" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@@ -202,8 +205,8 @@
<data name="time" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\time.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="runcursor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\runcursor.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="disconnect" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\disconnect.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="delete" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\delete.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -229,8 +232,8 @@
<data name="save" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="runfwd" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\runfwd.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="wrench" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\wrench.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="topo_tristrip" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\topologies\topo_tristrip.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -238,8 +241,8 @@
<data name="topo_linelist_adj" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\topologies\topo_linelist_adj.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="accept" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\accept.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="runcursor" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\runcursor.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="page_white_edit" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\page_white_edit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
@@ -262,12 +265,12 @@
<data name="cog" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\cog.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="page_white_link" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\page_white_link.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="topo_linestrip_adj" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\topologies\topo_linestrip_adj.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="arrow_undo" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\arrow_undo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="action_hover" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\rightarrow_green_16x16.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
@@ -277,7 +280,7 @@
<data name="chart_curve" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\chart_curve.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="asterisk_orange" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\asterisk_orange.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
<data name="folder_page" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\folder_page.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file not shown.

After

Width:  |  Height:  |  Size: 688 B

+362
View File
@@ -0,0 +1,362 @@
namespace renderdocui.Windows.Dialogs
{
partial class PythonShell
{
/// <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()
{
System.Windows.Forms.ToolStripContainer toolStripContainer1;
System.Windows.Forms.ToolStrip toolStrip1;
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PythonShell));
this.scriptTable = new System.Windows.Forms.TableLayoutPanel();
this.scriptSplit = new System.Windows.Forms.SplitContainer();
this.scriptOutput = new System.Windows.Forms.TextBox();
this.toolStrip2 = new System.Windows.Forms.ToolStrip();
this.openButton = new System.Windows.Forms.ToolStripButton();
this.saveAs = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.runButton = new System.Windows.Forms.ToolStripButton();
this.shellTable = new System.Windows.Forms.TableLayoutPanel();
this.interactiveInput = new System.Windows.Forms.TextBox();
this.interactiveOutput = new System.Windows.Forms.TextBox();
this.executeCmd = new System.Windows.Forms.Button();
this.clearCmd = new System.Windows.Forms.Button();
this.shellMode = new System.Windows.Forms.ToolStripButton();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.scriptMode = new System.Windows.Forms.ToolStripButton();
this.saveDialog = new System.Windows.Forms.SaveFileDialog();
this.openDialog = new System.Windows.Forms.OpenFileDialog();
this.newScript = new System.Windows.Forms.ToolStripButton();
toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
toolStrip1 = new System.Windows.Forms.ToolStrip();
toolStripContainer1.ContentPanel.SuspendLayout();
toolStripContainer1.TopToolStripPanel.SuspendLayout();
toolStripContainer1.SuspendLayout();
this.scriptTable.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.scriptSplit)).BeginInit();
this.scriptSplit.Panel2.SuspendLayout();
this.scriptSplit.SuspendLayout();
this.toolStrip2.SuspendLayout();
this.shellTable.SuspendLayout();
toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// toolStripContainer1
//
//
// toolStripContainer1.ContentPanel
//
toolStripContainer1.ContentPanel.Controls.Add(this.scriptTable);
toolStripContainer1.ContentPanel.Controls.Add(this.shellTable);
toolStripContainer1.ContentPanel.Size = new System.Drawing.Size(658, 425);
toolStripContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
toolStripContainer1.Location = new System.Drawing.Point(0, 0);
toolStripContainer1.Name = "toolStripContainer1";
toolStripContainer1.Size = new System.Drawing.Size(658, 450);
toolStripContainer1.TabIndex = 0;
toolStripContainer1.Text = "toolStripContainer1";
//
// toolStripContainer1.TopToolStripPanel
//
toolStripContainer1.TopToolStripPanel.Controls.Add(toolStrip1);
//
// scriptTable
//
this.scriptTable.ColumnCount = 1;
this.scriptTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.scriptTable.Controls.Add(this.scriptSplit, 0, 1);
this.scriptTable.Controls.Add(this.toolStrip2, 0, 0);
this.scriptTable.Location = new System.Drawing.Point(340, 40);
this.scriptTable.Name = "scriptTable";
this.scriptTable.RowCount = 2;
this.scriptTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.scriptTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.scriptTable.Size = new System.Drawing.Size(306, 373);
this.scriptTable.TabIndex = 2;
//
// scriptSplit
//
this.scriptSplit.Dock = System.Windows.Forms.DockStyle.Fill;
this.scriptSplit.Location = new System.Drawing.Point(3, 28);
this.scriptSplit.Name = "scriptSplit";
//
// scriptSplit.Panel2
//
this.scriptSplit.Panel2.Controls.Add(this.scriptOutput);
this.scriptSplit.Size = new System.Drawing.Size(300, 342);
this.scriptSplit.SplitterDistance = 193;
this.scriptSplit.TabIndex = 1;
//
// scriptOutput
//
this.scriptOutput.BackColor = System.Drawing.SystemColors.Window;
this.scriptOutput.Dock = System.Windows.Forms.DockStyle.Fill;
this.scriptOutput.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.scriptOutput.Location = new System.Drawing.Point(0, 0);
this.scriptOutput.Multiline = true;
this.scriptOutput.Name = "scriptOutput";
this.scriptOutput.ReadOnly = true;
this.scriptOutput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.scriptOutput.Size = new System.Drawing.Size(103, 342);
this.scriptOutput.TabIndex = 2;
//
// toolStrip2
//
this.toolStrip2.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.newScript,
this.openButton,
this.saveAs,
this.toolStripSeparator2,
this.runButton});
this.toolStrip2.Location = new System.Drawing.Point(0, 0);
this.toolStrip2.Name = "toolStrip2";
this.toolStrip2.Size = new System.Drawing.Size(306, 25);
this.toolStrip2.TabIndex = 2;
this.toolStrip2.Text = "toolStrip2";
//
// openButton
//
this.openButton.Image = global::renderdocui.Properties.Resources.folder_page;
this.openButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.openButton.Name = "openButton";
this.openButton.Size = new System.Drawing.Size(53, 22);
this.openButton.Text = "Open";
this.openButton.Click += new System.EventHandler(this.openButton_Click);
//
// saveAs
//
this.saveAs.Image = global::renderdocui.Properties.Resources.save;
this.saveAs.ImageTransparentColor = System.Drawing.Color.Magenta;
this.saveAs.Name = "saveAs";
this.saveAs.Size = new System.Drawing.Size(66, 22);
this.saveAs.Text = "Save As";
this.saveAs.Click += new System.EventHandler(this.saveAs_Click);
//
// toolStripSeparator2
//
this.toolStripSeparator2.Name = "toolStripSeparator2";
this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25);
//
// runButton
//
this.runButton.Image = global::renderdocui.Properties.Resources.runfwd;
this.runButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.runButton.Name = "runButton";
this.runButton.Size = new System.Drawing.Size(46, 22);
this.runButton.Text = "Run";
this.runButton.Click += new System.EventHandler(this.runButton_Click);
//
// shellTable
//
this.shellTable.ColumnCount = 3;
this.shellTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.shellTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.shellTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.shellTable.Controls.Add(this.interactiveInput, 0, 0);
this.shellTable.Controls.Add(this.interactiveOutput, 0, 2);
this.shellTable.Controls.Add(this.executeCmd, 1, 0);
this.shellTable.Controls.Add(this.clearCmd, 2, 0);
this.shellTable.Location = new System.Drawing.Point(25, 40);
this.shellTable.Name = "shellTable";
this.shellTable.RowCount = 3;
this.shellTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.shellTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.shellTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.shellTable.Size = new System.Drawing.Size(293, 373);
this.shellTable.TabIndex = 0;
//
// interactiveInput
//
this.interactiveInput.AcceptsTab = true;
this.interactiveInput.Dock = System.Windows.Forms.DockStyle.Top;
this.interactiveInput.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.interactiveInput.Location = new System.Drawing.Point(3, 3);
this.interactiveInput.MinimumSize = new System.Drawing.Size(4, 20);
this.interactiveInput.Multiline = true;
this.interactiveInput.Name = "interactiveInput";
this.interactiveInput.Size = new System.Drawing.Size(175, 20);
this.interactiveInput.TabIndex = 0;
this.interactiveInput.WordWrap = false;
this.interactiveInput.TextChanged += new System.EventHandler(this.interactiveInput_TextChanged);
this.interactiveInput.KeyDown += new System.Windows.Forms.KeyEventHandler(this.interactiveInput_KeyDown);
this.interactiveInput.Layout += new System.Windows.Forms.LayoutEventHandler(this.interactiveInput_Layout);
//
// interactiveOutput
//
this.interactiveOutput.BackColor = System.Drawing.SystemColors.Window;
this.shellTable.SetColumnSpan(this.interactiveOutput, 3);
this.interactiveOutput.Dock = System.Windows.Forms.DockStyle.Fill;
this.interactiveOutput.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.interactiveOutput.Location = new System.Drawing.Point(3, 32);
this.interactiveOutput.Multiline = true;
this.interactiveOutput.Name = "interactiveOutput";
this.interactiveOutput.ReadOnly = true;
this.interactiveOutput.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.interactiveOutput.Size = new System.Drawing.Size(287, 338);
this.interactiveOutput.TabIndex = 1;
//
// executeCmd
//
this.executeCmd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.executeCmd.Location = new System.Drawing.Point(184, 3);
this.executeCmd.Name = "executeCmd";
this.executeCmd.Size = new System.Drawing.Size(60, 23);
this.executeCmd.TabIndex = 2;
this.executeCmd.Text = "Execute";
this.executeCmd.UseVisualStyleBackColor = true;
this.executeCmd.Click += new System.EventHandler(this.executeCmd_Click);
//
// clearCmd
//
this.clearCmd.Location = new System.Drawing.Point(250, 3);
this.clearCmd.Name = "clearCmd";
this.clearCmd.Size = new System.Drawing.Size(40, 23);
this.clearCmd.TabIndex = 3;
this.clearCmd.Text = "Clear";
this.clearCmd.UseVisualStyleBackColor = true;
this.clearCmd.Click += new System.EventHandler(this.clearCmd_Click);
//
// toolStrip1
//
toolStrip1.Dock = System.Windows.Forms.DockStyle.None;
toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden;
toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.shellMode,
this.toolStripSeparator1,
this.scriptMode});
toolStrip1.Location = new System.Drawing.Point(3, 0);
toolStrip1.Name = "toolStrip1";
toolStrip1.Size = new System.Drawing.Size(161, 25);
toolStrip1.TabIndex = 0;
//
// shellMode
//
this.shellMode.Checked = true;
this.shellMode.CheckState = System.Windows.Forms.CheckState.Checked;
this.shellMode.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.shellMode.Image = ((System.Drawing.Image)(resources.GetObject("shellMode.Image")));
this.shellMode.ImageTransparentColor = System.Drawing.Color.Magenta;
this.shellMode.Name = "shellMode";
this.shellMode.Size = new System.Drawing.Size(88, 22);
this.shellMode.Text = "Interactive shell";
this.shellMode.Click += new System.EventHandler(this.mode_Changed);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
//
// scriptMode
//
this.scriptMode.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.scriptMode.Image = ((System.Drawing.Image)(resources.GetObject("scriptMode.Image")));
this.scriptMode.ImageTransparentColor = System.Drawing.Color.Magenta;
this.scriptMode.Name = "scriptMode";
this.scriptMode.Size = new System.Drawing.Size(64, 22);
this.scriptMode.Text = "Run scripts";
this.scriptMode.Click += new System.EventHandler(this.mode_Changed);
//
// saveDialog
//
this.saveDialog.DefaultExt = "py";
this.saveDialog.Filter = "Python Scripts (*.py)|*.py";
this.saveDialog.Title = "Save script as .py";
//
// openDialog
//
this.openDialog.DefaultExt = "py";
this.openDialog.Filter = "Python Scripts (*.py)|*.py";
this.openDialog.Title = "Open .py script";
//
// newScript
//
this.newScript.Image = global::renderdocui.Properties.Resources.page_white_edit;
this.newScript.ImageTransparentColor = System.Drawing.Color.Magenta;
this.newScript.Name = "newScript";
this.newScript.Size = new System.Drawing.Size(48, 22);
this.newScript.Text = "New";
this.newScript.Click += new System.EventHandler(this.newScript_Click);
//
// PythonShell
//
this.AllowDrop = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(658, 450);
this.Controls.Add(toolStripContainer1);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "PythonShell";
this.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.Document;
this.Text = "PythonShell";
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.shell_DragDrop);
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.shell_DragEnter);
toolStripContainer1.ContentPanel.ResumeLayout(false);
toolStripContainer1.TopToolStripPanel.ResumeLayout(false);
toolStripContainer1.TopToolStripPanel.PerformLayout();
toolStripContainer1.ResumeLayout(false);
toolStripContainer1.PerformLayout();
this.scriptTable.ResumeLayout(false);
this.scriptTable.PerformLayout();
this.scriptSplit.Panel2.ResumeLayout(false);
this.scriptSplit.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.scriptSplit)).EndInit();
this.scriptSplit.ResumeLayout(false);
this.toolStrip2.ResumeLayout(false);
this.toolStrip2.PerformLayout();
this.shellTable.ResumeLayout(false);
this.shellTable.PerformLayout();
toolStrip1.ResumeLayout(false);
toolStrip1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel shellTable;
private System.Windows.Forms.SplitContainer scriptSplit;
private System.Windows.Forms.TextBox interactiveInput;
private System.Windows.Forms.TextBox interactiveOutput;
private System.Windows.Forms.ToolStripButton shellMode;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.ToolStripButton scriptMode;
private System.Windows.Forms.Button executeCmd;
private System.Windows.Forms.TextBox scriptOutput;
private System.Windows.Forms.Button clearCmd;
private System.Windows.Forms.TableLayoutPanel scriptTable;
private System.Windows.Forms.ToolStrip toolStrip2;
private System.Windows.Forms.ToolStripButton openButton;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator2;
private System.Windows.Forms.ToolStripButton runButton;
private System.Windows.Forms.ToolStripButton saveAs;
private System.Windows.Forms.SaveFileDialog saveDialog;
private System.Windows.Forms.OpenFileDialog openDialog;
private System.Windows.Forms.ToolStripButton newScript;
}
}
+438
View File
@@ -0,0 +1,438 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.IO;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using renderdocui.Code;
using renderdoc;
using IronPython.Hosting;
using Microsoft.Scripting.Hosting;
using IronPython.Runtime.Exceptions;
using System.Threading;
namespace renderdocui.Windows.Dialogs
{
public partial class PythonShell : DockContent
{
Core m_Core = null;
private ScriptEngine pythonengine = null;
private ScriptScope shellscope = null;
ScintillaNET.Scintilla scriptEditor = null;
public PythonShell(Core core)
{
InitializeComponent();
shellTable.Dock = DockStyle.Fill;
scriptTable.Dock = DockStyle.Fill;
scriptEditor = new ScintillaNET.Scintilla();
((System.ComponentModel.ISupportInitialize)(scriptEditor)).BeginInit();
scriptEditor.Dock = System.Windows.Forms.DockStyle.Fill;
scriptEditor.Location = new System.Drawing.Point(3, 3);
scriptEditor.Name = "scripteditor";
scriptEditor.Font = new Font("Consolas", 8.25F, FontStyle.Regular, GraphicsUnit.Point, 0);
scriptEditor.Margins.Left = 4;
scriptEditor.Margins.Margin0.Width = 30;
scriptEditor.Margins.Margin1.Width = 0;
scriptEditor.Margins.Margin2.Width = 16;
scriptEditor.Markers[0].BackColor = System.Drawing.Color.LightCoral;
scriptEditor.ConfigurationManager.Language = "python";
((System.ComponentModel.ISupportInitialize)(scriptEditor)).EndInit();
scriptEditor.KeyDown += new KeyEventHandler(scriptEditor_KeyDown);
newScript.PerformClick();
scriptEditor.Scrolling.HorizontalWidth = 1;
const uint SCI_SETSCROLLWIDTHTRACKING = 2516;
scriptEditor.NativeInterface.SendMessageDirect(SCI_SETSCROLLWIDTHTRACKING, true);
scriptSplit.Panel1.Controls.Add(scriptEditor);
m_Core = core;
pythonengine = NewEngine();
mode_Changed(shellMode, null);
clearCmd_Click(null, null);
}
void scriptEditor_KeyDown(object sender, KeyEventArgs e)
{
if (e.Control)
{
if (e.KeyCode == Keys.O)
{
openButton.PerformClick();
e.Handled = true;
e.SuppressKeyPress = true;
}
if (e.KeyCode == Keys.S)
{
saveAs.PerformClick();
e.Handled = true;
e.SuppressKeyPress = true;
}
}
}
private ScriptEngine NewEngine()
{
var engine = Python.CreateEngine();
List<string> searches = new List<string>(engine.GetSearchPaths());
searches.Add(Directory.GetCurrentDirectory());
engine.SetSearchPaths(searches);
return engine;
}
private ScriptScope NewScope(ScriptEngine engine)
{
var scope = engine.CreateScope();
scope.SetVariable("renderdoc", m_Core);
return scope;
}
private MemoryStream stdout = null;
private StreamWriter stdoutwriter = null;
private StreamReader stdoutreader = null;
private string Execute(ScriptEngine engine, ScriptScope scope, string script)
{
stdout = new MemoryStream();
stdoutwriter = new StreamWriter(stdout);
stdoutreader = new StreamReader(stdout);
engine.Runtime.IO.SetOutput(stdout, stdoutwriter);
try
{
dynamic ret = engine.CreateScriptSourceFromString(script).Execute(scope);
if (ret != null)
{
stdoutwriter.Write(ret.ToString() + Environment.NewLine);
stdoutwriter.Flush();
}
}
catch (Exception ex)
{
// IronPython throws so many exceptions, we don't want to kill the application
// so we just swallow Exception to cover all the bases
string exstr = engine.GetService<ExceptionOperations>().FormatException(ex);
stdoutwriter.Write(exstr);
stdoutwriter.Write(Environment.NewLine);
stdoutwriter.Flush();
}
stdout.Seek(0, SeekOrigin.Begin);
string output = stdoutreader.ReadToEnd();
stdoutreader.Dispose();
stdout = null;
stdoutreader = null;
stdoutwriter = null;
return output;
}
private void mode_Changed(object sender, EventArgs e)
{
if (sender == shellMode)
{
shellMode.Checked = true;
scriptMode.Checked = false;
scriptTable.Visible = false;
shellTable.Visible = true;
Text = "Interactive Python Shell";
interactiveInput_TextChanged(null, null);
}
else if (sender == scriptMode)
{
scriptMode.Checked = true;
shellMode.Checked = false;
shellTable.Visible = false;
scriptTable.Visible = true;
scriptOutput.Text = "";
Text = "Python Script Execute";
}
}
private List<string> history = new List<string>();
int historyidx = -1;
string workingtext = "";
private void interactiveInput_KeyDown(object sender, KeyEventArgs e)
{
if (!e.Shift && e.KeyCode == Keys.Return)
{
executeCmd_Click(null, null);
e.Handled = true;
e.SuppressKeyPress = true;
}
bool moved = false;
if (e.KeyCode == Keys.Down && historyidx > -1)
{
historyidx--;
moved = true;
}
if (e.KeyCode == Keys.Up && historyidx + 1 < history.Count)
{
if (historyidx == -1)
workingtext = interactiveInput.Text;
historyidx++;
moved = true;
}
if (moved)
{
if (historyidx == -1)
interactiveInput.Text = workingtext;
else
interactiveInput.Text = history[historyidx];
interactiveInput.Select(interactiveInput.Text.Length, 0);
}
}
private void interactiveInput_TextChanged(object sender, EventArgs e)
{
using (var g = interactiveInput.CreateGraphics())
{
SizeF MessageSize = g.MeasureString(interactiveInput.Text + "a", interactiveInput.Font,
interactiveInput.Width, new StringFormat(0));
const int maxHeight = 100;
if (MessageSize.Height <= maxHeight)
{
interactiveInput.Height = 20 + (int)MessageSize.Height;
interactiveInput.ScrollBars = ScrollBars.None;
}
else
{
interactiveInput.Height = 20 + maxHeight;
interactiveInput.ScrollBars = ScrollBars.Vertical;
}
}
}
private void interactiveInput_Layout(object sender, LayoutEventArgs e)
{
interactiveInput_TextChanged(null, null);
}
private void executeCmd_Click(object sender, EventArgs e)
{
var nl = Environment.NewLine;
interactiveOutput.AppendText(">> " + interactiveInput.Text.Trim().Replace(nl, nl + ">> ") + nl);
interactiveOutput.AppendText(Execute(pythonengine, shellscope, interactiveInput.Text));
history.Insert(0, interactiveInput.Text);
historyidx = -1;
workingtext = "";
interactiveInput.Text = "";
}
private void clearCmd_Click(object sender, EventArgs e)
{
interactiveOutput.Text = String.Format("RenderDoc Python console, powered by IronPython {0}{1}" +
"The 'renderdoc' object is the Core class instance.{1}", IronPython.CurrentVersion.AssemblyFileVersion, Environment.NewLine);
shellscope = NewScope(pythonengine);
}
private static PythonShell me = null;
private static TracebackDelegate PythonTrace(TraceBackFrame frame, string result, object payload)
{
if(me != null)
me.TraceCallback(frame, result, payload);
return PythonTrace;
}
private void TraceCallback(TraceBackFrame frame, string result, object payload)
{
System.Diagnostics.Trace.WriteLine("On line " + frame.f_lineno.ToString());
int lineNum = (int)frame.f_lineno - 1;
BeginInvoke(new Action(() => { SetLineNumber(lineNum); }));
stdoutwriter.Flush();
stdout.Seek(0, SeekOrigin.Begin);
string output = stdoutreader.ReadToEnd();
stdout.Seek(0, SeekOrigin.Begin);
stdout.SetLength(0);
this.BeginInvoke(new Action(() =>
{
scriptOutput.Text += output;
}));
}
private void SetLineNumber(int lineNum)
{
for (int i = 0; i < me.scriptEditor.Lines.Count; i++)
{
me.scriptEditor.Lines[i].DeleteMarker(0);
}
if (lineNum >= 0 && lineNum < me.scriptEditor.Lines.Count)
{
me.scriptEditor.Lines[lineNum].AddMarker(0);
}
}
private void EnableButtons(bool enable)
{
shellMode.Enabled = scriptMode.Enabled =
newScript.Enabled = openButton.Enabled = saveAs.Enabled =
runButton.Enabled = enable;
}
private void runButton_Click(object sender, EventArgs e)
{
var scriptscope = NewScope(pythonengine);
me = this;
var script = scriptEditor.Text;
scriptOutput.Text = "";
EnableButtons(false);
Thread th = Helpers.NewThread(new ThreadStart(() =>
{
pythonengine.SetTrace(PythonTrace);
// ignore output, the trace handler above will print output
string output = Execute(pythonengine, scriptscope, script);
pythonengine.SetTrace(null);
this.BeginInvoke(new Action(() =>
{
scriptOutput.Text += output;
SetLineNumber(-1);
EnableButtons(true);
}));
}));
th.Start();
}
private string ValidData(IDataObject d)
{
var fmts = new List<string>(d.GetFormats());
if (fmts.Contains("FileName"))
{
var data = d.GetData("FileName") as Array;
if (data != null && data.Length == 1 && data.GetValue(0) is string)
{
var filename = (string)data.GetValue(0);
try
{
if (File.Exists(filename) && Path.GetExtension(filename).ToUpperInvariant() == ".PY")
return Path.GetFullPath(filename);
}
catch (ArgumentException)
{
// invalid path etc
}
}
}
return "";
}
private void shell_DragEnter(object sender, DragEventArgs e)
{
if (ValidData(e.Data).Length > 0)
e.Effect = DragDropEffects.Copy;
else
e.Effect = DragDropEffects.None;
}
private void shell_DragDrop(object sender, DragEventArgs e)
{
string fn = ValidData(e.Data);
if (fn.Length > 0)
{
scriptEditor.Text = File.ReadAllText(fn);
mode_Changed(scriptMode, null);
}
}
private void openButton_Click(object sender, EventArgs e)
{
DialogResult res = openDialog.ShowDialog();
if (res == DialogResult.OK)
{
scriptEditor.Text = File.ReadAllText(openDialog.FileName);
}
}
private void saveAs_Click(object sender, EventArgs e)
{
DialogResult res = saveDialog.ShowDialog();
if (res == DialogResult.OK)
{
File.WriteAllText(saveDialog.FileName, scriptEditor.Text);
}
}
private void newScript_Click(object sender, EventArgs e)
{
scriptEditor.Text = String.Format("# RenderDoc Python scripts, powered by IronPython {0}\n" +
"# The 'renderdoc' object is the Core class instance.\n\n", IronPython.CurrentVersion.AssemblyFileVersion);
if (File.Exists("pythonlibs.dll"))
scriptEditor.Text += "import clr\nclr.AddReference(\"pythonlibs\")\n\n";
else
scriptEditor.Text += "#import clr\n#clr.AddReference(\"pythonlibs\")\n\n";
scriptEditor.Text = scriptEditor.Text.Replace("\n", Environment.NewLine);
}
}
}
@@ -0,0 +1,169 @@
<?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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolStripContainer1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>116, 17</value>
</metadata>
<metadata name="toolStrip1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="shellMode.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<data name="scriptMode.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9
c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32
Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo
mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+
kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D
TgDQASA1MVpwzwAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="saveDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>213, 16</value>
</metadata>
<metadata name="openDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>318, 16</value>
</metadata>
</root>
+27 -17
View File
@@ -110,6 +110,7 @@
this.statusProgress = new System.Windows.Forms.ToolStripProgressBar();
this.dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel();
this.saveDialog = new System.Windows.Forms.SaveFileDialog();
this.pythonShellToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.toolStripContainer1.BottomToolStripPanel.SuspendLayout();
this.toolStripContainer1.ContentPanel.SuspendLayout();
@@ -269,6 +270,7 @@
this.toolStripMenuItem1,
this.saveLayoutToolStripMenuItem,
this.toolStripSeparator1,
this.pythonShellToolStripMenuItem,
this.eventViewerToolStripMenuItem,
this.textureToolStripMenuItem,
this.D3D11PipelineStateToolStripMenuItem,
@@ -298,7 +300,7 @@
// layoutSaveDefault
//
this.layoutSaveDefault.Name = "layoutSaveDefault";
this.layoutSaveDefault.Size = new System.Drawing.Size(145, 22);
this.layoutSaveDefault.Size = new System.Drawing.Size(152, 22);
this.layoutSaveDefault.Tag = "0";
this.layoutSaveDefault.Text = "&Default Layout";
this.layoutSaveDefault.Click += new System.EventHandler(this.saveLayout_Click);
@@ -306,12 +308,12 @@
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
this.toolStripSeparator3.Size = new System.Drawing.Size(142, 6);
this.toolStripSeparator3.Size = new System.Drawing.Size(149, 6);
//
// layoutSave1
//
this.layoutSave1.Name = "layoutSave1";
this.layoutSave1.Size = new System.Drawing.Size(145, 22);
this.layoutSave1.Size = new System.Drawing.Size(152, 22);
this.layoutSave1.Tag = "1";
this.layoutSave1.Text = "Layout &1";
this.layoutSave1.Click += new System.EventHandler(this.saveLayout_Click);
@@ -319,7 +321,7 @@
// layoutSave2
//
this.layoutSave2.Name = "layoutSave2";
this.layoutSave2.Size = new System.Drawing.Size(145, 22);
this.layoutSave2.Size = new System.Drawing.Size(152, 22);
this.layoutSave2.Tag = "2";
this.layoutSave2.Text = "Layout &2";
this.layoutSave2.Click += new System.EventHandler(this.saveLayout_Click);
@@ -327,7 +329,7 @@
// layoutSave3
//
this.layoutSave3.Name = "layoutSave3";
this.layoutSave3.Size = new System.Drawing.Size(145, 22);
this.layoutSave3.Size = new System.Drawing.Size(152, 22);
this.layoutSave3.Tag = "3";
this.layoutSave3.Text = "Layout &3";
this.layoutSave3.Click += new System.EventHandler(this.saveLayout_Click);
@@ -335,7 +337,7 @@
// layoutSave4
//
this.layoutSave4.Name = "layoutSave4";
this.layoutSave4.Size = new System.Drawing.Size(145, 22);
this.layoutSave4.Size = new System.Drawing.Size(152, 22);
this.layoutSave4.Tag = "4";
this.layoutSave4.Text = "Layout &4";
this.layoutSave4.Click += new System.EventHandler(this.saveLayout_Click);
@@ -343,7 +345,7 @@
// layoutSave5
//
this.layoutSave5.Name = "layoutSave5";
this.layoutSave5.Size = new System.Drawing.Size(145, 22);
this.layoutSave5.Size = new System.Drawing.Size(152, 22);
this.layoutSave5.Tag = "5";
this.layoutSave5.Text = "Layout &5";
this.layoutSave5.Click += new System.EventHandler(this.saveLayout_Click);
@@ -351,7 +353,7 @@
// layoutSave6
//
this.layoutSave6.Name = "layoutSave6";
this.layoutSave6.Size = new System.Drawing.Size(145, 22);
this.layoutSave6.Size = new System.Drawing.Size(152, 22);
this.layoutSave6.Tag = "6";
this.layoutSave6.Text = "Layout &6";
this.layoutSave6.Click += new System.EventHandler(this.saveLayout_Click);
@@ -545,14 +547,14 @@
this.viewDocsToolStripMenuItem.Name = "viewDocsToolStripMenuItem";
this.viewDocsToolStripMenuItem.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.viewDocsToolStripMenuItem.ShortcutKeys = System.Windows.Forms.Keys.F1;
this.viewDocsToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.viewDocsToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
this.viewDocsToolStripMenuItem.Text = "View &Documentation";
this.viewDocsToolStripMenuItem.Click += new System.EventHandler(this.viewDocsToolStripMenuItem_Click);
//
// viewLogFileToolStripMenuItem
//
this.viewLogFileToolStripMenuItem.Name = "viewLogFileToolStripMenuItem";
this.viewLogFileToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.viewLogFileToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
this.viewLogFileToolStripMenuItem.Text = "View Diagnostic &Log File";
this.viewLogFileToolStripMenuItem.Click += new System.EventHandler(this.viewLogFileToolStripMenuItem_Click);
//
@@ -560,40 +562,40 @@
//
this.sendErrorReportToolStripMenuItem.Name = "sendErrorReportToolStripMenuItem";
this.sendErrorReportToolStripMenuItem.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.sendErrorReportToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.sendErrorReportToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
this.sendErrorReportToolStripMenuItem.Text = "Send &Error Report";
this.sendErrorReportToolStripMenuItem.Click += new System.EventHandler(this.sendErrorReportToolStripMenuItem_Click);
//
// toolStripSeparator9
//
this.toolStripSeparator9.Name = "toolStripSeparator9";
this.toolStripSeparator9.Size = new System.Drawing.Size(187, 6);
this.toolStripSeparator9.Size = new System.Drawing.Size(189, 6);
//
// updateToolStripMenuItem
//
this.updateToolStripMenuItem.Enabled = false;
this.updateToolStripMenuItem.Image = global::renderdocui.Properties.Resources.hourglass;
this.updateToolStripMenuItem.Name = "updateToolStripMenuItem";
this.updateToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.updateToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
this.updateToolStripMenuItem.Text = "No update available";
this.updateToolStripMenuItem.Click += new System.EventHandler(this.updateToolStripMenuItem_Click);
//
// toolStripSeparator8
//
this.toolStripSeparator8.Name = "toolStripSeparator8";
this.toolStripSeparator8.Size = new System.Drawing.Size(187, 6);
this.toolStripSeparator8.Size = new System.Drawing.Size(189, 6);
//
// sourceOnGithubToolStripMenuItem
//
this.sourceOnGithubToolStripMenuItem.Name = "sourceOnGithubToolStripMenuItem";
this.sourceOnGithubToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.sourceOnGithubToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
this.sourceOnGithubToolStripMenuItem.Text = "Source on github";
this.sourceOnGithubToolStripMenuItem.Click += new System.EventHandler(this.sourceOnGithubToolStripMenuItem_Click);
//
// nightlybuildsToolStripMenuItem
//
this.nightlybuildsToolStripMenuItem.Name = "nightlybuildsToolStripMenuItem";
this.nightlybuildsToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.nightlybuildsToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
this.nightlybuildsToolStripMenuItem.Text = "Build/Release downloads";
this.nightlybuildsToolStripMenuItem.Click += new System.EventHandler(this.nightlybuildsToolStripMenuItem_Click);
//
@@ -601,7 +603,7 @@
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(190, 22);
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(192, 22);
this.aboutToolStripMenuItem.Text = "&About";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
@@ -725,6 +727,13 @@
this.saveDialog.Filter = "Log Files (*.rdc)|*.rdc";
this.saveDialog.Title = "Save Log As";
//
// pythonShellToolStripMenuItem
//
this.pythonShellToolStripMenuItem.Name = "pythonShellToolStripMenuItem";
this.pythonShellToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.pythonShellToolStripMenuItem.Text = "P&ython Shell";
this.pythonShellToolStripMenuItem.Click += new System.EventHandler(this.pythonShellToolStripMenuItem_Click);
//
// MainWindow
//
this.AllowDrop = true;
@@ -826,6 +835,7 @@
private System.Windows.Forms.ToolStripMenuItem viewLogFileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem nightlybuildsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem sourceOnGithubToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem pythonShellToolStripMenuItem;
}
}
+9
View File
@@ -404,6 +404,10 @@ namespace renderdocui.Windows
return m_Core.GetDebugMessages();
else if (IsPersist(persistString, typeof(TimelineBar).ToString()))
return m_Core.GetTimelineBar();
else if (IsPersist(persistString, typeof(Dialogs.PythonShell).ToString()))
{
return new Dialogs.PythonShell(m_Core);
}
else if (IsPersist(persistString, typeof(Dialogs.CaptureDialog).ToString()))
{
if (m_Core.CaptureDialog == null)
@@ -1359,6 +1363,11 @@ namespace renderdocui.Windows
t.Show(dockPanel);
}
private void pythonShellToolStripMenuItem_Click(object sender, EventArgs e)
{
(new Dialogs.PythonShell(m_Core)).Show(dockPanel);
}
private void PipelineStateToolStripMenuItem_Click(object sender, EventArgs e)
{
m_Core.GetPipelineStateViewer().Show(dockPanel);
+10
View File
@@ -224,6 +224,12 @@
<Compile Include="Windows\Dialogs\ColumnSelector.Designer.cs">
<DependentUpon>ColumnSelector.cs</DependentUpon>
</Compile>
<Compile Include="Windows\Dialogs\PythonShell.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Windows\Dialogs\PythonShell.Designer.cs">
<DependentUpon>PythonShell.cs</DependentUpon>
</Compile>
<Compile Include="Windows\Dialogs\RemoteHostSelect.cs">
<SubType>Form</SubType>
</Compile>
@@ -353,6 +359,9 @@
<EmbeddedResource Include="Windows\Dialogs\ColumnSelector.resx">
<DependentUpon>ColumnSelector.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Windows\Dialogs\PythonShell.resx">
<DependentUpon>PythonShell.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Windows\Dialogs\RemoteHostSelect.resx">
<DependentUpon>RemoteHostSelect.cs</DependentUpon>
</EmbeddedResource>
@@ -475,6 +484,7 @@
<None Include="Resources\disconnect.png" />
<None Include="Resources\flip_y.png" />
<None Include="Resources\asterisk_orange.png" />
<None Include="Resources\folder_page.png" />
<Content Include="Resources\RightArrow_Green_16x16.png" />
<Content Include="Resources\icon.ico" />
<None Include="Resources\page_white_delete.png" />