Add support for external libraries to dndxc. (#317)

This commit is contained in:
Marcelo Lopez Ruiz 2017-05-22 11:45:57 -07:00 коммит произвёл GitHub
Родитель ab643b8345
Коммит 9da0b2afbf
5 изменённых файлов: 354 добавлений и 135 удалений

Просмотреть файл

@ -322,6 +322,23 @@ namespace DotNetDxc
public void GetLength(out UInt32 length) { length = (UInt32)this.contents.Length; }
}
public delegate int DxcCreateInstanceFn(ref Guid clsid, ref Guid iid, [MarshalAs(UnmanagedType.IUnknown)] out object instance);
class DefaultDxcLib
{
[DllImport(@"dxcompiler.dll", CallingConvention = CallingConvention.StdCall)]
private static extern int DxcCreateInstance(
ref Guid clsid,
ref Guid iid,
[MarshalAs(UnmanagedType.IUnknown)] out object instance);
[MethodImplAttribute(MethodImplOptions.NoInlining)]
internal static DxcCreateInstanceFn GetDxcCreateInstanceFn()
{
return DxcCreateInstance;
}
}
class HlslDxcLib
{
private static Guid CLSID_DxcAssembler = new Guid("D728DB68-F903-4F80-94CD-DCCF76EC7151");
@ -332,11 +349,32 @@ namespace DotNetDxc
private static Guid CLSID_DxcOptimizer = new Guid("AE2CD79F-CC22-453F-9B6B-B124E7A5204C");
private static Guid CLSID_DxcValidator = new Guid("8CA3E215-F728-4CF3-8CDD-88AF917587A1");
[DllImport(@"dxcompiler.dll", CallingConvention = CallingConvention.StdCall)]
private static extern int DxcCreateInstance(
public static DxcCreateInstanceFn DxcCreateInstanceFn;
[DllImport("kernel32.dll", CallingConvention = CallingConvention.Winapi, SetLastError =true, CharSet=CharSet.Unicode, ExactSpelling = true)]
private static extern IntPtr LoadLibraryW([MarshalAs(UnmanagedType.LPWStr)] string fileName);
[DllImport("kernel32.dll", SetLastError = true, CharSet = CharSet.Ansi, ExactSpelling =true)]
private static extern IntPtr GetProcAddress(IntPtr hModule, string procName);
public static DxcCreateInstanceFn LoadDxcCreateInstance(string dllPath, string fnName)
{
IntPtr handle = LoadLibraryW(dllPath);
if (handle == IntPtr.Zero)
{
throw new System.ComponentModel.Win32Exception();
}
IntPtr fnPtr = GetProcAddress(handle, fnName);
return (DxcCreateInstanceFn)Marshal.GetDelegateForFunctionPointer(fnPtr, typeof(DxcCreateInstanceFn));
}
private static int DxcCreateInstance(
ref Guid clsid,
ref Guid iid,
[MarshalAs(UnmanagedType.IUnknown)] out object instance);
out object instance)
{
return DxcCreateInstanceFn(ref clsid, ref iid, out instance);
}
[MethodImplAttribute(MethodImplOptions.NoInlining)]
public static IDxcAssembler CreateDxcAssembler()

273
tools/clang/tools/dotnetc/EditorForm.Designer.cs сгенерированный
Просмотреть файл

@ -85,6 +85,7 @@ namespace MainNs
this.ASTTabPage = new System.Windows.Forms.TabPage();
this.ASTDumpBox = new System.Windows.Forms.RichTextBox();
this.OptimizerTabPage = new System.Windows.Forms.TabPage();
this.PrintAllPassesBox = new System.Windows.Forms.CheckBox();
this.ResetDefaultPassesButton = new System.Windows.Forms.Button();
this.AnalyzeCheckBox = new System.Windows.Forms.CheckBox();
this.AddPrintModuleButton = new System.Windows.Forms.Button();
@ -105,7 +106,8 @@ namespace MainNs
this.OutputTabControl = new System.Windows.Forms.TabControl();
this.RenderLogTabPage = new System.Windows.Forms.TabPage();
this.RenderLogBox = new System.Windows.Forms.TextBox();
this.PrintAllPassesBox = new System.Windows.Forms.CheckBox();
this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.TheStatusStrip.SuspendLayout();
this.TheMenuStrip.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
@ -130,10 +132,10 @@ namespace MainNs
this.TheStatusStrip.ImageScalingSize = new System.Drawing.Size(24, 24);
this.TheStatusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.TheStatusStripLabel});
this.TheStatusStrip.Location = new System.Drawing.Point(0, 1057);
this.TheStatusStrip.Location = new System.Drawing.Point(0, 526);
this.TheStatusStrip.Name = "TheStatusStrip";
this.TheStatusStrip.Padding = new System.Windows.Forms.Padding(2, 0, 18, 0);
this.TheStatusStrip.Size = new System.Drawing.Size(1568, 22);
this.TheStatusStrip.Padding = new System.Windows.Forms.Padding(1, 0, 9, 0);
this.TheStatusStrip.Size = new System.Drawing.Size(784, 22);
this.TheStatusStrip.TabIndex = 0;
this.TheStatusStrip.Text = "statusStrip1";
//
@ -150,11 +152,12 @@ namespace MainNs
this.editToolStripMenuItem,
this.viewToolStripMenuItem,
this.buildToolStripMenuItem,
this.toolsToolStripMenuItem,
this.helpToolStripMenuItem});
this.TheMenuStrip.Location = new System.Drawing.Point(0, 0);
this.TheMenuStrip.Name = "TheMenuStrip";
this.TheMenuStrip.Padding = new System.Windows.Forms.Padding(8, 2, 0, 2);
this.TheMenuStrip.Size = new System.Drawing.Size(1568, 40);
this.TheMenuStrip.Padding = new System.Windows.Forms.Padding(4, 1, 0, 1);
this.TheMenuStrip.Size = new System.Drawing.Size(784, 24);
this.TheMenuStrip.TabIndex = 1;
this.TheMenuStrip.Text = "menuStrip1";
//
@ -170,7 +173,7 @@ namespace MainNs
this.toolStripMenuItem4,
this.exitToolStripMenuItem});
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
this.fileToolStripMenuItem.Size = new System.Drawing.Size(64, 36);
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 22);
this.fileToolStripMenuItem.Text = "&File";
this.fileToolStripMenuItem.DropDownOpening += new System.EventHandler(this.fileToolStripMenuItem_DropDownOpening);
//
@ -178,7 +181,7 @@ namespace MainNs
//
this.NewToolStripMenuItem.Name = "NewToolStripMenuItem";
this.NewToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
this.NewToolStripMenuItem.Size = new System.Drawing.Size(274, 38);
this.NewToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.NewToolStripMenuItem.Text = "&New";
this.NewToolStripMenuItem.Click += new System.EventHandler(this.NewToolStripMenuItem_Click);
//
@ -186,7 +189,7 @@ namespace MainNs
//
this.openToolStripMenuItem.Name = "openToolStripMenuItem";
this.openToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
this.openToolStripMenuItem.Size = new System.Drawing.Size(274, 38);
this.openToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.openToolStripMenuItem.Text = "&Open...";
this.openToolStripMenuItem.Click += new System.EventHandler(this.openToolStripMenuItem_Click);
//
@ -194,37 +197,37 @@ namespace MainNs
//
this.saveToolStripMenuItem.Name = "saveToolStripMenuItem";
this.saveToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
this.saveToolStripMenuItem.Size = new System.Drawing.Size(274, 38);
this.saveToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.saveToolStripMenuItem.Text = "&Save";
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
//
// saveAsToolStripMenuItem
//
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(274, 38);
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.saveAsToolStripMenuItem.Text = "Save &As...";
this.saveAsToolStripMenuItem.Click += new System.EventHandler(this.saveAsToolStripMenuItem_Click);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(271, 6);
this.toolStripSeparator1.Size = new System.Drawing.Size(152, 6);
//
// recentFilesToolStripMenuItem
//
this.recentFilesToolStripMenuItem.Name = "recentFilesToolStripMenuItem";
this.recentFilesToolStripMenuItem.Size = new System.Drawing.Size(274, 38);
this.recentFilesToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.recentFilesToolStripMenuItem.Text = "Recent &Files";
//
// toolStripMenuItem4
//
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(271, 6);
this.toolStripMenuItem4.Size = new System.Drawing.Size(152, 6);
//
// exitToolStripMenuItem
//
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
this.exitToolStripMenuItem.Size = new System.Drawing.Size(274, 38);
this.exitToolStripMenuItem.Size = new System.Drawing.Size(155, 22);
this.exitToolStripMenuItem.Text = "E&xit";
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
//
@ -246,27 +249,27 @@ namespace MainNs
this.FontGrowToolStripMenuItem,
this.FontShrinkToolStripMenuItem});
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
this.editToolStripMenuItem.Size = new System.Drawing.Size(67, 36);
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 22);
this.editToolStripMenuItem.Text = "&Edit";
//
// undoToolStripMenuItem
//
this.undoToolStripMenuItem.Name = "undoToolStripMenuItem";
this.undoToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Z)));
this.undoToolStripMenuItem.Size = new System.Drawing.Size(296, 38);
this.undoToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
this.undoToolStripMenuItem.Text = "&Undo";
this.undoToolStripMenuItem.Click += new System.EventHandler(this.undoToolStripMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(293, 6);
this.toolStripMenuItem1.Size = new System.Drawing.Size(161, 6);
//
// cutToolStripMenuItem
//
this.cutToolStripMenuItem.Name = "cutToolStripMenuItem";
this.cutToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.X)));
this.cutToolStripMenuItem.Size = new System.Drawing.Size(296, 38);
this.cutToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
this.cutToolStripMenuItem.Text = "Cu&t";
this.cutToolStripMenuItem.Click += new System.EventHandler(this.cutToolStripMenuItem_Click);
//
@ -274,7 +277,7 @@ namespace MainNs
//
this.copyToolStripMenuItem.Name = "copyToolStripMenuItem";
this.copyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C)));
this.copyToolStripMenuItem.Size = new System.Drawing.Size(296, 38);
this.copyToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
this.copyToolStripMenuItem.Text = "&Copy";
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
//
@ -282,48 +285,48 @@ namespace MainNs
//
this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem";
this.pasteToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.V)));
this.pasteToolStripMenuItem.Size = new System.Drawing.Size(296, 38);
this.pasteToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
this.pasteToolStripMenuItem.Text = "&Paste";
this.pasteToolStripMenuItem.Click += new System.EventHandler(this.pasteToolStripMenuItem_Click);
//
// deleteToolStripMenuItem
//
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(296, 38);
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
this.deleteToolStripMenuItem.Text = "&Delete";
this.deleteToolStripMenuItem.Click += new System.EventHandler(this.deleteToolStripMenuItem_Click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(293, 6);
this.toolStripMenuItem2.Size = new System.Drawing.Size(161, 6);
//
// selectAllToolStripMenuItem
//
this.selectAllToolStripMenuItem.Name = "selectAllToolStripMenuItem";
this.selectAllToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.A)));
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(296, 38);
this.selectAllToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
this.selectAllToolStripMenuItem.Text = "Select &All";
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(293, 6);
this.toolStripMenuItem3.Size = new System.Drawing.Size(161, 6);
//
// findAndReplaceToolStripMenuItem
//
this.findAndReplaceToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.quickFindToolStripMenuItem});
this.findAndReplaceToolStripMenuItem.Name = "findAndReplaceToolStripMenuItem";
this.findAndReplaceToolStripMenuItem.Size = new System.Drawing.Size(296, 38);
this.findAndReplaceToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
this.findAndReplaceToolStripMenuItem.Text = "&Find and Replace";
//
// quickFindToolStripMenuItem
//
this.quickFindToolStripMenuItem.Name = "quickFindToolStripMenuItem";
this.quickFindToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
this.quickFindToolStripMenuItem.Size = new System.Drawing.Size(308, 38);
this.quickFindToolStripMenuItem.Size = new System.Drawing.Size(171, 22);
this.quickFindToolStripMenuItem.Text = "Quick &Find";
this.quickFindToolStripMenuItem.Click += new System.EventHandler(this.quickFindToolStripMenuItem_Click);
//
@ -331,14 +334,14 @@ namespace MainNs
//
this.goToToolStripMenuItem.Name = "goToToolStripMenuItem";
this.goToToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.G)));
this.goToToolStripMenuItem.Size = new System.Drawing.Size(296, 38);
this.goToToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
this.goToToolStripMenuItem.Text = "&Go To...";
this.goToToolStripMenuItem.Click += new System.EventHandler(this.goToToolStripMenuItem_Click);
//
// fileVariablesToolStripMenuItem
//
this.fileVariablesToolStripMenuItem.Name = "fileVariablesToolStripMenuItem";
this.fileVariablesToolStripMenuItem.Size = new System.Drawing.Size(296, 38);
this.fileVariablesToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
this.fileVariablesToolStripMenuItem.Text = "File &Variables...";
this.fileVariablesToolStripMenuItem.Click += new System.EventHandler(this.fileVariablesToolStripMenuItem_Click);
//
@ -348,7 +351,7 @@ namespace MainNs
this.FontGrowToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.OemPeriod)));
this.FontGrowToolStripMenuItem.ShowShortcutKeys = false;
this.FontGrowToolStripMenuItem.Size = new System.Drawing.Size(296, 38);
this.FontGrowToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
this.FontGrowToolStripMenuItem.Text = "Font G&row";
this.FontGrowToolStripMenuItem.Click += new System.EventHandler(this.FontGrowToolStripMenuItem_Click);
//
@ -358,7 +361,7 @@ namespace MainNs
this.FontShrinkToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
| System.Windows.Forms.Keys.Oemcomma)));
this.FontShrinkToolStripMenuItem.ShowShortcutKeys = false;
this.FontShrinkToolStripMenuItem.Size = new System.Drawing.Size(296, 38);
this.FontShrinkToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
this.FontShrinkToolStripMenuItem.Text = "Font Shrin&k";
this.FontShrinkToolStripMenuItem.Click += new System.EventHandler(this.FontShrinkToolStripMenuItem_Click);
//
@ -371,41 +374,41 @@ namespace MainNs
this.renderToolStripMenuItem,
this.outputToolStripMenuItem});
this.viewToolStripMenuItem.Name = "viewToolStripMenuItem";
this.viewToolStripMenuItem.Size = new System.Drawing.Size(78, 36);
this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 22);
this.viewToolStripMenuItem.Text = "&View";
//
// autoUpdateToolStripMenuItem
//
this.autoUpdateToolStripMenuItem.Name = "autoUpdateToolStripMenuItem";
this.autoUpdateToolStripMenuItem.Size = new System.Drawing.Size(252, 38);
this.autoUpdateToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.autoUpdateToolStripMenuItem.Text = "&Auto-Update";
this.autoUpdateToolStripMenuItem.Click += new System.EventHandler(this.autoUpdateToolStripMenuItem_Click);
//
// bitstreamToolStripMenuItem
//
this.bitstreamToolStripMenuItem.Name = "bitstreamToolStripMenuItem";
this.bitstreamToolStripMenuItem.Size = new System.Drawing.Size(252, 38);
this.bitstreamToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.bitstreamToolStripMenuItem.Text = "&Bitstream";
this.bitstreamToolStripMenuItem.Click += new System.EventHandler(this.bitstreamToolStripMenuItem_Click);
//
// errorListToolStripMenuItem
//
this.errorListToolStripMenuItem.Name = "errorListToolStripMenuItem";
this.errorListToolStripMenuItem.Size = new System.Drawing.Size(252, 38);
this.errorListToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.errorListToolStripMenuItem.Text = "Error L&ist";
this.errorListToolStripMenuItem.Click += new System.EventHandler(this.errorListToolStripMenuItem_Click);
//
// renderToolStripMenuItem
//
this.renderToolStripMenuItem.Name = "renderToolStripMenuItem";
this.renderToolStripMenuItem.Size = new System.Drawing.Size(252, 38);
this.renderToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.renderToolStripMenuItem.Text = "&Render";
this.renderToolStripMenuItem.Click += new System.EventHandler(this.renderToolStripMenuItem_Click);
//
// outputToolStripMenuItem
//
this.outputToolStripMenuItem.Name = "outputToolStripMenuItem";
this.outputToolStripMenuItem.Size = new System.Drawing.Size(252, 38);
this.outputToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.outputToolStripMenuItem.Text = "&Output";
this.outputToolStripMenuItem.Click += new System.EventHandler(this.outputToolStripMenuItem_Click);
//
@ -415,21 +418,21 @@ namespace MainNs
this.compileToolStripMenuItem,
this.exportCompiledObjectToolStripMenuItem});
this.buildToolStripMenuItem.Name = "buildToolStripMenuItem";
this.buildToolStripMenuItem.Size = new System.Drawing.Size(81, 36);
this.buildToolStripMenuItem.Size = new System.Drawing.Size(46, 22);
this.buildToolStripMenuItem.Text = "&Build";
//
// compileToolStripMenuItem
//
this.compileToolStripMenuItem.Name = "compileToolStripMenuItem";
this.compileToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F7)));
this.compileToolStripMenuItem.Size = new System.Drawing.Size(368, 38);
this.compileToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
this.compileToolStripMenuItem.Text = "Co&mpile";
this.compileToolStripMenuItem.Click += new System.EventHandler(this.compileToolStripMenuItem_Click);
//
// exportCompiledObjectToolStripMenuItem
//
this.exportCompiledObjectToolStripMenuItem.Name = "exportCompiledObjectToolStripMenuItem";
this.exportCompiledObjectToolStripMenuItem.Size = new System.Drawing.Size(368, 38);
this.exportCompiledObjectToolStripMenuItem.Size = new System.Drawing.Size(200, 22);
this.exportCompiledObjectToolStripMenuItem.Text = "&Export Compiled Object";
this.exportCompiledObjectToolStripMenuItem.Click += new System.EventHandler(this.exportCompiledObjectToolStripMenuItem_Click);
//
@ -438,13 +441,13 @@ namespace MainNs
this.helpToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.aboutToolStripMenuItem});
this.helpToolStripMenuItem.Name = "helpToolStripMenuItem";
this.helpToolStripMenuItem.Size = new System.Drawing.Size(77, 36);
this.helpToolStripMenuItem.Size = new System.Drawing.Size(44, 22);
this.helpToolStripMenuItem.Text = "&Help";
//
// aboutToolStripMenuItem
//
this.aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(194, 38);
this.aboutToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.aboutToolStripMenuItem.Text = "&About...";
this.aboutToolStripMenuItem.Click += new System.EventHandler(this.aboutToolStripMenuItem_Click);
//
@ -452,7 +455,7 @@ namespace MainNs
//
this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainer1.Location = new System.Drawing.Point(0, 0);
this.splitContainer1.Margin = new System.Windows.Forms.Padding(4);
this.splitContainer1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
@ -462,9 +465,9 @@ namespace MainNs
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.AnalysisTabControl);
this.splitContainer1.Size = new System.Drawing.Size(1568, 1017);
this.splitContainer1.SplitterDistance = 570;
this.splitContainer1.SplitterWidth = 6;
this.splitContainer1.Size = new System.Drawing.Size(784, 502);
this.splitContainer1.SplitterDistance = 285;
this.splitContainer1.SplitterWidth = 3;
this.splitContainer1.TabIndex = 2;
//
// CodeBox
@ -472,9 +475,9 @@ namespace MainNs
this.CodeBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.CodeBox.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.CodeBox.Location = new System.Drawing.Point(0, 0);
this.CodeBox.Margin = new System.Windows.Forms.Padding(4);
this.CodeBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.CodeBox.Name = "CodeBox";
this.CodeBox.Size = new System.Drawing.Size(570, 1017);
this.CodeBox.Size = new System.Drawing.Size(285, 502);
this.CodeBox.TabIndex = 0;
this.CodeBox.Text = "";
this.CodeBox.WordWrap = false;
@ -488,21 +491,21 @@ namespace MainNs
this.AnalysisTabControl.Controls.Add(this.OptimizerTabPage);
this.AnalysisTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.AnalysisTabControl.Location = new System.Drawing.Point(0, 0);
this.AnalysisTabControl.Margin = new System.Windows.Forms.Padding(4);
this.AnalysisTabControl.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.AnalysisTabControl.Name = "AnalysisTabControl";
this.AnalysisTabControl.SelectedIndex = 0;
this.AnalysisTabControl.Size = new System.Drawing.Size(992, 1017);
this.AnalysisTabControl.Size = new System.Drawing.Size(496, 502);
this.AnalysisTabControl.TabIndex = 0;
this.AnalysisTabControl.Selecting += new System.Windows.Forms.TabControlCancelEventHandler(this.AnalysisTabControl_Selecting);
//
// DisassemblyTabPage
//
this.DisassemblyTabPage.Controls.Add(this.DisassemblyTextBox);
this.DisassemblyTabPage.Location = new System.Drawing.Point(8, 39);
this.DisassemblyTabPage.Margin = new System.Windows.Forms.Padding(4);
this.DisassemblyTabPage.Location = new System.Drawing.Point(4, 22);
this.DisassemblyTabPage.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.DisassemblyTabPage.Name = "DisassemblyTabPage";
this.DisassemblyTabPage.Padding = new System.Windows.Forms.Padding(4);
this.DisassemblyTabPage.Size = new System.Drawing.Size(976, 970);
this.DisassemblyTabPage.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.DisassemblyTabPage.Size = new System.Drawing.Size(488, 476);
this.DisassemblyTabPage.TabIndex = 0;
this.DisassemblyTabPage.Text = "Disassembly";
this.DisassemblyTabPage.UseVisualStyleBackColor = true;
@ -510,11 +513,11 @@ namespace MainNs
// DisassemblyTextBox
//
this.DisassemblyTextBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.DisassemblyTextBox.Location = new System.Drawing.Point(4, 4);
this.DisassemblyTextBox.Margin = new System.Windows.Forms.Padding(4);
this.DisassemblyTextBox.Location = new System.Drawing.Point(2, 2);
this.DisassemblyTextBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.DisassemblyTextBox.Name = "DisassemblyTextBox";
this.DisassemblyTextBox.ReadOnly = true;
this.DisassemblyTextBox.Size = new System.Drawing.Size(968, 962);
this.DisassemblyTextBox.Size = new System.Drawing.Size(484, 472);
this.DisassemblyTextBox.TabIndex = 0;
this.DisassemblyTextBox.Text = "";
this.DisassemblyTextBox.WordWrap = false;
@ -523,11 +526,11 @@ namespace MainNs
// ASTTabPage
//
this.ASTTabPage.Controls.Add(this.ASTDumpBox);
this.ASTTabPage.Location = new System.Drawing.Point(8, 39);
this.ASTTabPage.Margin = new System.Windows.Forms.Padding(4);
this.ASTTabPage.Location = new System.Drawing.Point(4, 22);
this.ASTTabPage.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.ASTTabPage.Name = "ASTTabPage";
this.ASTTabPage.Padding = new System.Windows.Forms.Padding(4);
this.ASTTabPage.Size = new System.Drawing.Size(976, 970);
this.ASTTabPage.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.ASTTabPage.Size = new System.Drawing.Size(488, 503);
this.ASTTabPage.TabIndex = 1;
this.ASTTabPage.Text = "AST";
this.ASTTabPage.UseVisualStyleBackColor = true;
@ -535,11 +538,11 @@ namespace MainNs
// ASTDumpBox
//
this.ASTDumpBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.ASTDumpBox.Location = new System.Drawing.Point(4, 4);
this.ASTDumpBox.Margin = new System.Windows.Forms.Padding(4);
this.ASTDumpBox.Location = new System.Drawing.Point(2, 2);
this.ASTDumpBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.ASTDumpBox.Name = "ASTDumpBox";
this.ASTDumpBox.ReadOnly = true;
this.ASTDumpBox.Size = new System.Drawing.Size(968, 962);
this.ASTDumpBox.Size = new System.Drawing.Size(484, 499);
this.ASTDumpBox.TabIndex = 0;
this.ASTDumpBox.Text = "";
//
@ -556,22 +559,33 @@ namespace MainNs
this.OptimizerTabPage.Controls.Add(this.label2);
this.OptimizerTabPage.Controls.Add(this.label1);
this.OptimizerTabPage.Controls.Add(this.AvailablePassesBox);
this.OptimizerTabPage.Location = new System.Drawing.Point(8, 39);
this.OptimizerTabPage.Margin = new System.Windows.Forms.Padding(4);
this.OptimizerTabPage.Location = new System.Drawing.Point(4, 22);
this.OptimizerTabPage.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.OptimizerTabPage.Name = "OptimizerTabPage";
this.OptimizerTabPage.Padding = new System.Windows.Forms.Padding(4);
this.OptimizerTabPage.Size = new System.Drawing.Size(976, 970);
this.OptimizerTabPage.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.OptimizerTabPage.Size = new System.Drawing.Size(488, 503);
this.OptimizerTabPage.TabIndex = 2;
this.OptimizerTabPage.Text = "Optimizer";
this.OptimizerTabPage.UseVisualStyleBackColor = true;
//
// PrintAllPassesBox
//
this.PrintAllPassesBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.PrintAllPassesBox.AutoSize = true;
this.PrintAllPassesBox.Location = new System.Drawing.Point(7, 428);
this.PrintAllPassesBox.Name = "PrintAllPassesBox";
this.PrintAllPassesBox.Size = new System.Drawing.Size(96, 17);
this.PrintAllPassesBox.TabIndex = 10;
this.PrintAllPassesBox.Text = "Print all passes";
this.PrintAllPassesBox.UseVisualStyleBackColor = true;
//
// ResetDefaultPassesButton
//
this.ResetDefaultPassesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.ResetDefaultPassesButton.Location = new System.Drawing.Point(560, 808);
this.ResetDefaultPassesButton.Margin = new System.Windows.Forms.Padding(4);
this.ResetDefaultPassesButton.Location = new System.Drawing.Point(284, 431);
this.ResetDefaultPassesButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.ResetDefaultPassesButton.Name = "ResetDefaultPassesButton";
this.ResetDefaultPassesButton.Size = new System.Drawing.Size(292, 48);
this.ResetDefaultPassesButton.Size = new System.Drawing.Size(146, 25);
this.ResetDefaultPassesButton.TabIndex = 9;
this.ResetDefaultPassesButton.Text = "Reset Default Passes";
this.ResetDefaultPassesButton.UseVisualStyleBackColor = true;
@ -581,10 +595,9 @@ namespace MainNs
//
this.AnalyzeCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.AnalyzeCheckBox.AutoSize = true;
this.AnalyzeCheckBox.Location = new System.Drawing.Point(14, 766);
this.AnalyzeCheckBox.Margin = new System.Windows.Forms.Padding(6);
this.AnalyzeCheckBox.Location = new System.Drawing.Point(7, 407);
this.AnalyzeCheckBox.Name = "AnalyzeCheckBox";
this.AnalyzeCheckBox.Size = new System.Drawing.Size(196, 29);
this.AnalyzeCheckBox.Size = new System.Drawing.Size(99, 17);
this.AnalyzeCheckBox.TabIndex = 8;
this.AnalyzeCheckBox.Text = "Analyze passes";
this.AnalyzeCheckBox.UseVisualStyleBackColor = true;
@ -592,10 +605,10 @@ namespace MainNs
// AddPrintModuleButton
//
this.AddPrintModuleButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.AddPrintModuleButton.Location = new System.Drawing.Point(14, 844);
this.AddPrintModuleButton.Margin = new System.Windows.Forms.Padding(4);
this.AddPrintModuleButton.Location = new System.Drawing.Point(7, 450);
this.AddPrintModuleButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.AddPrintModuleButton.Name = "AddPrintModuleButton";
this.AddPrintModuleButton.Size = new System.Drawing.Size(292, 48);
this.AddPrintModuleButton.Size = new System.Drawing.Size(146, 25);
this.AddPrintModuleButton.TabIndex = 7;
this.AddPrintModuleButton.Text = "Add Print Module";
this.AddPrintModuleButton.UseVisualStyleBackColor = true;
@ -604,10 +617,10 @@ namespace MainNs
// RunPassesButton
//
this.RunPassesButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.RunPassesButton.Location = new System.Drawing.Point(560, 860);
this.RunPassesButton.Margin = new System.Windows.Forms.Padding(4);
this.RunPassesButton.Location = new System.Drawing.Point(284, 458);
this.RunPassesButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.RunPassesButton.Name = "RunPassesButton";
this.RunPassesButton.Size = new System.Drawing.Size(292, 48);
this.RunPassesButton.Size = new System.Drawing.Size(146, 25);
this.RunPassesButton.TabIndex = 6;
this.RunPassesButton.Text = "Run Passes";
this.RunPassesButton.UseVisualStyleBackColor = true;
@ -616,10 +629,10 @@ namespace MainNs
// SelectPassDownButton
//
this.SelectPassDownButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.SelectPassDownButton.Location = new System.Drawing.Point(706, 748);
this.SelectPassDownButton.Margin = new System.Windows.Forms.Padding(4);
this.SelectPassDownButton.Location = new System.Drawing.Point(357, 400);
this.SelectPassDownButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.SelectPassDownButton.Name = "SelectPassDownButton";
this.SelectPassDownButton.Size = new System.Drawing.Size(146, 48);
this.SelectPassDownButton.Size = new System.Drawing.Size(73, 25);
this.SelectPassDownButton.TabIndex = 5;
this.SelectPassDownButton.Text = "Swap Down";
this.SelectPassDownButton.UseVisualStyleBackColor = true;
@ -628,10 +641,10 @@ namespace MainNs
// SelectPassUpButton
//
this.SelectPassUpButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.SelectPassUpButton.Location = new System.Drawing.Point(560, 748);
this.SelectPassUpButton.Margin = new System.Windows.Forms.Padding(4);
this.SelectPassUpButton.Location = new System.Drawing.Point(284, 400);
this.SelectPassUpButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.SelectPassUpButton.Name = "SelectPassUpButton";
this.SelectPassUpButton.Size = new System.Drawing.Size(138, 48);
this.SelectPassUpButton.Size = new System.Drawing.Size(69, 25);
this.SelectPassUpButton.TabIndex = 4;
this.SelectPassUpButton.Text = "Swap Up";
this.SelectPassUpButton.UseVisualStyleBackColor = true;
@ -643,11 +656,10 @@ namespace MainNs
| System.Windows.Forms.AnchorStyles.Right)));
this.SelectedPassesBox.ContextMenuStrip = this.PassesContextMenu;
this.SelectedPassesBox.FormattingEnabled = true;
this.SelectedPassesBox.ItemHeight = 25;
this.SelectedPassesBox.Location = new System.Drawing.Point(560, 58);
this.SelectedPassesBox.Margin = new System.Windows.Forms.Padding(4);
this.SelectedPassesBox.Location = new System.Drawing.Point(284, 30);
this.SelectedPassesBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.SelectedPassesBox.Name = "SelectedPassesBox";
this.SelectedPassesBox.Size = new System.Drawing.Size(410, 629);
this.SelectedPassesBox.Size = new System.Drawing.Size(207, 329);
this.SelectedPassesBox.TabIndex = 3;
this.SelectedPassesBox.DoubleClick += new System.EventHandler(this.SelectedPassesBox_DoubleClick);
this.SelectedPassesBox.KeyUp += new System.Windows.Forms.KeyEventHandler(this.SelectedPassesBox_KeyUp);
@ -661,31 +673,31 @@ namespace MainNs
this.copyToolStripMenuItem1,
this.copyAllToolStripMenuItem});
this.PassesContextMenu.Name = "PassesContextMenu";
this.PassesContextMenu.Size = new System.Drawing.Size(213, 118);
this.PassesContextMenu.Size = new System.Drawing.Size(137, 76);
//
// PassPropertiesMenuItem
//
this.PassPropertiesMenuItem.Name = "PassPropertiesMenuItem";
this.PassPropertiesMenuItem.Size = new System.Drawing.Size(212, 36);
this.PassPropertiesMenuItem.Size = new System.Drawing.Size(136, 22);
this.PassPropertiesMenuItem.Text = "&Properties...";
this.PassPropertiesMenuItem.Click += new System.EventHandler(this.PassPropertiesMenuItem_Click);
//
// toolStripMenuItem5
//
this.toolStripMenuItem5.Name = "toolStripMenuItem5";
this.toolStripMenuItem5.Size = new System.Drawing.Size(209, 6);
this.toolStripMenuItem5.Size = new System.Drawing.Size(133, 6);
//
// copyToolStripMenuItem1
//
this.copyToolStripMenuItem1.Name = "copyToolStripMenuItem1";
this.copyToolStripMenuItem1.Size = new System.Drawing.Size(212, 36);
this.copyToolStripMenuItem1.Size = new System.Drawing.Size(136, 22);
this.copyToolStripMenuItem1.Text = "&Copy";
this.copyToolStripMenuItem1.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
//
// copyAllToolStripMenuItem
//
this.copyAllToolStripMenuItem.Name = "copyAllToolStripMenuItem";
this.copyAllToolStripMenuItem.Size = new System.Drawing.Size(212, 36);
this.copyAllToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.copyAllToolStripMenuItem.Text = "Copy &All";
this.copyAllToolStripMenuItem.Click += new System.EventHandler(this.copyAllToolStripMenuItem_Click);
//
@ -693,20 +705,20 @@ namespace MainNs
//
this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(554, 15);
this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label2.Location = new System.Drawing.Point(281, 8);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(95, 25);
this.label2.Size = new System.Drawing.Size(47, 13);
this.label2.TabIndex = 2;
this.label2.Text = "&Pipeline:";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(8, 15);
this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
this.label1.Location = new System.Drawing.Point(4, 8);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(384, 25);
this.label1.Size = new System.Drawing.Size(189, 13);
this.label1.TabIndex = 1;
this.label1.Text = "&Available Passes (double-click to add):";
//
@ -716,12 +728,11 @@ namespace MainNs
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.AvailablePassesBox.FormattingEnabled = true;
this.AvailablePassesBox.ItemHeight = 25;
this.AvailablePassesBox.Location = new System.Drawing.Point(14, 58);
this.AvailablePassesBox.Margin = new System.Windows.Forms.Padding(4);
this.AvailablePassesBox.Location = new System.Drawing.Point(7, 30);
this.AvailablePassesBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.AvailablePassesBox.Name = "AvailablePassesBox";
this.AvailablePassesBox.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;
this.AvailablePassesBox.Size = new System.Drawing.Size(534, 629);
this.AvailablePassesBox.Size = new System.Drawing.Size(273, 329);
this.AvailablePassesBox.TabIndex = 0;
this.AvailablePassesBox.DoubleClick += new System.EventHandler(this.AvailablePassesBox_DoubleClick);
//
@ -729,7 +740,8 @@ namespace MainNs
//
this.TopSplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.TopSplitContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.TopSplitContainer.Location = new System.Drawing.Point(0, 40);
this.TopSplitContainer.Location = new System.Drawing.Point(0, 24);
this.TopSplitContainer.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.TopSplitContainer.Name = "TopSplitContainer";
this.TopSplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
@ -741,8 +753,9 @@ namespace MainNs
//
this.TopSplitContainer.Panel2.Controls.Add(this.OutputTabControl);
this.TopSplitContainer.Panel2Collapsed = true;
this.TopSplitContainer.Size = new System.Drawing.Size(1568, 1017);
this.TopSplitContainer.Size = new System.Drawing.Size(784, 502);
this.TopSplitContainer.SplitterDistance = 800;
this.TopSplitContainer.SplitterWidth = 2;
this.TopSplitContainer.TabIndex = 3;
//
// OutputTabControl
@ -750,18 +763,20 @@ namespace MainNs
this.OutputTabControl.Controls.Add(this.RenderLogTabPage);
this.OutputTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.OutputTabControl.Location = new System.Drawing.Point(0, 0);
this.OutputTabControl.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.OutputTabControl.Name = "OutputTabControl";
this.OutputTabControl.SelectedIndex = 0;
this.OutputTabControl.Size = new System.Drawing.Size(150, 46);
this.OutputTabControl.Size = new System.Drawing.Size(75, 24);
this.OutputTabControl.TabIndex = 0;
//
// RenderLogTabPage
//
this.RenderLogTabPage.Controls.Add(this.RenderLogBox);
this.RenderLogTabPage.Location = new System.Drawing.Point(8, 39);
this.RenderLogTabPage.Location = new System.Drawing.Point(4, 20);
this.RenderLogTabPage.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.RenderLogTabPage.Name = "RenderLogTabPage";
this.RenderLogTabPage.Padding = new System.Windows.Forms.Padding(3);
this.RenderLogTabPage.Size = new System.Drawing.Size(1552, 166);
this.RenderLogTabPage.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.RenderLogTabPage.Size = new System.Drawing.Size(776, 86);
this.RenderLogTabPage.TabIndex = 0;
this.RenderLogTabPage.Text = "Render Log";
this.RenderLogTabPage.UseVisualStyleBackColor = true;
@ -769,36 +784,40 @@ namespace MainNs
// RenderLogBox
//
this.RenderLogBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.RenderLogBox.Location = new System.Drawing.Point(3, 3);
this.RenderLogBox.Location = new System.Drawing.Point(2, 2);
this.RenderLogBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.RenderLogBox.Multiline = true;
this.RenderLogBox.Name = "RenderLogBox";
this.RenderLogBox.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.RenderLogBox.Size = new System.Drawing.Size(1546, 160);
this.RenderLogBox.Size = new System.Drawing.Size(772, 82);
this.RenderLogBox.TabIndex = 0;
this.RenderLogBox.WordWrap = false;
//
// PrintAllPassesBox
// toolsToolStripMenuItem
//
this.PrintAllPassesBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.PrintAllPassesBox.AutoSize = true;
this.PrintAllPassesBox.Location = new System.Drawing.Point(14, 805);
this.PrintAllPassesBox.Margin = new System.Windows.Forms.Padding(6);
this.PrintAllPassesBox.Name = "PrintAllPassesBox";
this.PrintAllPassesBox.Size = new System.Drawing.Size(191, 29);
this.PrintAllPassesBox.TabIndex = 10;
this.PrintAllPassesBox.Text = "Print all passes";
this.PrintAllPassesBox.UseVisualStyleBackColor = true;
this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.optionsToolStripMenuItem});
this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
this.toolsToolStripMenuItem.Size = new System.Drawing.Size(47, 22);
this.toolsToolStripMenuItem.Text = "&Tools";
//
// optionsToolStripMenuItem
//
this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
this.optionsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.optionsToolStripMenuItem.Text = "&Options...";
this.optionsToolStripMenuItem.Click += new System.EventHandler(this.optionsToolStripMenuItem_Click);
//
// EditorForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(12F, 25F);
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1568, 1079);
this.ClientSize = new System.Drawing.Size(784, 548);
this.Controls.Add(this.TopSplitContainer);
this.Controls.Add(this.TheStatusStrip);
this.Controls.Add(this.TheMenuStrip);
this.MainMenuStrip = this.TheMenuStrip;
this.Margin = new System.Windows.Forms.Padding(4);
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "EditorForm";
this.Text = "DirectX Compiler Editor";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.EditorForm_FormClosing);
@ -901,5 +920,7 @@ namespace MainNs
private System.Windows.Forms.ToolStripMenuItem FontGrowToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem FontShrinkToolStripMenuItem;
private System.Windows.Forms.CheckBox PrintAllPassesBox;
private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem optionsToolStripMenuItem;
}
}

