Commit aed623a0 authored by 247321453's avatar 247321453

ok

parent ccf4f16b
......@@ -50,7 +50,7 @@ static DataBase()
/// 创建数据库
/// </summary>
/// <param name="Db">新数据库路径</param>
public static void Create(string Db)
public static bool Create(string Db)
{
if ( File.Exists(Db) )
File.Delete(Db);
......@@ -62,7 +62,9 @@ public static void Create(string Db)
{
File.AppendAllText("System.Data.SQLite.log", exc.Source+"\n"+
exc.TargetSite+"\n"+exc.Message+"\n"+exc.ToString());
return false;
}
return true;
}
#endregion
......@@ -326,7 +328,9 @@ public static string GetSelectSQL(Card c)
if(c.id>0 && c.alias<0)
sb.Append(" and datas.id >= "+c.id.ToString());
else if(c.id>0 && c.alias>0)
sb.Append(" and datas.id >= "+c.id.ToString()+" and datas.alias >="+c.alias.ToString());
sb.Append(" and datas.id >= "+c.id.ToString()+" and datas.id <="+c.alias.ToString());
else if(c.id<0 && c.alias>0)
sb.Append(" and datas.id <= "+c.alias.ToString());
else if(c.id>0)
sb.Append(" and datas.id="+c.id.ToString());
else if(c.alias>0)
......@@ -348,7 +352,7 @@ public static string GetInsertSQL(Card c, bool ignore)
if(ignore)
st.Append("INSERT or ignore into datas values(");
else
st.Append("INSERT into datas values(");
st.Append("INSERT or replace into datas values(");
st.Append(c.id.ToString()); st.Append(",");
st.Append(c.ot.ToString()); st.Append(",");
st.Append(c.alias.ToString()); st.Append(",");
......@@ -360,7 +364,10 @@ public static string GetInsertSQL(Card c, bool ignore)
st.Append(c.race.ToString()); st.Append(",");
st.Append(c.attribute.ToString()); st.Append(",");
st.Append(c.category.ToString()); st.Append(")");
if(ignore)
st.Append(";INSERT or ignore into texts values(");
else
st.Append(";INSERT or replace into texts values(");
st.Append(c.id.ToString()); st.Append(",'");
st.Append(c.name.Replace("'", "''")); st.Append("','");
st.Append(c.desc.Replace("'", "''"));
......
......@@ -35,47 +35,25 @@ 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_new = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_save = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_saveas = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_copyto = new System.Windows.Forms.ToolStripMenuItem();
this.tsep1 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_inport = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_export = new System.Windows.Forms.ToolStripMenuItem();
this.tsep2 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_readydk = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_readimages = new System.Windows.Forms.ToolStripMenuItem();
this.tsep3 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_quit = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_edit = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_undo = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_redo = new System.Windows.Forms.ToolStripMenuItem();
this.tsep4 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_add = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_mod = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_del = new System.Windows.Forms.ToolStripMenuItem();
this.tsep5 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_search = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_reset = new System.Windows.Forms.ToolStripMenuItem();
this.tsep6 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_showimage = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_openscript = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_opengame = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_help = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_about = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_checkupdate = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_github = new System.Windows.Forms.ToolStripMenuItem();
this.lv_cardlist = new System.Windows.Forms.DListView();
this.ch_cardcode = new System.Windows.Forms.ColumnHeader();
this.ch_cardname = new System.Windows.Forms.ColumnHeader();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.exportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.copyToToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.deleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.cb_cardattribute = new System.Windows.Forms.ComboBox();
this.tb_cardname = new System.Windows.Forms.TextBox();
this.cb_cardrule = new System.Windows.Forms.ComboBox();
......@@ -115,8 +93,6 @@ private void InitializeComponent()
this.label6 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.btn_redo = new System.Windows.Forms.Button();
this.btn_undo = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
......@@ -124,7 +100,6 @@ private void InitializeComponent()
this.pl_cardtype = new System.Windows.Forms.DFlowLayoutPanel();
this.pl_category = new System.Windows.Forms.DFlowLayoutPanel();
this.menuStrip1.SuspendLayout();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
......@@ -144,13 +119,8 @@ private void InitializeComponent()
this.menuitem_file.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_open,
this.menuitem_new,
this.menuitem_save,
this.menuitem_saveas,
this.menuitem_copyto,
this.tsep1,
this.menuitem_inport,
this.menuitem_export,
this.tsep2,
this.menuitem_readydk,
this.menuitem_readimages,
this.tsep3,
......@@ -162,199 +132,79 @@ private void InitializeComponent()
// menuitem_open
//
this.menuitem_open.Name = "menuitem_open";
this.menuitem_open.Size = new System.Drawing.Size(124, 22);
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(165, 22);
this.menuitem_open.Text = "打开(&O)";
this.menuitem_open.Click += new System.EventHandler(this.Menuitem_openClick);
//
// menuitem_new
//
this.menuitem_new.Name = "menuitem_new";
this.menuitem_new.Size = new System.Drawing.Size(124, 22);
this.menuitem_new.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.N)));
this.menuitem_new.Size = new System.Drawing.Size(165, 22);
this.menuitem_new.Text = "新建(&N)";
this.menuitem_new.Click += new System.EventHandler(this.Menuitem_newClick);
//
// menuitem_save
//
this.menuitem_save.Name = "menuitem_save";
this.menuitem_save.Size = new System.Drawing.Size(124, 22);
this.menuitem_save.Text = "保存(&S)";
this.menuitem_save.Click += new System.EventHandler(this.Menuitem_saveClick);
//
// menuitem_saveas
//
this.menuitem_saveas.Name = "menuitem_saveas";
this.menuitem_saveas.Size = new System.Drawing.Size(124, 22);
this.menuitem_saveas.Text = "另存为";
this.menuitem_saveas.Click += new System.EventHandler(this.Menuitem_saveasClick);
//
// menuitem_copyto
//
this.menuitem_copyto.Name = "menuitem_copyto";
this.menuitem_copyto.Size = new System.Drawing.Size(124, 22);
this.menuitem_copyto.Text = "复制到";
this.menuitem_copyto.Size = new System.Drawing.Size(165, 22);
this.menuitem_copyto.Text = "复制到(&C)";
this.menuitem_copyto.Click += new System.EventHandler(this.Menuitem_copytoClick);
//
// tsep1
//
this.tsep1.Name = "tsep1";
this.tsep1.Size = new System.Drawing.Size(121, 6);
//
// menuitem_inport
//
this.menuitem_inport.Name = "menuitem_inport";
this.menuitem_inport.Size = new System.Drawing.Size(124, 22);
this.menuitem_inport.Text = "导出";
this.menuitem_inport.Click += new System.EventHandler(this.Menuitem_inportClick);
//
// menuitem_export
//
this.menuitem_export.Name = "menuitem_export";
this.menuitem_export.Size = new System.Drawing.Size(124, 22);
this.menuitem_export.Text = "导入";
this.menuitem_export.Click += new System.EventHandler(this.Menuitem_exportClick);
//
// tsep2
//
this.tsep2.Name = "tsep2";
this.tsep2.Size = new System.Drawing.Size(121, 6);
this.tsep1.Size = new System.Drawing.Size(162, 6);
//
// menuitem_readydk
//
this.menuitem_readydk.Name = "menuitem_readydk";
this.menuitem_readydk.Size = new System.Drawing.Size(124, 22);
this.menuitem_readydk.Text = "读取ydk";
this.menuitem_readydk.Size = new System.Drawing.Size(165, 22);
this.menuitem_readydk.Text = "读取ydk(&Y)";
this.menuitem_readydk.Click += new System.EventHandler(this.Menuitem_readydkClick);
//
// menuitem_readimages
//
this.menuitem_readimages.Name = "menuitem_readimages";
this.menuitem_readimages.Size = new System.Drawing.Size(124, 22);
this.menuitem_readimages.Text = "读取图片";
this.menuitem_readimages.Size = new System.Drawing.Size(165, 22);
this.menuitem_readimages.Text = "读取图片(&I)";
this.menuitem_readimages.Click += new System.EventHandler(this.Menuitem_readimagesClick);
//
// tsep3
//
this.tsep3.Name = "tsep3";
this.tsep3.Size = new System.Drawing.Size(121, 6);
this.tsep3.Size = new System.Drawing.Size(162, 6);
//
// menuitem_quit
//
this.menuitem_quit.Name = "menuitem_quit";
this.menuitem_quit.Size = new System.Drawing.Size(124, 22);
this.menuitem_quit.Text = "退出";
this.menuitem_quit.Size = new System.Drawing.Size(165, 22);
this.menuitem_quit.Text = "退出(&Q)";
this.menuitem_quit.Click += new System.EventHandler(this.Menuitem_quitClick);
//
// menuitem_edit
//
this.menuitem_edit.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_undo,
this.menuitem_redo,
this.tsep4,
this.menuitem_add,
this.menuitem_mod,
this.menuitem_del,
this.tsep5,
this.menuitem_search,
this.menuitem_reset,
this.tsep6,
this.menuitem_showimage,
this.menuitem_openscript,
this.menuitem_opengame});
this.menuitem_showimage});
this.menuitem_edit.Name = "menuitem_edit";
this.menuitem_edit.Size = new System.Drawing.Size(59, 21);
this.menuitem_edit.Text = "编辑(&E)";
//
// menuitem_undo
//
this.menuitem_undo.Name = "menuitem_undo";
this.menuitem_undo.Size = new System.Drawing.Size(152, 22);
this.menuitem_undo.Text = "撤销";
this.menuitem_undo.Click += new System.EventHandler(this.Menuitem_undoClick);
//
// menuitem_redo
//
this.menuitem_redo.Name = "menuitem_redo";
this.menuitem_redo.Size = new System.Drawing.Size(152, 22);
this.menuitem_redo.Text = "还原";
this.menuitem_redo.Click += new System.EventHandler(this.Menuitem_redoClick);
//
// tsep4
//
this.tsep4.Name = "tsep4";
this.tsep4.Size = new System.Drawing.Size(149, 6);
//
// menuitem_add
//
this.menuitem_add.Name = "menuitem_add";
this.menuitem_add.Size = new System.Drawing.Size(152, 22);
this.menuitem_add.Text = "添加";
this.menuitem_add.Click += new System.EventHandler(this.Menuitem_addClick);
//
// menuitem_mod
//
this.menuitem_mod.Name = "menuitem_mod";
this.menuitem_mod.Size = new System.Drawing.Size(152, 22);
this.menuitem_mod.Text = "修改";
this.menuitem_mod.Click += new System.EventHandler(this.Menuitem_modClick);
//
// menuitem_del
//
this.menuitem_del.Name = "menuitem_del";
this.menuitem_del.Size = new System.Drawing.Size(152, 22);
this.menuitem_del.Text = "删除";
this.menuitem_del.Click += new System.EventHandler(this.Menuitem_delClick);
//
// tsep5
//
this.tsep5.Name = "tsep5";
this.tsep5.Size = new System.Drawing.Size(149, 6);
//
// menuitem_search
//
this.menuitem_search.Name = "menuitem_search";
this.menuitem_search.Size = new System.Drawing.Size(152, 22);
this.menuitem_search.Text = "搜索";
this.menuitem_search.Click += new System.EventHandler(this.Menuitem_searchClick);
//
// menuitem_reset
//
this.menuitem_reset.Name = "menuitem_reset";
this.menuitem_reset.Size = new System.Drawing.Size(152, 22);
this.menuitem_reset.Text = "重置";
this.menuitem_reset.Click += new System.EventHandler(this.Menuitem_resetClick);
//
// tsep6
//
this.tsep6.Name = "tsep6";
this.tsep6.Size = new System.Drawing.Size(149, 6);
this.menuitem_edit.Text = "设置(&T)";
//
// menuitem_showimage
//
this.menuitem_showimage.CheckOnClick = true;
this.menuitem_showimage.Name = "menuitem_showimage";
this.menuitem_showimage.Size = new System.Drawing.Size(152, 22);
this.menuitem_showimage.Text = "显示卡片图像";
this.menuitem_showimage.Size = new System.Drawing.Size(163, 22);
this.menuitem_showimage.Text = "显示卡片图像(&S)";
this.menuitem_showimage.Click += new System.EventHandler(this.Menuitem_showimageClick);
//
// menuitem_openscript
//
this.menuitem_openscript.Name = "menuitem_openscript";
this.menuitem_openscript.Size = new System.Drawing.Size(152, 22);
this.menuitem_openscript.Text = "打开脚本";
this.menuitem_openscript.Click += new System.EventHandler(this.Menuitem_openscriptClick);
//
// menuitem_opengame
//
this.menuitem_opengame.Name = "menuitem_opengame";
this.menuitem_opengame.Size = new System.Drawing.Size(152, 22);
this.menuitem_opengame.Text = "启动游戏";
this.menuitem_opengame.Click += new System.EventHandler(this.Menuitem_opengameClick);
//
// menuitem_help
//
this.menuitem_help.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_about,
this.menuitem_checkupdate});
this.menuitem_checkupdate,
this.menuitem_github});
this.menuitem_help.Name = "menuitem_help";
this.menuitem_help.Size = new System.Drawing.Size(61, 21);
this.menuitem_help.Text = "帮助(&H)";
......@@ -362,17 +212,25 @@ private void InitializeComponent()
// menuitem_about
//
this.menuitem_about.Name = "menuitem_about";
this.menuitem_about.Size = new System.Drawing.Size(124, 22);
this.menuitem_about.ShortcutKeys = System.Windows.Forms.Keys.F1;
this.menuitem_about.Size = new System.Drawing.Size(152, 22);
this.menuitem_about.Text = "关于";
this.menuitem_about.Click += new System.EventHandler(this.Menuitem_aboutClick);
//
// menuitem_checkupdate
//
this.menuitem_checkupdate.Name = "menuitem_checkupdate";
this.menuitem_checkupdate.Size = new System.Drawing.Size(124, 22);
this.menuitem_checkupdate.Size = new System.Drawing.Size(152, 22);
this.menuitem_checkupdate.Text = "检查更新";
this.menuitem_checkupdate.Click += new System.EventHandler(this.Menuitem_checkupdateClick);
//
// menuitem_github
//
this.menuitem_github.Name = "menuitem_github";
this.menuitem_github.Size = new System.Drawing.Size(152, 22);
this.menuitem_github.Text = "程序源码";
this.menuitem_github.Click += new System.EventHandler(this.Menuitem_githubClick);
//
// lv_cardlist
//
this.lv_cardlist.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
......@@ -380,7 +238,6 @@ private void InitializeComponent()
this.lv_cardlist.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.ch_cardcode,
this.ch_cardname});
this.lv_cardlist.ContextMenuStrip = this.contextMenuStrip1;
this.lv_cardlist.FullRowSelect = true;
this.lv_cardlist.GridLines = true;
this.lv_cardlist.HideSelection = false;
......@@ -393,6 +250,7 @@ private void InitializeComponent()
this.lv_cardlist.UseCompatibleStateImageBehavior = false;
this.lv_cardlist.View = System.Windows.Forms.View.Details;
this.lv_cardlist.SelectedIndexChanged += new System.EventHandler(this.Lv_cardlistSelectedIndexChanged);
this.lv_cardlist.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Lv_cardlistKeyDown);
//
// ch_cardcode
//
......@@ -404,40 +262,6 @@ private void InitializeComponent()
this.ch_cardname.Text = "卡片名称";
this.ch_cardname.Width = 140;
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.importToolStripMenuItem,
this.exportToolStripMenuItem,
this.copyToToolStripMenuItem,
this.deleteToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(122, 92);
//
// importToolStripMenuItem
//
this.importToolStripMenuItem.Name = "importToolStripMenuItem";
this.importToolStripMenuItem.Size = new System.Drawing.Size(121, 22);
this.importToolStripMenuItem.Text = "Import";
//
// exportToolStripMenuItem
//
this.exportToolStripMenuItem.Name = "exportToolStripMenuItem";
this.exportToolStripMenuItem.Size = new System.Drawing.Size(121, 22);
this.exportToolStripMenuItem.Text = "Export";
//
// copyToToolStripMenuItem
//
this.copyToToolStripMenuItem.Name = "copyToToolStripMenuItem";
this.copyToToolStripMenuItem.Size = new System.Drawing.Size(121, 22);
this.copyToToolStripMenuItem.Text = "CopyTo";
//
// deleteToolStripMenuItem
//
this.deleteToolStripMenuItem.Name = "deleteToolStripMenuItem";
this.deleteToolStripMenuItem.Size = new System.Drawing.Size(121, 22);
this.deleteToolStripMenuItem.Text = "Delete";
//
// cb_cardattribute
//
this.cb_cardattribute.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
......@@ -533,25 +357,25 @@ private void InitializeComponent()
//
// lb_scripttext
//
this.lb_scripttext.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.lb_scripttext.FormattingEnabled = true;
this.lb_scripttext.IntegralHeight = false;
this.lb_scripttext.ItemHeight = 12;
this.lb_scripttext.Location = new System.Drawing.Point(532, 357);
this.lb_scripttext.Name = "lb_scripttext";
this.lb_scripttext.ScrollAlwaysVisible = true;
this.lb_scripttext.Size = new System.Drawing.Size(281, 120);
this.lb_scripttext.Size = new System.Drawing.Size(281, 138);
this.lb_scripttext.TabIndex = 6;
this.lb_scripttext.SelectedIndexChanged += new System.EventHandler(this.Lb_scripttextSelectedIndexChanged);
//
// tb_edittext
//
this.tb_edittext.HideSelection = false;
this.tb_edittext.Location = new System.Drawing.Point(533, 478);
this.tb_edittext.Location = new System.Drawing.Point(533, 499);
this.tb_edittext.MaxLength = 2000;
this.tb_edittext.Multiline = true;
this.tb_edittext.Name = "tb_edittext";
this.tb_edittext.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.tb_edittext.Size = new System.Drawing.Size(279, 41);
this.tb_edittext.Size = new System.Drawing.Size(279, 21);
this.tb_edittext.TabIndex = 4;
this.tb_edittext.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Tb_edittextKeyPress);
//
......@@ -611,7 +435,7 @@ private void InitializeComponent()
this.tb_page.Name = "tb_page";
this.tb_page.Size = new System.Drawing.Size(34, 21);
this.tb_page.TabIndex = 8;
this.tb_page.Text = "0";
this.tb_page.Text = "1";
this.tb_page.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.tb_page.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Tb_pageKeyPress);
//
......@@ -624,7 +448,7 @@ private void InitializeComponent()
this.tb_pagenum.ReadOnly = true;
this.tb_pagenum.Size = new System.Drawing.Size(34, 21);
this.tb_pagenum.TabIndex = 8;
this.tb_pagenum.Text = "0";
this.tb_pagenum.Text = "1";
this.tb_pagenum.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// btn_PageUp
......@@ -653,9 +477,9 @@ private void InitializeComponent()
//
this.btn_add.Location = new System.Drawing.Point(532, 524);
this.btn_add.Name = "btn_add";
this.btn_add.Size = new System.Drawing.Size(68, 26);
this.btn_add.Size = new System.Drawing.Size(78, 27);
this.btn_add.TabIndex = 5;
this.btn_add.Text = "添加";
this.btn_add.Text = "添加卡片";
this.btn_add.UseVisualStyleBackColor = true;
this.btn_add.Click += new System.EventHandler(this.Btn_addClick);
//
......@@ -729,39 +553,39 @@ private void InitializeComponent()
//
// btn_mod
//
this.btn_mod.Location = new System.Drawing.Point(603, 524);
this.btn_mod.Location = new System.Drawing.Point(616, 524);
this.btn_mod.Name = "btn_mod";
this.btn_mod.Size = new System.Drawing.Size(68, 26);
this.btn_mod.Size = new System.Drawing.Size(78, 27);
this.btn_mod.TabIndex = 5;
this.btn_mod.Text = "修改";
this.btn_mod.Text = "修改卡片";
this.btn_mod.UseVisualStyleBackColor = true;
this.btn_mod.Click += new System.EventHandler(this.Btn_modClick);
//
// btn_del
//
this.btn_del.ForeColor = System.Drawing.Color.DarkRed;
this.btn_del.Location = new System.Drawing.Point(743, 524);
this.btn_del.Location = new System.Drawing.Point(445, 523);
this.btn_del.Name = "btn_del";
this.btn_del.Size = new System.Drawing.Size(68, 26);
this.btn_del.Size = new System.Drawing.Size(78, 27);
this.btn_del.TabIndex = 5;
this.btn_del.Text = "删除";
this.btn_del.Text = "删除卡片";
this.btn_del.UseVisualStyleBackColor = true;
this.btn_del.Click += new System.EventHandler(this.Btn_delClick);
//
// btn_lua
//
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(673, 524);
this.btn_lua.Location = new System.Drawing.Point(715, 523);
this.btn_lua.Name = "btn_lua";
this.btn_lua.Size = new System.Drawing.Size(68, 26);
this.btn_lua.Size = new System.Drawing.Size(94, 27);
this.btn_lua.TabIndex = 5;
this.btn_lua.Text = "脚本";
this.btn_lua.Text = "打开Lua脚本";
this.btn_lua.UseVisualStyleBackColor = true;
this.btn_lua.Click += new System.EventHandler(this.Btn_luaClick);
//
// btn_reset
//
this.btn_reset.Location = new System.Drawing.Point(307, 523);
this.btn_reset.Location = new System.Drawing.Point(312, 523);
this.btn_reset.Name = "btn_reset";
this.btn_reset.Size = new System.Drawing.Size(78, 27);
this.btn_reset.TabIndex = 5;
......@@ -832,26 +656,6 @@ private void InitializeComponent()
this.label7.Text = "卡片信息";
this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// btn_redo
//
this.btn_redo.Location = new System.Drawing.Point(390, 522);
this.btn_redo.Name = "btn_redo";
this.btn_redo.Size = new System.Drawing.Size(68, 26);
this.btn_redo.TabIndex = 5;
this.btn_redo.Text = "还原";
this.btn_redo.UseVisualStyleBackColor = true;
this.btn_redo.Click += new System.EventHandler(this.Btn_redoClick);
//
// btn_undo
//
this.btn_undo.Location = new System.Drawing.Point(460, 522);
this.btn_undo.Name = "btn_undo";
this.btn_undo.Size = new System.Drawing.Size(68, 26);
this.btn_undo.TabIndex = 5;
this.btn_undo.Text = "撤销";
this.btn_undo.UseVisualStyleBackColor = true;
this.btn_undo.Click += new System.EventHandler(this.Btn_undoClick);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(530, -168);
......@@ -890,6 +694,7 @@ private void InitializeComponent()
//
// pl_cardtype
//
this.pl_cardtype.AutoScroll = true;
this.pl_cardtype.Location = new System.Drawing.Point(220, 219);
this.pl_cardtype.Margin = new System.Windows.Forms.Padding(1, 2, 1, 2);
this.pl_cardtype.Name = "pl_cardtype";
......@@ -899,11 +704,12 @@ private void InitializeComponent()
//
// pl_category
//
this.pl_category.AutoScroll = true;
this.pl_category.Location = new System.Drawing.Point(220, 353);
this.pl_category.Margin = new System.Windows.Forms.Padding(1, 2, 1, 2);
this.pl_category.Name = "pl_category";
this.pl_category.Padding = new System.Windows.Forms.Padding(2);
this.pl_category.Size = new System.Drawing.Size(310, 169);
this.pl_category.Size = new System.Drawing.Size(310, 166);
this.pl_category.TabIndex = 13;
//
// DataEditForm
......@@ -940,9 +746,7 @@ private void InitializeComponent()
this.Controls.Add(this.btn_lua);
this.Controls.Add(this.btn_serach);
this.Controls.Add(this.btn_del);
this.Controls.Add(this.btn_undo);
this.Controls.Add(this.btn_mod);
this.Controls.Add(this.btn_redo);
this.Controls.Add(this.btn_add);
this.Controls.Add(this.btn_PageDown);
this.Controls.Add(this.textBox2);
......@@ -960,30 +764,25 @@ private void InitializeComponent()
this.Controls.Add(this.cb_cardattribute);
this.Controls.Add(this.lv_cardlist);
this.Controls.Add(this.menuStrip1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.MainMenuStrip = this.menuStrip1;
this.MaximizeBox = false;
this.Name = "DataEditForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "DataEditor";
this.Load += new System.EventHandler(this.DataEditFormLoad);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.ToolStripMenuItem menuitem_github;
private System.Windows.Forms.ToolStripMenuItem menuitem_new;
private System.Windows.Forms.ToolStripMenuItem deleteToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem copyToToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exportToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem importToolStripMenuItem;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem menuitem_showimage;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button btn_undo;
private System.Windows.Forms.Button btn_redo;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label3;
......@@ -1031,30 +830,13 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem menuitem_checkupdate;
private System.Windows.Forms.ToolStripMenuItem menuitem_about;
private System.Windows.Forms.ToolStripMenuItem menuitem_help;
private System.Windows.Forms.ToolStripMenuItem menuitem_opengame;
private System.Windows.Forms.ToolStripMenuItem menuitem_openscript;
private System.Windows.Forms.ToolStripSeparator tsep6;
private System.Windows.Forms.ToolStripMenuItem menuitem_reset;
private System.Windows.Forms.ToolStripMenuItem menuitem_search;
private System.Windows.Forms.ToolStripSeparator tsep5;
private System.Windows.Forms.ToolStripMenuItem menuitem_del;
private System.Windows.Forms.ToolStripMenuItem menuitem_mod;
private System.Windows.Forms.ToolStripMenuItem menuitem_add;
private System.Windows.Forms.ToolStripSeparator tsep4;
private System.Windows.Forms.ToolStripMenuItem menuitem_redo;
private System.Windows.Forms.ToolStripMenuItem menuitem_undo;
private System.Windows.Forms.ToolStripMenuItem menuitem_edit;
private System.Windows.Forms.ToolStripMenuItem menuitem_quit;
private System.Windows.Forms.ToolStripSeparator tsep3;
private System.Windows.Forms.ToolStripMenuItem menuitem_readimages;
private System.Windows.Forms.ToolStripMenuItem menuitem_readydk;
private System.Windows.Forms.ToolStripSeparator tsep2;
private System.Windows.Forms.ToolStripMenuItem menuitem_export;
private System.Windows.Forms.ToolStripMenuItem menuitem_inport;
private System.Windows.Forms.ToolStripSeparator tsep1;
private System.Windows.Forms.ToolStripMenuItem menuitem_copyto;
private System.Windows.Forms.ToolStripMenuItem menuitem_saveas;
private System.Windows.Forms.ToolStripMenuItem menuitem_save;
private System.Windows.Forms.ToolStripMenuItem menuitem_open;
private System.Windows.Forms.ToolStripMenuItem menuitem_file;
private System.Windows.Forms.MenuStrip menuStrip1;
......
......@@ -20,8 +20,10 @@ namespace DataEditorX
/// </summary>
public partial class DataEditForm : Form
{
string GAMEPATH,PICPATH,UPDATEURL;
#region 成员变量
string GAMEPATH,PICPATH,UPDATEURL,GITURL,LUAPTH;
Card oldCard=new Card(0);
Card srcCard=new Card(0);
ImageForm imgform=new ImageForm();
string[] strs=null;
string title;
......@@ -30,6 +32,7 @@ public partial class DataEditForm : Form
int page=1,pageNum=1;
int cardcount;
string strSetname="卡片系列";
List<Card> cardlist=new List<Card>();
Dictionary<long, string> dicCardRules=null;
Dictionary<long, string> dicCardAttributes=null;
......@@ -38,18 +41,20 @@ public partial class DataEditForm : Form
Dictionary<long, string> dicSetnames=null;
Dictionary<long, string> dicCardTypes=null;
Dictionary<long, string> dicCardcategorys=null;
#endregion
#region 界面初始化
public DataEditForm(string cdbfile)
{
InitializeComponent();
nowCdbFile=cdbfile;
}
public DataEditForm()
{
InitializeComponent();
}
#region 界面初始化
void DataEditFormLoad(object sender, EventArgs e)
{
InitListRows();
......@@ -68,10 +73,17 @@ void DataEditFormLoad(object sender, EventArgs e)
{
string[] lines=File.ReadAllLines(Path.Combine(GAMEPATH,"DataEditorX.txt"),Encoding.Default);
GAMEPATH=(lines.Length>0)?lines[0]:Application.StartupPath;
UPDATEURL=(lines.Length>1)?lines[1]:"http://about:blank";
UPDATEURL=(lines.Length>1)?lines[1]:"http://247321453@ys168.com";
GITURL=(lines.Length>2)?lines[2]:"https://github.com/247321453/DataEditorX";
}
else
{
GAMEPATH=Application.StartupPath;
UPDATEURL="http://247321453@ys168.com";
GITURL="https://github.com/247321453/DataEcitorX";
}
PICPATH=Path.Combine(GAMEPATH,"pics");
LUAPTH=Path.Combine(GAMEPATH,"script");
}
public void InitForm(string directory)
{
......@@ -174,7 +186,8 @@ void SetCard(Card c)
tb_cardname.Text=c.name;
tb_cardtext.Text=c.desc;
strs=c.str;
strs=new string[c.str.Length];
Array.Copy(c.str,strs,c.str.Length);
lb_scripttext.Items.Clear();
lb_scripttext.Items.AddRange(c.str);
tb_edittext.Text="";
......@@ -219,21 +232,26 @@ void SetCheck(FlowLayoutPanel fpl,long number)
void SetSelect(Dictionary<long, string> dic,ComboBox cb, long k,int start)
{
int index=0;
bool isfind=false;
int index=start;
if(k==0)
{
cb.SelectedIndex=0;
return;
}
foreach(long key in dic.Keys)
{
if(k==key)
{
isfind=true;
break;
}
index++;
}
if(isfind)
cb.SelectedIndex=index+start;
else
cb.SelectedIndex=0;
if(index==cb.Items.Count)
{
string word="0x"+k.ToString("x");
if(!dic.ContainsKey(k))
dic.Add(k, word);
cb.Items.Add(word);
}
cb.SelectedIndex=index;
}
#endregion
......@@ -242,24 +260,26 @@ void SetSelect(Dictionary<long, string> dic,ComboBox cb, long k,int start)
Card GetCard()
{
int temp;
long ltemp;
Card c=new Card(0);
c.name=tb_cardname.Text;
c.desc=tb_cardtext.Text;
c.str=strs;
Array.Copy(strs,c.str, c.str.Length);
int.TryParse(GetSelect(dicCardRules,cb_cardrule,0),out c.ot);
int.TryParse(GetSelect(dicCardAttributes,cb_cardattribute,0),out c.attribute);
long.TryParse(GetSelect(dicCardLevels,cb_cardlevel,0),out c.level);
long.TryParse(GetSelect(dicCardRaces,cb_cardrace,0),out c.race);
int.TryParse(GetSelect(dicSetnames, cb_setname1,1), out temp);
c.setcode+=temp;
int.TryParse(GetSelect(dicSetnames, cb_setname2,1), out temp);
c.setcode+=(temp<<0x10);
int.TryParse(GetSelect(dicSetnames, cb_setname3,1), out temp);
c.setcode+=(temp<<0x20);
int.TryParse(GetSelect(dicSetnames, cb_setname4,1), out temp);
c.setcode+=(temp<<0x30);
long.TryParse(GetSelect(dicSetnames, cb_setname1,1), out ltemp);
c.setcode+=ltemp;
long.TryParse(GetSelect(dicSetnames, cb_setname2,1), out ltemp);
c.setcode+=(ltemp<<0x10);
long.TryParse(GetSelect(dicSetnames, cb_setname3,1), out ltemp);
c.setcode+=(ltemp<<0x20);
long.TryParse(GetSelect(dicSetnames, cb_setname4,1), out ltemp);
c.setcode+=(ltemp<<0x30);
c.type=GetCheck(pl_cardtype);
c.category=GetCheck(pl_category);
......@@ -345,6 +365,7 @@ void Lv_cardlistSelectedIndexChanged(object sender, EventArgs e)
Card c=cardlist[index];
SetCard(c);
//设置卡片图像
if(imgform.Visible)
imgform.SetImageFile(Path.Combine(PICPATH,c.id.ToString()+".jpg"),c.name);
}
}
......@@ -353,23 +374,15 @@ void Lv_cardlistSelectedIndexChanged(object sender, EventArgs e)
void AddListView(int p)
{
int i,j,istart,iend;
if(p<=0)
{
p=1;
istart=(p-1)*MaxRow;
iend=p*MaxRow;
}
else if(p>=pageNum)
{
p=pageNum;
istart=(p-1)*MaxRow;
iend=cardcount;
}
else
{
istart=(p-1)*MaxRow;
iend=p*MaxRow;
}
if(iend>cardcount)
iend=cardcount;
page=p;
lv_cardlist.BeginUpdate();
lv_cardlist.Items.Clear();
......@@ -394,14 +407,28 @@ void AddListView(int p)
}
void Lv_cardlistKeyDown(object sender, KeyEventArgs e)
{
switch(e.KeyCode)
{
case Keys.Delete:ShowMsg("del");break;
case Keys.Right:Btn_PageDownClick(null,null);break;
case Keys.Left:Btn_PageUpClick(null,null);break;
}
}
void Btn_PageUpClick(object sender, EventArgs e)
{
if(!Check())
return;
page--;
AddListView(page);
}
void Btn_PageDownClick(object sender, EventArgs e)
{
if(!Check())
return;
page++;
AddListView(page);
}
......@@ -418,7 +445,18 @@ void Tb_pageKeyPress(object sender, KeyPressEventArgs e)
}
#endregion
#region 卡片编辑
#region 卡片搜索,打开
public bool Check()
{
if(File.Exists(nowCdbFile))
return true;
else
{
ShowWarning("请打开一个数据库!");
return false;
}
}
public bool Open(string cdbFile)
{
if(!File.Exists(cdbFile))
......@@ -426,14 +464,15 @@ public bool Open(string cdbFile)
ShowMsg("文件不存在!\n"+cdbFile);
return false;
}
nowCdbFile=cdbFile;
this.Text=cdbFile+"-"+title;
cardlist.Clear();
SetCards(DataBase.Read(cdbFile,true,""));
SetCards(DataBase.Read(cdbFile,true,""),false);
return true;
}
public void SetCards(Card[] cards)
public void SetCards(Card[] cards, bool isfresh)
{
if(cards!=null)
{
......@@ -444,88 +483,165 @@ public void SetCards(Card[] cards)
pageNum++;
tb_pagenum.Text=pageNum.ToString();
cardlist.AddRange(cards);
if(isfresh)
AddListView(page);
else
AddListView(1);
}
else
{
#if DEBUG
ShowWarning("没有卡片!");
#endif
cardcount=0;
page=1;
pageNum=1;
tb_page.Text=page.ToString();
tb_pagenum.Text=pageNum.ToString();
}
}
public void Search(Card c)
public void Search(Card c, bool isfresh)
{
if(!Check())
return;
srcCard=c;
string sql=DataBase.GetSelectSQL(c);
#if DEBUG
ShowMsg(sql);
#endif
SetCards(DataBase.Read(nowCdbFile, true, sql));
SetCards(DataBase.Read(nowCdbFile, true, sql),isfresh);
}
public void Reset()
{
oldCard=new Card(0);
SetCard(oldCard);
}
public void Undo()
{
}
#endregion
public void Redo()
#region 卡片编辑
//添加
public bool AddCard()
{
if(!Check())
return false;
Card c=GetCard();
if(c.id<=0)
{
ShowError("卡片密码必须大于0!");
return false;
}
if(DataBase.Command(nowCdbFile, DataBase.GetInsertSQL(c,true))>=2)
{
ShowMsg("添加 "+c.ToString()+" 成功!");
Search(srcCard, true);
return true;
}
public bool Add()
ShowError("添加 "+c.ToString()+" 失败!\n原因:可能已经存在该卡片.\n");
return false;
}
//修改
public bool ModCard()
{
if(!Check())
return false;
Card c=GetCard();
if(c.Equals(oldCard))
{
ShowMsg("卡片没有改变!");
return false;
}
public bool Mod()
if(c.id<=0)
{
ShowError("卡片密码必须大于0!");
return false;
}
public bool Del()
if(DataBase.Command(nowCdbFile, DataBase.GetUpdateSQL(c))>0)
{
ShowMsg("修改 "+c.ToString()+" 成功!");
Search(srcCard, true);
}
else
ShowError("修改失败!");
return false;
}
public bool OpenScript()
//删除
public bool DelCards()
{
if(!Check())
return false;
int ic=lv_cardlist.SelectedItems.Count;
if(ic>=0)
return false;
if(!ShowQuestion("是否删除选中的"+ic.ToString()+"张卡片?"))
return false;
List<string> sql=new List<string>();
foreach(ListViewItem lvitem in lv_cardlist.SelectedItems)
{
int index=lvitem.Index+(page-1)*MaxRow;
if(index<cardlist.Count)
{
Card c=cardlist[index];
sql.Add(DataBase.GetDeleteSQL(c));
}
public void OpanGame()
}
if(DataBase.Command(nowCdbFile, sql.ToArray())>=(sql.Count*2))
{
ShowMsg("删除成功!");
Search(srcCard, true);
return true;
}
else
{
ShowError("删除失败!\n原因:可能是卡片的数据不完整。");
Search(srcCard, true);
}
return false;
}
//打开脚本
public bool OpenScript()
{
if(!Check())
return false;
string lua=Path.Combine(LUAPTH,"c"+tb_cardcode.Text+".lua");
if(!File.Exists(lua))
{
if(ShowQuestion("是否创建脚本?\n"+lua))
{
File.Create(lua);
}
}
if(File.Exists(lua))
System.Diagnostics.Process.Start(lua);
return false;
}
#endregion
#region 按钮
//搜索卡片
void Btn_serachClick(object sender, EventArgs e)
{
Search(GetCard());
Search(GetCard(), false);
}
//重置卡片
void Btn_resetClick(object sender, EventArgs e)
{
Reset();
}
//还原
void Btn_redoClick(object sender, EventArgs e)
{
Redo();
}
//撤销
void Btn_undoClick(object sender, EventArgs e)
{
Undo();
}
//添加
void Btn_addClick(object sender, EventArgs e)
{
Add();
AddCard();
}
//修改
void Btn_modClick(object sender, EventArgs e)
{
Mod();
ModCard();
}
//打开脚本
void Btn_luaClick(object sender, EventArgs e)
......@@ -535,20 +651,23 @@ void Btn_luaClick(object sender, EventArgs e)
//删除
void Btn_delClick(object sender, EventArgs e)
{
Del();
DelCards();
}
#endregion
#region 文本框
//卡片密码搜索
void Tb_cardcodeKeyPress(object sender, KeyPressEventArgs e)
{
if(e.KeyChar==(char)Keys.Enter)
{
Card c=new Card(0);
long.TryParse(tb_cardcode.Text, out c.id);
if(c.id>0)
{
string sql=DataBase.GetSelectSQL(c);
SetCards(DataBase.Read(nowCdbFile, true, sql));
SetCards(DataBase.Read(nowCdbFile, true, sql), false);
}
}
}
//卡片名称搜索、编辑
......@@ -559,7 +678,7 @@ void Tb_cardnameKeyDown(object sender, KeyEventArgs e)
Card c=new Card(0);
c.name=tb_cardname.Text;
string sql=DataBase.GetSelectSQL(c);
SetCards(DataBase.Read(nowCdbFile, true, sql));
SetCards(DataBase.Read(nowCdbFile, true, sql), false);
}
}
//卡片描述编辑
......@@ -618,107 +737,110 @@ void Tb_edittextKeyPress(object sender, KeyPressEventArgs e)
#region 帮助菜单
void Menuitem_aboutClick(object sender, EventArgs e)
{
ShowMsg("程序:DataEditorX\n作者:247321453\nE-mail:247321453@qq.com\n");
}
void Menuitem_checkupdateClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(UPDATEURL);
}
void Menuitem_githubClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(GITURL);
}
#endregion
#region 文件菜单
void Menuitem_openClick(object sender, EventArgs e)
{
}
void Menuitem_saveClick(object sender, EventArgs e)
using(OpenFileDialog dlg=new OpenFileDialog())
{
}
void Menuitem_saveasClick(object sender, EventArgs e)
dlg.Title="选择卡片数据库(cdb文件)";
dlg.Filter="cdb文件(*.cdb)|*.cdb|所有文件(*.*)|*.*";
if(dlg.ShowDialog()==DialogResult.OK)
{
Open(dlg.FileName);
}
}
}
void Menuitem_newClick(object sender, EventArgs e)
{
using(SaveFileDialog dlg=new SaveFileDialog())
{
dlg.Title="选择卡片数据库(cdb文件)保存位置";
dlg.Filter="cdb文件(*.cdb)|*.cdb|所有文件(*.*)|*.*";
if(dlg.ShowDialog()==DialogResult.OK)
{
if(DataBase.Create(dlg.FileName))
{
Open(dlg.FileName);
}
}
}
}
void Menuitem_copytoClick(object sender, EventArgs e)
{
}
void Menuitem_inportClick(object sender, EventArgs e)
if(!Check())
return;
using(OpenFileDialog dlg=new OpenFileDialog())
{
}
void Menuitem_exportClick(object sender, EventArgs e)
dlg.Title="选择卡片数据库(cdb文件)";
dlg.Filter="cdb文件(*.cdb)|*.cdb|所有文件(*.*)|*.*";
if(dlg.ShowDialog()==DialogResult.OK)
{
if(ShowQuestion("是否覆盖已经存在的卡片?"))
DataBase.CopyDB(dlg.FileName,false,cardlist.ToArray());
else
DataBase.CopyDB(dlg.FileName,true,cardlist.ToArray());
}
}
}
void Menuitem_readydkClick(object sender, EventArgs e)
{
}
void Menuitem_readimagesClick(object sender, EventArgs e)
if(!Check())
return;
using(OpenFileDialog dlg=new OpenFileDialog())
{
}
//关闭
void Menuitem_quitClick(object sender, EventArgs e)
dlg.Title="选择卡组文件(ydk文件)";
dlg.Filter="ydk文件(*.ydk)|*.ydk|所有文件(*.*)|*.*";
if(dlg.ShowDialog()==DialogResult.OK)
{
this.Close();
SetCards(DataBase.ReadYdk(nowCdbFile, dlg.FileName), false);
}
#endregion
#region 编辑菜单
void Menuitem_undoClick(object sender, EventArgs e)
{
Undo();
}
void Menuitem_redoClick(object sender, EventArgs e)
{
Redo();
}
void Menuitem_addClick(object sender, EventArgs e)
void Menuitem_readimagesClick(object sender, EventArgs e)
{
Add();
}
void Menuitem_modClick(object sender, EventArgs e)
if(!Check())
return;
using(FolderBrowserDialog fdlg=new FolderBrowserDialog())
{
Mod();
}
void Menuitem_delClick(object sender, EventArgs e)
fdlg.Description="请选择卡片图像目录";
if(fdlg.ShowDialog()==DialogResult.OK)
{
Del();
SetCards(DataBase.ReadImage(nowCdbFile, fdlg.SelectedPath), false);
}
void Menuitem_searchClick(object sender, EventArgs e)
{
Search(GetCard());
}
void Menuitem_resetClick(object sender, EventArgs e)
}
//关闭
void Menuitem_quitClick(object sender, EventArgs e)
{
Reset();
this.Close();
}
#endregion
#region 设置菜单
void Menuitem_showimageClick(object sender, EventArgs e)
{
if(menuitem_showimage.Checked)
{
imgform.SetImageFile(
Path.Combine(PICPATH, tb_cardcode.Text+".jpg"),
tb_cardname.Text);
imgform.Show();
}
else
imgform.Hide();
}
......@@ -727,15 +849,7 @@ void OnimgFormClosed(object sender, EventArgs e)
menuitem_showimage.Checked=imgform.Visible;
}
void Menuitem_openscriptClick(object sender, EventArgs e)
{
OpenScript();
}
void Menuitem_opengameClick(object sender, EventArgs e)
{
OpanGame();
}
#endregion
}
}
......@@ -120,9 +120,6 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>130, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
</metadata>
......
......@@ -9,6 +9,9 @@
<AssemblyName>DataEditorX</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<AppDesignerFolder>Properties</AppDesignerFolder>
<StartupObject>DataEditorX.Program</StartupObject>
<ApplicationIcon>icon.ico</ApplicationIcon>
<NoWin32Manifest>False</NoWin32Manifest>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'AnyCPU' ">
<PlatformTarget>x86</PlatformTarget>
......
......@@ -10,7 +10,7 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DataEditorX")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("E-mail:247321452@qq.com")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("DataEditorX")]
......
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