Commit 79c92359 authored by keyongyu's avatar keyongyu

2.2.7.2

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