Просмотреть файл

@ -35,6 +35,7 @@ namespace MainNs
private string docFileName;
private DocumentKind documentKind;
private MRUManager mruManager;
private SettingsManager settingsManager;
private Action pendingASTDump;
private FindDialog findDialog;
private TabPage errorListTabPage;
@ -1248,7 +1249,7 @@ namespace MainNs
try
{
HlslFileVariables fileVars = HlslFileVariables.FromText(this.CodeBox.Text);
args = fileVars.Arguments.ToList();
args = fileVars.Arguments.Where(a => !String.IsNullOrWhiteSpace(a)).ToList();
}
catch(Exception)
{
@ -1359,17 +1360,37 @@ namespace MainNs
}
}
private static IEnumerable<TextSection> EnumerateSections(string separator, string text)
private static bool ClosestMatch(string text, ref int start, string[] separators, out string separator)
{
int closest = -1;
separator = null;
for (int i = 0; i < separators.Length; ++i)
{
int idx = text.IndexOf(separators[i], start);
if (idx >= 0 && (closest < 0 || idx < closest))
{
closest = idx;
separator = separators[i];
}
}
start = closest;
return closest >= 0;
}
private static IEnumerable<TextSection> EnumerateSections(string[] separators, string text)
{
string prior = null;
int idx = text.IndexOf(separator);
while (idx >= 0)
string separator;
int idx = 0;
while (idx >= 0 && ClosestMatch(text, ref idx, separators, out separator))
{
int lineEnd = text.IndexOf('\n', idx);
if (lineEnd < 0) break;
string title = text.Substring(idx + separator.Length, lineEnd - (idx + separator.Length));
title = title.Trim();
int next = text.IndexOf(separator, lineEnd);
int next = lineEnd;
if (!ClosestMatch(text, ref next, separators, out separator))
next = -1;
string sectionText = (next < 0) ? text.Substring(lineEnd + 1) : text.Substring(lineEnd + 1, next - (lineEnd + 1));
sectionText = sectionText.Trim();
if (sectionText == prior)
@ -1441,7 +1462,7 @@ namespace MainNs
RadioButton rightButton = new RadioButton() { Text = "Right Only", Left = diffButton.Right };
Panel optionsPanel = new Panel() { Dock = DockStyle.Top, Height = diffButton.Bottom };
optionsPanel.Controls.AddRange(new Control[] { leftButton, diffButton, rightButton } );
var sections = EnumerateSections("MODULE-PRINT", resultText).ToArray();
var sections = EnumerateSections(new string[] { "MODULE-PRINT", "Phase:" }, resultText).ToArray();
TextSection last = null;
foreach (var s in sections)
{
@ -2416,6 +2437,9 @@ namespace MainNs
{
this.mruManager = new MRUManager();
this.mruManager.LoadFromFile();
this.settingsManager = new SettingsManager();
this.settingsManager.LoadFromFile();
this.CheckSettingsForDxcLibrary();
}
private void RefreshMRUMenu(MRUManager mru, ToolStripMenuItem parent)
@ -2766,6 +2790,38 @@ namespace MainNs
if (target == null) return;
target.Font = new Font(target.Font.FontFamily, target.Font.Size / 1.1f);
}
private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
{
Form form = new Form();
PropertyGrid grid = new PropertyGrid();
grid.SelectedObject = this.settingsManager;
grid.Dock = DockStyle.Fill;
form.Controls.Add(grid);
form.FormClosing += (_, __) =>
{
this.settingsManager.SaveToFile();
this.CheckSettingsForDxcLibrary();
};
form.ShowDialog(this);
}
private void CheckSettingsForDxcLibrary()
{
if (!String.IsNullOrWhiteSpace(this.settingsManager.ExternalLib))
{
try
{
HlslDxcLib.DxcCreateInstanceFn = HlslDxcLib.LoadDxcCreateInstance(
this.settingsManager.ExternalLib,
this.settingsManager.ExternalFunction);
}
catch (Exception e)
{
HandleException(e);
}
}
}
}
public static class RichTextBoxExt

Просмотреть файл

@ -15,6 +15,8 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
namespace MainNs
{
@ -201,4 +203,105 @@ namespace MainNs
#endregion Public methods.
}
class SettingsManager
{
#region Private fields.
private XDocument doc = new XDocument();
#endregion Private fields.
#region Constructors.
public SettingsManager()
{
this.doc = new XDocument(new XElement("settings"));
this.SettingsPath =
System.IO.Path.Combine(
System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData),
"dndxc",
"settings.xml");
}
#endregion Constructors.
#region Public properties.
internal string SettingsPath { get; set; }
[Description("The name of an external DLL implementing the compiler.")]
public string ExternalLib
{
get { return this.GetPathTextOrDefault("", "external", "lib"); }
set { this.SetPathText(value, "external", "lib"); }
}
[Description("The name of the factory function export on the external DLL implementing the compiler.")]
public string ExternalFunction
{
get { return this.GetPathTextOrDefault("", "external", "fun"); }
set { this.SetPathText(value, "external", "fun"); }
}
#endregion Public properties.
#region Public methods.
public void LoadFromFile()
{
this.LoadFromFile(this.SettingsPath);
}
public void LoadFromFile(string path)
{
if (!System.IO.File.Exists(path))
return;
this.doc = XDocument.Load(path);
}
public void SaveToFile()
{
this.SaveToFile(this.SettingsPath);
}
public void SaveToFile(string path)
{
string dirName = System.IO.Path.GetDirectoryName(path);
if (!System.IO.Directory.Exists(dirName))
System.IO.Directory.CreateDirectory(dirName);
this.doc.Save(path);
}
#endregion Public methods.
#region Private methods.
private string GetPathTextOrDefault(string defaultValue, params string[] paths)
{
var element = this.doc.Root;
foreach (string path in paths)
{
element = element.Element(XName.Get(path));
if (element == null) return defaultValue;
}
return element.Value;
}
private void SetPathText(string value, params string[] paths)
{
var element = this.doc.Root;
foreach (string path in paths)
{
var next = element.Element(XName.Get(path));
if (next == null)
{
next = new XElement(XName.Get(path));
element.Add(next);
}
element = next;
}
element.Value = value;
}
#endregion Private methods.
}
}

Просмотреть файл

@ -50,6 +50,7 @@
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Compile Include="${DOS_STYLE_SOURCE_DIR}\AsmColorizer.cs" />