private void ProcessForm_Load(object sender, EventArgs e) { t = null; stop = true; this.Text = title; switch (title) { case "复制图片,脚本": stop = false; CCFile.CheckFolder(path2); CCFile.CheckFolder(path2 + "pics"); CCFile.CheckFolder(path2 + "pics\\field"); CCFile.CheckFolder(path2 + "pics\\thumbnail"); CCFile.CheckFolder(path2 + "script"); NUM = CDB.ids.Count; t = new Thread(Copy); break; case "裁剪图片": stop = false; CCFile.CheckFolder(path2); NUM = CDB.cards.Count; t = new Thread(Cut); break; case "图片调整": stop = false; CCFile.CheckFolder(path2); CCFile.CheckFolder(path2 + "pics"); CCFile.CheckFolder(path2 + "pics\\thumbnail"); names = CCFile.FindFiles(path1, ex, false); NUM = names.Length; t = new Thread(ReSize); break; case "提取图片": stop = false; label1.Text = "提取中。。。"; progressBar1.Style = ProgressBarStyle.Marquee; NUM = 1; t = new Thread(Get_setjpg); break; } if (t != null && NUM > 0) { pb1 = new _ProcessBar1(ProcessADD); lb1 = new _Label1(Setlabel); fm = new _Form(closeForm); progressBar1.Maximum = NUM; t.IsBackground = true; t.Start(); } else { stop = true; this.Close(); } }
private void ToolStrip_SearchJPG_Click(object sender, EventArgs e) { string path; if (CCFile.SelectFolder(out path, "请选择:\n需要读取的卡片的图片文件夹(jpg格式)", "")) { CDB.Read(CDBfile, CCFile.FindFiles(path, "jpg", false)); Count = CDB.ids.Count; SetNum(); Add_cardslist(); } }
private void ToolStrip_cdblist_MouseEnter(object sender, EventArgs e) { ToolStrip_cdblist.DropDownItems.Clear(); ToolStrip_cdblist.DropDownItems.Add(@"新建数据库(&D)", null, ToolStrip_newCDB_Click); ToolStrip_cdblist.DropDownItems[0].ToolTipText = "创建一个空白的数据库"; ToolStrip_cdblist.DropDownItems.Add(@"打开数据库(&O)", null, ToolStrip_openCDB_Click); ToolStrip_cdblist.DropDownItems[1].ToolTipText = "打开一个其他位置的数据库"; if (!SET.GamePath.Equals(path)) { SET.AddCDB(CCFile.FindFiles(path, "cdb", true)); } SET.AddCDB(CCFile.FindFiles(SET.GamePath, "cdb", true)); AddCDBlist(); }