Commit 9c6df5b0 authored by keyongyu's avatar keyongyu

1.6.7.0

parent de17af7e
......@@ -23,56 +23,17 @@ namespace DataEditorX.Core
/// </summary>
public class MSE
{
/*
*
normal monster 通常怪兽
effect monster 效果怪兽
fusion monster 融合怪兽
ritual monster 仪式怪兽
synchro monster 同调怪兽
token monster 衍生物
xyz monster 超量怪兽
spell card 魔法
trap card 陷阱
*/
static bool isInit=false;
static MSEConfig cfg;
static Dictionary<long,string> mTypedic;
static Dictionary<long,string> mRacedic;
MSEConfig cfg;
MSEConvert conv;
public static void Init(string path,
Dictionary<long,string> typedic,
Dictionary<long,string> racedic)
public MSE(string path,
Dictionary<long,string> typedic,
Dictionary<long,string> racedic)
{
if(isInit)
return;
cfg=new MSEConfig(path);
mTypedic = typedic;
mRacedic = racedic;
MSEConvert.Init(typedic, racedic, cfg);
isInit=true;
conv=new MSEConvert(typedic, racedic, cfg);
}
public static void Save(string file, Card[] cards,string pic,bool isUpdate){
if(!isInit)
return;
string setFile=Path.Combine(Application.StartupPath, "mse-set.txt");
string[] images=WriteSet(setFile, cards, pic);
if(isUpdate)//仅更新文字
return;
using(ZipStorer zips=ZipStorer.Create(file, ""))
{
zips.AddFile(setFile,"set","");
foreach ( string img in images )
{
zips.AddFile(img, Path.GetFileName(img),"");
}
zips.Close();
}
File.Delete(setFile);
}
public static string[] WriteSet(string file,Card[] cards,string pic)
public string[] WriteSet(string file,Card[] cards,string pic)
{
List<string> list=new List<string>();
using(FileStream fs=new FileStream(file,
......@@ -99,17 +60,8 @@ public static string[] WriteSet(string file,Card[] cards,string pic)
return list.ToArray();
}
public static string reItalic(string str)
{
str=MSEConvert.cn2tw(str);
foreach(RegStr rs in cfg.replaces)
{
str= Regex.Replace(str, rs.pstr, rs.rstr);
}
return str;
}
static string getMonster(Card c,string img,bool isPendulum)
string getMonster(Card c,string img,bool isPendulum)
{
StringBuilder sb=new StringBuilder();
if(isPendulum)
......@@ -117,43 +69,43 @@ static string getMonster(Card c,string img,bool isPendulum)
else
sb.Append(cfg.monster);
string[] types=MSEConvert.GetTypes(c);
string race=MSEConvert.GetRace(c.race);
string[] types = conv.GetTypes(c);
string race = conv.GetRace(c.race);
sb.Replace("%type%", types[0]);
sb.Replace("%name%", MSE.reItalic(c.name));
sb.Replace("%attribute%", MSEConvert.GetAttribute(c.attribute));
sb.Replace("%level%", MSEConvert.GetStar(c.level));
sb.Replace("%name%", conv.reItalic(c.name));
sb.Replace("%attribute%", conv.GetAttribute(c.attribute));
sb.Replace("%level%", conv.GetStar(c.level));
sb.Replace("%image%", img);
sb.Replace("%race%", race);
sb.Replace("%type1%",types[1]);
sb.Replace("%type2%",types[2]);
sb.Replace("%type3%",types[3]);
if(isPendulum){
sb.Replace("%desc%", MSEConvert.ReDesc(
MSEConvert.GetDesc(c.desc, cfg.regx_monster)));
sb.Replace("%desc%", conv.ReDesc(
conv.GetDesc(c.desc, cfg.regx_monster)));
sb.Replace("%pl%", ((c.level >> 0x18) & 0xff).ToString());
sb.Replace("%pr%", ((c.level >> 0x10) & 0xff).ToString());
sb.Replace("%pdesc%", MSEConvert.ReDesc(
MSEConvert.GetDesc(c.desc, cfg.regx_pendulum)));
sb.Replace("%pdesc%", conv.ReDesc(
conv.GetDesc(c.desc, cfg.regx_pendulum)));
}
else
sb.Replace("%desc%", MSEConvert.ReDesc(c.desc));
sb.Replace("%desc%", conv.ReDesc(c.desc));
sb.Replace("%atk%", (c.atk<0)?"?":c.atk.ToString());
sb.Replace("%def%", (c.def<0)?"?":c.def.ToString());
sb.Replace("%code%",c.id.ToString("00000000"));
sb.Replace("%code%", conv.Code(c.id));
return sb.ToString();
}
static string getSpellTrap(Card c,string img,bool isSpell)
string getSpellTrap(Card c,string img,bool isSpell)
{
StringBuilder sb=new StringBuilder(cfg.spelltrap);
sb.Replace("%type%", isSpell?"spell card":"trap card");
sb.Replace("%name%", MSE.reItalic(c.name));
sb.Replace("%name%", conv.reItalic(c.name));
sb.Replace("%attribute%", isSpell?"spell":"trap");
sb.Replace("%level%", MSEConvert.GetST(c, isSpell));
sb.Replace("%level%", conv.GetST(c, isSpell));
sb.Replace("%image%", img);
sb.Replace("%desc%", MSEConvert.ReDesc(c.desc));
sb.Replace("%code%", c.id.ToString("00000000"));
sb.Replace("%desc%", conv.ReDesc(c.desc));
sb.Replace("%code%", conv.Code(c.id));
return sb.ToString();
}
}
......
......@@ -19,10 +19,22 @@ namespace DataEditorX.Core
/// </summary>
public class MSEConvert
{
static MSEConfig cfg;
static Dictionary<long,string> mTypedic=null;
static Dictionary<long,string> mRacedic=null;
public static void Init(Dictionary<long,string> typedic,
/*
*
normal monster 通常怪兽
effect monster 效果怪兽
fusion monster 融合怪兽
ritual monster 仪式怪兽
synchro monster 同调怪兽
token monster 衍生物
xyz monster 超量怪兽
spell card 魔法
trap card 陷阱
*/
MSEConfig cfg;
Dictionary<long,string> mTypedic=null;
Dictionary<long,string> mRacedic=null;
public MSEConvert(Dictionary<long,string> typedic,
Dictionary<long,string> racedic,
MSEConfig _cfg)
{
......@@ -31,7 +43,11 @@ public class MSEConvert
cfg=_cfg;
}
public static string GetST(Card c,bool isSpell)
public string Code(long id)
{
return id.ToString("00000000");
}
public string GetST(Card c,bool isSpell)
{
string level;
if(c.IsType(CardType.TYPE_EQUIP))
......@@ -57,8 +73,16 @@ public static string GetST(Card c,bool isSpell)
level=cfg.str_trap.Replace("%%",level);
return level;
}
public static string cn2tw(string str)
public string reItalic(string str)
{
str=cn2tw(str);
foreach(RegStr rs in cfg.replaces)
{
str= Regex.Replace(str, rs.pstr, rs.rstr);
}
return str;
}
public string cn2tw(string str)
{
if(cfg.Iscn2tw){
str= Strings.StrConv(str,VbStrConv.TraditionalChinese,0);
......@@ -66,10 +90,10 @@ public static string cn2tw(string str)
}
return str;
}
public static string ReDesc(string desc)
public string ReDesc(string desc)
{
desc=cn2tw(desc);
StringBuilder sb=new StringBuilder(MSE.reItalic(desc));
StringBuilder sb=new StringBuilder(reItalic(desc));
sb.Replace(Environment.NewLine, "\n");
sb.Replace("\n\n","\n");
......@@ -77,7 +101,7 @@ public static string ReDesc(string desc)
sb.Replace(" ","^");
return sb.ToString();
}
public static string[] GetTypes(Card c)
public string[] GetTypes(Card c)
{
string[] types=new string[]{"normal monster","","",""};
if(c.IsType(CardType.TYPE_MONSTER))
......@@ -164,7 +188,7 @@ public static string[] GetTypes(Card c)
return types;
}
static string GetType(CardType type)
string GetType(CardType type)
{
long key=(long)type;
if(mTypedic==null)
......@@ -174,7 +198,7 @@ static string GetType(CardType type)
return "";
}
public static string GetStar(long level)
public string GetStar(long level)
{
long j=level&0xff;
string star="";
......@@ -185,7 +209,7 @@ public static string GetStar(long level)
return star;
}
public static string GetRace(long race)
public string GetRace(long race)
{
if(race==0)
return "";
......@@ -196,7 +220,7 @@ public static string GetRace(long race)
return "";
}
public static string GetDesc(string desc,string regx)
public string GetDesc(string desc,string regx)
{
desc=desc.Replace(Environment.NewLine,"\n");
Regex regex=new Regex(regx);
......@@ -207,7 +231,7 @@ public static string GetDesc(string desc,string regx)
return "";
}
public static string GetAttribute(int attr)
public string GetAttribute(int attr)
{
CardAttribute cattr= (CardAttribute)attr;
string sattr="none";
......
......@@ -9,12 +9,11 @@
using System.Collections.Generic;
using System.Configuration;
using System.Drawing;
using System.Globalization;
using System.IO;
using System.Text;
using System.IO.Compression;
using System.Windows.Forms;
using System.ComponentModel;
using DataEditorX.Core;
using DataEditorX.Language;
namespace DataEditorX.Core
......@@ -32,20 +31,40 @@ public enum MyTask{
/// </summary>
public class TaskHelper
{
private static MyTask nowTask=MyTask.NONE;
private static Card[] cardlist;
private static string[] mArgs;
private static ImageSet imgSet=new ImageSet();
public static MyTask getTask(){
return nowTask;
private MyTask nowTask=MyTask.NONE;
private MyTask lastTask=MyTask.NONE;
private Card[] cardlist;
private string[] mArgs;
private ImageSet imgSet=new ImageSet();
private MSE mseHelper;
private bool isCancel=false;
private BackgroundWorker worker;
public TaskHelper(string datapath,BackgroundWorker worker,
Dictionary<long,string> typedic,
Dictionary<long,string> racedic)
{
this.worker=worker;
mseHelper=new MSE(datapath,typedic,racedic);
imgSet.Init();
}
public bool IsCancel()
{
return isCancel;
}
public static void SetTask(MyTask myTask,Card[] cards,params string[] args){
public void Cancel()
{
isCancel=true;
}
public MyTask getLastTask(){
return lastTask;
}
public void SetTask(MyTask myTask,Card[] cards,params string[] args){
nowTask=myTask;
cardlist=cards;
mArgs=args;
}
public static void OnCheckUpdate(bool showNew){
public void OnCheckUpdate(bool showNew){
string newver=CheckUpdate.Check(
ConfigurationManager.AppSettings["updateURL"]);
int iver,iver2;
......@@ -76,15 +95,16 @@ public class TaskHelper
else
MyMsg.Show(LMSG.DownloadFail);
}
public static void CutImages(string imgpath,string savepath)
{
CutImages(imgpath,savepath,true);
}
public static void CutImages(string imgpath,string savepath,bool isreplace)
public void CutImages(string imgpath,string savepath,bool isreplace)
{
imgSet.Init();
int count=cardlist.Length;
int i=0;
foreach(Card c in cardlist)
{
if(isCancel)
break;
i++;
worker.ReportProgress((i/count), string.Format("{0}/{1}",i,count));
string jpg=Path.Combine(imgpath, c.id+".jpg");
string savejpg=Path.Combine(savepath, c.id+".jpg");
if(File.Exists(jpg) && (isreplace || !File.Exists(savejpg))){
......@@ -109,8 +129,7 @@ public static void CutImages(string imgpath,string savepath,bool isreplace)
}
}
}
public static void ToImg(string img,string saveimg1,string saveimg2){
imgSet.Init();
public void ToImg(string img,string saveimg1,string saveimg2){
if(!File.Exists(img))
return;
Bitmap bmp=new Bitmap(img);
......@@ -119,13 +138,19 @@ public static void CutImages(string imgpath,string savepath,bool isreplace)
MyBitmap.SaveAsJPEG(MyBitmap.Zoom(bmp, imgSet.w, imgSet.h),
saveimg2, imgSet.quilty);
}
public static void ConvertImages(string imgpath,string gamepath,bool isreplace)
public void ConvertImages(string imgpath,string gamepath,bool isreplace)
{
imgSet.Init();
string picspath=Path.Combine(gamepath,"pics");
string thubpath=Path.Combine(picspath,"thumbnail");
string[] files=Directory.GetFiles(imgpath);
int i=0;
int count=files.Length;
foreach(string f in files){
if(isCancel)
break;
i++;
worker.ReportProgress(i/count, string.Format("{0}/{1}",i,count));
string ex=Path.GetExtension(f).ToLower();
string name=Path.GetFileNameWithoutExtension(f);
string jpg_b=Path.Combine(picspath,name+".jpg");
......@@ -148,8 +173,29 @@ public static void ConvertImages(string imgpath,string gamepath,bool isreplace)
}
}
}
public static void Run(){
public void SaveMSE(string file, Card[] cards,string pic,bool isUpdate){
string setFile=file+".txt";
string[] images=mseHelper.WriteSet(setFile, cards, pic);
if(isUpdate)//仅更新文字
return;
int i=0;
int count=images.Length;
using(ZipStorer zips=ZipStorer.Create(file, ""))
{
zips.AddFile(setFile,"set","");
foreach ( string img in images )
{
if(isCancel)
break;
i++;
worker.ReportProgress(i/count, string.Format("{0}/{1}",i,count));
zips.AddFile(img, Path.GetFileName(img),"");
}
}
File.Delete(setFile);
}
public void Run(){
isCancel=false;
bool replace;
bool showNew;
switch(nowTask){
......@@ -184,7 +230,7 @@ public static void ConvertImages(string imgpath,string gamepath,bool isreplace)
if(mArgs[2]==Boolean.TrueString)
replace=true;
}
MSE.Save(mArgs[0], cardlist, mArgs[1], replace);
SaveMSE(mArgs[0], cardlist, mArgs[1], replace);
}
break;
case MyTask.ConvertImages:
......@@ -198,6 +244,8 @@ public static void ConvertImages(string imgpath,string gamepath,bool isreplace)
}
break;
}
lastTask=nowTask;
nowTask=MyTask.NONE;
cardlist=null;
mArgs=null;
}
......
......@@ -103,13 +103,15 @@ private void InitializeComponent()
this.pl_image = new System.Windows.Forms.Panel();
this.lb_types = new System.Windows.Forms.Label();
this.lb_tiptexts = new System.Windows.Forms.Label();
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
this.bgWorker1 = new System.ComponentModel.BackgroundWorker();
this.btn_undo = new System.Windows.Forms.Button();
this.btn_img = new System.Windows.Forms.Button();
this.tb_setcode1 = new System.Windows.Forms.TextBox();
this.tb_setcode2 = new System.Windows.Forms.TextBox();
this.tb_setcode3 = new System.Windows.Forms.TextBox();
this.tb_setcode4 = new System.Windows.Forms.TextBox();
this.menuitem_cancelTask = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
......@@ -272,7 +274,9 @@ private void InitializeComponent()
this.menuitem_help.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_about,
this.menuitem_checkupdate,
this.menuitem_github});
this.menuitem_github,
this.toolStripSeparator1,
this.menuitem_cancelTask});
this.menuitem_help.Name = "menuitem_help";
this.menuitem_help.Size = new System.Drawing.Size(64, 21);
this.menuitem_help.Text = "Help(&H)";
......@@ -753,12 +757,13 @@ private void InitializeComponent()
this.lb_tiptexts.Text = "Tips Texts";
this.lb_tiptexts.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// backgroundWorker1
// bgWorker1
//
this.backgroundWorker1.WorkerReportsProgress = true;
this.backgroundWorker1.WorkerSupportsCancellation = true;
this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.BackgroundWorker1DoWork);
this.backgroundWorker1.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.BackgroundWorker1RunWorkerCompleted);
this.bgWorker1.WorkerReportsProgress = true;
this.bgWorker1.WorkerSupportsCancellation = true;
this.bgWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.BgWorker1DoWork);
this.bgWorker1.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.BgWorker1ProgressChanged);
this.bgWorker1.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.BgWorker1RunWorkerCompleted);
//
// btn_undo
//
......@@ -820,6 +825,18 @@ private void InitializeComponent()
this.tb_setcode4.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.tb_setcode4.TextChanged += new System.EventHandler(this.Tb_setcode4TextChanged);
//
// menuitem_cancelTask
//
this.menuitem_cancelTask.Name = "menuitem_cancelTask";
this.menuitem_cancelTask.Size = new System.Drawing.Size(158, 22);
this.menuitem_cancelTask.Text = "Cancel Task";
this.menuitem_cancelTask.Click += new System.EventHandler(this.Menuitem_cancelTaskClick);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(155, 6);
//
// DataEditForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
......@@ -887,6 +904,8 @@ private void InitializeComponent()
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.ToolStripMenuItem menuitem_cancelTask;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
private System.Windows.Forms.TextBox tb_setcode4;
private System.Windows.Forms.TextBox tb_setcode3;
private System.Windows.Forms.TextBox tb_setcode2;
......@@ -902,7 +921,7 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripSeparator tsep4;
private System.Windows.Forms.Button btn_img;
private System.Windows.Forms.Button btn_undo;
private System.ComponentModel.BackgroundWorker backgroundWorker1;
private System.ComponentModel.BackgroundWorker bgWorker1;
private System.Windows.Forms.Panel pl_image;
private System.Windows.Forms.ToolStripMenuItem menuitem_copyselectto;
private System.Windows.Forms.ToolStripMenuItem menuitem_github;
......
......@@ -22,10 +22,14 @@ namespace DataEditorX
public partial class DataEditForm : Form
{
#region 成员变量
TaskHelper tasker;
string taskname;
string ydkfile=null;
string imagepath=null;
string GAMEPATH,PICPATH,PICPATH2,LUAPTH,IMAGEPATH;
/// <summary>当前卡片</summary>
Card oldCard=new Card(0);
/// <summary>搜索条件</summary>
Card srcCard=new Card(0);
string[] strs=null;
string title;
......@@ -91,7 +95,7 @@ void DataEditFormLoad(object sender, EventArgs e)
title=this.Text;
InitGameData();
MSE.Init(datapath, dicCardTypes, dicCardRaces);
tasker=new TaskHelper(datapath, bgWorker1, dicCardTypes, dicCardRaces);
SetCDB(nowCdbFile);
//设置空白卡片
......@@ -964,11 +968,20 @@ void checkupdate(bool showNew)
{
if(!isRun())
{
TaskHelper.SetTask(MyTask.CheckUpdate,null,showNew.ToString());
tasker.SetTask(MyTask.CheckUpdate,null,showNew.ToString());
Run(LANG.GetMsg(LMSG.checkUpdate));
}
}
void Menuitem_cancelTaskClick(object sender, EventArgs e)
{
if(MyMsg.Question(LMSG.IfCancelTask)){
if(bgWorker1.IsBusy){
tasker.Cancel();
bgWorker1.CancelAsync();
}
}
}
void Menuitem_githubClick(object sender, EventArgs e)
{
System.Diagnostics.Process.Start(ConfigurationManager.AppSettings["sourceURL"]);
......@@ -1021,8 +1034,8 @@ void Menuitem_convertimageClick(object sender, EventArgs e)
if(fdlg.ShowDialog()==DialogResult.OK)
{
bool isreplace=MyMsg.Question(LMSG.IfReplaceExistingImage);
TaskHelper.SetTask(MyTask.ConvertImages, null,
fdlg.SelectedPath, GAMEPATH, isreplace.ToString());
tasker.SetTask(MyTask.ConvertImages, null,
fdlg.SelectedPath, GAMEPATH, isreplace.ToString());
Run(LANG.GetMsg(LMSG.ConvertImage));
}
}
......@@ -1073,7 +1086,7 @@ void Menuitem_quitClick(object sender, EventArgs e)
#region 线程
bool isRun(){
if(backgroundWorker1.IsBusy){
if(bgWorker1.IsBusy){
MyMsg.Warning(LMSG.RunError);
return true;
}
......@@ -1083,17 +1096,31 @@ void Menuitem_quitClick(object sender, EventArgs e)
void Run(string name){
if(isRun())
return;
title=title+" ("+name+")";
taskname=name;
title=title+" ("+taskname+")";
SetTitle();
backgroundWorker1.RunWorkerAsync();
bgWorker1.RunWorkerAsync();
}
//线程任务
void BackgroundWorker1DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
void BgWorker1DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
tasker.Run();
}
void BgWorker1ProgressChanged(object sender, System.ComponentModel.ProgressChangedEventArgs e)
{
TaskHelper.Run();
int t=title.LastIndexOf(" (");
if(t>0)
{
title=string.Format("{0} ({1}-{2})",
title.Substring(0,t),
taskname,
// e.ProgressPercentage,
e.UserState);
SetTitle();
}
}
//任务完成
void BackgroundWorker1RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e)
void BgWorker1RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e)
{
//
int t=title.LastIndexOf(" (");
......@@ -1102,21 +1129,31 @@ void BackgroundWorker1RunWorkerCompleted(object sender, System.ComponentModel.Ru
title=title.Substring(0,t);
SetTitle();
}
MyTask mt=TaskHelper.getTask();
switch(mt){
case MyTask.CheckUpdate:break;
case MyTask.CopyDataBase:
MyMsg.Show(LMSG.copyDBIsOK);
break;
case MyTask.CutImages:
MyMsg.Show(LMSG.CutImageOK);
break;
case MyTask.SaveAsMSE:
MyMsg.Show(LMSG.SaveMseOK);
break;
case MyTask.ConvertImages:
MyMsg.Show(LMSG.ConvertImageOK);
break;
if ( e.Error != null){
MyMsg.Show(LANG.GetMsg(LMSG.TaskError)+"\n"+e.Error);
}
else if(tasker.IsCancel() || e.Cancelled){
MyMsg.Show(LMSG.CancelTask);
}
else
{
MyTask mt=tasker.getLastTask();
switch(mt){
case MyTask.CheckUpdate:break;
case MyTask.CopyDataBase:
MyMsg.Show(LMSG.copyDBIsOK);
break;
case MyTask.CutImages:
MyMsg.Show(LMSG.CutImageOK);
break;
case MyTask.SaveAsMSE:
MyMsg.Show(LMSG.SaveMseOK);
break;
case MyTask.ConvertImages:
MyMsg.Show(LMSG.ConvertImageOK);
break;
}
}
}
#endregion
......@@ -1157,6 +1194,7 @@ void Cb_setname4SelectedIndexChanged(object sender, EventArgs e)
tb_setcode4.Text=GetSelectHex(dicSetnames, cb_setname4);
setcodeIsedit4=false;
}
void Tb_setcode4TextChanged(object sender, EventArgs e)
{
if(setcodeIsedit4)
......@@ -1202,7 +1240,7 @@ void Tb_setcode1TextChanged(object sender, EventArgs e)
}
#endregion
#region copy cards
#region 复制卡片
Card[] getCardList(bool onlyselect){
List<Card> cards=new List<Card>();
if(onlyselect)
......@@ -1258,14 +1296,14 @@ void CopyTo(bool onlyselect)
}
}
if(!string.IsNullOrEmpty(filename)){
TaskHelper.SetTask(MyTask.CopyDataBase, cards, filename, replace.ToString());
tasker.SetTask(MyTask.CopyDataBase, cards, filename, replace.ToString());
Run(LANG.GetMsg(LMSG.copyCards));
}
}
#endregion
#region MSE set
#region MSE存档
void Menuitem_cutimagesClick(object sender, EventArgs e)
{
if(!Check())
......@@ -1273,8 +1311,8 @@ void Menuitem_cutimagesClick(object sender, EventArgs e)
if(isRun())
return;
bool isreplace=MyMsg.Question(LMSG.IfReplaceExistingImage);
TaskHelper.SetTask(MyTask.CutImages, cardlist.ToArray(),
PICPATH, IMAGEPATH, isreplace.ToString());
tasker.SetTask(MyTask.CutImages, cardlist.ToArray(),
PICPATH, IMAGEPATH, isreplace.ToString());
Run(LANG.GetMsg(LMSG.CutImage));
}
void Menuitem_saveasmse_selectClick(object sender, EventArgs e)
......@@ -1305,15 +1343,15 @@ void Menuitem_saveasmseClick(object sender, EventArgs e)
#if DEBUG
isUpdate=MyMsg.Question(LMSG.OnlySet);
#endif
TaskHelper.SetTask(MyTask.SaveAsMSE,cards,
dlg.FileName,IMAGEPATH,isUpdate.ToString());
tasker.SetTask(MyTask.SaveAsMSE,cards,
dlg.FileName,IMAGEPATH,isUpdate.ToString());
Run(LANG.GetMsg(LMSG.SaveMse));
}
}
}
#endregion
#region inprot image
#region 导入卡图
void Pl_imageDragDrop(object sender, DragEventArgs e)
{
string[] files=e.Data.GetData(DataFormats.FileDrop) as string[];
......@@ -1339,8 +1377,8 @@ void InportImage(string file,string tid)
pl_image.BackgroundImage.Dispose();
pl_image.BackgroundImage=m_cover;
}
TaskHelper.ToImg(file,f,
Path.Combine(PICPATH2,tid+".jpg"));
tasker.ToImg(file,f,
Path.Combine(PICPATH2,tid+".jpg"));
setImage(f);
}
void setImage(string f){
......
......@@ -118,10 +118,10 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<value>124, 17</value>
</metadata>
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>130, 17</value>
<metadata name="bgWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
......
......@@ -68,6 +68,11 @@ public enum LMSG : uint
ConvertImageOK,
CompDBOK,
OnlySet,
CancelTask,
PauseTask,
ResumeTask,
TaskError,
IfCancelTask,
COUNT,
}
}
......@@ -28,4 +28,4 @@
//
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("1.6.6.0")]
[assembly: AssemblyVersion("1.6.7.0")]
......@@ -22,6 +22,7 @@ DataEditForm->lb4 /
DataEditForm->lb5 /
DataEditForm->lv_cardlist0 密码
DataEditForm->lv_cardlist1 卡片名称
DataEditForm->menuitem_cancelTask 取消当前任务
DataEditForm->menuitem_compdb 压缩当前数据库
DataEditForm->menuitem_convertimage 批量导入卡图
DataEditForm->menuitem_openLastDataBase 最后打开的数据库
......
......@@ -51,4 +51,9 @@
0x32 正在转换图片
0x33 转换图片完成
0x34 压缩数据库完成
0x35 仅更新存档的文字?
\ No newline at end of file
0x35 仅更新存档的文字?
0x36 任务已经停止
0x37 任务已经暂停
0x38 继续任务
0x39 任务出错
0x3a 是否取消当前任务?
\ No newline at end of file
......@@ -22,6 +22,7 @@ DataEditForm->lb4 /
DataEditForm->lb5 /
DataEditForm->lv_cardlist0 Card Code
DataEditForm->lv_cardlist1 Card Name
DataEditForm->menuitem_cancelTask Cancel Task
DataEditForm->menuitem_compdb Compression DataBase
DataEditForm->menuitem_convertimage Inport Images
DataEditForm->menuitem_openLastDataBase Open Last DataBase
......
......@@ -51,4 +51,9 @@
0x32 Converting Images
0x33 Convert Images OK
0x34 Compression DataBase OK
0x35 Only Update Text of Set?
\ No newline at end of file
0x35 Only Update Text of Set?
0x36 Task is Canceled
0x37 Task is Paused
0x38 Task is Resume
0x39 Task has Error
0x3a Cancel Task?
\ No newline at end of file
[DataEditorX]1.6.6.0[DataEditorX]
[DataEditorX]1.6.7.0[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
......@@ -56,6 +56,9 @@ DataEditorX.exe.config
描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史
1.6.7.0
任务进度提示
取消任务
1.6.6.0
mse-config.txt添加注释
1.6.5.0
......
No preview for this file type
......@@ -22,6 +22,7 @@ DataEditForm->lb4 /
DataEditForm->lb5 /
DataEditForm->lv_cardlist0 密码
DataEditForm->lv_cardlist1 卡片名称
DataEditForm->menuitem_cancelTask 取消当前任务
DataEditForm->menuitem_compdb 压缩当前数据库
DataEditForm->menuitem_convertimage 批量导入卡图
DataEditForm->menuitem_openLastDataBase 最后打开的数据库
......
......@@ -51,4 +51,9 @@
0x32 正在转换图片
0x33 转换图片完成
0x34 压缩数据库完成
0x35 仅更新存档的文字?
\ No newline at end of file
0x35 仅更新存档的文字?
0x36 任务已经停止
0x37 任务已经暂停
0x38 继续任务
0x39 任务出错
0x3a 是否取消当前任务?
\ No newline at end of file
......@@ -22,6 +22,7 @@ DataEditForm->lb4 /
DataEditForm->lb5 /
DataEditForm->lv_cardlist0 Card Code
DataEditForm->lv_cardlist1 Card Name
DataEditForm->menuitem_cancelTask Cancel Task
DataEditForm->menuitem_compdb Compression DataBase
DataEditForm->menuitem_convertimage Inport Images
DataEditForm->menuitem_openLastDataBase Open Last DataBase
......
......@@ -51,4 +51,9 @@
0x32 Converting Images
0x33 Convert Images OK
0x34 Compression DataBase OK
0x35 Only Update Text of Set?
\ No newline at end of file
0x35 Only Update Text of Set?
0x36 Task is Canceled
0x37 Task is Paused
0x38 Task is Resume
0x39 Task has Error
0x3a Cancel Task?
\ No newline at end of file
mse version: 0.3.8
game: yugioh
stylesheet: standard
set info:
language: TW
edition:
ST mark is text: no
pendulum image is small: yes
card:
card type: trap card
name: 隱藏的機殼
attribute: trap
level: [陷阱卡]
image: 4450854.jpg
rule text:
「隱藏的機殼」在1回合只能發動1張。
①:從自己的額外卡組把最多3只表側表示的「機殼」靈擺怪獸加入手卡。
gamecode: 04450854
card:
card type: spell card
name: 機殼的牲祭
attribute: spell
level: [魔法卡+]
image: 17639150.jpg
rule text:
「機殼」怪獸才能裝備。
①:裝備怪獸的攻擊力上升300,不會被戰斗破壞。
②:「機殼」怪獸上級召喚的場合,裝備怪獸可以作為2只的數量解放。
③:這張卡從場上送去墓地的場合才能發動。從卡組把1只「機殼」怪獸加入手卡。
gamecode: 17639150
card:
card type: effect monster
name: 隱藏的機殼殺手 物質主義
attribute: earth
level: **********
image: 27279764.jpg
type 1: 機械族
type 2: 效果
type 3:
type 4:
rule text:
這張卡不能特殊召喚,把自己場上3只「機殼」怪獸解放的場合才能通常召喚。
①:通常召喚的這張卡不受魔法·陷阱卡的效果影響,也不受原本的等級或者階級比這張卡的等級低的怪獸發動的效果影響。
②:只要這張卡在怪獸區域存在,特殊召喚的怪獸的攻擊力·守備力下降500。
③:1回合1次,自己主要階段才能發動。對方必須把自身的手卡·場上1只怪獸送去墓地。
attack: 3000
defense: 2600
gamecode: 27279764
card:
card type: trap card
name: 起動的機殼
attribute: trap
level: [陷阱卡]
image: 30845999.jpg
rule text:
①:場上的通常召喚的「機殼」怪獸直到回合結束時攻擊力上升300,效果無效化,不受這張卡以外的魔法·陷阱卡的效果影響。
gamecode: 30845999
card:
card type: effect monster
name: 機殼基因組 貪欲
attribute: earth
level: ******
image: 37991342.jpg
type 1: 機械族
type 2: 靈擺
type 3: 效果
type 4:
rule text:
①:這張卡可以不用解放作召喚。
②:特殊召喚或者不用解放作召喚的這張卡的等級變成4星,原本攻擊力變成1800。
③:通常召喚的這張卡不受原本的等級或者階級比這張卡的等級低的怪獸發動的效果影響。
④:這張卡被解放的場合,以場上1張魔法·陷阱卡為對象才能發動。那張卡破壞。
attack: 2400
defense: 1000
pendulum: medium
pendulum scale 1: 9
pendulum scale 2: 9
pendulum text:
①:自己不是「機殼」怪獸不能特殊召喚。這個效果不會被無效化。
②:對方場上的怪獸的攻擊力下降300。
gamecode: 37991342
card:
card type: spell card
name: 機殼的要塞
attribute: spell
level: [魔法卡&]
image: 43034264.jpg
rule text:
①:只要這張卡在場地區域存在,自己在通常召喚外加上只有1次,自己主要階段可以把1只「機殼」怪獸召喚。
②:只要這張卡在場地區域存在,「機殼」怪獸的召喚不會被無效化。
gamecode: 43034264
card:
card type: effect monster
name: 機殼磁盤 無感動
attribute: earth
level: *******
image: 64496451.jpg
type 1: 機械族
type 2: 靈擺
type 3: 效果
type 4:
rule text:
①:這張卡可以不用解放作召喚。
②:特殊召喚或者不用解放作召喚的這張卡的等級變成4星,原本攻擊力變成1800。
③:通常召喚的這張卡不受原本的等級或者階級比這張卡的等級低的怪獸發動的效果影響。
④:把「機殼」怪獸解放對這張卡的上級召喚成功時才能發動。從卡組把2只「機殼」怪獸特殊召喚。這個效果特殊召喚的怪獸在結束階段破壞。
attack: 2800
defense: 1000
pendulum: medium
pendulum scale 1: 1
pendulum scale 2: 1
pendulum text:
①:自己不是「機殼」怪獸不能特殊召喚。這個效果不會被無效化。
②:自己場上的「機殼」怪獸的攻擊力上升300。
gamecode: 64496451
card:
card type: normal monster
name: 機殼工具 丑惡
attribute: earth
level: *****
image: 65518099.jpg
type 1: 機械族
type 2: 靈擺
type 3:
type 4:
rule text:
正在準備以副本模式啟動系統...
C:\sophia\sefiroth.exe^執行中發生錯誤。
正在試圖執行來自未知發布者的以下程序。
C:\tierra\qliphoth.exe^您想允許執行嗎?^<Y/N>...[Y]
以自律模式啟動系統。
attack: 1000
defense: 2800
pendulum: medium
pendulum scale 1: 9
pendulum scale 2: 9
pendulum text:
①:自己不是「機殼」怪獸不能特殊召喚。這個效果不會被無效化。
②:1回合1次,支付800基本分才能發動。從卡組把「機殼工具^丑惡」以外的1張「機殼」卡加入手卡。
gamecode: 65518099
card:
card type: effect monster
name: 機殼殼層 拒絕
attribute: earth
level: ********
image: 90885155.jpg
type 1: 機械族
type 2: 靈擺
type 3: 效果
type 4:
rule text:
①:這張卡可以不用解放作召喚。
②:特殊召喚或者不用解放作召喚的這張卡的等級變成4星,原本攻擊力變成1800。
③:通常召喚的這張卡不受原本的等級或者階級比這張卡的等級低的怪獸發動的效果影響。
④:把「機殼」怪獸解放表側表示上級召喚成功的場合,這張卡在同1次的戰斗階段中可以作2次攻擊,向守備表示怪獸攻擊的場合,給與攻擊力超過那個守備力的數值的戰斗傷害。
attack: 2800
defense: 1000
pendulum: medium
pendulum scale 1: 9
pendulum scale 2: 9
pendulum text:
①:自己不是「機殼」怪獸不能特殊召喚。這個效果不會被無效化。
②:對方場上的怪獸的攻擊力下降300。
gamecode: 90885155
card:
card type: effect monster
name: 機殼檔案 色欲
attribute: earth
level: ******
image: 91907707.jpg
type 1: 機械族
type 2: 靈擺
type 3: 效果
type 4:
rule text:
①:這張卡可以不用解放作召喚。
②:特殊召喚或者不用解放作召喚的這張卡的等級變成4星,原本攻擊力變成1800。
③:通常召喚的這張卡不受原本的等級或者階級比這張卡的等級低的怪獸發動的效果影響。
④:這張卡被解放的場合,以場上1只怪獸為對象才能發動。那只怪獸回到持有者手卡。
attack: 2400
defense: 1000
pendulum: medium
pendulum scale 1: 1
pendulum scale 2: 1
pendulum text:
①:自己不是「機殼」怪獸不能特殊召喚。這個效果不會被無效化。
②:自己場上的「機殼」怪獸的攻擊力上升300。
gamecode: 91907707
[DataEditorX]1.6.6.0[DataEditorX]
[DataEditorX]1.6.7.0[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
......@@ -56,6 +56,9 @@ DataEditorX.exe.config
描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史
1.6.7.0
任务进度提示
取消任务
1.6.6.0
mse-config.txt添加注释
1.6.5.0
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment