Commit dab72a71 authored by keyongyu's avatar keyongyu

2.2.9.6

parent 1bea0f6c
......@@ -3,7 +3,7 @@
using System.Text;
using System.Globalization;
namespace DataEditorX.Config
namespace DataEditorX.Common
{
public class ConfHelper
{
......@@ -105,7 +105,7 @@ public static int getIntegerValue(string line, int defalut)
/// </summary>
/// <param name="dic"></param>
/// <param name="line"></param>
public static void DicAdd(Dictionary<long, string> dic, string line)
public static void DicAdd(SortedList<long, string> dic, string line)
{
int i = line.IndexOf("0x");
int j = (i > 0) ? line.IndexOf(SEP_LINE, i + 1) : -1;
......
......@@ -10,6 +10,7 @@ namespace DataEditorX.Core
{
public struct Card : IEquatable<Card>
{
public const int STR_MAX = 0x10;
#region 构造
/// <summary>
/// 卡片
......@@ -18,24 +19,32 @@ public struct Card : IEquatable<Card>
/// <param name="cardName">名字</param>
public Card(long cardCode)
{
int i;
this.id = cardCode;
this.name="";
this.ot = 0;
this.alias = 0;
this.setcode = 0;
this.type = 0;
this.atk = 0;
this.def = 0;
this.level = 0;
this.race = 0;
this.attribute = 0;
this.category = 0;
this.desc = "";
this.str = new string[0x10];
for(i=0;i<0x10;i++)
str[i]="";
this.id = cardCode;
this.name = "";
this.ot = 0;
this.alias = 0;
this.setcode = 0;
this.type = 0;
this.atk = 0;
this.def = 0;
this.level = 0;
this.race = 0;
this.attribute = 0;
this.category = 0;
this.desc = "";
int i;
this.str = new string[STR_MAX];
for (i = 0; i < STR_MAX; i++)
str[i] = "";
}
public void InitStrs()
{
int i;
this.str = new string[STR_MAX];
for (i = 0; i < STR_MAX; i++)
str[i] = "";
}
#endregion
#region 成员
......
......@@ -14,6 +14,7 @@ namespace DataEditorX.Core
/// </summary>
public enum CardRace : long
{
RACE_NONE = 0,
///<summary>战士</summary>
RACE_WARRIOR = 0x1,
///<summary>魔法师</summary>
......
using System;
using System.Collections.Generic;
using System.Text;
namespace DataEditorX.Core
{
public enum CardRule :int
{
/// <summary>无</summary>
NONE = 0,
/// <summary>OCG</summary>
OCG =1,
/// <summary>TCG</summary>
TCG = 2,
/// <summary>OT</summary>
OCGTCG = 3,
/// <summary>DIY,原创卡</summary>
DIY = 4,
}
}
......@@ -297,6 +297,8 @@ public static string GetSelectSQL(Card c)
{
StringBuilder sb=new StringBuilder();
sb.Append("SELECT datas.*,texts.* FROM datas,texts WHERE datas.id=texts.id ");
if (c == null)
return sb.ToString();
if(!string.IsNullOrEmpty(c.name)){
if(c.name.IndexOf("%%")>=0)
c.name=c.name.Replace("%%","%");
......@@ -350,6 +352,10 @@ public static string GetSelectSQL(Card c)
/// <returns>SQL语句</returns>
public static string GetInsertSQL(Card c, bool ignore)
{
if (c == null)
return "";
if (c.str == null)
c.InitStrs();
StringBuilder st = new StringBuilder();
if(ignore)
st.Append("INSERT or ignore into datas values(");
......@@ -393,6 +399,10 @@ public static string GetInsertSQL(Card c, bool ignore)
public static string GetUpdateSQL(Card c)
{
StringBuilder st = new StringBuilder();
if (c == null)
return "";
if (c.str == null)
c.InitStrs();
st.Append("update datas set ot="); st.Append(c.ot.ToString());
st.Append(",alias="); st.Append(c.alias.ToString());
st.Append(",setcode="); st.Append(c.setcode.ToString());
......
......@@ -12,19 +12,27 @@
using System.Text;
using DataEditorX.Language;
using System.Globalization;
using DataEditorX.Common;
using DataEditorX.Config;
namespace DataEditorX.Config
namespace DataEditorX.Core.Mse
{
/// <summary>
/// Description of MSEConfig.
/// </summary>
public class MSEConfig
{
#region 常量
public const string TAG = "mse";
/// <summary>存档头部</summary>
public const string TAG_HEAD = "head";
/// <summary>存档尾部</summary>
public const string TAG_END = "end";
/// <summary>简体转繁体</summary>
public const string TAG_CN2TW = "cn2tw";
/// <summary>魔法标志格式</summary>
public const string TAG_SPELL = "spell";
/// <summary>陷阱标志格式</summary>
public const string TAG_TRAP = "trap";
public const string TAG_REG_PENDULUM = "pendulum-text";
public const string TAG_REG_MONSTER = "monster-text";
......@@ -42,7 +50,7 @@ public class MSEConfig
public const string FILE_CONFIG_NAME = "Chinese-Simplified";
public const string PATH_IMAGE = "Images";
public string configName = FILE_CONFIG_NAME;
#endregion
public MSEConfig(string path)
{
init(path);
......@@ -56,10 +64,10 @@ public void SetConfig(string config, string path)
//设置文件名
configName = MyPath.getFullFileName(MSEConfig.TAG, config);
replaces = new Dictionary<string, string>();
replaces = new SortedList<string, string>();
typeDic = new Dictionary<long, string>();
raceDic = new Dictionary<long, string>();
typeDic = new SortedList<long, string>();
raceDic = new SortedList<long, string>();
string[] lines = File.ReadAllLines(config, Encoding.UTF8);
foreach (string line in lines)
{
......@@ -137,7 +145,7 @@ public void init(string path)
//简体转繁体?
public bool Iscn2tw;
//特数字替换
public Dictionary<string, string> replaces;
public SortedList<string, string> replaces;
//效果文正则提取
public string regx_pendulum;
public string regx_monster;
......@@ -145,7 +153,7 @@ public void init(string path)
public string head;
//存档结尾
public string end;
public Dictionary<long, string> typeDic;
public Dictionary<long, string> raceDic;
public SortedList<long, string> typeDic;
public SortedList<long, string> raceDic;
}
}
using System;
using System.Collections.Generic;
using System.Text;
namespace DataEditorX.Core.Mse
{
public class MseAttribute
{
/// <summary>无</summary>
public const string NONE = "none";
/// <summary>暗</summary>
public const string DARK = "dark";
/// <summary>神</summary>
public const string DIVINE = "divine";
/// <summary>地</summary>
public const string EARTH = "earth";
/// <summary>火</summary>
public const string FIRE = "fire";
/// <summary>光</summary>
public const string LIGHT = "light";
/// <summary>水</summary>
public const string WATER = "water";
/// <summary>风</summary>
public const string WIND = "wind";
/// <summary>魔法</summary>
public const string SPELL = "spell";
/// <summary>陷阱</summary>
public const string TRAP = "trap";
}
public class MseSpellTrap
{
/// <summary>装备</summary>
public const string EQUIP = "+";
/// <summary>速攻</summary>
public const string QUICKPLAY = "$";
/// <summary>场地</summary>
public const string FIELD = "&";
/// <summary>永续</summary>
public const string CONTINUOUS = "%";
/// <summary>仪式</summary>
public const string RITUAL = "#";
/// <summary>反击</summary>
public const string COUNTER = "!";
/// <summary>通常</summary>
public const string NORMAL = "^";
}
public class MseCardType
{
/// <summary>通常</summary>
public const string CARD_NORMAL = "normal monster";
/// <summary>效果</summary>
public const string CARD_EFFECT = "effect monster";
/// <summary>超量</summary>
public const string CARD_XYZ = "xyz monster";
/// <summary>仪式</summary>
public const string CARD_RITUAL = "ritual monster";
/// <summary>融合</summary>
public const string CARD_FUSION = "fusion monster";
/// <summary>衍生物</summary>
public const string CARD_TOKEN = "token monster";
/// <summary>衍生物无种族</summary>
public const string CARD_TOKEN2 = "token card";
/// <summary>同调</summary>
public const string CARD_SYNCHRO = "synchro monster";
/// <summary>魔法</summary>
public const string CARD_SPELL = "spell card";
/// <summary>陷阱</summary>
public const string CARD_TRAP = "trap card";
}
}
......@@ -18,6 +18,7 @@
using DataEditorX.Language;
using DataEditorX.Common;
using DataEditorX.Config;
using DataEditorX.Core.Mse;
namespace DataEditorX.Core
{
......@@ -35,6 +36,8 @@ public enum MyTask
CutImages,
///<summary>转换图片</summary>
ConvertImages,
///<summary>读取MSE存档</summary>
ReadMSE,
}
/// <summary>
/// 任务
......@@ -55,6 +58,13 @@ public class TaskHelper
/// </summary>
private Card[] cardlist;
/// <summary>
/// 当前卡片列表
/// </summary>
public Card[] CardList
{
get { return cardlist; }
}
/// <summary>
/// 任务参数
/// </summary>
private string[] mArgs;
......@@ -99,6 +109,7 @@ public bool IsCancel()
}
public void Cancel()
{
isRun = false;
isCancel = true;
}
public MyTask getLastTask()
......@@ -246,7 +257,7 @@ public void ConvertImages(string imgpath, string gamepath, bool isreplace)
#endregion
#region MSE存档
public string MSEImage
public string MSEImagePath
{
get { return mseHelper.ImagePath; }
}
......@@ -303,6 +314,25 @@ public void SaveMSE(int num, string file, Card[] cards, bool isUpdate)
}
File.Delete(setFile);
}
public Card[] ReadMSE(string mseset, bool repalceOld)
{
//解压所有文件
using (ZipStorer zips = ZipStorer.Open(mseset,FileAccess.Read))
{
zips.EncodeUTF8 = true;
List<ZipStorer.ZipFileEntry> files = zips.ReadCentralDir();
int count = files.Count;
int i = 0;
foreach (ZipStorer.ZipFileEntry file in files)
{
worker.ReportProgress(i / count, string.Format("{0}/{1}", i, count));
string savefilename = MyPath.Combine(mseHelper.ImagePath, file.FilenameInZip);
zips.ExtractFile(file, savefilename);
}
}
string setfile = MyPath.Combine(mseHelper.ImagePath, "set");
return mseHelper.ReadCards(setfile, repalceOld);
}
#endregion
#region 导出数据
......@@ -406,6 +436,18 @@ public void Run()
SaveMSEs(mArgs[0], cardlist, replace);
}
break;
case MyTask.ReadMSE:
if (mArgs != null && mArgs.Length >= 2)
{
replace = false;
if (mArgs.Length >= 2)
{
if (mArgs[1] == Boolean.TrueString)
replace = true;
}
cardlist = ReadMSE(mArgs[0], replace);
}
break;
case MyTask.ConvertImages:
if (mArgs != null && mArgs.Length >= 2)
{
......@@ -422,7 +464,8 @@ public void Run()
isRun = false;
lastTask = nowTask;
nowTask = MyTask.NONE;
cardlist = null;
if(lastTask != MyTask.ReadMSE)
cardlist = null;
mArgs = null;
}
#endregion
......
......@@ -53,7 +53,6 @@ private void InitializeComponent()
this.menuitem_readydk = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_readimages = new System.Windows.Forms.ToolStripMenuItem();
this.tsep6 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_compdb = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_exportdata = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_findluafunc = new System.Windows.Forms.ToolStripMenuItem();
this.tsep5 = new System.Windows.Forms.ToolStripSeparator();
......@@ -120,6 +119,7 @@ private void InitializeComponent()
this.lv_cardlist = new System.Windows.Forms.DListView();
this.ch_cardcode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ch_cardname = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.menuitem_compdb = new System.Windows.Forms.ToolStripMenuItem();
this.mainMenu.SuspendLayout();
this.SuspendLayout();
//
......@@ -141,6 +141,7 @@ private void InitializeComponent()
this.menuitem_file.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_open,
this.menuitem_new,
this.menuitem_compdb,
this.toolStripSeparator3,
this.menuitem_copyselectto,
this.menuitem_copyto,
......@@ -233,7 +234,6 @@ private void InitializeComponent()
this.menuitem_readydk,
this.menuitem_readimages,
this.tsep6,
this.menuitem_compdb,
this.menuitem_exportdata,
this.menuitem_findluafunc,
this.tsep5,
......@@ -252,96 +252,90 @@ private void InitializeComponent()
// menuitem_readydk
//
this.menuitem_readydk.Name = "menuitem_readydk";
this.menuitem_readydk.Size = new System.Drawing.Size(212, 22);
this.menuitem_readydk.Size = new System.Drawing.Size(205, 22);
this.menuitem_readydk.Text = "Cards Form ydk file(&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(212, 22);
this.menuitem_readimages.Size = new System.Drawing.Size(205, 22);
this.menuitem_readimages.Text = "Cards From Images(&I)";
this.menuitem_readimages.Click += new System.EventHandler(this.Menuitem_readimagesClick);
//
// tsep6
//
this.tsep6.Name = "tsep6";
this.tsep6.Size = new System.Drawing.Size(209, 6);
//
// menuitem_compdb
//
this.menuitem_compdb.Name = "menuitem_compdb";
this.menuitem_compdb.Size = new System.Drawing.Size(212, 22);
this.menuitem_compdb.Text = "Compression DataBase";
this.menuitem_compdb.Click += new System.EventHandler(this.Menuitem_compdbClick);
this.tsep6.Size = new System.Drawing.Size(202, 6);
//
// menuitem_exportdata
//
this.menuitem_exportdata.Name = "menuitem_exportdata";
this.menuitem_exportdata.Size = new System.Drawing.Size(212, 22);
this.menuitem_exportdata.Size = new System.Drawing.Size(205, 22);
this.menuitem_exportdata.Text = "Export Data";
this.menuitem_exportdata.Click += new System.EventHandler(this.Menuitem_exportdataClick);
//
// menuitem_findluafunc
//
this.menuitem_findluafunc.Name = "menuitem_findluafunc";
this.menuitem_findluafunc.Size = new System.Drawing.Size(212, 22);
this.menuitem_findluafunc.Size = new System.Drawing.Size(205, 22);
this.menuitem_findluafunc.Text = "Find Lua Function";
this.menuitem_findluafunc.Click += new System.EventHandler(this.menuitem_findluafunc_Click);
//
// tsep5
//
this.tsep5.Name = "tsep5";
this.tsep5.Size = new System.Drawing.Size(209, 6);
this.tsep5.Size = new System.Drawing.Size(202, 6);
//
// menuitem_readmse
//
this.menuitem_readmse.Name = "menuitem_readmse";
this.menuitem_readmse.Size = new System.Drawing.Size(212, 22);
this.menuitem_readmse.Size = new System.Drawing.Size(205, 22);
this.menuitem_readmse.Text = "Read from MSE";
this.menuitem_readmse.Click += new System.EventHandler(this.menuitem_readmse_Click);
//
// menuitem_saveasmse_select
//
this.menuitem_saveasmse_select.Name = "menuitem_saveasmse_select";
this.menuitem_saveasmse_select.Size = new System.Drawing.Size(212, 22);
this.menuitem_saveasmse_select.Size = new System.Drawing.Size(205, 22);
this.menuitem_saveasmse_select.Text = "Select Save As MSE";
this.menuitem_saveasmse_select.Click += new System.EventHandler(this.Menuitem_saveasmse_selectClick);
//
// menuitem_saveasmse
//
this.menuitem_saveasmse.Name = "menuitem_saveasmse";
this.menuitem_saveasmse.Size = new System.Drawing.Size(212, 22);
this.menuitem_saveasmse.Size = new System.Drawing.Size(205, 22);
this.menuitem_saveasmse.Text = "All Now Save As MSE";
this.menuitem_saveasmse.Click += new System.EventHandler(this.Menuitem_saveasmseClick);
//
// tsep3
//
this.tsep3.Name = "tsep3";
this.tsep3.Size = new System.Drawing.Size(209, 6);
this.tsep3.Size = new System.Drawing.Size(202, 6);
//
// menuitem_cutimages
//
this.menuitem_cutimages.Name = "menuitem_cutimages";
this.menuitem_cutimages.Size = new System.Drawing.Size(212, 22);
this.menuitem_cutimages.Size = new System.Drawing.Size(205, 22);
this.menuitem_cutimages.Text = "Cut Images";
this.menuitem_cutimages.Click += new System.EventHandler(this.Menuitem_cutimagesClick);
//
// menuitem_convertimage
//
this.menuitem_convertimage.Name = "menuitem_convertimage";
this.menuitem_convertimage.Size = new System.Drawing.Size(212, 22);
this.menuitem_convertimage.Size = new System.Drawing.Size(205, 22);
this.menuitem_convertimage.Text = "Import Images";
this.menuitem_convertimage.Click += new System.EventHandler(this.Menuitem_convertimageClick);
//
// toolStripSeparator1
//
this.toolStripSeparator1.Name = "toolStripSeparator1";
this.toolStripSeparator1.Size = new System.Drawing.Size(209, 6);
this.toolStripSeparator1.Size = new System.Drawing.Size(202, 6);
//
// menuitem_cancelTask
//
this.menuitem_cancelTask.Name = "menuitem_cancelTask";
this.menuitem_cancelTask.Size = new System.Drawing.Size(212, 22);
this.menuitem_cancelTask.Size = new System.Drawing.Size(205, 22);
this.menuitem_cancelTask.Text = "Cancel Task";
this.menuitem_cancelTask.Click += new System.EventHandler(this.Menuitem_cancelTaskClick);
//
......@@ -972,6 +966,13 @@ private void InitializeComponent()
this.ch_cardname.Text = "Card Name";
this.ch_cardname.Width = 140;
//
// menuitem_compdb
//
this.menuitem_compdb.Name = "menuitem_compdb";
this.menuitem_compdb.Size = new System.Drawing.Size(232, 22);
this.menuitem_compdb.Text = "Compression DataBase";
this.menuitem_compdb.Click += new System.EventHandler(this.menuitem_compdb_Click);
//
// DataEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -1057,7 +1058,6 @@ private void InitializeComponent()
private System.Windows.Forms.TextBox tb_setcode2;
private System.Windows.Forms.TextBox tb_setcode1;
private System.Windows.Forms.ToolStripSeparator tsep5;
private System.Windows.Forms.ToolStripMenuItem menuitem_compdb;
private System.Windows.Forms.ToolStripMenuItem menuitem_convertimage;
private System.Windows.Forms.ToolStripMenuItem menuitem_cutimages;
private System.Windows.Forms.ToolStripMenuItem menuitem_saveasmse;
......@@ -1126,5 +1126,6 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem menuitem_importmseimg;
private System.Windows.Forms.ToolStripMenuItem menuitem_findluafunc;
private System.Windows.Forms.ToolStripSeparator tsep6;
private System.Windows.Forms.ToolStripMenuItem menuitem_compdb;
}
}
......@@ -20,6 +20,7 @@
using DataEditorX.Controls;
using DataEditorX.Config;
using DataEditorX.Core.Mse;
namespace DataEditorX
{
......@@ -445,6 +446,8 @@ void AddListView(int p)
void SetCard(Card c)
{
oldCard = c;
if (c.str == null)
c.InitStrs();
tb_cardname.Text = c.name;
tb_cardtext.Text = c.desc;
......@@ -1137,7 +1140,7 @@ void BgWorker1ProgressChanged(object sender, System.ComponentModel.ProgressChang
//任务完成
void BgWorker1RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e)
{
//
//还原标题
int t = title.LastIndexOf(" (");
if (t > 0)
{
......@@ -1145,12 +1148,15 @@ void BgWorker1RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerC
SetTitle();
}
if (e.Error != null)
{
{//出错
if (tasker != null)
tasker.Cancel();
if (bgWorker1.IsBusy)
bgWorker1.CancelAsync();
MyMsg.Show(LANG.GetMsg(LMSG.TaskError) + "\n" + e.Error);
}
else if (tasker.IsCancel() || e.Cancelled)
{
{//取消任务
MyMsg.Show(LMSG.CancelTask);
}
else
......@@ -1172,6 +1178,11 @@ void BgWorker1RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerC
case MyTask.ConvertImages:
MyMsg.Show(LMSG.ConvertImageOK);
break;
case MyTask.ReadMSE:
//保存读取的卡片
SaveCards(tasker.CardList);
MyMsg.Show(LMSG.ReadMSEisOK);
break;
}
}
}
......@@ -1204,28 +1215,32 @@ public Card[] getCardList(bool onlyselect)
}
void Menuitem_copytoClick(object sender, EventArgs e)
{
CopyTo(false);
if (!Check())
return;
CopyTo(getCardList(false));
}
void Menuitem_copyselecttoClick(object sender, EventArgs e)
{
CopyTo(true);
if (!Check())
return;
CopyTo(getCardList(true));
}
//保存卡片
//保存卡片到当前数据库
public void SaveCards(Card[] cards)
{
if (!Check())
return;
if (cards == null || cards.Length == 0)
return;
bool replace = MyMsg.Question(LMSG.IfReplaceExistingCard);
DataBase.CopyDB(nowCdbFile, !replace, cards);
Search(srcCard, true);
}
void CopyTo(bool onlyselect)
//卡片另存为
void CopyTo(Card[] cards)
{
if (!Check())
return;
Card[] cards = getCardList(onlyselect);
if (cards == null)
if (cards == null || cards.Length == 0)
return;
//select file
bool replace = false;
......@@ -1331,9 +1346,9 @@ void ImportImage(string file, string tid)
}
if (menuitem_importmseimg.Checked)
{
if (!Directory.Exists(tasker.MSEImage))
Directory.CreateDirectory(tasker.MSEImage);
f = MyPath.Combine(tasker.MSEImage, tid + ".jpg");
if (!Directory.Exists(tasker.MSEImagePath))
Directory.CreateDirectory(tasker.MSEImagePath);
f = MyPath.Combine(tasker.MSEImagePath, tid + ".jpg");
File.Copy(file, f, true);
}
else
......@@ -1357,8 +1372,8 @@ void setImage(long id)
pl_image.BackgroundImage.Dispose();
Bitmap temp;
string pic = MyPath.Combine(PICPATH, id + ".jpg");
string pic2 = MyPath.Combine(tasker.MSEImage, id + ".jpg");
string pic3 = MyPath.Combine(tasker.MSEImage, new Card(id).idString + ".jpg");
string pic2 = MyPath.Combine(tasker.MSEImagePath, id + ".jpg");
string pic3 = MyPath.Combine(tasker.MSEImagePath, new Card(id).idString + ".jpg");
if (menuitem_importmseimg.Checked && File.Exists(pic2))
{
temp = new Bitmap(pic2);
......@@ -1377,13 +1392,6 @@ void setImage(long id)
else
pl_image.BackgroundImage = m_cover;
}
void Menuitem_compdbClick(object sender, EventArgs e)
{
if (!Check())
return;
DataBase.Compression(nowCdbFile);
MyMsg.Show(LMSG.CompDBOK);
}
void Menuitem_convertimageClick(object sender, EventArgs e)
{
if (!Check())
......@@ -1607,5 +1615,37 @@ private void cb_setname4_SelectedIndexChanged(object sender, EventArgs e)
setCode_Selected(4, cb_setname4, tb_setcode4);
}
#endregion
#region 读取MSE存档
private void menuitem_readmse_Click(object sender, EventArgs e)
{
if (!Check())
return;
if (isRun())
return;
//select open mse-set
using (OpenFileDialog dlg = new OpenFileDialog())
{
dlg.Title = LANG.GetMsg(LMSG.selectMseset);
dlg.Filter = LANG.GetMsg(LMSG.MseType);
if (dlg.ShowDialog() == DialogResult.OK)
{
bool isUpdate = false;//是否替换存在的图片
isUpdate = MyMsg.Question(LMSG.IfReplaceExistingImage);
tasker.SetTask(MyTask.ReadMSE, null,
dlg.FileName, isUpdate.ToString());
Run(LANG.GetMsg(LMSG.ReadMSE));
}
}
}
#endregion
private void menuitem_compdb_Click(object sender, EventArgs e)
{
if (!Check())
return;
DataBase.Compression(nowCdbFile);
MyMsg.Show(LMSG.CompDBOK);
}
}
}
......@@ -68,7 +68,7 @@
<DependentUpon>CodeEditForm.cs</DependentUpon>
</Compile>
<Compile Include="Common\CheckUpdate.cs" />
<Compile Include="Config\ConfHelper.cs" />
<Compile Include="Common\ConfHelper.cs" />
<Compile Include="Controls\DoubleContorl.cs">
<SubType>Component</SubType>
</Compile>
......@@ -88,6 +88,7 @@
<Compile Include="Core\Card.cs" />
<Compile Include="Core\CardAttribute.cs" />
<Compile Include="Core\CardRace.cs" />
<Compile Include="Core\CardRule.cs" />
<Compile Include="Core\CardType.cs" />
<Compile Include="Config\CodeConfig.cs" />
<Compile Include="Core\DataBase.cs" />
......@@ -95,8 +96,9 @@
<Compile Include="Config\DataManager.cs" />
<Compile Include="Config\ImageSet.cs" />
<Compile Include="Core\LuaFunction.cs" />
<Compile Include="Core\MseMaker.cs" />
<Compile Include="Config\MSEConfig.cs" />
<Compile Include="Core\Mse\MSECons.cs" />
<Compile Include="Core\Mse\MseMaker.cs" />
<Compile Include="Core\Mse\MSEConfig.cs" />
<Compile Include="Core\TaskHelper.cs" />
<Compile Include="Core\YGOUtil.cs" />
<Compile Include="DataEditForm.cs">
......
......@@ -88,6 +88,8 @@ public enum LMSG : uint
NewFile = 0x44,
SaveFileOK = 0x45,
IfSaveScript =0x46,
ReadMSE = 0x47,
ReadMSEisOK= 0x48,
COUNT,
}
}
......@@ -305,7 +305,7 @@ void Menuitem_openClick(object sender, EventArgs e)
using (OpenFileDialog dlg = new OpenFileDialog())
{
dlg.Title = LANG.GetMsg(LMSG.OpenFile);
if (GetActive() != null)//判断当前窗口是不是DataEditor
if (GetActive() != null || dockPanel1.Contents.Count == 0)//判断当前窗口是不是DataEditor
dlg.Filter = LANG.GetMsg(LMSG.CdbType);
else
dlg.Filter = LANG.GetMsg(LMSG.ScriptFilter);
......@@ -462,7 +462,6 @@ void CompareDB()
#endregion
#region 自动更新
private void bgWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
......
......@@ -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("2.2.9.5")]
[assembly: AssemblyVersion("2.2.9.6")]
......@@ -120,7 +120,7 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x27 正在检查更新
0x28 正在复制卡片
0x29 卡片复制完成
0x2a 保存MSE存档
0x2a MSE存档
0x2b MSE存档文件(*.mse-set)|*.mse-set|所有文件(*.*)|*.*
0x2c 正在导出MSE存档
0x2d 导出MSE存档完成
......@@ -148,4 +148,6 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x43 脚本文件(*.lua)|*.lua|所有文件(*.*)|*.*
0x44 新建文件
0x45 保存完成
0x46 是否保存脚本?
\ No newline at end of file
0x46 是否保存脚本?
0x47 读取MSE存档
0x48 读取MSE存档完成!
\ No newline at end of file
......@@ -148,4 +148,6 @@ MainForm.mainMenu.menuitem_closeall Close All
0x43 Script(*.lua)|*.lua|all files(*.*)|*.*
0x44 New File
0x45 Save OK
0x46 If Save Script?
\ No newline at end of file
0x46 If Save Script?
0x47 Read MSE-set
0x48 Read MSE-set is OK.
\ No newline at end of file
......@@ -17,7 +17,7 @@ trap = [陷阱卡%%]
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: CN\r\n\tedition: \r\n\tST mark is text: no\r\n\tpendulum image is small: yes
end = version control:\n\ttype: none\napprentice code:
############################ Text
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
text =【摇摆文本】\n%ptext%\n【怪兽效果】\n%text%\n
############################
# chs jp
pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
......
......@@ -17,7 +17,7 @@ trap = [陷阱卡%%]
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: TW\r\n\tedition: \r\n\tST mark is text: no\r\n\tpendulum image is small: yes
end = version control:\n\ttype: none\napprentice code:
############################ Text
text =【摇摆效果】\n%ptext%\n【怪獸效果】\n%text%\n
text =【摇摆文本】\n%ptext%\n【怪獸效果】\n%text%\n
############################
# chs jp
pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
......
......@@ -15,7 +15,7 @@ trap = %%
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: JP\r\n\tedition: \r\n\tST mark is text: yes\r\n\tpendulum image is small: yes
end = version control:\n\ttype: none\napprentice code:
############################ Text
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
text =【摇摆文本】\n%ptext%\n【怪兽效果】\n%text%\n
############################
# chs jp
pendulum-text = Pendulum Text :\n([\S\s]*?)\n\n
......
[DataEditorX]2.2.9.5[DataEditorX]
[DataEditorX]2.2.9.6[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★文件关联(File association)
......@@ -80,6 +80,16 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.9.6
读取MSE存档
可能出现的bug:通常魔法类型识别出错,P怪兽文本提取出错,或者无法识别该卡
存档结构:(要求:每张卡的内容,开头是card,最后一行是gamecode,在MSE的card_fields修改gamecode为最后的元素)
card:
...
gamecode: 123456
card:
....
gamecode: 123456
2.2.9.5
优化选择框
2.2.9.4
......
No preview for this file type
# database history
F:\games\ygopro\p.cdb
F:\games\ygopro\cards.cdb
# script history
F:\games\ygopro\script\c168917.lua
......
......@@ -120,7 +120,7 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x27 正在检查更新
0x28 正在复制卡片
0x29 卡片复制完成
0x2a 保存MSE存档
0x2a MSE存档
0x2b MSE存档文件(*.mse-set)|*.mse-set|所有文件(*.*)|*.*
0x2c 正在导出MSE存档
0x2d 导出MSE存档完成
......@@ -148,4 +148,6 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x43 脚本文件(*.lua)|*.lua|所有文件(*.*)|*.*
0x44 新建文件
0x45 保存完成
0x46 是否保存脚本?
\ No newline at end of file
0x46 是否保存脚本?
0x47 读取MSE存档
0x48 读取MSE存档完成!
\ No newline at end of file
......@@ -148,4 +148,6 @@ MainForm.mainMenu.menuitem_closeall Close All
0x43 Script(*.lua)|*.lua|all files(*.*)|*.*
0x44 New File
0x45 Save OK
0x46 If Save Script?
\ No newline at end of file
0x46 If Save Script?
0x47 Read MSE-set
0x48 Read MSE-set is OK.
\ No newline at end of file
......@@ -17,7 +17,7 @@ trap = [陷阱卡%%]
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: CN\r\n\tedition: \r\n\tST mark is text: no\r\n\tpendulum image is small: yes
end = version control:\n\ttype: none\napprentice code:
############################ Text
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
text =【摇摆文本】\n%ptext%\n【怪兽效果】\n%text%\n
############################
# chs jp
pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
......
......@@ -17,7 +17,7 @@ trap = [陷阱卡%%]
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: TW\r\n\tedition: \r\n\tST mark is text: no\r\n\tpendulum image is small: yes
end = version control:\n\ttype: none\napprentice code:
############################ Text
text =【摇摆效果】\n%ptext%\n【怪獸效果】\n%text%\n
text =【摇摆文本】\n%ptext%\n【怪獸效果】\n%text%\n
############################
# chs jp
pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
......
......@@ -15,7 +15,7 @@ trap = %%
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: JP\r\n\tedition: \r\n\tST mark is text: yes\r\n\tpendulum image is small: yes
end = version control:\n\ttype: none\napprentice code:
############################ Text
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
text =【摇摆文本】\n%ptext%\n【怪兽效果】\n%text%\n
############################
# chs jp
pendulum-text = Pendulum Text :\n([\S\s]*?)\n\n
......
[DataEditorX]2.2.9.5[DataEditorX]
[DataEditorX]2.2.9.6[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★文件关联(File association)
......@@ -80,6 +80,16 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.9.6
读取MSE存档
可能出现的bug:通常魔法类型识别出错,P怪兽文本提取出错,或者无法识别该卡
存档结构:(要求:每张卡的内容,开头是card,最后一行是gamecode,在MSE的card_fields修改gamecode为最后的元素)
card:
...
gamecode: 123456
card:
....
gamecode: 123456
2.2.9.5
优化选择框
2.2.9.4
......
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