Commit 79c92359 authored by keyongyu's avatar keyongyu

2.2.7.2

parent 1491cfc3
......@@ -35,248 +35,250 @@ protected override void Dispose(bool disposing)
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.menuitem_file = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_open = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_save = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_saveas = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_quit = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_setting = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_showmap = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_showinput = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_find = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_replace = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_setcard = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_help = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_about = new System.Windows.Forms.ToolStripMenuItem();
this.fctb = new FastColoredTextBoxNS.FastColoredTextBoxEx();
this.documentMap1 = new FastColoredTextBoxNS.DocumentMap();
this.tb_input = new System.Windows.Forms.TextBox();
this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.fctb)).BeginInit();
this.SuspendLayout();
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_file,
this.menuitem_setting,
this.menuitem_help});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(695, 25);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
//
// menuitem_file
//
this.menuitem_file.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_open,
this.menuitem_save,
this.menuitem_saveas,
this.toolStripSeparator1,
this.menuitem_quit});
this.menuitem_file.Name = "menuitem_file";
this.menuitem_file.Size = new System.Drawing.Size(53, 21);
this.menuitem_file.Text = "File(&F)";
//
// menuitem_open
//
this.menuitem_open.Name = "menuitem_open";
this.menuitem_open.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
this.menuitem_open.Size = new System.Drawing.Size(155, 22);
this.menuitem_open.Text = "Open";
this.menuitem_open.Click += new System.EventHandler(this.Menuitem_openClick);
//
// menuitem_save
//
this.menuitem_save.Name = "menuitem_save";
this.menuitem_save.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
this.menuitem_save.Size = new System.Drawing.Size(155, 22);
this.menuitem_save.Text = "Save";
this.menuitem_save.Click += new System.EventHandler(this.SaveToolStripMenuItemClick);
//
// menuitem_saveas
//
this.menuitem_saveas.Name = "menuitem_saveas";
this.menuitem_saveas.Size = new System.Drawing.Size(155, 22);
this.menuitem_saveas.Text = "Save As";
this.menuitem_saveas.Click += new System.EventHandler(this.SaveAsToolStripMenuItemClick);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(152, 6);
//
// menuitem_quit
//
this.menuitem_quit.Name = "menuitem_quit";
this.menuitem_quit.Size = new System.Drawing.Size(155, 22);
this.menuitem_quit.Text = "Quit";
this.menuitem_quit.Click += new System.EventHandler(this.QuitToolStripMenuItemClick);
//
// menuitem_setting
//
this.menuitem_setting.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_showmap,
this.menuitem_showinput,
this.menuitem_find,
this.menuitem_replace,
this.menuitem_setcard});
this.menuitem_setting.Name = "menuitem_setting";
this.menuitem_setting.Size = new System.Drawing.Size(67, 21);
this.menuitem_setting.Text = "Tools(&S)";
//
// menuitem_showmap
//
this.menuitem_showmap.Name = "menuitem_showmap";
this.menuitem_showmap.Size = new System.Drawing.Size(168, 22);
this.menuitem_showmap.Text = "Show Map";
this.menuitem_showmap.Click += new System.EventHandler(this.ShowMapToolStripMenuItemClick);
//
// menuitem_showinput
//
this.menuitem_showinput.Checked = true;
this.menuitem_showinput.CheckState = System.Windows.Forms.CheckState.Checked;
this.menuitem_showinput.Name = "menuitem_showinput";
this.menuitem_showinput.Size = new System.Drawing.Size(168, 22);
this.menuitem_showinput.Text = "Show InputBox";
this.menuitem_showinput.Click += new System.EventHandler(this.Menuitem_showinputClick);
//
// menuitem_find
//
this.menuitem_find.Name = "menuitem_find";
this.menuitem_find.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
this.menuitem_find.Size = new System.Drawing.Size(168, 22);
this.menuitem_find.Text = "Find";
this.menuitem_find.Click += new System.EventHandler(this.Menuitem_findClick);
//
// menuitem_replace
//
this.menuitem_replace.Name = "menuitem_replace";
this.menuitem_replace.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.H)));
this.menuitem_replace.Size = new System.Drawing.Size(168, 22);
this.menuitem_replace.Text = "Replace";
this.menuitem_replace.Click += new System.EventHandler(this.Menuitem_replaceClick);
//
// menuitem_setcard
//
this.menuitem_setcard.Name = "menuitem_setcard";
this.menuitem_setcard.Size = new System.Drawing.Size(168, 22);
this.menuitem_setcard.Text = "Set Cards";
//
// menuitem_help
//
this.menuitem_help.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_about});
this.menuitem_help.Name = "menuitem_help";
this.menuitem_help.Size = new System.Drawing.Size(64, 21);
this.menuitem_help.Text = "Help(&H)";
//
// menuitem_about
//
this.menuitem_about.Name = "menuitem_about";
this.menuitem_about.Size = new System.Drawing.Size(111, 22);
this.menuitem_about.Text = "About";
this.menuitem_about.Click += new System.EventHandler(this.AboutToolStripMenuItemClick);
//
// fctb
//
this.fctb.AutoCompleteBracketsList = new char[] {
'(',
')',
'{',
'}',
'[',
']',
'\"',
'\"',
'\'',
'\''};
this.fctb.AutoIndentChars = false;
this.fctb.AutoIndentCharsPatterns = "\n^\\s*[\\w\\.]+(\\s\\w+)?\\s*(?<range>=)\\s*(?<range>.+)\n";
this.fctb.AutoScrollMinSize = new System.Drawing.Size(0, 22);
this.fctb.BackBrush = null;
this.fctb.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.fctb.BracketsHighlightStrategy = FastColoredTextBoxNS.BracketsHighlightStrategy.Strategy2;
this.fctb.CharHeight = 22;
this.fctb.CharWidth = 10;
this.fctb.CommentPrefix = "--";
this.fctb.Cursor = System.Windows.Forms.Cursors.IBeam;
this.fctb.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))));
this.fctb.Dock = System.Windows.Forms.DockStyle.Fill;
this.fctb.Font = new System.Drawing.Font("Consolas", 14.25F);
this.fctb.ForeColor = System.Drawing.Color.GhostWhite;
this.fctb.IndentBackColor = System.Drawing.SystemColors.WindowFrame;
this.fctb.IsReplaceMode = false;
this.fctb.Language = FastColoredTextBoxNS.Language.Lua;
this.fctb.LeftBracket = '(';
this.fctb.LeftBracket2 = '{';
this.fctb.LineNumberColor = System.Drawing.Color.Gainsboro;
this.fctb.Location = new System.Drawing.Point(0, 25);
this.fctb.Margin = new System.Windows.Forms.Padding(0);
this.fctb.Name = "fctb";
this.fctb.Paddings = new System.Windows.Forms.Padding(0);
this.fctb.RightBracket = ')';
this.fctb.RightBracket2 = '}';
this.fctb.SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255)))));
this.fctb.Size = new System.Drawing.Size(504, 369);
this.fctb.TabIndex = 0;
this.fctb.WordWrap = true;
this.fctb.Zoom = 100;
this.fctb.ToolTipNeeded += new System.EventHandler<FastColoredTextBoxNS.ToolTipNeededEventArgs>(this.FctbToolTipNeeded);
this.fctb.TextChangedDelayed += new System.EventHandler<FastColoredTextBoxNS.TextChangedEventArgs>(this.FctbTextChangedDelayed);
this.fctb.SelectionChangedDelayed += new System.EventHandler(this.FctbSelectionChangedDelayed);
this.fctb.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FctbKeyDown);
this.fctb.MouseClick += new System.Windows.Forms.MouseEventHandler(this.FctbMouseClick);
//
// documentMap1
//
this.documentMap1.BackColor = System.Drawing.Color.DimGray;
this.documentMap1.Dock = System.Windows.Forms.DockStyle.Right;
this.documentMap1.ForeColor = System.Drawing.Color.Maroon;
this.documentMap1.Location = new System.Drawing.Point(504, 25);
this.documentMap1.Name = "documentMap1";
this.documentMap1.Size = new System.Drawing.Size(191, 390);
this.documentMap1.TabIndex = 5;
this.documentMap1.Target = this.fctb;
this.documentMap1.Text = "documentMap1";
this.documentMap1.Visible = false;
//
// tb_input
//
this.tb_input.BackColor = System.Drawing.SystemColors.Control;
this.tb_input.Dock = System.Windows.Forms.DockStyle.Bottom;
this.tb_input.Location = new System.Drawing.Point(0, 394);
this.tb_input.Margin = new System.Windows.Forms.Padding(0);
this.tb_input.Name = "tb_input";
this.tb_input.Size = new System.Drawing.Size(504, 21);
this.tb_input.TabIndex = 1;
this.tb_input.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Tb_inputKeyDown);
//
// CodeEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(695, 415);
this.Controls.Add(this.fctb);
this.Controls.Add(this.tb_input);
this.Controls.Add(this.documentMap1);
this.Controls.Add(this.menuStrip1);
this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.MainMenuStrip = this.menuStrip1;
this.Name = "CodeEditForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "CodeEditor";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CodeEditFormFormClosing);
this.Load += new System.EventHandler(this.CodeEditFormLoad);
this.Enter += new System.EventHandler(this.CodeEditFormEnter);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.fctb)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.menuitem_file = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_open = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_save = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_saveas = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_quit = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_setting = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_showmap = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_showinput = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_find = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_replace = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_setcard = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_help = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_about = new System.Windows.Forms.ToolStripMenuItem();
this.tb_input = new System.Windows.Forms.TextBox();
this.fctb = new FastColoredTextBoxNS.FastColoredTextBoxEx();
this.documentMap1 = new FastColoredTextBoxNS.DocumentMap();
this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.fctb)).BeginInit();
this.SuspendLayout();
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_file,
this.menuitem_setting,
this.menuitem_help});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(695, 25);
this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1";
//
// menuitem_file
//
this.menuitem_file.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_open,
this.menuitem_save,
this.menuitem_saveas,
this.toolStripSeparator1,
this.menuitem_quit});
this.menuitem_file.Name = "menuitem_file";
this.menuitem_file.Size = new System.Drawing.Size(53, 21);
this.menuitem_file.Text = "File(&F)";
//
// menuitem_open
//
this.menuitem_open.Name = "menuitem_open";
this.menuitem_open.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.O)));
this.menuitem_open.Size = new System.Drawing.Size(155, 22);
this.menuitem_open.Text = "Open";
this.menuitem_open.Click += new System.EventHandler(this.Menuitem_openClick);
//
// menuitem_save
//
this.menuitem_save.Name = "menuitem_save";
this.menuitem_save.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.S)));
this.menuitem_save.Size = new System.Drawing.Size(155, 22);
this.menuitem_save.Text = "Save";
this.menuitem_save.Click += new System.EventHandler(this.SaveToolStripMenuItemClick);
//
// menuitem_saveas
//
this.menuitem_saveas.Name = "menuitem_saveas";
this.menuitem_saveas.Size = new System.Drawing.Size(155, 22);
this.menuitem_saveas.Text = "Save As";
this.menuitem_saveas.Click += new System.EventHandler(this.SaveAsToolStripMenuItemClick);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(152, 6);
//
// menuitem_quit
//
this.menuitem_quit.Name = "menuitem_quit";
this.menuitem_quit.Size = new System.Drawing.Size(155, 22);
this.menuitem_quit.Text = "Quit";
this.menuitem_quit.Click += new System.EventHandler(this.QuitToolStripMenuItemClick);
//
// menuitem_setting
//
this.menuitem_setting.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_showmap,
this.menuitem_showinput,
this.menuitem_find,
this.menuitem_replace,
this.menuitem_setcard});
this.menuitem_setting.Name = "menuitem_setting";
this.menuitem_setting.Size = new System.Drawing.Size(67, 21);
this.menuitem_setting.Text = "Tools(&S)";
//
// menuitem_showmap
//
this.menuitem_showmap.Name = "menuitem_showmap";
this.menuitem_showmap.Size = new System.Drawing.Size(168, 22);
this.menuitem_showmap.Text = "Show Map";
this.menuitem_showmap.Click += new System.EventHandler(this.ShowMapToolStripMenuItemClick);
//
// menuitem_showinput
//
this.menuitem_showinput.Checked = true;
this.menuitem_showinput.CheckState = System.Windows.Forms.CheckState.Checked;
this.menuitem_showinput.Name = "menuitem_showinput";
this.menuitem_showinput.Size = new System.Drawing.Size(168, 22);
this.menuitem_showinput.Text = "Show InputBox";
this.menuitem_showinput.Click += new System.EventHandler(this.Menuitem_showinputClick);
//
// menuitem_find
//
this.menuitem_find.Name = "menuitem_find";
this.menuitem_find.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.F)));
this.menuitem_find.Size = new System.Drawing.Size(168, 22);
this.menuitem_find.Text = "Find";
this.menuitem_find.Click += new System.EventHandler(this.Menuitem_findClick);
//
// menuitem_replace
//
this.menuitem_replace.Name = "menuitem_replace";
this.menuitem_replace.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.H)));
this.menuitem_replace.Size = new System.Drawing.Size(168, 22);
this.menuitem_replace.Text = "Replace";
this.menuitem_replace.Click += new System.EventHandler(this.Menuitem_replaceClick);
//
// menuitem_setcard
//
this.menuitem_setcard.Name = "menuitem_setcard";
this.menuitem_setcard.Size = new System.Drawing.Size(168, 22);
this.menuitem_setcard.Text = "Set Cards";
//
// menuitem_help
//
this.menuitem_help.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_about});
this.menuitem_help.Name = "menuitem_help";
this.menuitem_help.Size = new System.Drawing.Size(64, 21);
this.menuitem_help.Text = "Help(&H)";
//
// menuitem_about
//
this.menuitem_about.Name = "menuitem_about";
this.menuitem_about.Size = new System.Drawing.Size(111, 22);
this.menuitem_about.Text = "About";
this.menuitem_about.Click += new System.EventHandler(this.AboutToolStripMenuItemClick);
//
// tb_input
//
this.tb_input.BackColor = System.Drawing.SystemColors.Control;
this.tb_input.Dock = System.Windows.Forms.DockStyle.Bottom;
this.tb_input.Location = new System.Drawing.Point(0, 394);
this.tb_input.Margin = new System.Windows.Forms.Padding(0);
this.tb_input.Name = "tb_input";
this.tb_input.Size = new System.Drawing.Size(504, 21);
this.tb_input.TabIndex = 1;
this.tb_input.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Tb_inputKeyDown);
//
// fctb
//
this.fctb.AutoCompleteBracketsList = new char[] {
'(',
')',
'{',
'}',
'[',
']',
'\"',
'\"',
'\'',
'\''};
this.fctb.AutoIndent = false;
this.fctb.AutoIndentChars = false;
this.fctb.AutoIndentCharsPatterns = "\n^\\s*[\\w\\.]+(\\s\\w+)?\\s*(?<range>=)\\s*(?<range>.+)\n";
this.fctb.AutoIndentExistingLines = false;
this.fctb.AutoScrollMinSize = new System.Drawing.Size(0, 22);
this.fctb.BackBrush = null;
this.fctb.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.fctb.BracketsHighlightStrategy = FastColoredTextBoxNS.BracketsHighlightStrategy.Strategy2;
this.fctb.CharHeight = 22;
this.fctb.CharWidth = 10;
this.fctb.CommentPrefix = "--";
this.fctb.Cursor = System.Windows.Forms.Cursors.IBeam;
this.fctb.DisabledColor = System.Drawing.Color.FromArgb(((int)(((byte)(100)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))), ((int)(((byte)(180)))));
this.fctb.Dock = System.Windows.Forms.DockStyle.Fill;
this.fctb.Font = new System.Drawing.Font("Consolas", 14.25F);
this.fctb.ForeColor = System.Drawing.Color.GhostWhite;
this.fctb.IndentBackColor = System.Drawing.SystemColors.WindowFrame;
this.fctb.IsReplaceMode = false;
this.fctb.Language = FastColoredTextBoxNS.Language.Lua;
this.fctb.LeftBracket = '(';
this.fctb.LeftBracket2 = '{';
this.fctb.LineNumberColor = System.Drawing.Color.Gainsboro;
this.fctb.Location = new System.Drawing.Point(0, 25);
this.fctb.Margin = new System.Windows.Forms.Padding(0);
this.fctb.Name = "fctb";
this.fctb.Paddings = new System.Windows.Forms.Padding(0);
this.fctb.RightBracket = ')';
this.fctb.RightBracket2 = '}';
this.fctb.SelectionColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(255)))));
this.fctb.Size = new System.Drawing.Size(504, 369);
this.fctb.TabIndex = 0;
this.fctb.WordWrap = true;
this.fctb.Zoom = 100;
this.fctb.ToolTipNeeded += new System.EventHandler<FastColoredTextBoxNS.ToolTipNeededEventArgs>(this.FctbToolTipNeeded);
this.fctb.TextChangedDelayed += new System.EventHandler<FastColoredTextBoxNS.TextChangedEventArgs>(this.FctbTextChangedDelayed);
this.fctb.SelectionChangedDelayed += new System.EventHandler(this.FctbSelectionChangedDelayed);
this.fctb.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FctbKeyDown);
this.fctb.MouseClick += new System.Windows.Forms.MouseEventHandler(this.FctbMouseClick);
//
// documentMap1
//
this.documentMap1.BackColor = System.Drawing.Color.DimGray;
this.documentMap1.Dock = System.Windows.Forms.DockStyle.Right;
this.documentMap1.ForeColor = System.Drawing.Color.Maroon;
this.documentMap1.Location = new System.Drawing.Point(504, 25);
this.documentMap1.Name = "documentMap1";
this.documentMap1.Size = new System.Drawing.Size(191, 390);
this.documentMap1.TabIndex = 5;
this.documentMap1.Target = this.fctb;
this.documentMap1.Text = "documentMap1";
this.documentMap1.Visible = false;
//
// CodeEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.ClientSize = new System.Drawing.Size(695, 415);
this.Controls.Add(this.fctb);
this.Controls.Add(this.tb_input);
this.Controls.Add(this.documentMap1);
this.Controls.Add(this.menuStrip1);
this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.MainMenuStrip = this.menuStrip1;
this.Name = "CodeEditForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "CodeEditor";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CodeEditFormFormClosing);
this.Load += new System.EventHandler(this.CodeEditFormLoad);
this.Enter += new System.EventHandler(this.CodeEditFormEnter);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.fctb)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.ToolStripMenuItem menuitem_setcard;
private System.Windows.Forms.ToolStripMenuItem menuitem_replace;
......
......@@ -36,6 +36,7 @@ public partial class CodeEditForm : DockContent
AutocompleteMenu popupMenu_con;
AutocompleteMenu popupMenu_find;
string nowFile;
public string NowFile { get { return nowFile; } }
string title;
string oldtext;
Dictionary<string,string> tooltipDic;
......@@ -84,7 +85,6 @@ void InitForm()
fctb.ImeMode=ImeMode.On;
}
public void LoadXml(string xmlfile)
{
fctb.DescriptionFile=xmlfile;
......
......@@ -33,7 +33,6 @@ public partial class MainForm : Form
string conflang,conflang_de,conflang_ce,confmsg,conflang_pe;
DataEditForm compare1,compare2;
Card[] tCards;
Dictionary<DataEditForm,string> list;
//
DataConfig datacfg = null;
CodeConfig codecfg = null;
......@@ -57,7 +56,6 @@ void Init(string datapath)
tCards = null;
hittorylist = new List<string>();
list = new Dictionary<DataEditForm,string>();
this.datapath = datapath;
InitDataEditor();
InitCodeEditor();
......@@ -180,11 +178,13 @@ void MenuHistoryItem_Click(object sender, EventArgs e)
{
ToolStripMenuItem tsmi=sender as ToolStripMenuItem;
if(tsmi!=null){
string file=tsmi.Text;
if(MainForm.isScript(file))
OpenScript(file);
else
Open(tsmi.Text);
string file = tsmi.Text;
if (MainForm.isScript(file))
{
OpenScript(file);
}
else
Open(file);
}
}
#endregion
......@@ -224,6 +224,10 @@ public void OpenScript(string file)
if(!string.IsNullOrEmpty(file) && File.Exists(file)){
AddHistory(file);
}
if (checkOpen(file))
return;
if (OpenInNull(file))
return;
CodeEditForm cf=new CodeEditForm();
LANG.InitForm(cf, conflang_ce);
LANG.SetLanguage(cf);
......@@ -258,6 +262,11 @@ void InitDataEditor()
}
public void Open(string file)
{
if (MainForm.isScript(file))
{
OpenScript(file);
return;
}
if(!string.IsNullOrEmpty(file) && File.Exists(file)){
AddHistory(file);
}
......@@ -275,20 +284,38 @@ public void Open(string file)
InitDataEditor();
def.InitGameData(datacfg);
def.DockAreas = DockAreas.Document;
def.FormClosed+=new FormClosedEventHandler(def_FormClosed);
def.Show(dockPanel1, DockState.Document);
list.Add(def, "");
}
bool checkOpen(string file)
{
foreach(DataEditForm df in list.Keys)
DockContentCollection contents = dockPanel1.Contents;
foreach (DockContent dc in contents)
{
if(df!=null && !df.IsDisposed)
{
if(df.getNowCDB()==file)
return true;
}
if (!MainForm.isScript(file))
{
DataEditForm df = dc as DataEditForm;
if (df != null && !df.IsDisposed)
{
if (df.getNowCDB() == file)
{
df.Show();
return true;
}
}
}
else
{
CodeEditForm cf = dc as CodeEditForm;
if (cf != null && !cf.IsDisposed)
{
if (cf.NowFile == file)
{
cf.Show();
return true;
}
}
}
}
return false;
}
......@@ -296,26 +323,38 @@ bool OpenInNull(string file)
{
if(string.IsNullOrEmpty(file) || !File.Exists(file))
return false;
foreach(DataEditForm df in list.Keys)
{
if(df!=null && !df.IsDisposed)
{
if(string.IsNullOrEmpty(df.getNowCDB())){
df.Open(file);
return true;
}
}
}
return false;
}
DockContentCollection contents = dockPanel1.Contents;
foreach (DockContent dc in contents)
{
if (!MainForm.isScript(file))
{
DataEditForm df = dc as DataEditForm;
if (df != null && !df.IsDisposed)
{
if (string.IsNullOrEmpty(df.getNowCDB()))
{
df.Open(file);
df.Show();
return true;
}
}
}
else
{
CodeEditForm cf = dc as CodeEditForm;
if (cf != null && !cf.IsDisposed)
{
if (string.IsNullOrEmpty(cf.NowFile))
{
cf.Open(file);
cf.Show();
return true;
}
void def_FormClosed(object sender, FormClosedEventArgs e)
{
DataEditForm df=sender as DataEditForm;
if(df!=null)
{
list.Remove(df);
}
}
}
}
return false;
}
void DataEditorToolStripMenuItemClick(object sender, EventArgs e)
......
......@@ -28,4 +28,4 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("2.2.7.1")]
[assembly: AssemblyVersion("2.2.7.2")]
[DataEditorX]2.2.7.1[DataEditorX]
[DataEditorX]2.2.7.2[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★文件关联
......@@ -58,6 +58,8 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.7.2
打开脚本,重复的时候,显示标签
2.2.7.1
历史记录分离,脚本编辑器的卡片信息描述
2.2.7.0
......
No preview for this file type
# history
F:\games\ygopro\script\c78835747.lua
F:\games\ygopro\p.zip.cdb
\ No newline at end of file
F:\games\ygopro\script\c50485594.lua
F:\games\ygopro\script\c17857780.lua
F:\games\ygopro\script\c47198668.lua
F:\games\ygopro\script\c168917.lua
F:\games\ygopro\script\c65518099.lua
F:\games\ygopro\p.zip.cdb
F:\games\ygopro\script\c64496451.lua
F:\games\ygopro\script\c78835747.lua
\ No newline at end of file
[DataEditorX]2.2.7.1[DataEditorX]
[DataEditorX]2.2.7.2[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★文件关联
......@@ -58,6 +58,8 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.7.2
打开脚本,重复的时候,显示标签
2.2.7.1
历史记录分离,脚本编辑器的卡片信息描述
2.2.7.0
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment