LuaWriterColorConfig. Added a panel to color Normal Text, also to put it bold.
LuaWriter. Added menu item that colors the background of the textbox. Added all the variables into Config.cs
This commit is contained in:
parent
a7b847dbe2
commit
087947273c
|
@ -553,7 +553,9 @@ namespace BizHawk.MultiClient
|
|||
|
||||
//LuaWriter Settings
|
||||
public int LuaDefaultTextColor = -16777216;
|
||||
|
||||
public bool LuaDefaultTextBold = false;
|
||||
public int LuaWriterBackColor = -1;
|
||||
|
||||
public int LuaKeyWordColor = -16776961;
|
||||
public bool LuaKeyWordBold = false;
|
||||
public int LuaCommentColor = -16744448;
|
||||
|
|
|
@ -28,105 +28,106 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LuaWriter));
|
||||
this.timer = new System.Windows.Forms.Timer(this.components);
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.redoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.cutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.replaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.goToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.configToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fontToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.syntaxHighlightingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.startWithEmptyScriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.restoreSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.MessageLabel = new System.Windows.Forms.Label();
|
||||
this.AutoCompleteView = new System.Windows.Forms.ListView();
|
||||
this.PositionLabel = new System.Windows.Forms.Label();
|
||||
this.ZoomLabel = new System.Windows.Forms.Label();
|
||||
this.LuaText = new BizHawk.MultiClient.LuaWriterBox();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// timer
|
||||
//
|
||||
this.timer.Enabled = true;
|
||||
this.timer.Interval = 1000;
|
||||
this.timer.Tick += new System.EventHandler(this.timer_Tick);
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LuaWriter));
|
||||
this.timer = new System.Windows.Forms.Timer(this.components);
|
||||
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
|
||||
this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.redoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.cutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.pasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.selectAllToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator4 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.searchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.replaceToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.goToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.configToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.fontToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.syntaxHighlightingToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.startWithEmptyScriptToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.restoreSettingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.MessageLabel = new System.Windows.Forms.Label();
|
||||
this.AutoCompleteView = new System.Windows.Forms.ListView();
|
||||
this.PositionLabel = new System.Windows.Forms.Label();
|
||||
this.ZoomLabel = new System.Windows.Forms.Label();
|
||||
this.LuaText = new BizHawk.MultiClient.LuaWriterBox();
|
||||
this.backgroundColorToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// timer
|
||||
//
|
||||
this.timer.Enabled = true;
|
||||
this.timer.Interval = 1000;
|
||||
this.timer.Tick += new System.EventHandler(this.timer_Tick);
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fileToolStripMenuItem,
|
||||
this.editToolStripMenuItem,
|
||||
this.configToolStripMenuItem});
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(474, 24);
|
||||
this.menuStrip1.TabIndex = 1;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
|
||||
this.menuStrip1.Name = "menuStrip1";
|
||||
this.menuStrip1.Size = new System.Drawing.Size(474, 24);
|
||||
this.menuStrip1.TabIndex = 1;
|
||||
this.menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// fileToolStripMenuItem
|
||||
//
|
||||
this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.saveToolStripMenuItem,
|
||||
this.saveAsToolStripMenuItem,
|
||||
this.toolStripSeparator1,
|
||||
this.exitToolStripMenuItem});
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
this.saveToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.SaveAs;
|
||||
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(195, 22);
|
||||
this.saveToolStripMenuItem.Text = "&Save";
|
||||
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
|
||||
//
|
||||
// saveAsToolStripMenuItem
|
||||
//
|
||||
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
|
||||
this.saveAsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
||||
this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
|
||||
this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20);
|
||||
this.fileToolStripMenuItem.Text = "&File";
|
||||
//
|
||||
// saveToolStripMenuItem
|
||||
//
|
||||
this.saveToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.SaveAs;
|
||||
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(195, 22);
|
||||
this.saveToolStripMenuItem.Text = "&Save";
|
||||
this.saveToolStripMenuItem.Click += new System.EventHandler(this.saveToolStripMenuItem_Click);
|
||||
//
|
||||
// saveAsToolStripMenuItem
|
||||
//
|
||||
this.saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
|
||||
this.saveAsToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift)
|
||||
| System.Windows.Forms.Keys.S)));
|
||||
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(195, 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(192, 6);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.ShortcutKeyDisplayString = "Alt+F4";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.exitToolStripMenuItem.Text = "E&xit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// editToolStripMenuItem
|
||||
//
|
||||
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.saveAsToolStripMenuItem.Size = new System.Drawing.Size(195, 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(192, 6);
|
||||
//
|
||||
// exitToolStripMenuItem
|
||||
//
|
||||
this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
|
||||
this.exitToolStripMenuItem.ShortcutKeyDisplayString = "Alt+F4";
|
||||
this.exitToolStripMenuItem.Size = new System.Drawing.Size(195, 22);
|
||||
this.exitToolStripMenuItem.Text = "E&xit";
|
||||
this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
|
||||
//
|
||||
// editToolStripMenuItem
|
||||
//
|
||||
this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.undoToolStripMenuItem,
|
||||
this.redoToolStripMenuItem,
|
||||
this.toolStripSeparator2,
|
||||
|
@ -139,231 +140,239 @@
|
|||
this.searchToolStripMenuItem,
|
||||
this.replaceToolStripMenuItem,
|
||||
this.goToToolStripMenuItem});
|
||||
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
|
||||
this.editToolStripMenuItem.Text = "Edit";
|
||||
//
|
||||
// undoToolStripMenuItem
|
||||
//
|
||||
this.undoToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.undo;
|
||||
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(164, 22);
|
||||
this.undoToolStripMenuItem.Text = "Undo";
|
||||
this.undoToolStripMenuItem.Click += new System.EventHandler(this.undoToolStripMenuItem_Click);
|
||||
//
|
||||
// redoToolStripMenuItem
|
||||
//
|
||||
this.redoToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.redo;
|
||||
this.redoToolStripMenuItem.Name = "redoToolStripMenuItem";
|
||||
this.redoToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y)));
|
||||
this.redoToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
|
||||
this.redoToolStripMenuItem.Text = "Redo";
|
||||
this.redoToolStripMenuItem.Click += new System.EventHandler(this.redoToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(161, 6);
|
||||
//
|
||||
// cutToolStripMenuItem
|
||||
//
|
||||
this.cutToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.CutHS;
|
||||
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(164, 22);
|
||||
this.cutToolStripMenuItem.Text = "Cut";
|
||||
this.cutToolStripMenuItem.Click += new System.EventHandler(this.cutToolStripMenuItem_Click);
|
||||
//
|
||||
// copyToolStripMenuItem
|
||||
//
|
||||
this.copyToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Duplicate;
|
||||
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(164, 22);
|
||||
this.copyToolStripMenuItem.Text = "Copy";
|
||||
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
|
||||
//
|
||||
// pasteToolStripMenuItem
|
||||
//
|
||||
this.pasteToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Paste;
|
||||
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(164, 22);
|
||||
this.pasteToolStripMenuItem.Text = "Paste";
|
||||
this.pasteToolStripMenuItem.Click += new System.EventHandler(this.pasteToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.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(164, 22);
|
||||
this.selectAllToolStripMenuItem.Text = "Select All";
|
||||
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(161, 6);
|
||||
//
|
||||
// searchToolStripMenuItem
|
||||
//
|
||||
this.searchToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.FindHS;
|
||||
this.searchToolStripMenuItem.Name = "searchToolStripMenuItem";
|
||||
this.searchToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
|
||||
this.searchToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
|
||||
this.searchToolStripMenuItem.Text = "Search";
|
||||
//
|
||||
// replaceToolStripMenuItem
|
||||
//
|
||||
this.replaceToolStripMenuItem.Name = "replaceToolStripMenuItem";
|
||||
this.replaceToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.H)));
|
||||
this.replaceToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
|
||||
this.replaceToolStripMenuItem.Text = "Replace";
|
||||
//
|
||||
// goToToolStripMenuItem
|
||||
//
|
||||
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(164, 22);
|
||||
this.goToToolStripMenuItem.Text = "Go to...";
|
||||
this.goToToolStripMenuItem.Click += new System.EventHandler(this.goToToolStripMenuItem_Click);
|
||||
//
|
||||
// configToolStripMenuItem
|
||||
//
|
||||
this.configToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.editToolStripMenuItem.Name = "editToolStripMenuItem";
|
||||
this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20);
|
||||
this.editToolStripMenuItem.Text = "Edit";
|
||||
//
|
||||
// undoToolStripMenuItem
|
||||
//
|
||||
this.undoToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.undo;
|
||||
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(164, 22);
|
||||
this.undoToolStripMenuItem.Text = "Undo";
|
||||
this.undoToolStripMenuItem.Click += new System.EventHandler(this.undoToolStripMenuItem_Click);
|
||||
//
|
||||
// redoToolStripMenuItem
|
||||
//
|
||||
this.redoToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.redo;
|
||||
this.redoToolStripMenuItem.Name = "redoToolStripMenuItem";
|
||||
this.redoToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Y)));
|
||||
this.redoToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
|
||||
this.redoToolStripMenuItem.Text = "Redo";
|
||||
this.redoToolStripMenuItem.Click += new System.EventHandler(this.redoToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator2
|
||||
//
|
||||
this.toolStripSeparator2.Name = "toolStripSeparator2";
|
||||
this.toolStripSeparator2.Size = new System.Drawing.Size(161, 6);
|
||||
//
|
||||
// cutToolStripMenuItem
|
||||
//
|
||||
this.cutToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.CutHS;
|
||||
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(164, 22);
|
||||
this.cutToolStripMenuItem.Text = "Cut";
|
||||
this.cutToolStripMenuItem.Click += new System.EventHandler(this.cutToolStripMenuItem_Click);
|
||||
//
|
||||
// copyToolStripMenuItem
|
||||
//
|
||||
this.copyToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Duplicate;
|
||||
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(164, 22);
|
||||
this.copyToolStripMenuItem.Text = "Copy";
|
||||
this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click);
|
||||
//
|
||||
// pasteToolStripMenuItem
|
||||
//
|
||||
this.pasteToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.Paste;
|
||||
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(164, 22);
|
||||
this.pasteToolStripMenuItem.Text = "Paste";
|
||||
this.pasteToolStripMenuItem.Click += new System.EventHandler(this.pasteToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator3
|
||||
//
|
||||
this.toolStripSeparator3.Name = "toolStripSeparator3";
|
||||
this.toolStripSeparator3.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(164, 22);
|
||||
this.selectAllToolStripMenuItem.Text = "Select All";
|
||||
this.selectAllToolStripMenuItem.Click += new System.EventHandler(this.selectAllToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator4
|
||||
//
|
||||
this.toolStripSeparator4.Name = "toolStripSeparator4";
|
||||
this.toolStripSeparator4.Size = new System.Drawing.Size(161, 6);
|
||||
//
|
||||
// searchToolStripMenuItem
|
||||
//
|
||||
this.searchToolStripMenuItem.Image = global::BizHawk.MultiClient.Properties.Resources.FindHS;
|
||||
this.searchToolStripMenuItem.Name = "searchToolStripMenuItem";
|
||||
this.searchToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
|
||||
this.searchToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
|
||||
this.searchToolStripMenuItem.Text = "Search";
|
||||
//
|
||||
// replaceToolStripMenuItem
|
||||
//
|
||||
this.replaceToolStripMenuItem.Name = "replaceToolStripMenuItem";
|
||||
this.replaceToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.H)));
|
||||
this.replaceToolStripMenuItem.Size = new System.Drawing.Size(164, 22);
|
||||
this.replaceToolStripMenuItem.Text = "Replace";
|
||||
//
|
||||
// goToToolStripMenuItem
|
||||
//
|
||||
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(164, 22);
|
||||
this.goToToolStripMenuItem.Text = "Go to...";
|
||||
this.goToToolStripMenuItem.Click += new System.EventHandler(this.goToToolStripMenuItem_Click);
|
||||
//
|
||||
// configToolStripMenuItem
|
||||
//
|
||||
this.configToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.fontToolStripMenuItem,
|
||||
this.syntaxHighlightingToolStripMenuItem,
|
||||
this.backgroundColorToolStripMenuItem,
|
||||
this.toolStripSeparator5,
|
||||
this.startWithEmptyScriptToolStripMenuItem,
|
||||
this.restoreSettingsToolStripMenuItem});
|
||||
this.configToolStripMenuItem.Name = "configToolStripMenuItem";
|
||||
this.configToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
|
||||
this.configToolStripMenuItem.Text = "&Config";
|
||||
//
|
||||
// fontToolStripMenuItem
|
||||
//
|
||||
this.fontToolStripMenuItem.Name = "fontToolStripMenuItem";
|
||||
this.fontToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
||||
this.fontToolStripMenuItem.Text = "&Font";
|
||||
this.fontToolStripMenuItem.Click += new System.EventHandler(this.fontToolStripMenuItem_Click);
|
||||
//
|
||||
// syntaxHighlightingToolStripMenuItem
|
||||
//
|
||||
this.syntaxHighlightingToolStripMenuItem.Name = "syntaxHighlightingToolStripMenuItem";
|
||||
this.syntaxHighlightingToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
||||
this.syntaxHighlightingToolStripMenuItem.Text = "&Syntax Highlighting";
|
||||
this.syntaxHighlightingToolStripMenuItem.Click += new System.EventHandler(this.syntaxHighlightingToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator5
|
||||
//
|
||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||
this.toolStripSeparator5.Size = new System.Drawing.Size(193, 6);
|
||||
//
|
||||
// startWithEmptyScriptToolStripMenuItem
|
||||
//
|
||||
this.startWithEmptyScriptToolStripMenuItem.Name = "startWithEmptyScriptToolStripMenuItem";
|
||||
this.startWithEmptyScriptToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
||||
this.startWithEmptyScriptToolStripMenuItem.Text = "Start With Empty Script";
|
||||
this.startWithEmptyScriptToolStripMenuItem.Click += new System.EventHandler(this.startWithEmptyScriptToolStripMenuItem_Click);
|
||||
//
|
||||
// restoreSettingsToolStripMenuItem
|
||||
//
|
||||
this.restoreSettingsToolStripMenuItem.Name = "restoreSettingsToolStripMenuItem";
|
||||
this.restoreSettingsToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
||||
this.restoreSettingsToolStripMenuItem.Text = "Restore Settings";
|
||||
this.restoreSettingsToolStripMenuItem.Click += new System.EventHandler(this.restoreSettingsToolStripMenuItem_Click);
|
||||
//
|
||||
// MessageLabel
|
||||
//
|
||||
this.MessageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.MessageLabel.AutoSize = true;
|
||||
this.MessageLabel.Location = new System.Drawing.Point(15, 424);
|
||||
this.MessageLabel.Name = "MessageLabel";
|
||||
this.MessageLabel.Size = new System.Drawing.Size(91, 13);
|
||||
this.MessageLabel.TabIndex = 2;
|
||||
this.MessageLabel.Text = " ";
|
||||
//
|
||||
// AutoCompleteView
|
||||
//
|
||||
this.AutoCompleteView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.AutoCompleteView.FullRowSelect = true;
|
||||
this.AutoCompleteView.Location = new System.Drawing.Point(324, 322);
|
||||
this.AutoCompleteView.Name = "AutoCompleteView";
|
||||
this.AutoCompleteView.Size = new System.Drawing.Size(121, 97);
|
||||
this.AutoCompleteView.TabIndex = 3;
|
||||
this.AutoCompleteView.UseCompatibleStateImageBehavior = false;
|
||||
this.AutoCompleteView.View = System.Windows.Forms.View.List;
|
||||
this.AutoCompleteView.Visible = false;
|
||||
this.AutoCompleteView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.AutoCompleteView_MouseDoubleClick);
|
||||
//
|
||||
// PositionLabel
|
||||
//
|
||||
this.PositionLabel.AutoSize = true;
|
||||
this.PositionLabel.Location = new System.Drawing.Point(14, 30);
|
||||
this.PositionLabel.Name = "PositionLabel";
|
||||
this.PositionLabel.Size = new System.Drawing.Size(46, 13);
|
||||
this.PositionLabel.TabIndex = 4;
|
||||
this.PositionLabel.Text = " ";
|
||||
//
|
||||
// ZoomLabel
|
||||
//
|
||||
this.ZoomLabel.AutoSize = true;
|
||||
this.ZoomLabel.Location = new System.Drawing.Point(393, 30);
|
||||
this.ZoomLabel.Name = "ZoomLabel";
|
||||
this.ZoomLabel.Size = new System.Drawing.Size(66, 13);
|
||||
this.ZoomLabel.TabIndex = 5;
|
||||
this.ZoomLabel.Text = "Zoom: 100%";
|
||||
//
|
||||
// LuaText
|
||||
//
|
||||
this.LuaText.AcceptsTab = true;
|
||||
this.LuaText.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
this.configToolStripMenuItem.Name = "configToolStripMenuItem";
|
||||
this.configToolStripMenuItem.Size = new System.Drawing.Size(55, 20);
|
||||
this.configToolStripMenuItem.Text = "&Config";
|
||||
//
|
||||
// fontToolStripMenuItem
|
||||
//
|
||||
this.fontToolStripMenuItem.Name = "fontToolStripMenuItem";
|
||||
this.fontToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
||||
this.fontToolStripMenuItem.Text = "&Font";
|
||||
this.fontToolStripMenuItem.Click += new System.EventHandler(this.fontToolStripMenuItem_Click);
|
||||
//
|
||||
// syntaxHighlightingToolStripMenuItem
|
||||
//
|
||||
this.syntaxHighlightingToolStripMenuItem.Name = "syntaxHighlightingToolStripMenuItem";
|
||||
this.syntaxHighlightingToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
||||
this.syntaxHighlightingToolStripMenuItem.Text = "&Syntax Highlighting";
|
||||
this.syntaxHighlightingToolStripMenuItem.Click += new System.EventHandler(this.syntaxHighlightingToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator5
|
||||
//
|
||||
this.toolStripSeparator5.Name = "toolStripSeparator5";
|
||||
this.toolStripSeparator5.Size = new System.Drawing.Size(193, 6);
|
||||
//
|
||||
// startWithEmptyScriptToolStripMenuItem
|
||||
//
|
||||
this.startWithEmptyScriptToolStripMenuItem.Name = "startWithEmptyScriptToolStripMenuItem";
|
||||
this.startWithEmptyScriptToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
||||
this.startWithEmptyScriptToolStripMenuItem.Text = "Start With Empty Script";
|
||||
this.startWithEmptyScriptToolStripMenuItem.Click += new System.EventHandler(this.startWithEmptyScriptToolStripMenuItem_Click);
|
||||
//
|
||||
// restoreSettingsToolStripMenuItem
|
||||
//
|
||||
this.restoreSettingsToolStripMenuItem.Name = "restoreSettingsToolStripMenuItem";
|
||||
this.restoreSettingsToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
||||
this.restoreSettingsToolStripMenuItem.Text = "Restore Settings";
|
||||
this.restoreSettingsToolStripMenuItem.Click += new System.EventHandler(this.restoreSettingsToolStripMenuItem_Click);
|
||||
//
|
||||
// MessageLabel
|
||||
//
|
||||
this.MessageLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.MessageLabel.AutoSize = true;
|
||||
this.MessageLabel.Location = new System.Drawing.Point(15, 424);
|
||||
this.MessageLabel.Name = "MessageLabel";
|
||||
this.MessageLabel.Size = new System.Drawing.Size(91, 13);
|
||||
this.MessageLabel.TabIndex = 2;
|
||||
this.MessageLabel.Text = " ";
|
||||
//
|
||||
// AutoCompleteView
|
||||
//
|
||||
this.AutoCompleteView.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.AutoCompleteView.FullRowSelect = true;
|
||||
this.AutoCompleteView.Location = new System.Drawing.Point(324, 322);
|
||||
this.AutoCompleteView.Name = "AutoCompleteView";
|
||||
this.AutoCompleteView.Size = new System.Drawing.Size(121, 97);
|
||||
this.AutoCompleteView.TabIndex = 3;
|
||||
this.AutoCompleteView.UseCompatibleStateImageBehavior = false;
|
||||
this.AutoCompleteView.View = System.Windows.Forms.View.List;
|
||||
this.AutoCompleteView.Visible = false;
|
||||
this.AutoCompleteView.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.AutoCompleteView_MouseDoubleClick);
|
||||
//
|
||||
// PositionLabel
|
||||
//
|
||||
this.PositionLabel.AutoSize = true;
|
||||
this.PositionLabel.Location = new System.Drawing.Point(14, 30);
|
||||
this.PositionLabel.Name = "PositionLabel";
|
||||
this.PositionLabel.Size = new System.Drawing.Size(46, 13);
|
||||
this.PositionLabel.TabIndex = 4;
|
||||
this.PositionLabel.Text = " ";
|
||||
//
|
||||
// ZoomLabel
|
||||
//
|
||||
this.ZoomLabel.AutoSize = true;
|
||||
this.ZoomLabel.Location = new System.Drawing.Point(393, 30);
|
||||
this.ZoomLabel.Name = "ZoomLabel";
|
||||
this.ZoomLabel.Size = new System.Drawing.Size(66, 13);
|
||||
this.ZoomLabel.TabIndex = 5;
|
||||
this.ZoomLabel.Text = "Zoom: 100%";
|
||||
//
|
||||
// LuaText
|
||||
//
|
||||
this.LuaText.AcceptsTab = true;
|
||||
this.LuaText.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.LuaText.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.LuaText.EnableAutoDragDrop = true;
|
||||
this.LuaText.Location = new System.Drawing.Point(15, 50);
|
||||
this.LuaText.Name = "LuaText";
|
||||
this.LuaText.Size = new System.Drawing.Size(444, 369);
|
||||
this.LuaText.TabIndex = 0;
|
||||
this.LuaText.Text = "";
|
||||
this.LuaText.WordWrap = false;
|
||||
this.LuaText.SelectionChanged += new System.EventHandler(this.LuaText_SelectionChanged);
|
||||
this.LuaText.TextChanged += new System.EventHandler(this.LuaText_TextChanged);
|
||||
this.LuaText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.LuaText_KeyDown);
|
||||
this.LuaText.KeyUp += new System.Windows.Forms.KeyEventHandler(this.LuaText_KeyUp);
|
||||
this.LuaText.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.LuaText_PreviewKeyDown);
|
||||
//
|
||||
// LuaWriter
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(474, 441);
|
||||
this.Controls.Add(this.AutoCompleteView);
|
||||
this.Controls.Add(this.ZoomLabel);
|
||||
this.Controls.Add(this.PositionLabel);
|
||||
this.Controls.Add(this.MessageLabel);
|
||||
this.Controls.Add(this.LuaText);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "LuaWriter";
|
||||
this.Text = "LuaWriter";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LuaWriter_FormClosing);
|
||||
this.Load += new System.EventHandler(this.LuaWriter_Load);
|
||||
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.LuaWriter_DragDrop);
|
||||
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.LuaWriter_DragEnter);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
this.LuaText.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.LuaText.EnableAutoDragDrop = true;
|
||||
this.LuaText.Location = new System.Drawing.Point(15, 50);
|
||||
this.LuaText.Name = "LuaText";
|
||||
this.LuaText.Size = new System.Drawing.Size(444, 369);
|
||||
this.LuaText.TabIndex = 0;
|
||||
this.LuaText.Text = "";
|
||||
this.LuaText.WordWrap = false;
|
||||
this.LuaText.SelectionChanged += new System.EventHandler(this.LuaText_SelectionChanged);
|
||||
this.LuaText.TextChanged += new System.EventHandler(this.LuaText_TextChanged);
|
||||
this.LuaText.KeyDown += new System.Windows.Forms.KeyEventHandler(this.LuaText_KeyDown);
|
||||
this.LuaText.KeyUp += new System.Windows.Forms.KeyEventHandler(this.LuaText_KeyUp);
|
||||
this.LuaText.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.LuaText_PreviewKeyDown);
|
||||
//
|
||||
// backgroundColorToolStripMenuItem
|
||||
//
|
||||
this.backgroundColorToolStripMenuItem.Name = "backgroundColorToolStripMenuItem";
|
||||
this.backgroundColorToolStripMenuItem.Size = new System.Drawing.Size(196, 22);
|
||||
this.backgroundColorToolStripMenuItem.Text = "Background Color";
|
||||
this.backgroundColorToolStripMenuItem.Click += new System.EventHandler(this.backgroundColorToolStripMenuItem_Click);
|
||||
//
|
||||
// LuaWriter
|
||||
//
|
||||
this.AllowDrop = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(474, 441);
|
||||
this.Controls.Add(this.AutoCompleteView);
|
||||
this.Controls.Add(this.ZoomLabel);
|
||||
this.Controls.Add(this.PositionLabel);
|
||||
this.Controls.Add(this.MessageLabel);
|
||||
this.Controls.Add(this.LuaText);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "LuaWriter";
|
||||
this.Text = "LuaWriter";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LuaWriter_FormClosing);
|
||||
this.Load += new System.EventHandler(this.LuaWriter_Load);
|
||||
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.LuaWriter_DragDrop);
|
||||
this.DragEnter += new System.Windows.Forms.DragEventHandler(this.LuaWriter_DragEnter);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
|
@ -400,5 +409,6 @@
|
|||
private System.Windows.Forms.ToolStripMenuItem goToToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem startWithEmptyScriptToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator5;
|
||||
private System.Windows.Forms.ToolStripMenuItem backgroundColorToolStripMenuItem;
|
||||
}
|
||||
}
|
|
@ -34,7 +34,7 @@ namespace BizHawk.MultiClient
|
|||
|
||||
bool changes = false;
|
||||
bool hasChanged = false;
|
||||
bool ProcessingText = false;
|
||||
bool ProcessingText;
|
||||
public Regex keyWords = new Regex("and|break|do|else|if|end|false|for|function|in|local|nil|not|or|repeat|return|then|true|until|while|elseif");
|
||||
char[] Symbols = { '+', '-', '*', '/', '%', '^', '#', '=', '<', '>', '(', ')', '{', '}', '[', ']', ';', ':', ',', '.' };
|
||||
public Regex libraryWords;
|
||||
|
@ -79,7 +79,10 @@ namespace BizHawk.MultiClient
|
|||
|
||||
LuaText.SelectAll();
|
||||
LuaText.SelectionColor = Color.FromArgb(Global.Config.LuaDefaultTextColor);
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Regular);
|
||||
if(Global.Config.LuaDefaultTextBold)
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Bold);
|
||||
else
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Regular);
|
||||
|
||||
ColorReservedWords();
|
||||
ColorLibraries();
|
||||
|
@ -122,6 +125,10 @@ namespace BizHawk.MultiClient
|
|||
|
||||
LuaText.Select(firstBracket, ending - firstBracket + 1);
|
||||
LuaText.SelectionColor = Color.FromArgb(Global.Config.LuaStringColor);
|
||||
if(Global.Config.LuaStringBold)
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Bold);
|
||||
else
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Regular);
|
||||
|
||||
if (ending < LuaText.Text.Length - 1)
|
||||
firstBracket = LuaText.Find("[", ending + 1, LuaText.Text.Length, RichTextBoxFinds.MatchCase);
|
||||
|
@ -180,6 +187,9 @@ namespace BizHawk.MultiClient
|
|||
LuaText.SelectionColor = Color.FromArgb(Global.Config.LuaSymbolColor);
|
||||
if (Global.Config.LuaSymbolBold)
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Bold);
|
||||
else
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Regular);
|
||||
|
||||
currPos = LuaText.SelectionStart + 1;
|
||||
|
||||
if (currPos == LuaText.Text.Length)
|
||||
|
@ -240,6 +250,9 @@ namespace BizHawk.MultiClient
|
|||
LuaText.SelectionColor = Color.FromArgb(Global.Config.LuaStringColor);
|
||||
if (Global.Config.LuaStringBold)
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Bold);
|
||||
else
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Regular);
|
||||
|
||||
if (ending >= LuaText.Text.Length)
|
||||
ending++;
|
||||
else
|
||||
|
@ -287,6 +300,8 @@ namespace BizHawk.MultiClient
|
|||
LuaText.SelectionColor = Color.FromArgb(Global.Config.LuaCommentColor);
|
||||
if (Global.Config.LuaCommentBold)
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Bold);
|
||||
else
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Regular);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -299,6 +314,8 @@ namespace BizHawk.MultiClient
|
|||
LuaText.SelectionColor = Color.FromArgb(Global.Config.LuaCommentColor);
|
||||
if (Global.Config.LuaCommentBold)
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Bold);
|
||||
else
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Regular);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -323,6 +340,8 @@ namespace BizHawk.MultiClient
|
|||
LuaText.SelectionColor = Color.FromArgb(Global.Config.LuaKeyWordColor);
|
||||
if (Global.Config.LuaKeyWordBold)
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Bold);
|
||||
else
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Regular);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -349,6 +368,8 @@ namespace BizHawk.MultiClient
|
|||
LuaText.SelectionColor = Color.FromArgb(Global.Config.LuaLibraryColor);
|
||||
if (Global.Config.LuaLibraryBold)
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Bold);
|
||||
else
|
||||
LuaText.SelectionFont = new Font(LuaText.SelectionFont, FontStyle.Regular);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -380,8 +401,10 @@ namespace BizHawk.MultiClient
|
|||
private void LuaWriter_Load(object sender, EventArgs e)
|
||||
{
|
||||
//LuaTextFont;
|
||||
ProcessingText = true;
|
||||
LuaText.SelectionTabs = new int[] { 20, 40, 60, 80, 100, 120, 140, 160, 180, 200, 220, 240, 260, 280, 300, 320, 340, 360, 380, 400, 420, 480, 500, 520, 540, 560, 580, 600 }; //adelikat: What a goofy way to have to do this
|
||||
LoadFont();
|
||||
LuaText.BackColor = Color.FromArgb(Global.Config.LuaWriterBackColor);
|
||||
LuaText.ZoomFactor = Global.Config.LuaWriterZoom;
|
||||
ZoomLabel.Text = string.Format("Zoom: {0}%", LuaText.ZoomFactor * 100);
|
||||
GenerateLibraryRegex();
|
||||
|
@ -419,8 +442,6 @@ namespace BizHawk.MultiClient
|
|||
StreamReader sr = new StreamReader(file.FullName);
|
||||
LuaText.Text = sr.ReadToEnd();
|
||||
sr.Close();
|
||||
|
||||
MessageLabel.Text = CurrentFile;
|
||||
}
|
||||
|
||||
private void LuaWriter_DragEnter(object sender, DragEventArgs e)
|
||||
|
@ -720,6 +741,7 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
Global.Config.LuaWriterZoom = LuaText.ZoomFactor;
|
||||
Global.Config.LuaWriterStartEmpty = startWithEmptyScriptToolStripMenuItem.Checked;
|
||||
Global.Config.LuaWriterBackColor = LuaText.BackColor.ToArgb();
|
||||
}
|
||||
|
||||
private void restoreSettingsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
@ -731,12 +753,16 @@ namespace BizHawk.MultiClient
|
|||
Global.Config.LuaSymbolColor = -16777216;
|
||||
Global.Config.LuaLibraryColor = -16711681;
|
||||
|
||||
Global.Config.LuaDefaultTextBold = false;
|
||||
Global.Config.LuaKeyWordBold = false;
|
||||
Global.Config.LuaCommentBold = false;
|
||||
Global.Config.LuaStringBold = false;
|
||||
Global.Config.LuaSymbolBold = false;
|
||||
Global.Config.LuaLibraryBold = false;
|
||||
|
||||
Global.Config.LuaWriterBackColor = -1;
|
||||
LuaText.BackColor = Color.FromArgb(-1);
|
||||
|
||||
Global.Config.LuaWriterStartEmpty = false;
|
||||
startWithEmptyScriptToolStripMenuItem.Checked = false;
|
||||
|
||||
|
@ -813,5 +839,14 @@ namespace BizHawk.MultiClient
|
|||
{
|
||||
startWithEmptyScriptToolStripMenuItem.Checked ^= true;
|
||||
}
|
||||
|
||||
private void backgroundColorToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
ColorDialog col = new ColorDialog();
|
||||
if (col.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
LuaText.BackColor = col.Color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -28,263 +28,298 @@
|
|||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.OK = new System.Windows.Forms.Button();
|
||||
this.Cancel = new System.Windows.Forms.Button();
|
||||
this.panelKeyWord = new System.Windows.Forms.Panel();
|
||||
this.lblKeyWords = new System.Windows.Forms.Label();
|
||||
this.lblComments = new System.Windows.Forms.Label();
|
||||
this.panelComment = new System.Windows.Forms.Panel();
|
||||
this.panelString = new System.Windows.Forms.Panel();
|
||||
this.lblStrings = new System.Windows.Forms.Label();
|
||||
this.panelSymbol = new System.Windows.Forms.Panel();
|
||||
this.lblSymbols = new System.Windows.Forms.Label();
|
||||
this.panelLibrary = new System.Windows.Forms.Panel();
|
||||
this.lblLibraries = new System.Windows.Forms.Label();
|
||||
this.KeyWordColorDialog = new System.Windows.Forms.ColorDialog();
|
||||
this.CommentColorDialog = new System.Windows.Forms.ColorDialog();
|
||||
this.StringColorDialog = new System.Windows.Forms.ColorDialog();
|
||||
this.SymbolColorDialog = new System.Windows.Forms.ColorDialog();
|
||||
this.LibraryColorDialog = new System.Windows.Forms.ColorDialog();
|
||||
this.buttonDefaults = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.BoldKeyWords = new System.Windows.Forms.CheckBox();
|
||||
this.BoldComments = new System.Windows.Forms.CheckBox();
|
||||
this.BoldStrings = new System.Windows.Forms.CheckBox();
|
||||
this.BoldSymbols = new System.Windows.Forms.CheckBox();
|
||||
this.BoldLibraries = new System.Windows.Forms.CheckBox();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// OK
|
||||
//
|
||||
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.OK.Location = new System.Drawing.Point(116, 227);
|
||||
this.OK.Name = "OK";
|
||||
this.OK.Size = new System.Drawing.Size(75, 23);
|
||||
this.OK.TabIndex = 10;
|
||||
this.OK.Text = "&OK";
|
||||
this.OK.UseVisualStyleBackColor = true;
|
||||
this.OK.Click += new System.EventHandler(this.OK_Click);
|
||||
//
|
||||
// Cancel
|
||||
//
|
||||
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.Cancel.Location = new System.Drawing.Point(197, 227);
|
||||
this.Cancel.Name = "Cancel";
|
||||
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.Cancel.TabIndex = 11;
|
||||
this.Cancel.Text = "&Cancel";
|
||||
this.Cancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// panelKeyWord
|
||||
//
|
||||
this.panelKeyWord.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.panelKeyWord.Location = new System.Drawing.Point(77, 12);
|
||||
this.panelKeyWord.Name = "panelKeyWord";
|
||||
this.panelKeyWord.Size = new System.Drawing.Size(20, 20);
|
||||
this.panelKeyWord.TabIndex = 1;
|
||||
this.panelKeyWord.DoubleClick += new System.EventHandler(this.panelKeyWord_DoubleClick);
|
||||
//
|
||||
// lblKeyWords
|
||||
//
|
||||
this.lblKeyWords.AutoSize = true;
|
||||
this.lblKeyWords.Location = new System.Drawing.Point(12, 19);
|
||||
this.lblKeyWords.Name = "lblKeyWords";
|
||||
this.lblKeyWords.Size = new System.Drawing.Size(59, 13);
|
||||
this.lblKeyWords.TabIndex = 0;
|
||||
this.lblKeyWords.Text = "Key Words";
|
||||
//
|
||||
// lblComments
|
||||
//
|
||||
this.lblComments.AutoSize = true;
|
||||
this.lblComments.Location = new System.Drawing.Point(15, 59);
|
||||
this.lblComments.Name = "lblComments";
|
||||
this.lblComments.Size = new System.Drawing.Size(56, 13);
|
||||
this.lblComments.TabIndex = 2;
|
||||
this.lblComments.Text = "Comments";
|
||||
//
|
||||
// panelComment
|
||||
//
|
||||
this.panelComment.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.panelComment.Location = new System.Drawing.Point(77, 52);
|
||||
this.panelComment.Name = "panelComment";
|
||||
this.panelComment.Size = new System.Drawing.Size(20, 20);
|
||||
this.panelComment.TabIndex = 3;
|
||||
this.panelComment.DoubleClick += new System.EventHandler(this.panelComment_DoubleClick);
|
||||
//
|
||||
// panelString
|
||||
//
|
||||
this.panelString.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.panelString.Location = new System.Drawing.Point(77, 92);
|
||||
this.panelString.Name = "panelString";
|
||||
this.panelString.Size = new System.Drawing.Size(20, 20);
|
||||
this.panelString.TabIndex = 5;
|
||||
this.panelString.DoubleClick += new System.EventHandler(this.panelString_DoubleClick);
|
||||
//
|
||||
// lblStrings
|
||||
//
|
||||
this.lblStrings.AutoSize = true;
|
||||
this.lblStrings.Location = new System.Drawing.Point(32, 99);
|
||||
this.lblStrings.Name = "lblStrings";
|
||||
this.lblStrings.Size = new System.Drawing.Size(39, 13);
|
||||
this.lblStrings.TabIndex = 4;
|
||||
this.lblStrings.Text = "Strings";
|
||||
//
|
||||
// panelSymbol
|
||||
//
|
||||
this.panelSymbol.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.panelSymbol.Location = new System.Drawing.Point(77, 132);
|
||||
this.panelSymbol.Name = "panelSymbol";
|
||||
this.panelSymbol.Size = new System.Drawing.Size(20, 20);
|
||||
this.panelSymbol.TabIndex = 7;
|
||||
this.panelSymbol.DoubleClick += new System.EventHandler(this.panelSymbol_DoubleClick);
|
||||
//
|
||||
// lblSymbols
|
||||
//
|
||||
this.lblSymbols.AutoSize = true;
|
||||
this.lblSymbols.Location = new System.Drawing.Point(25, 139);
|
||||
this.lblSymbols.Name = "lblSymbols";
|
||||
this.lblSymbols.Size = new System.Drawing.Size(46, 13);
|
||||
this.lblSymbols.TabIndex = 6;
|
||||
this.lblSymbols.Text = "Symbols";
|
||||
//
|
||||
// panelLibrary
|
||||
//
|
||||
this.panelLibrary.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.panelLibrary.Location = new System.Drawing.Point(77, 172);
|
||||
this.panelLibrary.Name = "panelLibrary";
|
||||
this.panelLibrary.Size = new System.Drawing.Size(20, 20);
|
||||
this.panelLibrary.TabIndex = 9;
|
||||
this.panelLibrary.DoubleClick += new System.EventHandler(this.panelLibrary_DoubleClick);
|
||||
//
|
||||
// lblLibraries
|
||||
//
|
||||
this.lblLibraries.AutoSize = true;
|
||||
this.lblLibraries.Location = new System.Drawing.Point(25, 179);
|
||||
this.lblLibraries.Name = "lblLibraries";
|
||||
this.lblLibraries.Size = new System.Drawing.Size(46, 13);
|
||||
this.lblLibraries.TabIndex = 8;
|
||||
this.lblLibraries.Text = "Libraries";
|
||||
//
|
||||
// KeyWordColorDialog
|
||||
//
|
||||
this.KeyWordColorDialog.Color = System.Drawing.Color.Blue;
|
||||
//
|
||||
// CommentColorDialog
|
||||
//
|
||||
this.CommentColorDialog.Color = System.Drawing.Color.Green;
|
||||
//
|
||||
// StringColorDialog
|
||||
//
|
||||
this.StringColorDialog.Color = System.Drawing.Color.Gray;
|
||||
//
|
||||
// LibraryColorDialog
|
||||
//
|
||||
this.LibraryColorDialog.Color = System.Drawing.Color.Cyan;
|
||||
//
|
||||
// buttonDefaults
|
||||
//
|
||||
this.buttonDefaults.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonDefaults.Location = new System.Drawing.Point(12, 227);
|
||||
this.buttonDefaults.Name = "buttonDefaults";
|
||||
this.buttonDefaults.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonDefaults.TabIndex = 12;
|
||||
this.buttonDefaults.Text = "&Deafults";
|
||||
this.buttonDefaults.UseVisualStyleBackColor = true;
|
||||
this.buttonDefaults.Click += new System.EventHandler(this.buttonDefaults_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.BoldLibraries);
|
||||
this.groupBox1.Controls.Add(this.BoldSymbols);
|
||||
this.groupBox1.Controls.Add(this.BoldStrings);
|
||||
this.groupBox1.Controls.Add(this.BoldComments);
|
||||
this.groupBox1.Controls.Add(this.BoldKeyWords);
|
||||
this.groupBox1.Controls.Add(this.panelKeyWord);
|
||||
this.groupBox1.Controls.Add(this.lblKeyWords);
|
||||
this.groupBox1.Controls.Add(this.panelLibrary);
|
||||
this.groupBox1.Controls.Add(this.lblComments);
|
||||
this.groupBox1.Controls.Add(this.lblLibraries);
|
||||
this.groupBox1.Controls.Add(this.panelComment);
|
||||
this.groupBox1.Controls.Add(this.panelSymbol);
|
||||
this.groupBox1.Controls.Add(this.lblStrings);
|
||||
this.groupBox1.Controls.Add(this.lblSymbols);
|
||||
this.groupBox1.Controls.Add(this.panelString);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(260, 202);
|
||||
this.groupBox1.TabIndex = 13;
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
// BoldKeyWords
|
||||
//
|
||||
this.BoldKeyWords.AutoSize = true;
|
||||
this.BoldKeyWords.Location = new System.Drawing.Point(132, 15);
|
||||
this.BoldKeyWords.Name = "BoldKeyWords";
|
||||
this.BoldKeyWords.Size = new System.Drawing.Size(47, 17);
|
||||
this.BoldKeyWords.TabIndex = 10;
|
||||
this.BoldKeyWords.Text = "Bold";
|
||||
this.BoldKeyWords.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// BoldComments
|
||||
//
|
||||
this.BoldComments.AutoSize = true;
|
||||
this.BoldComments.Location = new System.Drawing.Point(132, 55);
|
||||
this.BoldComments.Name = "BoldComments";
|
||||
this.BoldComments.Size = new System.Drawing.Size(47, 17);
|
||||
this.BoldComments.TabIndex = 11;
|
||||
this.BoldComments.Text = "Bold";
|
||||
this.BoldComments.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// BoldStrings
|
||||
//
|
||||
this.BoldStrings.AutoSize = true;
|
||||
this.BoldStrings.Location = new System.Drawing.Point(132, 95);
|
||||
this.BoldStrings.Name = "BoldStrings";
|
||||
this.BoldStrings.Size = new System.Drawing.Size(47, 17);
|
||||
this.BoldStrings.TabIndex = 12;
|
||||
this.BoldStrings.Text = "Bold";
|
||||
this.BoldStrings.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// BoldSymbols
|
||||
//
|
||||
this.BoldSymbols.AutoSize = true;
|
||||
this.BoldSymbols.Location = new System.Drawing.Point(132, 135);
|
||||
this.BoldSymbols.Name = "BoldSymbols";
|
||||
this.BoldSymbols.Size = new System.Drawing.Size(47, 17);
|
||||
this.BoldSymbols.TabIndex = 13;
|
||||
this.BoldSymbols.Text = "Bold";
|
||||
this.BoldSymbols.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// BoldLibraries
|
||||
//
|
||||
this.BoldLibraries.AutoSize = true;
|
||||
this.BoldLibraries.Location = new System.Drawing.Point(132, 175);
|
||||
this.BoldLibraries.Name = "BoldLibraries";
|
||||
this.BoldLibraries.Size = new System.Drawing.Size(47, 17);
|
||||
this.BoldLibraries.TabIndex = 14;
|
||||
this.BoldLibraries.Text = "Bold";
|
||||
this.BoldLibraries.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// LuaWriterColorConfig
|
||||
//
|
||||
this.AcceptButton = this.OK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.Cancel;
|
||||
this.ClientSize = new System.Drawing.Size(284, 262);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.buttonDefaults);
|
||||
this.Controls.Add(this.Cancel);
|
||||
this.Controls.Add(this.OK);
|
||||
this.Name = "LuaWriterColorConfig";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "Syntax Highlight Config";
|
||||
this.Load += new System.EventHandler(this.LuaWriterColorConfig_Load);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.OK = new System.Windows.Forms.Button();
|
||||
this.Cancel = new System.Windows.Forms.Button();
|
||||
this.panelKeyWord = new System.Windows.Forms.Panel();
|
||||
this.lblKeyWords = new System.Windows.Forms.Label();
|
||||
this.lblComments = new System.Windows.Forms.Label();
|
||||
this.panelComment = new System.Windows.Forms.Panel();
|
||||
this.panelString = new System.Windows.Forms.Panel();
|
||||
this.lblStrings = new System.Windows.Forms.Label();
|
||||
this.panelSymbol = new System.Windows.Forms.Panel();
|
||||
this.lblSymbols = new System.Windows.Forms.Label();
|
||||
this.panelLibrary = new System.Windows.Forms.Panel();
|
||||
this.lblLibraries = new System.Windows.Forms.Label();
|
||||
this.KeyWordColorDialog = new System.Windows.Forms.ColorDialog();
|
||||
this.CommentColorDialog = new System.Windows.Forms.ColorDialog();
|
||||
this.StringColorDialog = new System.Windows.Forms.ColorDialog();
|
||||
this.SymbolColorDialog = new System.Windows.Forms.ColorDialog();
|
||||
this.LibraryColorDialog = new System.Windows.Forms.ColorDialog();
|
||||
this.buttonDefaults = new System.Windows.Forms.Button();
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.BoldLibraries = new System.Windows.Forms.CheckBox();
|
||||
this.BoldSymbols = new System.Windows.Forms.CheckBox();
|
||||
this.BoldStrings = new System.Windows.Forms.CheckBox();
|
||||
this.BoldComments = new System.Windows.Forms.CheckBox();
|
||||
this.BoldKeyWords = new System.Windows.Forms.CheckBox();
|
||||
this.BoldText = new System.Windows.Forms.CheckBox();
|
||||
this.panelText = new System.Windows.Forms.Panel();
|
||||
this.lblText = new System.Windows.Forms.Label();
|
||||
this.TextColorDialog = new System.Windows.Forms.ColorDialog();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// OK
|
||||
//
|
||||
this.OK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.OK.Location = new System.Drawing.Point(116, 272);
|
||||
this.OK.Name = "OK";
|
||||
this.OK.Size = new System.Drawing.Size(75, 23);
|
||||
this.OK.TabIndex = 10;
|
||||
this.OK.Text = "&OK";
|
||||
this.OK.UseVisualStyleBackColor = true;
|
||||
this.OK.Click += new System.EventHandler(this.OK_Click);
|
||||
//
|
||||
// Cancel
|
||||
//
|
||||
this.Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.Cancel.Location = new System.Drawing.Point(197, 272);
|
||||
this.Cancel.Name = "Cancel";
|
||||
this.Cancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.Cancel.TabIndex = 11;
|
||||
this.Cancel.Text = "&Cancel";
|
||||
this.Cancel.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// panelKeyWord
|
||||
//
|
||||
this.panelKeyWord.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.panelKeyWord.Location = new System.Drawing.Point(77, 58);
|
||||
this.panelKeyWord.Name = "panelKeyWord";
|
||||
this.panelKeyWord.Size = new System.Drawing.Size(20, 20);
|
||||
this.panelKeyWord.TabIndex = 1;
|
||||
this.panelKeyWord.DoubleClick += new System.EventHandler(this.panelKeyWord_DoubleClick);
|
||||
//
|
||||
// lblKeyWords
|
||||
//
|
||||
this.lblKeyWords.AutoSize = true;
|
||||
this.lblKeyWords.Location = new System.Drawing.Point(12, 65);
|
||||
this.lblKeyWords.Name = "lblKeyWords";
|
||||
this.lblKeyWords.Size = new System.Drawing.Size(59, 13);
|
||||
this.lblKeyWords.TabIndex = 0;
|
||||
this.lblKeyWords.Text = "Key Words";
|
||||
//
|
||||
// lblComments
|
||||
//
|
||||
this.lblComments.AutoSize = true;
|
||||
this.lblComments.Location = new System.Drawing.Point(15, 105);
|
||||
this.lblComments.Name = "lblComments";
|
||||
this.lblComments.Size = new System.Drawing.Size(56, 13);
|
||||
this.lblComments.TabIndex = 2;
|
||||
this.lblComments.Text = "Comments";
|
||||
//
|
||||
// panelComment
|
||||
//
|
||||
this.panelComment.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.panelComment.Location = new System.Drawing.Point(77, 98);
|
||||
this.panelComment.Name = "panelComment";
|
||||
this.panelComment.Size = new System.Drawing.Size(20, 20);
|
||||
this.panelComment.TabIndex = 3;
|
||||
this.panelComment.DoubleClick += new System.EventHandler(this.panelComment_DoubleClick);
|
||||
//
|
||||
// panelString
|
||||
//
|
||||
this.panelString.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.panelString.Location = new System.Drawing.Point(77, 138);
|
||||
this.panelString.Name = "panelString";
|
||||
this.panelString.Size = new System.Drawing.Size(20, 20);
|
||||
this.panelString.TabIndex = 5;
|
||||
this.panelString.DoubleClick += new System.EventHandler(this.panelString_DoubleClick);
|
||||
//
|
||||
// lblStrings
|
||||
//
|
||||
this.lblStrings.AutoSize = true;
|
||||
this.lblStrings.Location = new System.Drawing.Point(32, 145);
|
||||
this.lblStrings.Name = "lblStrings";
|
||||
this.lblStrings.Size = new System.Drawing.Size(39, 13);
|
||||
this.lblStrings.TabIndex = 4;
|
||||
this.lblStrings.Text = "Strings";
|
||||
//
|
||||
// panelSymbol
|
||||
//
|
||||
this.panelSymbol.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.panelSymbol.Location = new System.Drawing.Point(77, 178);
|
||||
this.panelSymbol.Name = "panelSymbol";
|
||||
this.panelSymbol.Size = new System.Drawing.Size(20, 20);
|
||||
this.panelSymbol.TabIndex = 7;
|
||||
this.panelSymbol.DoubleClick += new System.EventHandler(this.panelSymbol_DoubleClick);
|
||||
//
|
||||
// lblSymbols
|
||||
//
|
||||
this.lblSymbols.AutoSize = true;
|
||||
this.lblSymbols.Location = new System.Drawing.Point(25, 185);
|
||||
this.lblSymbols.Name = "lblSymbols";
|
||||
this.lblSymbols.Size = new System.Drawing.Size(46, 13);
|
||||
this.lblSymbols.TabIndex = 6;
|
||||
this.lblSymbols.Text = "Symbols";
|
||||
//
|
||||
// panelLibrary
|
||||
//
|
||||
this.panelLibrary.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.panelLibrary.Location = new System.Drawing.Point(77, 218);
|
||||
this.panelLibrary.Name = "panelLibrary";
|
||||
this.panelLibrary.Size = new System.Drawing.Size(20, 20);
|
||||
this.panelLibrary.TabIndex = 9;
|
||||
this.panelLibrary.DoubleClick += new System.EventHandler(this.panelLibrary_DoubleClick);
|
||||
//
|
||||
// lblLibraries
|
||||
//
|
||||
this.lblLibraries.AutoSize = true;
|
||||
this.lblLibraries.Location = new System.Drawing.Point(25, 225);
|
||||
this.lblLibraries.Name = "lblLibraries";
|
||||
this.lblLibraries.Size = new System.Drawing.Size(46, 13);
|
||||
this.lblLibraries.TabIndex = 8;
|
||||
this.lblLibraries.Text = "Libraries";
|
||||
//
|
||||
// KeyWordColorDialog
|
||||
//
|
||||
this.KeyWordColorDialog.Color = System.Drawing.Color.Blue;
|
||||
//
|
||||
// CommentColorDialog
|
||||
//
|
||||
this.CommentColorDialog.Color = System.Drawing.Color.Green;
|
||||
//
|
||||
// StringColorDialog
|
||||
//
|
||||
this.StringColorDialog.Color = System.Drawing.Color.Gray;
|
||||
//
|
||||
// LibraryColorDialog
|
||||
//
|
||||
this.LibraryColorDialog.Color = System.Drawing.Color.Cyan;
|
||||
//
|
||||
// buttonDefaults
|
||||
//
|
||||
this.buttonDefaults.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonDefaults.Location = new System.Drawing.Point(12, 272);
|
||||
this.buttonDefaults.Name = "buttonDefaults";
|
||||
this.buttonDefaults.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonDefaults.TabIndex = 12;
|
||||
this.buttonDefaults.Text = "&Deafults";
|
||||
this.buttonDefaults.UseVisualStyleBackColor = true;
|
||||
this.buttonDefaults.Click += new System.EventHandler(this.buttonDefaults_Click);
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.BoldText);
|
||||
this.groupBox1.Controls.Add(this.panelText);
|
||||
this.groupBox1.Controls.Add(this.lblText);
|
||||
this.groupBox1.Controls.Add(this.BoldLibraries);
|
||||
this.groupBox1.Controls.Add(this.BoldSymbols);
|
||||
this.groupBox1.Controls.Add(this.BoldStrings);
|
||||
this.groupBox1.Controls.Add(this.BoldComments);
|
||||
this.groupBox1.Controls.Add(this.BoldKeyWords);
|
||||
this.groupBox1.Controls.Add(this.panelKeyWord);
|
||||
this.groupBox1.Controls.Add(this.lblKeyWords);
|
||||
this.groupBox1.Controls.Add(this.panelLibrary);
|
||||
this.groupBox1.Controls.Add(this.lblComments);
|
||||
this.groupBox1.Controls.Add(this.lblLibraries);
|
||||
this.groupBox1.Controls.Add(this.panelComment);
|
||||
this.groupBox1.Controls.Add(this.panelSymbol);
|
||||
this.groupBox1.Controls.Add(this.lblStrings);
|
||||
this.groupBox1.Controls.Add(this.lblSymbols);
|
||||
this.groupBox1.Controls.Add(this.panelString);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(260, 249);
|
||||
this.groupBox1.TabIndex = 13;
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
// BoldLibraries
|
||||
//
|
||||
this.BoldLibraries.AutoSize = true;
|
||||
this.BoldLibraries.Location = new System.Drawing.Point(132, 221);
|
||||
this.BoldLibraries.Name = "BoldLibraries";
|
||||
this.BoldLibraries.Size = new System.Drawing.Size(47, 17);
|
||||
this.BoldLibraries.TabIndex = 14;
|
||||
this.BoldLibraries.Text = "Bold";
|
||||
this.BoldLibraries.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// BoldSymbols
|
||||
//
|
||||
this.BoldSymbols.AutoSize = true;
|
||||
this.BoldSymbols.Location = new System.Drawing.Point(132, 181);
|
||||
this.BoldSymbols.Name = "BoldSymbols";
|
||||
this.BoldSymbols.Size = new System.Drawing.Size(47, 17);
|
||||
this.BoldSymbols.TabIndex = 13;
|
||||
this.BoldSymbols.Text = "Bold";
|
||||
this.BoldSymbols.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// BoldStrings
|
||||
//
|
||||
this.BoldStrings.AutoSize = true;
|
||||
this.BoldStrings.Location = new System.Drawing.Point(132, 141);
|
||||
this.BoldStrings.Name = "BoldStrings";
|
||||
this.BoldStrings.Size = new System.Drawing.Size(47, 17);
|
||||
this.BoldStrings.TabIndex = 12;
|
||||
this.BoldStrings.Text = "Bold";
|
||||
this.BoldStrings.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// BoldComments
|
||||
//
|
||||
this.BoldComments.AutoSize = true;
|
||||
this.BoldComments.Location = new System.Drawing.Point(132, 101);
|
||||
this.BoldComments.Name = "BoldComments";
|
||||
this.BoldComments.Size = new System.Drawing.Size(47, 17);
|
||||
this.BoldComments.TabIndex = 11;
|
||||
this.BoldComments.Text = "Bold";
|
||||
this.BoldComments.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// BoldKeyWords
|
||||
//
|
||||
this.BoldKeyWords.AutoSize = true;
|
||||
this.BoldKeyWords.Location = new System.Drawing.Point(132, 61);
|
||||
this.BoldKeyWords.Name = "BoldKeyWords";
|
||||
this.BoldKeyWords.Size = new System.Drawing.Size(47, 17);
|
||||
this.BoldKeyWords.TabIndex = 10;
|
||||
this.BoldKeyWords.Text = "Bold";
|
||||
this.BoldKeyWords.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// BoldText
|
||||
//
|
||||
this.BoldText.AutoSize = true;
|
||||
this.BoldText.Location = new System.Drawing.Point(132, 19);
|
||||
this.BoldText.Name = "BoldText";
|
||||
this.BoldText.Size = new System.Drawing.Size(47, 17);
|
||||
this.BoldText.TabIndex = 17;
|
||||
this.BoldText.Text = "Bold";
|
||||
this.BoldText.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// panelText
|
||||
//
|
||||
this.panelText.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
|
||||
this.panelText.Location = new System.Drawing.Point(77, 18);
|
||||
this.panelText.Name = "panelText";
|
||||
this.panelText.Size = new System.Drawing.Size(20, 20);
|
||||
this.panelText.TabIndex = 16;
|
||||
this.panelText.DoubleClick += new System.EventHandler(this.panelText_DoubleClick);
|
||||
//
|
||||
// lblText
|
||||
//
|
||||
this.lblText.AutoSize = true;
|
||||
this.lblText.Location = new System.Drawing.Point(43, 25);
|
||||
this.lblText.Name = "lblText";
|
||||
this.lblText.Size = new System.Drawing.Size(28, 13);
|
||||
this.lblText.TabIndex = 15;
|
||||
this.lblText.Text = "Text";
|
||||
//
|
||||
// LuaWriterColorConfig
|
||||
//
|
||||
this.AcceptButton = this.OK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.Cancel;
|
||||
this.ClientSize = new System.Drawing.Size(284, 307);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Controls.Add(this.buttonDefaults);
|
||||
this.Controls.Add(this.Cancel);
|
||||
this.Controls.Add(this.OK);
|
||||
this.Name = "LuaWriterColorConfig";
|
||||
this.ShowIcon = false;
|
||||
this.Text = "Syntax Highlight Config";
|
||||
this.Load += new System.EventHandler(this.LuaWriterColorConfig_Load);
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.groupBox1.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
|
@ -314,5 +349,9 @@
|
|||
private System.Windows.Forms.CheckBox BoldStrings;
|
||||
private System.Windows.Forms.CheckBox BoldComments;
|
||||
private System.Windows.Forms.CheckBox BoldKeyWords;
|
||||
private System.Windows.Forms.CheckBox BoldText;
|
||||
private System.Windows.Forms.Panel panelText;
|
||||
private System.Windows.Forms.Label lblText;
|
||||
private System.Windows.Forms.ColorDialog TextColorDialog;
|
||||
}
|
||||
}
|
|
@ -12,6 +12,7 @@ namespace BizHawk.MultiClient.tools
|
|||
public partial class LuaWriterColorConfig : Form
|
||||
{
|
||||
//Get existing global Lua color settings
|
||||
int TextColor = Global.Config.LuaDefaultTextColor;
|
||||
int KeyWordColor = Global.Config.LuaKeyWordColor;
|
||||
int CommentColor = Global.Config.LuaCommentColor;
|
||||
int StringColor = Global.Config.LuaStringColor;
|
||||
|
@ -26,12 +27,14 @@ namespace BizHawk.MultiClient.tools
|
|||
private void LuaWriterColorConfig_Load(object sender, EventArgs e)
|
||||
{
|
||||
//Set the initial colors into the panels
|
||||
SetTextColor(TextColor);
|
||||
SetKeyWordColor(KeyWordColor);
|
||||
SetCommentColor(CommentColor);
|
||||
SetStringColor(StringColor);
|
||||
SetSymbolColor(SymbolColor);
|
||||
SetLibraryColor(LibraryColor);
|
||||
|
||||
BoldText.Checked = Global.Config.LuaDefaultTextBold;
|
||||
BoldKeyWords.Checked = Global.Config.LuaKeyWordBold;
|
||||
BoldComments.Checked = Global.Config.LuaCommentBold;
|
||||
BoldStrings.Checked = Global.Config.LuaStringBold;
|
||||
|
@ -39,6 +42,12 @@ namespace BizHawk.MultiClient.tools
|
|||
BoldLibraries.Checked = Global.Config.LuaLibraryBold;
|
||||
}
|
||||
|
||||
private void SetTextColor(int color)
|
||||
{
|
||||
TextColor = color; //Set new color
|
||||
panelText.BackColor = Color.FromArgb(color); //Update panel color with new selection
|
||||
}
|
||||
|
||||
private void SetKeyWordColor(int color)
|
||||
{
|
||||
KeyWordColor = color; //Set new color
|
||||
|
@ -69,6 +78,15 @@ namespace BizHawk.MultiClient.tools
|
|||
panelLibrary.BackColor = Color.FromArgb(color); //Update panel color with new selection
|
||||
}
|
||||
|
||||
//Pop up color dialog when double-clicked
|
||||
private void panelText_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
if (TextColorDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
SetTextColor(TextColorDialog.Color.ToArgb());
|
||||
}
|
||||
}
|
||||
|
||||
//Pop up color dialog when double-clicked
|
||||
private void panelKeyWord_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -125,6 +143,7 @@ namespace BizHawk.MultiClient.tools
|
|||
private void SaveData()
|
||||
{
|
||||
//Colors
|
||||
Global.Config.LuaDefaultTextColor = TextColor;
|
||||
Global.Config.LuaKeyWordColor = KeyWordColor;
|
||||
Global.Config.LuaCommentColor = CommentColor;
|
||||
Global.Config.LuaStringColor = StringColor;
|
||||
|
@ -132,6 +151,7 @@ namespace BizHawk.MultiClient.tools
|
|||
Global.Config.LuaLibraryColor = LibraryColor;
|
||||
|
||||
//Bold
|
||||
Global.Config.LuaDefaultTextBold = BoldText.Checked;
|
||||
Global.Config.LuaKeyWordBold = BoldKeyWords.Checked;
|
||||
Global.Config.LuaCommentBold = BoldComments.Checked;
|
||||
Global.Config.LuaStringBold = BoldStrings.Checked;
|
||||
|
@ -141,12 +161,14 @@ namespace BizHawk.MultiClient.tools
|
|||
|
||||
private void buttonDefaults_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetTextColor(-16777216);
|
||||
SetKeyWordColor(-16776961);
|
||||
SetCommentColor(-16744448);
|
||||
SetStringColor(-8355712);
|
||||
SetSymbolColor(-16777216);
|
||||
SetLibraryColor(-16711681);
|
||||
|
||||
BoldText.Checked = false;
|
||||
BoldKeyWords.Checked = false;
|
||||
BoldComments.Checked = false;
|
||||
BoldStrings.Checked = false;
|
||||
|
|
|
@ -132,4 +132,7 @@
|
|||
<metadata name="LibraryColorDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>652, 18</value>
|
||||
</metadata>
|
||||
<metadata name="TextColorDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 57</value>
|
||||
</metadata>
|
||||
</root>
|
Loading…
Reference in New Issue