Commit a0d4736a authored by 247321453's avatar 247321453

chg

parent 2c961859
0x1 A·O·J 0x0 卡片系列
0x1 A·O·J
0x2 ジェネクス 0x2 ジェネクス
0x1002 レアル·ジェネクス 0x1002 レアル·ジェネクス
0x2002 A·ジェネクス 0x2002 A·ジェネクス
......
...@@ -110,7 +110,7 @@ private void InitializeComponent() ...@@ -110,7 +110,7 @@ private void InitializeComponent()
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(814, 25); this.menuStrip1.Size = new System.Drawing.Size(820, 25);
this.menuStrip1.TabIndex = 0; this.menuStrip1.TabIndex = 0;
this.menuStrip1.Text = "menuStrip1"; this.menuStrip1.Text = "menuStrip1";
// //
...@@ -213,21 +213,21 @@ private void InitializeComponent() ...@@ -213,21 +213,21 @@ private void InitializeComponent()
// //
this.menuitem_about.Name = "menuitem_about"; this.menuitem_about.Name = "menuitem_about";
this.menuitem_about.ShortcutKeys = System.Windows.Forms.Keys.F1; this.menuitem_about.ShortcutKeys = System.Windows.Forms.Keys.F1;
this.menuitem_about.Size = new System.Drawing.Size(152, 22); this.menuitem_about.Size = new System.Drawing.Size(124, 22);
this.menuitem_about.Text = "关于"; this.menuitem_about.Text = "关于";
this.menuitem_about.Click += new System.EventHandler(this.Menuitem_aboutClick); this.menuitem_about.Click += new System.EventHandler(this.Menuitem_aboutClick);
// //
// menuitem_checkupdate // menuitem_checkupdate
// //
this.menuitem_checkupdate.Name = "menuitem_checkupdate"; this.menuitem_checkupdate.Name = "menuitem_checkupdate";
this.menuitem_checkupdate.Size = new System.Drawing.Size(152, 22); this.menuitem_checkupdate.Size = new System.Drawing.Size(124, 22);
this.menuitem_checkupdate.Text = "检查更新"; this.menuitem_checkupdate.Text = "检查更新";
this.menuitem_checkupdate.Click += new System.EventHandler(this.Menuitem_checkupdateClick); this.menuitem_checkupdate.Click += new System.EventHandler(this.Menuitem_checkupdateClick);
// //
// menuitem_github // menuitem_github
// //
this.menuitem_github.Name = "menuitem_github"; this.menuitem_github.Name = "menuitem_github";
this.menuitem_github.Size = new System.Drawing.Size(152, 22); this.menuitem_github.Size = new System.Drawing.Size(124, 22);
this.menuitem_github.Text = "程序源码"; this.menuitem_github.Text = "程序源码";
this.menuitem_github.Click += new System.EventHandler(this.Menuitem_githubClick); this.menuitem_github.Click += new System.EventHandler(this.Menuitem_githubClick);
// //
...@@ -235,6 +235,7 @@ private void InitializeComponent() ...@@ -235,6 +235,7 @@ private void InitializeComponent()
// //
this.lv_cardlist.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.lv_cardlist.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left))); | System.Windows.Forms.AnchorStyles.Left)));
this.lv_cardlist.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.lv_cardlist.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.lv_cardlist.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.ch_cardcode, this.ch_cardcode,
this.ch_cardname}); this.ch_cardname});
...@@ -242,10 +243,11 @@ private void InitializeComponent() ...@@ -242,10 +243,11 @@ private void InitializeComponent()
this.lv_cardlist.GridLines = true; this.lv_cardlist.GridLines = true;
this.lv_cardlist.HideSelection = false; this.lv_cardlist.HideSelection = false;
this.lv_cardlist.LabelWrap = false; this.lv_cardlist.LabelWrap = false;
this.lv_cardlist.Location = new System.Drawing.Point(0, 27); this.lv_cardlist.Location = new System.Drawing.Point(0, 26);
this.lv_cardlist.Name = "lv_cardlist"; this.lv_cardlist.Name = "lv_cardlist";
this.lv_cardlist.Scrollable = false;
this.lv_cardlist.ShowItemToolTips = true; this.lv_cardlist.ShowItemToolTips = true;
this.lv_cardlist.Size = new System.Drawing.Size(218, 495); this.lv_cardlist.Size = new System.Drawing.Size(218, 492);
this.lv_cardlist.TabIndex = 1; this.lv_cardlist.TabIndex = 1;
this.lv_cardlist.UseCompatibleStateImageBehavior = false; this.lv_cardlist.UseCompatibleStateImageBehavior = false;
this.lv_cardlist.View = System.Windows.Forms.View.Details; this.lv_cardlist.View = System.Windows.Forms.View.Details;
...@@ -273,9 +275,9 @@ private void InitializeComponent() ...@@ -273,9 +275,9 @@ private void InitializeComponent()
// //
// tb_cardname // tb_cardname
// //
this.tb_cardname.Location = new System.Drawing.Point(530, 51); this.tb_cardname.Location = new System.Drawing.Point(526, 51);
this.tb_cardname.Name = "tb_cardname"; this.tb_cardname.Name = "tb_cardname";
this.tb_cardname.Size = new System.Drawing.Size(281, 21); this.tb_cardname.Size = new System.Drawing.Size(289, 21);
this.tb_cardname.TabIndex = 4; this.tb_cardname.TabIndex = 4;
this.tb_cardname.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.tb_cardname.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.tb_cardname.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Tb_cardnameKeyDown); this.tb_cardname.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Tb_cardnameKeyDown);
...@@ -347,11 +349,12 @@ private void InitializeComponent() ...@@ -347,11 +349,12 @@ private void InitializeComponent()
// //
this.tb_cardtext.AcceptsReturn = true; this.tb_cardtext.AcceptsReturn = true;
this.tb_cardtext.AcceptsTab = true; this.tb_cardtext.AcceptsTab = true;
this.tb_cardtext.Location = new System.Drawing.Point(530, 96); this.tb_cardtext.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tb_cardtext.Location = new System.Drawing.Point(523, 94);
this.tb_cardtext.Multiline = true; this.tb_cardtext.Multiline = true;
this.tb_cardtext.Name = "tb_cardtext"; this.tb_cardtext.Name = "tb_cardtext";
this.tb_cardtext.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.tb_cardtext.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.tb_cardtext.Size = new System.Drawing.Size(281, 236); this.tb_cardtext.Size = new System.Drawing.Size(296, 236);
this.tb_cardtext.TabIndex = 4; this.tb_cardtext.TabIndex = 4;
this.tb_cardtext.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Tb_cardtextKeyDown); this.tb_cardtext.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Tb_cardtextKeyDown);
// //
...@@ -361,21 +364,21 @@ private void InitializeComponent() ...@@ -361,21 +364,21 @@ private void InitializeComponent()
this.lb_scripttext.FormattingEnabled = true; this.lb_scripttext.FormattingEnabled = true;
this.lb_scripttext.IntegralHeight = false; this.lb_scripttext.IntegralHeight = false;
this.lb_scripttext.ItemHeight = 12; this.lb_scripttext.ItemHeight = 12;
this.lb_scripttext.Location = new System.Drawing.Point(532, 357); this.lb_scripttext.Location = new System.Drawing.Point(525, 353);
this.lb_scripttext.Name = "lb_scripttext"; this.lb_scripttext.Name = "lb_scripttext";
this.lb_scripttext.ScrollAlwaysVisible = true; this.lb_scripttext.ScrollAlwaysVisible = true;
this.lb_scripttext.Size = new System.Drawing.Size(281, 138); this.lb_scripttext.Size = new System.Drawing.Size(293, 138);
this.lb_scripttext.TabIndex = 6; this.lb_scripttext.TabIndex = 6;
this.lb_scripttext.SelectedIndexChanged += new System.EventHandler(this.Lb_scripttextSelectedIndexChanged); this.lb_scripttext.SelectedIndexChanged += new System.EventHandler(this.Lb_scripttextSelectedIndexChanged);
// //
// tb_edittext // tb_edittext
// //
this.tb_edittext.HideSelection = false; this.tb_edittext.HideSelection = false;
this.tb_edittext.Location = new System.Drawing.Point(533, 499); this.tb_edittext.Location = new System.Drawing.Point(523, 495);
this.tb_edittext.MaxLength = 2000; this.tb_edittext.MaxLength = 2000;
this.tb_edittext.Name = "tb_edittext"; this.tb_edittext.Name = "tb_edittext";
this.tb_edittext.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.tb_edittext.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.tb_edittext.Size = new System.Drawing.Size(279, 21); this.tb_edittext.Size = new System.Drawing.Size(296, 21);
this.tb_edittext.TabIndex = 4; this.tb_edittext.TabIndex = 4;
this.tb_edittext.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Tb_edittextKeyPress); this.tb_edittext.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Tb_edittextKeyPress);
// //
...@@ -421,7 +424,7 @@ private void InitializeComponent() ...@@ -421,7 +424,7 @@ private void InitializeComponent()
// //
this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(105, 533); this.label4.Location = new System.Drawing.Point(105, 529);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(11, 12); this.label4.Size = new System.Drawing.Size(11, 12);
this.label4.TabIndex = 7; this.label4.TabIndex = 7;
...@@ -430,7 +433,7 @@ private void InitializeComponent() ...@@ -430,7 +433,7 @@ private void InitializeComponent()
// tb_page // tb_page
// //
this.tb_page.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.tb_page.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.tb_page.Location = new System.Drawing.Point(67, 528); this.tb_page.Location = new System.Drawing.Point(67, 524);
this.tb_page.MaxLength = 12; this.tb_page.MaxLength = 12;
this.tb_page.Name = "tb_page"; this.tb_page.Name = "tb_page";
this.tb_page.Size = new System.Drawing.Size(34, 21); this.tb_page.Size = new System.Drawing.Size(34, 21);
...@@ -442,7 +445,7 @@ private void InitializeComponent() ...@@ -442,7 +445,7 @@ private void InitializeComponent()
// tb_pagenum // tb_pagenum
// //
this.tb_pagenum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.tb_pagenum.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.tb_pagenum.Location = new System.Drawing.Point(118, 528); this.tb_pagenum.Location = new System.Drawing.Point(118, 524);
this.tb_pagenum.MaxLength = 12; this.tb_pagenum.MaxLength = 12;
this.tb_pagenum.Name = "tb_pagenum"; this.tb_pagenum.Name = "tb_pagenum";
this.tb_pagenum.ReadOnly = true; this.tb_pagenum.ReadOnly = true;
...@@ -454,9 +457,9 @@ private void InitializeComponent() ...@@ -454,9 +457,9 @@ private void InitializeComponent()
// btn_PageUp // btn_PageUp
// //
this.btn_PageUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btn_PageUp.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btn_PageUp.Location = new System.Drawing.Point(0, 525); this.btn_PageUp.Location = new System.Drawing.Point(0, 520);
this.btn_PageUp.Name = "btn_PageUp"; this.btn_PageUp.Name = "btn_PageUp";
this.btn_PageUp.Size = new System.Drawing.Size(64, 24); this.btn_PageUp.Size = new System.Drawing.Size(64, 27);
this.btn_PageUp.TabIndex = 5; this.btn_PageUp.TabIndex = 5;
this.btn_PageUp.Text = "< <"; this.btn_PageUp.Text = "< <";
this.btn_PageUp.UseVisualStyleBackColor = true; this.btn_PageUp.UseVisualStyleBackColor = true;
...@@ -465,9 +468,9 @@ private void InitializeComponent() ...@@ -465,9 +468,9 @@ private void InitializeComponent()
// btn_PageDown // btn_PageDown
// //
this.btn_PageDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); this.btn_PageDown.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.btn_PageDown.Location = new System.Drawing.Point(155, 526); this.btn_PageDown.Location = new System.Drawing.Point(155, 520);
this.btn_PageDown.Name = "btn_PageDown"; this.btn_PageDown.Name = "btn_PageDown";
this.btn_PageDown.Size = new System.Drawing.Size(64, 24); this.btn_PageDown.Size = new System.Drawing.Size(64, 27);
this.btn_PageDown.TabIndex = 5; this.btn_PageDown.TabIndex = 5;
this.btn_PageDown.Text = "> >"; this.btn_PageDown.Text = "> >";
this.btn_PageDown.UseVisualStyleBackColor = true; this.btn_PageDown.UseVisualStyleBackColor = true;
...@@ -475,7 +478,7 @@ private void InitializeComponent() ...@@ -475,7 +478,7 @@ private void InitializeComponent()
// //
// btn_add // btn_add
// //
this.btn_add.Location = new System.Drawing.Point(532, 524); this.btn_add.Location = new System.Drawing.Point(525, 520);
this.btn_add.Name = "btn_add"; this.btn_add.Name = "btn_add";
this.btn_add.Size = new System.Drawing.Size(78, 27); this.btn_add.Size = new System.Drawing.Size(78, 27);
this.btn_add.TabIndex = 5; this.btn_add.TabIndex = 5;
...@@ -553,7 +556,7 @@ private void InitializeComponent() ...@@ -553,7 +556,7 @@ private void InitializeComponent()
// //
// btn_mod // btn_mod
// //
this.btn_mod.Location = new System.Drawing.Point(616, 524); this.btn_mod.Location = new System.Drawing.Point(609, 520);
this.btn_mod.Name = "btn_mod"; this.btn_mod.Name = "btn_mod";
this.btn_mod.Size = new System.Drawing.Size(78, 27); this.btn_mod.Size = new System.Drawing.Size(78, 27);
this.btn_mod.TabIndex = 5; this.btn_mod.TabIndex = 5;
...@@ -564,7 +567,7 @@ private void InitializeComponent() ...@@ -564,7 +567,7 @@ private void InitializeComponent()
// btn_del // btn_del
// //
this.btn_del.ForeColor = System.Drawing.Color.DarkRed; this.btn_del.ForeColor = System.Drawing.Color.DarkRed;
this.btn_del.Location = new System.Drawing.Point(445, 523); this.btn_del.Location = new System.Drawing.Point(440, 520);
this.btn_del.Name = "btn_del"; this.btn_del.Name = "btn_del";
this.btn_del.Size = new System.Drawing.Size(78, 27); this.btn_del.Size = new System.Drawing.Size(78, 27);
this.btn_del.TabIndex = 5; this.btn_del.TabIndex = 5;
...@@ -575,7 +578,7 @@ private void InitializeComponent() ...@@ -575,7 +578,7 @@ private void InitializeComponent()
// btn_lua // btn_lua
// //
this.btn_lua.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(64)))), ((int)(((byte)(0))))); this.btn_lua.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(64)))), ((int)(((byte)(0)))));
this.btn_lua.Location = new System.Drawing.Point(715, 523); this.btn_lua.Location = new System.Drawing.Point(724, 520);
this.btn_lua.Name = "btn_lua"; this.btn_lua.Name = "btn_lua";
this.btn_lua.Size = new System.Drawing.Size(94, 27); this.btn_lua.Size = new System.Drawing.Size(94, 27);
this.btn_lua.TabIndex = 5; this.btn_lua.TabIndex = 5;
...@@ -585,7 +588,7 @@ private void InitializeComponent() ...@@ -585,7 +588,7 @@ private void InitializeComponent()
// //
// btn_reset // btn_reset
// //
this.btn_reset.Location = new System.Drawing.Point(312, 523); this.btn_reset.Location = new System.Drawing.Point(312, 520);
this.btn_reset.Name = "btn_reset"; this.btn_reset.Name = "btn_reset";
this.btn_reset.Size = new System.Drawing.Size(78, 27); this.btn_reset.Size = new System.Drawing.Size(78, 27);
this.btn_reset.TabIndex = 5; this.btn_reset.TabIndex = 5;
...@@ -595,9 +598,9 @@ private void InitializeComponent() ...@@ -595,9 +598,9 @@ private void InitializeComponent()
// //
// btn_serach // btn_serach
// //
this.btn_serach.Location = new System.Drawing.Point(222, 524); this.btn_serach.Location = new System.Drawing.Point(222, 520);
this.btn_serach.Name = "btn_serach"; this.btn_serach.Name = "btn_serach";
this.btn_serach.Size = new System.Drawing.Size(83, 25); this.btn_serach.Size = new System.Drawing.Size(83, 27);
this.btn_serach.TabIndex = 5; this.btn_serach.TabIndex = 5;
this.btn_serach.Text = "搜索"; this.btn_serach.Text = "搜索";
this.btn_serach.UseVisualStyleBackColor = true; this.btn_serach.UseVisualStyleBackColor = true;
...@@ -617,10 +620,10 @@ private void InitializeComponent() ...@@ -617,10 +620,10 @@ private void InitializeComponent()
// label3 // label3
// //
this.label3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); this.label3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.label3.Location = new System.Drawing.Point(220, 336); this.label3.Location = new System.Drawing.Point(220, 333);
this.label3.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0); this.label3.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(308, 16); this.label3.Size = new System.Drawing.Size(303, 16);
this.label3.TabIndex = 11; this.label3.TabIndex = 11;
this.label3.Text = "效果种类"; this.label3.Text = "效果种类";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
...@@ -628,10 +631,10 @@ private void InitializeComponent() ...@@ -628,10 +631,10 @@ private void InitializeComponent()
// label6 // label6
// //
this.label6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); this.label6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.label6.Location = new System.Drawing.Point(532, 337); this.label6.Location = new System.Drawing.Point(525, 333);
this.label6.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0); this.label6.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0);
this.label6.Name = "label6"; this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(278, 16); this.label6.Size = new System.Drawing.Size(293, 16);
this.label6.TabIndex = 11; this.label6.TabIndex = 11;
this.label6.Text = "脚本提示文本"; this.label6.Text = "脚本提示文本";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
...@@ -666,10 +669,10 @@ private void InitializeComponent() ...@@ -666,10 +669,10 @@ private void InitializeComponent()
// label8 // label8
// //
this.label8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); this.label8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.label8.Location = new System.Drawing.Point(532, 76); this.label8.Location = new System.Drawing.Point(525, 76);
this.label8.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0); this.label8.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0);
this.label8.Name = "label8"; this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(278, 16); this.label8.Size = new System.Drawing.Size(294, 16);
this.label8.TabIndex = 11; this.label8.TabIndex = 11;
this.label8.Text = "卡片描述文本"; this.label8.Text = "卡片描述文本";
this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
...@@ -684,10 +687,10 @@ private void InitializeComponent() ...@@ -684,10 +687,10 @@ private void InitializeComponent()
// label9 // label9
// //
this.label9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255))))); this.label9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.label9.Location = new System.Drawing.Point(533, 29); this.label9.Location = new System.Drawing.Point(525, 29);
this.label9.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0); this.label9.Margin = new System.Windows.Forms.Padding(3, 3, 3, 0);
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(278, 16); this.label9.Size = new System.Drawing.Size(293, 16);
this.label9.TabIndex = 11; this.label9.TabIndex = 11;
this.label9.Text = "卡片名称"; this.label9.Text = "卡片名称";
this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
...@@ -705,18 +708,18 @@ private void InitializeComponent() ...@@ -705,18 +708,18 @@ private void InitializeComponent()
// pl_category // pl_category
// //
this.pl_category.AutoScroll = true; this.pl_category.AutoScroll = true;
this.pl_category.Location = new System.Drawing.Point(220, 353); this.pl_category.Location = new System.Drawing.Point(220, 350);
this.pl_category.Margin = new System.Windows.Forms.Padding(1, 2, 1, 2); this.pl_category.Margin = new System.Windows.Forms.Padding(1, 2, 1, 2);
this.pl_category.Name = "pl_category"; this.pl_category.Name = "pl_category";
this.pl_category.Padding = new System.Windows.Forms.Padding(2); this.pl_category.Padding = new System.Windows.Forms.Padding(2);
this.pl_category.Size = new System.Drawing.Size(310, 166); this.pl_category.Size = new System.Drawing.Size(303, 166);
this.pl_category.TabIndex = 13; this.pl_category.TabIndex = 13;
// //
// DataEditForm // DataEditForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(814, 553); this.ClientSize = new System.Drawing.Size(820, 548);
this.Controls.Add(this.pl_category); this.Controls.Add(this.pl_category);
this.Controls.Add(this.pl_cardtype); this.Controls.Add(this.pl_cardtype);
this.Controls.Add(this.label3); this.Controls.Add(this.label3);
...@@ -770,6 +773,7 @@ private void InitializeComponent() ...@@ -770,6 +773,7 @@ private void InitializeComponent()
this.Name = "DataEditForm"; this.Name = "DataEditForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "DataEditor"; this.Text = "DataEditor";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.DataEditFormFormClosing);
this.Load += new System.EventHandler(this.DataEditFormLoad); this.Load += new System.EventHandler(this.DataEditFormLoad);
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();
......
...@@ -21,7 +21,7 @@ namespace DataEditorX ...@@ -21,7 +21,7 @@ namespace DataEditorX
public partial class DataEditForm : Form public partial class DataEditForm : Form
{ {
#region 成员变量 #region 成员变量
string GAMEPATH,PICPATH,UPDATEURL,GITURL,LUAPTH; string GAMEPATH,PICPATH,UPDATEURL,GITURL,LUAPTH,INIPATH;
Card oldCard=new Card(0); Card oldCard=new Card(0);
Card srcCard=new Card(0); Card srcCard=new Card(0);
ImageForm imgform=new ImageForm(); ImageForm imgform=new ImageForm();
...@@ -31,7 +31,6 @@ public partial class DataEditForm : Form ...@@ -31,7 +31,6 @@ public partial class DataEditForm : Form
int MaxRow=20; int MaxRow=20;
int page=1,pageNum=1; int page=1,pageNum=1;
int cardcount; int cardcount;
string strSetname="卡片系列";
List<Card> cardlist=new List<Card>(); List<Card> cardlist=new List<Card>();
Dictionary<long, string> dicCardRules=null; Dictionary<long, string> dicCardRules=null;
...@@ -41,6 +40,14 @@ public partial class DataEditForm : Form ...@@ -41,6 +40,14 @@ public partial class DataEditForm : Form
Dictionary<long, string> dicSetnames=null; Dictionary<long, string> dicSetnames=null;
Dictionary<long, string> dicCardTypes=null; Dictionary<long, string> dicCardTypes=null;
Dictionary<long, string> dicCardcategorys=null; Dictionary<long, string> dicCardcategorys=null;
string confrule="card-rule.txt";
string confattribute="card-attribute.txt";
string confrace="card-race.txt";
string conflevel="card-level.txt";
string confsetname="card-setname.txt";
string conftype="card-type.txt";
string confcategory="card-category.txt";
string confcover= "cover.jpg";
#endregion #endregion
#region 界面初始化 #region 界面初始化
...@@ -62,16 +69,25 @@ void DataEditFormLoad(object sender, EventArgs e) ...@@ -62,16 +69,25 @@ void DataEditFormLoad(object sender, EventArgs e)
#if DEBUG #if DEBUG
title=title+"(DEBUG)"; title=title+"(DEBUG)";
#endif #endif
imgform.VisibleChanged+=OnimgFormClosed;
InitPath();
InitForm();
//set null card //set null card
oldCard=new Card(0); oldCard=new Card(0);
SetCard(oldCard); SetCard(oldCard);
if(!string.IsNullOrEmpty(nowCdbFile)) if(!string.IsNullOrEmpty(nowCdbFile))
Open(nowCdbFile); Open(nowCdbFile);
imgform.VisibleChanged+=OnimgFormClosed; }
void InitPath()
{
GAMEPATH=Application.StartupPath; GAMEPATH=Application.StartupPath;
if(File.Exists(Path.Combine(GAMEPATH,"DataEditorX.txt"))) INIPATH=Path.Combine(GAMEPATH,"DataEditorX.txt");
if(File.Exists(INIPATH))
{ {
string[] lines=File.ReadAllLines(Path.Combine(GAMEPATH,"DataEditorX.txt"),Encoding.UTF8); string[] lines=File.ReadAllLines(INIPATH, Encoding.UTF8);
GAMEPATH=(lines.Length>0)?lines[0]:Application.StartupPath; GAMEPATH=(lines.Length>0)?lines[0]:Application.StartupPath;
UPDATEURL=(lines.Length>1)?lines[1]:"http://247321453@ys168.com"; UPDATEURL=(lines.Length>1)?lines[1]:"http://247321453@ys168.com";
GITURL=(lines.Length>2)?lines[2]:"https://github.com/247321453/DataEditorX"; GITURL=(lines.Length>2)?lines[2]:"https://github.com/247321453/DataEditorX";
...@@ -84,41 +100,60 @@ void DataEditFormLoad(object sender, EventArgs e) ...@@ -84,41 +100,60 @@ void DataEditFormLoad(object sender, EventArgs e)
} }
PICPATH=Path.Combine(GAMEPATH,"pics"); PICPATH=Path.Combine(GAMEPATH,"pics");
LUAPTH=Path.Combine(GAMEPATH,"script"); LUAPTH=Path.Combine(GAMEPATH,"script");
string datapath=Path.Combine(Application.StartupPath,"data");
confrule=Path.Combine(datapath,"card-rule.txt");
confattribute=Path.Combine(datapath,"card-attribute.txt");
confrace=Path.Combine(datapath,"card-race.txt");
conflevel=Path.Combine(datapath,"card-level.txt");
confsetname=Path.Combine(datapath,"card-setname.txt");
conftype=Path.Combine(datapath,"card-type.txt");
confcategory=Path.Combine(datapath,"card-category.txt");
confcover= Path.Combine(datapath,"cover.jpg");
} }
public void InitForm(string directory) void DataEditFormFormClosing(object sender, FormClosingEventArgs e)
{
if(!File.Exists(INIPATH))
File.WriteAllLines(INIPATH,new string[]{GAMEPATH,UPDATEURL,GITURL},Encoding.UTF8);
}
void SaveDic(string file, Dictionary<long, string> dic)
{
using(FileStream fs=new FileStream(file,FileMode.OpenOrCreate,FileAccess.Write))
{
StreamWriter sw=new StreamWriter(fs,Encoding.UTF8);
foreach(long k in dic.Keys)
{
sw.WriteLine("0x"+k.ToString("x")+" "+dic[k]);
}
sw.Close();
fs.Close();
}
}
public void InitForm()
{ {
//初始化 //初始化
dicCardRules=InitComboBox( dicCardRules=InitComboBox(cb_cardrule,confrule);
cb_cardrule,Path.Combine(directory, "card-rule.txt")); dicCardAttributes=InitComboBox(cb_cardattribute,confattribute);
dicCardAttributes=InitComboBox( dicCardRaces=InitComboBox(cb_cardrace, confrace);
cb_cardattribute,Path.Combine(directory, "card-attribute.txt")); dicCardLevels=InitComboBox(cb_cardlevel, conflevel);
dicCardRaces=InitComboBox( dicSetnames=DataManager.Read(confsetname);
cb_cardrace,Path.Combine(directory, "card-race.txt"));
dicCardLevels=InitComboBox(
cb_cardlevel,Path.Combine(directory, "card-level.txt"));
dicSetnames=DataManager.Read(
Path.Combine(directory, "card-setname.txt"));
//setname //setname
string[] setnames=DataManager.GetValues(dicSetnames); string[] setnames=DataManager.GetValues(dicSetnames);
cb_setname1.Items.Add(strSetname+"1");
cb_setname2.Items.Add(strSetname+"2");
cb_setname3.Items.Add(strSetname+"3");
cb_setname4.Items.Add(strSetname+"4");
cb_setname1.Items.AddRange(setnames); cb_setname1.Items.AddRange(setnames);
cb_setname2.Items.AddRange(setnames); cb_setname2.Items.AddRange(setnames);
cb_setname3.Items.AddRange(setnames); cb_setname3.Items.AddRange(setnames);
cb_setname4.Items.AddRange(setnames); cb_setname4.Items.AddRange(setnames);
//card types //card types
dicCardTypes=DataManager.Read( dicCardTypes=DataManager.Read(conftype);
Path.Combine(directory, "card-type.txt"));
InitCheckPanel(pl_cardtype, dicCardTypes); InitCheckPanel(pl_cardtype, dicCardTypes);
//card categorys //card categorys
dicCardcategorys=DataManager.Read( dicCardcategorys=DataManager.Read(confcategory);
Path.Combine(directory, "card-category.txt"));
InitCheckPanel(pl_category, dicCardcategorys); InitCheckPanel(pl_category, dicCardcategorys);
// //
if(File.Exists(Path.Combine(directory, "cover.jpg"))) if(File.Exists(confcover))
imgform.SetDefault(Image.FromFile(Path.Combine(directory, "cover.jpg"))); imgform.SetDefault(Image.FromFile(confcover));
} }
//初始化FlowLayoutPanel //初始化FlowLayoutPanel
void InitCheckPanel(FlowLayoutPanel fpanel, Dictionary<long, string> dic) void InitCheckPanel(FlowLayoutPanel fpanel, Dictionary<long, string> dic)
...@@ -168,7 +203,7 @@ void InitListRows() ...@@ -168,7 +203,7 @@ void InitListRows()
int itemH=lv_cardlist.Items[0].GetBounds(ItemBoundsPortion.ItemOnly).Height; int itemH=lv_cardlist.Items[0].GetBounds(ItemBoundsPortion.ItemOnly).Height;
if ( itemH>0 ) if ( itemH>0 )
{ {
int n=( lv_cardlist.Height-headH-2 )/itemH; int n=( lv_cardlist.Height-headH-4 )/itemH;
if ( n>0 ) if ( n>0 )
MaxRow=n; MaxRow=n;
} }
...@@ -192,15 +227,15 @@ void SetCard(Card c) ...@@ -192,15 +227,15 @@ void SetCard(Card c)
lb_scripttext.Items.AddRange(c.str); lb_scripttext.Items.AddRange(c.str);
tb_edittext.Text=""; tb_edittext.Text="";
SetSelect(dicCardRules,cb_cardrule,(long)c.ot,0); SetSelect(dicCardRules,cb_cardrule,(long)c.ot);
SetSelect(dicCardAttributes,cb_cardattribute,(long)c.attribute,0); SetSelect(dicCardAttributes,cb_cardattribute,(long)c.attribute);
SetSelect(dicCardLevels,cb_cardlevel,(long)(c.level&0xff),0); SetSelect(dicCardLevels,cb_cardlevel,(long)(c.level&0xff));
SetSelect(dicCardRaces,cb_cardrace,c.race,0); SetSelect(dicCardRaces,cb_cardrace,c.race);
SetSelect(dicSetnames, cb_setname1, c.setcode&0xffff,1); SetSelect(dicSetnames, cb_setname1, c.setcode&0xffff);
SetSelect(dicSetnames, cb_setname2, (c.setcode>>0x10)&0xffff,1); SetSelect(dicSetnames, cb_setname2, (c.setcode>>0x10)&0xffff);
SetSelect(dicSetnames, cb_setname3, (c.setcode>>0x20)&0xffff,1); SetSelect(dicSetnames, cb_setname3, (c.setcode>>0x20)&0xffff);
SetSelect(dicSetnames, cb_setname4, (c.setcode>>0x30)&0xffff,1); SetSelect(dicSetnames, cb_setname4, (c.setcode>>0x30)&0xffff);
SetCheck(pl_cardtype,c.type); SetCheck(pl_cardtype,c.type);
SetCheck(pl_category,c.category); SetCheck(pl_category,c.category);
...@@ -230,9 +265,9 @@ void SetCheck(FlowLayoutPanel fpl,long number) ...@@ -230,9 +265,9 @@ void SetCheck(FlowLayoutPanel fpl,long number)
} }
} }
void SetSelect(Dictionary<long, string> dic,ComboBox cb, long k,int start) void SetSelect(Dictionary<long, string> dic,ComboBox cb, long k)
{ {
int index=start; int index=0;
if(k==0) if(k==0)
{ {
cb.SelectedIndex=0; cb.SelectedIndex=0;
...@@ -325,34 +360,7 @@ long GetCheck(FlowLayoutPanel fpl) ...@@ -325,34 +360,7 @@ long GetCheck(FlowLayoutPanel fpl)
return number; return number;
} }
#endregion #endregion
#region 消息显示
void ShowMsg(string strMsg)
{
MessageBox.Show(strMsg, "提示",
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
void ShowWarning(string strWarn)
{
MessageBox.Show(strWarn, "警告",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
void ShowError(string strError)
{
MessageBox.Show(strError, "错误",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
bool ShowQuestion(string strQues)
{
if(MessageBox.Show(strQues, "询问",
MessageBoxButtons.OKCancel,
MessageBoxIcon.Question)==DialogResult.OK)
return true;
else
return false;
}
#endregion
#region 卡片列表 #region 卡片列表
void Lv_cardlistSelectedIndexChanged(object sender, EventArgs e) void Lv_cardlistSelectedIndexChanged(object sender, EventArgs e)
{ {
...@@ -411,7 +419,7 @@ void Lv_cardlistKeyDown(object sender, KeyEventArgs e) ...@@ -411,7 +419,7 @@ void Lv_cardlistKeyDown(object sender, KeyEventArgs e)
{ {
switch(e.KeyCode) switch(e.KeyCode)
{ {
case Keys.Delete:ShowMsg("del");break; case Keys.Delete:MyMsg.Show("del");break;
case Keys.Right:Btn_PageDownClick(null,null);break; case Keys.Right:Btn_PageDownClick(null,null);break;
case Keys.Left:Btn_PageUpClick(null,null);break; case Keys.Left:Btn_PageUpClick(null,null);break;
} }
...@@ -452,7 +460,7 @@ public bool Check() ...@@ -452,7 +460,7 @@ public bool Check()
return true; return true;
else else
{ {
ShowWarning("请打开一个数据库!"); MyMsg.Warning(MyMsg.WARN_NoSelectCDB);
return false; return false;
} }
} }
...@@ -461,7 +469,7 @@ public bool Open(string cdbFile) ...@@ -461,7 +469,7 @@ public bool Open(string cdbFile)
{ {
if(!File.Exists(cdbFile)) if(!File.Exists(cdbFile))
{ {
ShowMsg("文件不存在!\n"+cdbFile); MyMsg.Error(string.Format(MyMsg.ERROR_FileNotExisit,cdbFile));
return false; return false;
} }
nowCdbFile=cdbFile; nowCdbFile=cdbFile;
...@@ -491,7 +499,7 @@ public void SetCards(Card[] cards, bool isfresh) ...@@ -491,7 +499,7 @@ public void SetCards(Card[] cards, bool isfresh)
else else
{ {
#if DEBUG #if DEBUG
ShowWarning("没有卡片!"); MyMsg.Warning(MyMsg.ERROR_NoCard);
#endif #endif
cardcount=0; cardcount=0;
page=1; page=1;
...@@ -508,7 +516,7 @@ public void Search(Card c, bool isfresh) ...@@ -508,7 +516,7 @@ public void Search(Card c, bool isfresh)
srcCard=c; srcCard=c;
string sql=DataBase.GetSelectSQL(c); string sql=DataBase.GetSelectSQL(c);
#if DEBUG #if DEBUG
ShowMsg(sql); MyMsg.Show(sql);
#endif #endif
SetCards(DataBase.Read(nowCdbFile, true, sql),isfresh); SetCards(DataBase.Read(nowCdbFile, true, sql),isfresh);
} }
...@@ -530,16 +538,16 @@ public bool AddCard() ...@@ -530,16 +538,16 @@ public bool AddCard()
Card c=GetCard(); Card c=GetCard();
if(c.id<=0) if(c.id<=0)
{ {
ShowError("卡片密码必须大于0!"); MyMsg.Error(MyMsg.ERROR_CardCodeIsZero);
return false; return false;
} }
if(DataBase.Command(nowCdbFile, DataBase.GetInsertSQL(c,true))>=2) if(DataBase.Command(nowCdbFile, DataBase.GetInsertSQL(c,true))>=2)
{ {
ShowMsg("添加 "+c.ToString()+" 成功!"); MyMsg.Show(string.Format(MyMsg.INFO_Addition,c.ToString()));
Search(srcCard, true); Search(srcCard, true);
return true; return true;
} }
ShowError("添加 "+c.ToString()+" 失败!\n原因:可能已经存在该卡片.\n"); MyMsg.Error(MyMsg.ERROR_AdditionFail);
return false; return false;
} }
//修改 //修改
...@@ -551,22 +559,22 @@ public bool ModCard() ...@@ -551,22 +559,22 @@ public bool ModCard()
if(c.Equals(oldCard)) if(c.Equals(oldCard))
{ {
ShowMsg("卡片没有改变!"); MyMsg.Show(MyMsg.INFO_NoChanged);
return false; return false;
} }
if(c.id<=0) if(c.id<=0)
{ {
ShowError("卡片密码必须大于0!"); MyMsg.Error(MyMsg.ERROR_CardCodeIsZero);
return false; return false;
} }
if(DataBase.Command(nowCdbFile, DataBase.GetUpdateSQL(c))>0) if(DataBase.Command(nowCdbFile, DataBase.GetUpdateSQL(c))>0)
{ {
ShowMsg("修改 "+c.ToString()+" 成功!"); MyMsg.Show(string.Format(MyMsg.INFO_Modifty,c.ToString()));
Search(srcCard, true); Search(srcCard, true);
} }
else else
ShowError("修改失败!"); MyMsg.Error(MyMsg.ERROR_ModiftyFail);
return false; return false;
} }
//删除 //删除
...@@ -577,7 +585,7 @@ public bool DelCards() ...@@ -577,7 +585,7 @@ public bool DelCards()
int ic=lv_cardlist.SelectedItems.Count; int ic=lv_cardlist.SelectedItems.Count;
if(ic>=0) if(ic>=0)
return false; return false;
if(!ShowQuestion("是否删除选中的"+ic.ToString()+"张卡片?")) if(!MyMsg.Question(string.Format(MyMsg.QUES_DeleteCard,ic)))
return false; return false;
List<string> sql=new List<string>(); List<string> sql=new List<string>();
foreach(ListViewItem lvitem in lv_cardlist.SelectedItems) foreach(ListViewItem lvitem in lv_cardlist.SelectedItems)
...@@ -591,13 +599,13 @@ public bool DelCards() ...@@ -591,13 +599,13 @@ public bool DelCards()
} }
if(DataBase.Command(nowCdbFile, sql.ToArray())>=(sql.Count*2)) if(DataBase.Command(nowCdbFile, sql.ToArray())>=(sql.Count*2))
{ {
ShowMsg("删除成功!"); MyMsg.Show(MyMsg.INFO_Delete);
Search(srcCard, true); Search(srcCard, true);
return true; return true;
} }
else else
{ {
ShowError("删除失败!\n原因:可能是卡片的数据不完整。"); MyMsg.Error(MyMsg.ERROR_DeleteFail);
Search(srcCard, true); Search(srcCard, true);
} }
...@@ -611,7 +619,7 @@ public bool OpenScript() ...@@ -611,7 +619,7 @@ public bool OpenScript()
string lua=Path.Combine(LUAPTH,"c"+tb_cardcode.Text+".lua"); string lua=Path.Combine(LUAPTH,"c"+tb_cardcode.Text+".lua");
if(!File.Exists(lua)) if(!File.Exists(lua))
{ {
if(ShowQuestion("是否创建脚本?\n"+lua)) if(MyMsg.Question(string.Format(MyMsg.QUES_CreateLua,lua)))
{ {
File.Create(lua); File.Create(lua);
} }
...@@ -694,7 +702,7 @@ void Setscripttext(string str) ...@@ -694,7 +702,7 @@ void Setscripttext(string str)
} }
catch{ catch{
index=-1; index=-1;
ShowError("请选中脚本文本"); MyMsg.Error(MyMsg.ERROR_NoSeclectScriptText);
} }
if(index>=0) if(index>=0)
{ {
...@@ -713,7 +721,7 @@ string Getscripttext() ...@@ -713,7 +721,7 @@ string Getscripttext()
} }
catch{ catch{
index=-1; index=-1;
ShowError("请选中脚本文本"); MyMsg.Error(MyMsg.ERROR_NoSeclectScriptText);
} }
if(index>=0) if(index>=0)
return strs[index]; return strs[index];
...@@ -737,7 +745,7 @@ void Tb_edittextKeyPress(object sender, KeyPressEventArgs e) ...@@ -737,7 +745,7 @@ void Tb_edittextKeyPress(object sender, KeyPressEventArgs e)
#region 帮助菜单 #region 帮助菜单
void Menuitem_aboutClick(object sender, EventArgs e) void Menuitem_aboutClick(object sender, EventArgs e)
{ {
ShowMsg("程序:DataEditorX\n作者:247321453\nE-mail:247321453@qq.com\n"); MyMsg.Show(MyMsg.ABOUT);
} }
void Menuitem_checkupdateClick(object sender, EventArgs e) void Menuitem_checkupdateClick(object sender, EventArgs e)
...@@ -750,7 +758,7 @@ void Menuitem_githubClick(object sender, EventArgs e) ...@@ -750,7 +758,7 @@ void Menuitem_githubClick(object sender, EventArgs e)
} }
#endregion #endregion
#region 文件菜单 #region 文件菜单(chs)
void Menuitem_openClick(object sender, EventArgs e) void Menuitem_openClick(object sender, EventArgs e)
{ {
using(OpenFileDialog dlg=new OpenFileDialog()) using(OpenFileDialog dlg=new OpenFileDialog())
...@@ -788,7 +796,7 @@ void Menuitem_copytoClick(object sender, EventArgs e) ...@@ -788,7 +796,7 @@ void Menuitem_copytoClick(object sender, EventArgs e)
dlg.Filter="cdb文件(*.cdb)|*.cdb|所有文件(*.*)|*.*"; dlg.Filter="cdb文件(*.cdb)|*.cdb|所有文件(*.*)|*.*";
if(dlg.ShowDialog()==DialogResult.OK) if(dlg.ShowDialog()==DialogResult.OK)
{ {
if(ShowQuestion("是否覆盖已经存在的卡片?")) if(MyMsg.Question("是否覆盖已经存在的卡片?"))
DataBase.CopyDB(dlg.FileName,false,cardlist.ToArray()); DataBase.CopyDB(dlg.FileName,false,cardlist.ToArray());
else else
DataBase.CopyDB(dlg.FileName,true,cardlist.ToArray()); DataBase.CopyDB(dlg.FileName,true,cardlist.ToArray());
...@@ -827,7 +835,7 @@ void Menuitem_readimagesClick(object sender, EventArgs e) ...@@ -827,7 +835,7 @@ void Menuitem_readimagesClick(object sender, EventArgs e)
//关闭 //关闭
void Menuitem_quitClick(object sender, EventArgs e) void Menuitem_quitClick(object sender, EventArgs e)
{ {
this.Close(); Application.Exit();
} }
#endregion #endregion
...@@ -851,5 +859,6 @@ void OnimgFormClosed(object sender, EventArgs e) ...@@ -851,5 +859,6 @@ void OnimgFormClosed(object sender, EventArgs e)
} }
#endregion #endregion
} }
} }
...@@ -55,10 +55,7 @@ ...@@ -55,10 +55,7 @@
<Compile Include="ImageForm.Designer.cs"> <Compile Include="ImageForm.Designer.cs">
<DependentUpon>ImageForm.cs</DependentUpon> <DependentUpon>ImageForm.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="MainForm.cs" /> <Compile Include="MyMsg.cs" />
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" /> <Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
...@@ -69,9 +66,6 @@ ...@@ -69,9 +66,6 @@
<EmbeddedResource Include="ImageForm.resx"> <EmbeddedResource Include="ImageForm.resx">
<DependentUpon>ImageForm.cs</DependentUpon> <DependentUpon>ImageForm.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Data" /> <Folder Include="Data" />
......
/*
* 由SharpDevelop创建。
* 用户: Acer
* 日期: 5月12 星期一
* 时间: 12:00
*
*/
namespace DataEditorX
{
partial class MainForm
{
/// <summary>
/// Designer variable used to keep track of non-visual components.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Disposes resources used by the form.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing) {
if (components != null) {
components.Dispose();
}
}
base.Dispose(disposing);
}
/// <summary>
/// This method is required for Windows Forms designer support.
/// Do not change the method contents inside the source code editor. The Forms designer might
/// not be able to load this method if it was changed manually.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.label1 = new System.Windows.Forms.Label();
this.lb_tips = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// label1
//
this.label1.Font = new System.Drawing.Font("Consolas", 36F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(6, 18);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(404, 171);
this.label1.TabIndex = 0;
this.label1.Text = "DataEditorX";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// lb_tips
//
this.lb_tips.Font = new System.Drawing.Font("Consolas", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lb_tips.Location = new System.Drawing.Point(229, 221);
this.lb_tips.Name = "lb_tips";
this.lb_tips.Size = new System.Drawing.Size(201, 32);
this.lb_tips.TabIndex = 1;
this.lb_tips.Text = "Loading. . .";
this.lb_tips.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Location = new System.Drawing.Point(14, 18);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(416, 200);
this.groupBox1.TabIndex = 2;
this.groupBox1.TabStop = false;
//
// timer1
//
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.Timer1Tick);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
this.ClientSize = new System.Drawing.Size(442, 262);
this.Controls.Add(this.lb_tips);
this.Controls.Add(this.groupBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "DataEditorX";
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
}
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label lb_tips;
private System.Windows.Forms.Label label1;
}
}
/*
* 由SharpDevelop创建。
* 用户: Acer
* 日期: 5月12 星期一
* 时间: 12:00
*
*/
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
namespace DataEditorX
{
/// <summary>
/// Description of MainForm.
/// </summary>
public partial class MainForm : Form
{
DataEditForm editForm;
string datadir="";
public MainForm(string filename)
{
Init(filename);
}
public MainForm()
{
Init(null);
}
void Init(string filename)
{
if(filename==null)
editForm=new DataEditForm();
else
editForm=new DataEditForm(filename);
InitializeComponent();
timer1.Interval=2000;
timer1.Enabled=true;
datadir=Path.Combine(Application.StartupPath,"data");
editForm.InitForm(datadir);
}
void Timer1Tick(object sender, EventArgs e)
{
timer1.Enabled=false;
this.Hide();
editForm.ShowDialog();
this.Close();
}
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
\ No newline at end of file
/*
* 由SharpDevelop创建。
* 用户: Acer
* 日期: 5月20 星期二
* 时间: 7:40
*
*/
using System;
using System.Windows.Forms;
namespace DataEditorX
{
/// <summary>
/// Description of MyMsg.
/// </summary>
public static class MyMsg
{
public static readonly string ABOUT="程序:DataEditorX\n作者:247321453\nE-mail:247321453@qq.com\n";
public static readonly string ERROR_NoSeclectScriptText="请选中脚本文本";
public static readonly string INFO_Delete="删除成功!";
public static readonly string INFO_Modifty="修改 {0} 成功!";
public static readonly string INFO_Addition="添加 {0} 成功!";
public static readonly string INFO_NoChanged="卡片没有被修改!";
public static readonly string ERROR_NoCard="没有卡片!";
public static readonly string WARN_NoSelectCDB="请打开一个数据库!";
public static readonly string ERROR_FileNotExisit="文件不存在!\n{0}";
public static readonly string ERROR_ModiftyFail="修改失败!";
public static readonly string ERROR_AdditionFail="修添加失败!";
public static readonly string ERROR_CardCodeIsZero="卡片密码必须大于0!";
public static readonly string ERROR_DeleteFail="删除失败!";
public static readonly string QUES_CreateLua="是否创建脚本?\n{0}";
public static readonly string QUES_DeleteCard="是否删除选择的{0}张卡?";
public static void Show(string strMsg)
{
MessageBox.Show(strMsg, "提示",
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
public static void Warning(string strWarn)
{
MessageBox.Show(strWarn, "警告",
MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
public static void Error(string strError)
{
MessageBox.Show(strError, "错误",
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
public static bool Question(string strQues)
{
if(MessageBox.Show(strQues, "询问",
MessageBoxButtons.OKCancel,
MessageBoxIcon.Question)==DialogResult.OK)
return true;
else
return false;
}
}
}
...@@ -24,9 +24,9 @@ private static void Main(string[] args) ...@@ -24,9 +24,9 @@ private static void Main(string[] args)
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
if(args.Length==1) if(args.Length==1)
Application.Run(new MainForm(args[0])); Application.Run(new DataEditForm(args[0]));
else else
Application.Run(new MainForm()); Application.Run(new DataEditForm());
} }
} }
} }
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