Commit aa4ae85f authored by keyongyu's avatar keyongyu

2.2.9.1

parent 98040680
...@@ -25,11 +25,13 @@ static CheckUpdate() ...@@ -25,11 +25,13 @@ static CheckUpdate()
public static string URL = ""; public static string URL = "";
static string HEAD = "[DataEditorX]", HEAD2 = "[URL]"; static string HEAD = "[DataEditorX]", HEAD2 = "[URL]";
public static bool isOK = false; public static bool isOK = false;
public const string DEFALUT = "0.0.0.0";
public const int VER_LENGTH = 4;
#region 检查版本 #region 检查版本
public static string Check(string VERURL) public static string GetNewVersion(string VERURL)
{ {
string urlver = "0.0.0.0"; string urlver = DEFALUT;
string html = GetHtmlContentByUrl(VERURL); string html = GetHtmlContentByUrl(VERURL);
if (!string.IsNullOrEmpty(html)) if (!string.IsNullOrEmpty(html))
{ {
...@@ -38,17 +40,45 @@ public static string Check(string VERURL) ...@@ -38,17 +40,45 @@ public static string Check(string VERURL)
w = (t > 0) ? html.IndexOf(HEAD, t + HEAD.Length) : 0; w = (t > 0) ? html.IndexOf(HEAD, t + HEAD.Length) : 0;
if (w > 0) if (w > 0)
{ {
//获取版本
urlver = html.Substring(t + HEAD.Length, w - t - HEAD.Length); urlver = html.Substring(t + HEAD.Length, w - t - HEAD.Length);
} }
t = html.IndexOf(HEAD2); t = html.IndexOf(HEAD2);
w = (t > 0) ? html.IndexOf(HEAD2, t + HEAD2.Length) : 0; w = (t > 0) ? html.IndexOf(HEAD2, t + HEAD2.Length) : 0;
if (w > 0) if (w > 0)
{ {
//获取下载地址
URL = html.Substring(t + HEAD2.Length, w - t - HEAD2.Length); URL = html.Substring(t + HEAD2.Length, w - t - HEAD2.Length);
} }
} }
return urlver; return urlver;
} }
//检查版本号,格式0.0.0.0
public static bool CheckVersion(string ver, string oldver)
{
bool hasNew = false;
string[] vers = ver.Split('.');
string[] oldvers = oldver.Split('.');
if (vers.Length == oldvers.Length && vers.Length == VER_LENGTH)
{
int j, k;
for (int i = 0; i < VER_LENGTH; i++)
{
int.TryParse(vers[i], out j);
int.TryParse(oldvers[i], out k);
if (j > k)
{
hasNew = true;
break;
}
}
}
#if DEBUG
MessageBox.Show("new:" + ver + ",oldver:" + oldver + ",hasnew:" + hasNew.ToString());
#endif
return hasNew;
}
#endregion #endregion
#region 获取网址内容 #region 获取网址内容
......
...@@ -123,8 +123,6 @@ public static bool SaveAsJPEG(Bitmap bitmap, string filename, int quality) ...@@ -123,8 +123,6 @@ public static bool SaveAsJPEG(Bitmap bitmap, string filename, int quality)
return false; return false;
} }
#endregion #endregion
} }
} }
......
...@@ -35,7 +35,12 @@ public static string getMultLineValue(string line) ...@@ -35,7 +35,12 @@ public static string getMultLineValue(string line)
} }
public static string getRegex(string word) public static string getRegex(string word)
{ {
return word.Replace("\\n", Environment.NewLine).Replace("\\t", "\t").Replace("\\s", " "); StringBuilder sb = new StringBuilder(word);
sb.Replace("\\r", "\r");
sb.Replace("\\n", "\n");
sb.Replace("\\t", "\t");
sb.Replace("[:space:]", " ");
return sb.ToString();
} }
public static bool getBooleanValue(string line) public static bool getBooleanValue(string line)
{ {
......
...@@ -38,6 +38,7 @@ public History(IMainForm mainForm) ...@@ -38,6 +38,7 @@ public History(IMainForm mainForm)
cdbhistory = new List<string>(); cdbhistory = new List<string>();
luahistory = new List<string>(); luahistory = new List<string>();
} }
//读取历史记录
public void ReadHistory(string historyFile) public void ReadHistory(string historyFile)
{ {
this.historyFile = historyFile; this.historyFile = historyFile;
...@@ -46,6 +47,7 @@ public void ReadHistory(string historyFile) ...@@ -46,6 +47,7 @@ public void ReadHistory(string historyFile)
string[] lines = File.ReadAllLines(historyFile); string[] lines = File.ReadAllLines(historyFile);
AddHistorys(lines); AddHistorys(lines);
} }
//添加历史记录
void AddHistorys(string[] lines) void AddHistorys(string[] lines)
{ {
luahistory.Clear(); luahistory.Clear();
...@@ -84,6 +86,7 @@ public void AddHistory(string file) ...@@ -84,6 +86,7 @@ public void AddHistory(string file)
SaveHistory(); SaveHistory();
MenuHistory(); MenuHistory();
} }
//保存历史
void SaveHistory() void SaveHistory()
{ {
string texts = "# database history"; string texts = "# database history";
...@@ -102,6 +105,7 @@ void SaveHistory() ...@@ -102,6 +105,7 @@ void SaveHistory()
File.Delete(historyFile); File.Delete(historyFile);
File.WriteAllText(historyFile, texts); File.WriteAllText(historyFile, texts);
} }
//添加历史记录菜单
public void MenuHistory() public void MenuHistory()
{ {
//cdb历史 //cdb历史
...@@ -129,6 +133,7 @@ public void MenuHistory() ...@@ -129,6 +133,7 @@ public void MenuHistory()
tsmiclear2.Click += MenuHistoryClear2_Click; tsmiclear2.Click += MenuHistoryClear2_Click;
mainForm.AddLuaMenu(tsmiclear2); mainForm.AddLuaMenu(tsmiclear2);
} }
void MenuHistoryClear2_Click(object sender, EventArgs e) void MenuHistoryClear2_Click(object sender, EventArgs e)
{ {
luahistory.Clear(); luahistory.Clear();
......
...@@ -6,11 +6,17 @@ namespace DataEditorX.Controls ...@@ -6,11 +6,17 @@ namespace DataEditorX.Controls
{ {
interface IEditForm interface IEditForm
{ {
//获取打开的文件路径
string GetOpenFile(); string GetOpenFile();
//创建文件
bool Create(string file); bool Create(string file);
//打开文件
bool Open(string file); bool Open(string file);
//是否能打开某个文件
bool CanOpen(string file); bool CanOpen(string file);
//保存
bool Save(); bool Save();
//设置为活动窗口
void SetActived(); void SetActived();
} }
} }
...@@ -5,14 +5,10 @@ ...@@ -5,14 +5,10 @@
* 时间: 12:48 * 时间: 12:48
* *
*/ */
using System;
using System.IO; using System.IO;
using System.Configuration;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.IO.Compression;
using System.Windows.Forms;
using Microsoft.VisualBasic; using Microsoft.VisualBasic;
using DataEditorX.Config; using DataEditorX.Config;
...@@ -26,8 +22,34 @@ namespace DataEditorX.Core ...@@ -26,8 +22,34 @@ namespace DataEditorX.Core
/// </summary> /// </summary>
public class MseMaker public class MseMaker
{ {
public const string TAG_CARD = "card";
public const string TAG_CARDTYPE = "card type";
public const string TAG_NAME = "name";
public const string TAG_ATTRIBUTE = "attribute";
public const string TAG_LEVEL = "level";
public const string TAG_IMAGE = "image";
public const string TAG_TYPE1 = "type 1";
public const string TAG_TYPE2 = "type 2";
public const string TAG_TYPE3 = "type 3";
public const string TAG_TYPE4 = "type 4";
public const string TAG_TEXT = "rule text";
public const string TAG_ATK = "attack";
public const string TAG_DEF = "defense";
public const string TAG_PENDULUM = "pendulum";
public const string TAG_PSCALE1 = "pendulum scale 1";
public const string TAG_PSCALE2 = "pendulum scale 2";
public const string TAG_PEND_TEXT = "pendulum text";
public const string TAG_CODE = "gamecode";
public const string KEY_ATTRIBUTE_NONE = "none";
public const string KEY_ATTRIBUTE_DARK = "dark";
public const string KEY_ATTRIBUTE_DIVINE = "divine";
public const string KEY_ATTRIBUTE_EARTH = "earth";
public const string KEY_ATTRIBUTE_FIRE = "fire";
public const string KEY_ATTRIBUTE_LIGHT = "light";
public const string KEY_ATTRIBUTE_WATER = "water";
public const string KEY_ATTRIBUTE_WIND = "wind";
#region 成员,初始化
MSEConfig cfg; MSEConfig cfg;
public int MaxNum public int MaxNum
{ {
get { return cfg.maxcount; } get { return cfg.maxcount; }
...@@ -50,6 +72,14 @@ public MSEConfig GetConfig() ...@@ -50,6 +72,14 @@ public MSEConfig GetConfig()
{ {
return cfg; return cfg;
} }
#endregion
#region 数据处理
//合并
public string GetLine(string key, string word)
{
return " "+key+": "+word;
}
//特殊字 //特殊字
public string reItalic(string str) public string reItalic(string str)
{ {
...@@ -70,17 +100,6 @@ public string cn2tw(string str) ...@@ -70,17 +100,6 @@ public string cn2tw(string str)
} }
return str; return str;
} }
//调整换行符
public string ReDesc(string desc)
{
desc = cn2tw(desc);
StringBuilder sb = new StringBuilder(reItalic(desc));
sb.Replace(Environment.NewLine, "\n");
sb.Replace("\n\n", "\n");
sb.Replace("\n", "\n\t\t");
return sb.ToString();
}
//获取魔法陷阱的类型符号 //获取魔法陷阱的类型符号
public string GetST(Card c, bool isSpell) public string GetST(Card c, bool isSpell)
{ {
...@@ -108,6 +127,7 @@ public string GetST(Card c, bool isSpell) ...@@ -108,6 +127,7 @@ public string GetST(Card c, bool isSpell)
level = cfg.str_trap.Replace(MSEConfig.TAG_REP, level); level = cfg.str_trap.Replace(MSEConfig.TAG_REP, level);
return level; return level;
} }
//获取图片路径
public static string GetCardImagePath(string picpath, Card c) public static string GetCardImagePath(string picpath, Card c)
{ {
string jpg = MyPath.Combine(picpath, c.id + ".jpg"); string jpg = MyPath.Combine(picpath, c.id + ".jpg");
...@@ -150,46 +170,61 @@ public static string GetCardImagePath(string picpath, Card c) ...@@ -150,46 +170,61 @@ public static string GetCardImagePath(string picpath, Card c)
} }
return ""; return "";
} }
//获取属性
public static string GetAttribute(int attr) public static string GetAttribute(int attr)
{ {
CardAttribute cattr = (CardAttribute)attr; CardAttribute cattr = (CardAttribute)attr;
string sattr = "none"; string sattr = KEY_ATTRIBUTE_NONE;
switch (cattr) switch (cattr)
{ {
case CardAttribute.ATTRIBUTE_DARK: case CardAttribute.ATTRIBUTE_DARK:
sattr = "dark"; sattr = KEY_ATTRIBUTE_DARK;
break; break;
case CardAttribute.ATTRIBUTE_DEVINE: case CardAttribute.ATTRIBUTE_DEVINE:
sattr = "divine"; sattr = KEY_ATTRIBUTE_DIVINE;
break; break;
case CardAttribute.ATTRIBUTE_EARTH: case CardAttribute.ATTRIBUTE_EARTH:
sattr = "earth"; sattr = KEY_ATTRIBUTE_EARTH;
break; break;
case CardAttribute.ATTRIBUTE_FIRE: case CardAttribute.ATTRIBUTE_FIRE:
sattr = "fire"; sattr = KEY_ATTRIBUTE_FIRE;
break; break;
case CardAttribute.ATTRIBUTE_LIGHT: case CardAttribute.ATTRIBUTE_LIGHT:
sattr = "light"; sattr = KEY_ATTRIBUTE_LIGHT;
break; break;
case CardAttribute.ATTRIBUTE_WATER: case CardAttribute.ATTRIBUTE_WATER:
sattr = "water"; sattr = KEY_ATTRIBUTE_WATER;
break; break;
case CardAttribute.ATTRIBUTE_WIND: case CardAttribute.ATTRIBUTE_WIND:
sattr = "wind"; sattr = KEY_ATTRIBUTE_WIND;
break; break;
} }
return sattr; return sattr;
} }
public static string GetDesc(string desc, string regx) //获取效果文本
public static string GetDesc(string cdesc, string regx)
{ {
desc = desc.Replace(Environment.NewLine, "\n"); string desc = cdesc;
Regex regex = new Regex(regx); desc = desc.Replace("\r\n", "\n");
desc = desc.Replace("\r", "\n");
Regex regex = new Regex(regx, RegexOptions.Multiline);
Match mc = regex.Match(desc); Match mc = regex.Match(desc);
if (mc.Success) if (mc.Success)
return (mc.Groups.Count > 1) ? return ((mc.Groups.Count > 1) ?
mc.Groups[1].Value : mc.Groups[0].Value; mc.Groups[1].Value : mc.Groups[0].Value)
.Replace("\n","\n\t\t");
return ""; return "";
} }
public string ReText(string text)
{
StringBuilder sb = new StringBuilder(text);
sb.Replace("\r\n", "\n");
sb.Replace("\r", "\n");
sb.Replace("\n\n", "\n");
sb.Replace("\n", "\n\t\t");
return sb.ToString();
}
//获取星星
public static string GetStar(long level) public static string GetStar(long level)
{ {
long j = level & 0xff; long j = level & 0xff;
...@@ -200,12 +235,14 @@ public static string GetStar(long level) ...@@ -200,12 +235,14 @@ public static string GetStar(long level)
} }
return star; return star;
} }
//获取种族
public string GetRace(long race) public string GetRace(long race)
{ {
if (cfg.raceDic.ContainsKey(race)) if (cfg.raceDic.ContainsKey(race))
return cfg.raceDic[race].Trim(); return cfg.raceDic[race].Trim();
return race.ToString("x"); return race.ToString("x");
} }
//获取类型文字
public string GetType(CardType ctype) public string GetType(CardType ctype)
{ {
long type = (long)ctype; long type = (long)ctype;
...@@ -213,6 +250,8 @@ public string GetType(CardType ctype) ...@@ -213,6 +250,8 @@ public string GetType(CardType ctype)
return cfg.typeDic[type].Trim(); return cfg.typeDic[type].Trim();
return type.ToString("x"); return type.ToString("x");
} }
//获取卡片类型
public string[] GetTypes(Card c) public string[] GetTypes(Card c)
{ {
string[] types = new string[] { "normal monster", "", "", "" }; string[] types = new string[] { "normal monster", "", "", "" };
...@@ -311,6 +350,10 @@ public string[] GetTypes(Card c) ...@@ -311,6 +350,10 @@ public string[] GetTypes(Card c)
} }
return types; return types;
} }
#endregion
#region 写存档
//写存档
public string[] WriteSet(string file, Card[] cards) public string[] WriteSet(string file, Card[] cards)
{ {
List<string> list = new List<string>(); List<string> list = new List<string>();
...@@ -338,59 +381,62 @@ public string[] WriteSet(string file, Card[] cards) ...@@ -338,59 +381,62 @@ public string[] WriteSet(string file, Card[] cards)
return list.ToArray(); return list.ToArray();
} }
//pendulum怪兽 //怪兽,pendulum怪兽
string getMonster(Card c, string img, bool isPendulum) string getMonster(Card c, string img, bool isPendulum)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
string[] types = GetTypes(c); string[] types = GetTypes(c);
string race = GetRace(c.race); string race = GetRace(c.race);
sb.AppendLine("card:"); sb.AppendLine(TAG_CARD + ":");
sb.AppendLine(" card type: " + types[0]); sb.AppendLine(GetLine(TAG_CARDTYPE, types[0]));
sb.AppendLine(" name: " + reItalic(c.name)); sb.AppendLine(GetLine(TAG_NAME, reItalic(c.name)));
sb.AppendLine(" attribute: " + GetAttribute(c.attribute)); sb.AppendLine(GetLine(TAG_ATTRIBUTE, GetAttribute(c.attribute)));
sb.AppendLine(" level: " + GetStar(c.level)); sb.AppendLine(GetLine(TAG_LEVEL, GetStar(c.level)));
sb.AppendLine(" image: " + img); sb.AppendLine(GetLine(TAG_IMAGE, img));
sb.AppendLine(" type 1: " + cn2tw(race)); sb.AppendLine(GetLine(TAG_TYPE1, cn2tw(race)));
sb.AppendLine(" type 2: " + cn2tw(types[1])); sb.AppendLine(GetLine(TAG_TYPE2, cn2tw(types[1])));
sb.AppendLine(" type 3: " + cn2tw(types[2])); sb.AppendLine(GetLine(TAG_TYPE3, cn2tw(types[2])));
sb.AppendLine(" type 4: " + cn2tw(types[3])); sb.AppendLine(GetLine(TAG_TYPE4, cn2tw(types[3])));
if (isPendulum) if (isPendulum)
{ {
string text = GetDesc(c.desc, cfg.regx_monster); string text = GetDesc(c.desc, cfg.regx_monster);
if (string.IsNullOrEmpty(text)) if (string.IsNullOrEmpty(text))
text = c.desc; text = ReText(c.desc);
sb.AppendLine(" rule text: "); sb.AppendLine(" " + TAG_TEXT + ":");
sb.AppendLine(" " + ReDesc(text)); //sb.AppendLine(cfg.regx_monster + ":" + cfg.regx_pendulum);
sb.AppendLine(" pendulum scale 1: " + ((c.level >> 0x18) & 0xff).ToString()); sb.AppendLine(" " + text);
sb.AppendLine(" pendulum scale 2:" + ((c.level >> 0x10) & 0xff).ToString()); sb.AppendLine(GetLine(TAG_PENDULUM, "medium"));
sb.AppendLine(" pendulum text: "); sb.AppendLine(GetLine(TAG_PSCALE1, ((c.level >> 0x18) & 0xff).ToString()));
sb.AppendLine(" " + ReDesc(GetDesc(c.desc, cfg.regx_pendulum))); sb.AppendLine(GetLine(TAG_PSCALE2, ((c.level >> 0x10) & 0xff).ToString()));
sb.AppendLine(" " + TAG_PEND_TEXT + ":");
sb.AppendLine(" "+GetDesc(c.desc, cfg.regx_pendulum));
} }
else else
{ {
sb.AppendLine(" rule text: "); sb.AppendLine(" " + TAG_TEXT + ":");
sb.AppendLine(" " + ReDesc(c.desc)); sb.AppendLine(" " + ReText(c.desc));
} }
sb.AppendLine(" attack: " + ((c.atk < 0) ? "?" : c.atk.ToString())); sb.AppendLine(GetLine(TAG_ATK, (c.atk < 0) ? "?" : c.atk.ToString()));
sb.AppendLine(" defense: " + ((c.def < 0) ? "?" : c.def.ToString())); sb.AppendLine(GetLine(TAG_DEF, (c.def < 0) ? "?" : c.def.ToString()));
sb.AppendLine(" gamecode: " + c.idString); sb.AppendLine(GetLine(TAG_CODE, c.idString));
return sb.ToString(); return sb.ToString();
} }
//魔法陷阱 //魔法陷阱
string getSpellTrap(Card c, string img, bool isSpell) string getSpellTrap(Card c, string img, bool isSpell)
{ {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.AppendLine("card:"); sb.AppendLine(TAG_CARD+":");
sb.AppendLine(" card type: " + (isSpell ? "spell card" : "trap card")); sb.AppendLine(GetLine(TAG_CARDTYPE, isSpell ? "spell card" : "trap card"));
sb.AppendLine(" name: " + reItalic(c.name)); sb.AppendLine(GetLine(TAG_NAME, reItalic(c.name)));
sb.AppendLine(" attribute: " + (isSpell ? "spell" : "trap")); sb.AppendLine(GetLine(TAG_ATTRIBUTE, isSpell ? "spell" : "trap"));
sb.AppendLine(" level: " + GetST(c, isSpell)); sb.AppendLine(GetLine(TAG_LEVEL, GetST(c, isSpell)));
sb.AppendLine(" image: " + img); sb.AppendLine(GetLine(TAG_IMAGE, img));
sb.AppendLine(" rule text: "); sb.AppendLine(" " + TAG_TEXT + ":");
sb.AppendLine(" " + ReDesc(c.desc)); sb.AppendLine(" " + ReText(c.desc));
sb.AppendLine(" gamecode: " + c.idString); sb.AppendLine(GetLine(TAG_CODE, c.idString));
return sb.ToString(); return sb.ToString();
} }
#endregion
} }
} }
using System;
using System.Collections.Generic;
using System.Text;
namespace DataEditorX.Core
{
public class MseReader
{
public const string TAG_CARDTYPE = "card type";
public const string TAG_NAME = "name";
public const string TAG_ATTRIBUTE = "attribute";
public const string TAG_LEVEL = "level";
public const string TAG_IMAGE = "image";
public const string TAG_TYPE1 = "type 1";
public const string TAG_TYPE2 = "type 2";
public const string TAG_TYPE3 = "type 3";
public const string TAG_TYPE4 = "type 4";
public const string TAG_TEXT = "rule text";
public const string TAG_ATK = "attack";
public const string TAG_DEF = "defense";
public const string TAG_PSCALE1 = "pendulum scale 1";
public const string TAG_PSCALE2 = "pendulum scale 2";
public const string TAG_PEND_TEXT = "pendulum text";
public const string TAG_CODE = "gamecode";
}
}
...@@ -96,29 +96,28 @@ public void ToImg(string img, string saveimg1, string saveimg2) ...@@ -96,29 +96,28 @@ public void ToImg(string img, string saveimg1, string saveimg2)
#region 检查更新 #region 检查更新
public static void CheckVersion(bool showNew) public static void CheckVersion(bool showNew)
{ {
string newver = CheckUpdate.Check(MyConfig.readString(MyConfig.TAG_UPDATE_URL)); string newver = CheckUpdate.GetNewVersion(MyConfig.readString(MyConfig.TAG_UPDATE_URL));
int iver, iver2; if (newver == CheckUpdate.DEFALUT)
int.TryParse(Application.ProductVersion.Replace(".", ""), out iver); { //检查失败
int.TryParse(newver.Replace(".", ""), out iver2); if (!showNew)
if (iver2 > iver) return;
MyMsg.Error(LMSG.CheckUpdateFail);
return;
}
if (CheckUpdate.CheckVersion(newver, Application.ProductVersion))
{//有最新版本 {//有最新版本
if (!MyMsg.Question(LMSG.HaveNewVersion)) if (!MyMsg.Question(LMSG.HaveNewVersion))
return; return;
} }
else if (iver2 > 0) else
{//现在就是最新版本 {//现在就是最新版本
if (!showNew) if (!showNew)
return; return;
if (!MyMsg.Question(LMSG.NowIsNewVersion)) if (!MyMsg.Question(LMSG.NowIsNewVersion))
return; return;
} }
else //下载文件
{//检查失败
if (!showNew)
return;
MyMsg.Error(LMSG.CheckUpdateFail);
return;
}
if (CheckUpdate.DownLoad( if (CheckUpdate.DownLoad(
MyPath.Combine(Application.StartupPath, newver + ".zip"))) MyPath.Combine(Application.StartupPath, newver + ".zip")))
MyMsg.Show(LMSG.DownloadSucceed); MyMsg.Show(LMSG.DownloadSucceed);
......
...@@ -706,9 +706,6 @@ public void Search(Card c, bool isfresh) ...@@ -706,9 +706,6 @@ public void Search(Card c, bool isfresh)
{ {
srcCard = c; srcCard = c;
string sql = DataBase.GetSelectSQL(c); string sql = DataBase.GetSelectSQL(c);
#if DEBUG
MyMsg.Show(sql);
#endif
SetCards(DataBase.Read(nowCdbFile, true, sql), isfresh); SetCards(DataBase.Read(nowCdbFile, true, sql), isfresh);
} }
} }
......
...@@ -96,7 +96,6 @@ ...@@ -96,7 +96,6 @@
<Compile Include="Core\LuaFunction.cs" /> <Compile Include="Core\LuaFunction.cs" />
<Compile Include="Core\MseMaker.cs" /> <Compile Include="Core\MseMaker.cs" />
<Compile Include="Config\MSEConfig.cs" /> <Compile Include="Config\MSEConfig.cs" />
<Compile Include="Core\MseReader.cs" />
<Compile Include="Core\TaskHelper.cs" /> <Compile Include="Core\TaskHelper.cs" />
<Compile Include="Core\YGOUtil.cs" /> <Compile Include="Core\YGOUtil.cs" />
<Compile Include="DataEditForm.cs"> <Compile Include="DataEditForm.cs">
......
...@@ -17,9 +17,6 @@ ...@@ -17,9 +17,6 @@
namespace DataEditorX namespace DataEditorX
{ {
/// <summary>
/// Description of MainForm.
/// </summary>
public partial class MainForm : Form, IMainForm public partial class MainForm : Form, IMainForm
{ {
#region member #region member
......
...@@ -28,4 +28,4 @@ ...@@ -28,4 +28,4 @@
// //
// You can specify all the values or you can use the default the Revision and // You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below: // Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("2.2.9.0")] [assembly: AssemblyVersion("2.2.9.1")]
########################### ###########################
# Magic Set Editor 2 # Magic Set Editor 2
# #
# \t = Tab \n = Enter \s = Space # \t = Tab \n = Enter [:space:] = Space
########################### Chs 2 Cht ########################### Chs 2 Cht
cn2tw = false cn2tw = false
########################### Setting ########################### Setting
...@@ -14,7 +14,7 @@ imagepath = ./Images ...@@ -14,7 +14,7 @@ imagepath = ./Images
spell = [魔法卡%%] spell = [魔法卡%%]
trap = [陷阱卡%%] trap = [陷阱卡%%]
############################ language,style,other setting ############################ language,style,other setting
head = mse version: 0.3.8\ngame: yugioh\nstylesheet: standard\nset info:\n\tlanguage: CN\n\tedition: \n\tST mark is text: no\n\tpendulum image is small: yes 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
############################ Text ############################ Text
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
############################ ############################
...@@ -26,8 +26,8 @@ pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【 ...@@ -26,8 +26,8 @@ pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
monster-text = [果|介|述|報]】\n([\S\s]*) monster-text = [果|介|述|報]】\n([\S\s]*)
# en monster-text = Text:[\s\S]*?Text:\n([\S\s]*) # en monster-text = Text:[\s\S]*?Text:\n([\S\s]*)
########################### Replace ########################### Replace
replace = ([鮟|鱇|・|·]) <i>$1</i> replace = ([鮟|鱇]) <i>$1</i>
#replace = \s <sym-auto>^</sym-auto> #replace = [:space:] <sym-auto>^</sym-auto>
#replace = ([A-Z]) <i>$1</i> #replace = ([A-Z]) <i>$1</i>
########################### ###########################
##race ##race
......
########################### ###########################
# Magic Set Editor 2 # Magic Set Editor 2
# #
# \t = Tab \n = Enter \s = Space # \t = Tab \n = Enter [:space:] = Space
########################### Chs 2 Cht ########################### Chs 2 Cht
cn2tw = false cn2tw = false
########################### Setting ########################### Setting
...@@ -14,7 +14,7 @@ imagepath = ./Images ...@@ -14,7 +14,7 @@ imagepath = ./Images
spell = [魔法卡%%] spell = [魔法卡%%]
trap = [陷阱卡%%] trap = [陷阱卡%%]
############################ language,style,other setting ############################ language,style,other setting
head = mse version: 0.3.8\ngame: yugioh\nstylesheet: standard\nset info:\n\tlanguage: TW\n\tedition: \n\tST mark is text: no\n\tpendulum image is small: yes 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
############################ Text ############################ Text
text =【摇摆效果】\n%ptext%\n【怪獸效果】\n%text%\n text =【摇摆效果】\n%ptext%\n【怪獸效果】\n%text%\n
############################ ############################
......
########################### ###########################
# Magic Set Editor 2 # Magic Set Editor 2
# #
# \t = Tab \n = Enter \s = Space # \t = Tab \n = Enter [:space:] = Space
########################### Chs 2 Cht ########################### Chs 2 Cht
cn2tw = false cn2tw = false
########################### Setting ########################### Setting
...@@ -11,7 +11,7 @@ imagepath = ./Images ...@@ -11,7 +11,7 @@ imagepath = ./Images
spell = [Sepll Card%%] spell = [Sepll Card%%]
trap = [Trap Card%%] trap = [Trap Card%%]
############################ language,style,other setting ############################ language,style,other setting
head = mse version: 0.3.8\ngame: yugioh\nstylesheet: standard\nset info:\n\tlanguage: EN\n\tedition: \n\tST mark is text: no\n\tpendulum image is small: yes head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: EN\r\n\tedition: \r\n\tST mark is text: no\r\n\tpendulum image is small: yes
############################ Text ############################ Text
text = Pendulum Text :\n%ptext%\nMonster Text :\n%text%\n text = Pendulum Text :\n%ptext%\nMonster Text :\n%text%\n
############################ ############################
......
########################### ###########################
# Magic Set Editor 2 # Magic Set Editor 2
# #
# \t = Tab \n = Enter \s = Space # \t = Tab \n = Enter [:space:] = Space
########################### Chs 2 Cht ########################### Chs 2 Cht
cn2tw = false cn2tw = false
########################### Setting ########################### Setting
...@@ -12,7 +12,7 @@ imagepath = ./Images ...@@ -12,7 +12,7 @@ imagepath = ./Images
spell = %% spell = %%
trap = %% trap = %%
############################ language,style,other setting ############################ language,style,other setting
head = mse version: 0.3.8\ngame: yugioh\nstylesheet: standard\nset info:\n\tlanguage: JP\n\tedition: \n\tST mark is text: no\n\tpendulum image is small: yes 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
############################ Text ############################ Text
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
############################ ############################
......
[DataEditorX]2.2.9.0[DataEditorX] [DataEditorX]2.2.9.1[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL] [URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★文件关联(File association) ★文件关联(File association)
...@@ -14,13 +14,11 @@ Email:247321453@qq.com ...@@ -14,13 +14,11 @@ Email:247321453@qq.com
错误提示文字:(弹出出错框,请按Ctrl+C,然后找地方粘贴) 错误提示文字:(弹出出错框,请按Ctrl+C,然后找地方粘贴)
详细描述:(卡片信息,杀毒软件,本程序目录等等) 详细描述:(卡片信息,杀毒软件,本程序目录等等)
Title:(DataEditorX+Version)
Content:Error Message
★支持多语言化(Language setting) ★支持多语言化(Language setting)
DataEditorX.exe.config DataEditorX.exe.config
<add key="language" value="chinese" />简体 <add key="language" value="chinese" />简体
<add key="language" value="english" />英文 <add key="language" value="english" />英文
其他语言请自己添加
★DataEditor: ★DataEditor:
攻击力为?,可以输入?,?,-2任意一个都可以。 攻击力为?,可以输入?,?,-2任意一个都可以。
...@@ -51,11 +49,30 @@ DataEditorX.exe.config ...@@ -51,11 +49,30 @@ DataEditorX.exe.config
https://github.com/247321453/MagicSetEditor2 https://github.com/247321453/MagicSetEditor2
★MSE存档生成设置 ★MSE存档生成设置
mse-head MSE的风格设置文件 在每个语言的mse_xxx.txt修改\r\n会替换为换行,\t会替换为tab
mse-monster 普通怪兽模版 简体转繁体,
mse-pendulum P怪兽模版 cn2tw = false
mse-spelltrap 魔陷模版 每个存档最大数,0则是无限
mse-config 设置pendulum文本和普通文本的正则正则表达式,用来分离文本,支持设置每个存档的最大卡片数量 maxcount = 0
从下面的文件夹找图片添加到存档,名字为密码/卡名.png/jpg
imagepath = ./Images
魔法陷阱标志,%%替换为符号,如果只是%% ,需要设置下面的ST mark is text: yes
spell = [魔法卡%%]
trap = [陷阱卡%%]
游戏yugioh,风格standard,语言CN,Edition:MSE,P怪的中间图不包含P文本区域
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: CN\r\n\tedition: MSE\r\n\tST mark is text: no\r\n\tpendulum image is small: yes
读取存档,卡片描述
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
获取P文本
pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
获取怪兽文本
monster-text = [果|介|述|報]】\n([\S\s]*)
替换特数字
replace = ([鮟|鱇|・|·]) <i>$1</i>
把空格替换为^,(占1/3字宽)
#replace = \s <sym-auto>^</sym-auto>
把A-Z替换为另外一种字体
#replace = ([A-Z]) <i>$1</i>
★lua编辑器 ★lua编辑器
在下面的文本框输入关键字,按Enter 在下面的文本框输入关键字,按Enter
...@@ -63,6 +80,8 @@ Ctrl+鼠标左键 跳转到函数定义 ...@@ -63,6 +80,8 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字 Ctrl+鼠标滑轮 缩放文字
★更新历史 ★更新历史
2.2.9.1
添加MSE设置说明
2.2.9.0 2.2.9.0
可以切换MSE的配置 可以切换MSE的配置
配置整合 配置整合
......
No preview for this file type
# database history
F:\games\ygopro\cards.cdb
F:\games\ygopro\p.zip.cdb
# script history
F:\games\ygopro\script\c41777.lua
\ No newline at end of file
########################### ###########################
# Magic Set Editor 2 # Magic Set Editor 2
# #
# \t = Tab \n = Enter \s = Space # \t = Tab \n = Enter [:space:] = Space
########################### Chs 2 Cht ########################### Chs 2 Cht
cn2tw = false cn2tw = false
########################### Setting ########################### Setting
...@@ -14,7 +14,7 @@ imagepath = ./Images ...@@ -14,7 +14,7 @@ imagepath = ./Images
spell = [魔法卡%%] spell = [魔法卡%%]
trap = [陷阱卡%%] trap = [陷阱卡%%]
############################ language,style,other setting ############################ language,style,other setting
head = mse version: 0.3.8\ngame: yugioh\nstylesheet: standard\nset info:\n\tlanguage: CN\n\tedition: \n\tST mark is text: no\n\tpendulum image is small: yes 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
############################ Text ############################ Text
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
############################ ############################
...@@ -26,8 +26,8 @@ pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【 ...@@ -26,8 +26,8 @@ pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
monster-text = [果|介|述|報]】\n([\S\s]*) monster-text = [果|介|述|報]】\n([\S\s]*)
# en monster-text = Text:[\s\S]*?Text:\n([\S\s]*) # en monster-text = Text:[\s\S]*?Text:\n([\S\s]*)
########################### Replace ########################### Replace
replace = ([鮟|鱇|・|·]) <i>$1</i> replace = ([鮟|鱇]) <i>$1</i>
#replace = \s <sym-auto>^</sym-auto> #replace = [:space:] <sym-auto>^</sym-auto>
#replace = ([A-Z]) <i>$1</i> #replace = ([A-Z]) <i>$1</i>
########################### ###########################
##race ##race
......
########################### ###########################
# Magic Set Editor 2 # Magic Set Editor 2
# #
# \t = Tab \n = Enter \s = Space # \t = Tab \n = Enter [:space:] = Space
########################### Chs 2 Cht ########################### Chs 2 Cht
cn2tw = false cn2tw = false
########################### Setting ########################### Setting
...@@ -14,7 +14,7 @@ imagepath = ./Images ...@@ -14,7 +14,7 @@ imagepath = ./Images
spell = [魔法卡%%] spell = [魔法卡%%]
trap = [陷阱卡%%] trap = [陷阱卡%%]
############################ language,style,other setting ############################ language,style,other setting
head = mse version: 0.3.8\ngame: yugioh\nstylesheet: standard\nset info:\n\tlanguage: TW\n\tedition: \n\tST mark is text: no\n\tpendulum image is small: yes 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
############################ Text ############################ Text
text =【摇摆效果】\n%ptext%\n【怪獸效果】\n%text%\n text =【摇摆效果】\n%ptext%\n【怪獸效果】\n%text%\n
############################ ############################
......
########################### ###########################
# Magic Set Editor 2 # Magic Set Editor 2
# #
# \t = Tab \n = Enter \s = Space # \t = Tab \n = Enter [:space:] = Space
########################### Chs 2 Cht ########################### Chs 2 Cht
cn2tw = false cn2tw = false
########################### Setting ########################### Setting
...@@ -11,7 +11,7 @@ imagepath = ./Images ...@@ -11,7 +11,7 @@ imagepath = ./Images
spell = [Sepll Card%%] spell = [Sepll Card%%]
trap = [Trap Card%%] trap = [Trap Card%%]
############################ language,style,other setting ############################ language,style,other setting
head = mse version: 0.3.8\ngame: yugioh\nstylesheet: standard\nset info:\n\tlanguage: EN\n\tedition: \n\tST mark is text: no\n\tpendulum image is small: yes head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: EN\r\n\tedition: \r\n\tST mark is text: no\r\n\tpendulum image is small: yes
############################ Text ############################ Text
text = Pendulum Text :\n%ptext%\nMonster Text :\n%text%\n text = Pendulum Text :\n%ptext%\nMonster Text :\n%text%\n
############################ ############################
......
########################### ###########################
# Magic Set Editor 2 # Magic Set Editor 2
# #
# \t = Tab \n = Enter \s = Space # \t = Tab \n = Enter [:space:] = Space
########################### Chs 2 Cht ########################### Chs 2 Cht
cn2tw = false cn2tw = false
########################### Setting ########################### Setting
...@@ -12,7 +12,7 @@ imagepath = ./Images ...@@ -12,7 +12,7 @@ imagepath = ./Images
spell = %% spell = %%
trap = %% trap = %%
############################ language,style,other setting ############################ language,style,other setting
head = mse version: 0.3.8\ngame: yugioh\nstylesheet: standard\nset info:\n\tlanguage: JP\n\tedition: \n\tST mark is text: no\n\tpendulum image is small: yes 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
############################ Text ############################ Text
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
############################ ############################
......
[DataEditorX]2.2.9.0[DataEditorX] [DataEditorX]2.2.9.1[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL] [URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★文件关联(File association) ★文件关联(File association)
...@@ -14,13 +14,11 @@ Email:247321453@qq.com ...@@ -14,13 +14,11 @@ Email:247321453@qq.com
错误提示文字:(弹出出错框,请按Ctrl+C,然后找地方粘贴) 错误提示文字:(弹出出错框,请按Ctrl+C,然后找地方粘贴)
详细描述:(卡片信息,杀毒软件,本程序目录等等) 详细描述:(卡片信息,杀毒软件,本程序目录等等)
Title:(DataEditorX+Version)
Content:Error Message
★支持多语言化(Language setting) ★支持多语言化(Language setting)
DataEditorX.exe.config DataEditorX.exe.config
<add key="language" value="chinese" />简体 <add key="language" value="chinese" />简体
<add key="language" value="english" />英文 <add key="language" value="english" />英文
其他语言请自己添加
★DataEditor: ★DataEditor:
攻击力为?,可以输入?,?,-2任意一个都可以。 攻击力为?,可以输入?,?,-2任意一个都可以。
...@@ -51,11 +49,30 @@ DataEditorX.exe.config ...@@ -51,11 +49,30 @@ DataEditorX.exe.config
https://github.com/247321453/MagicSetEditor2 https://github.com/247321453/MagicSetEditor2
★MSE存档生成设置 ★MSE存档生成设置
mse-head MSE的风格设置文件 在每个语言的mse_xxx.txt修改\r\n会替换为换行,\t会替换为tab
mse-monster 普通怪兽模版 简体转繁体,
mse-pendulum P怪兽模版 cn2tw = false
mse-spelltrap 魔陷模版 每个存档最大数,0则是无限
mse-config 设置pendulum文本和普通文本的正则正则表达式,用来分离文本,支持设置每个存档的最大卡片数量 maxcount = 0
从下面的文件夹找图片添加到存档,名字为密码/卡名.png/jpg
imagepath = ./Images
魔法陷阱标志,%%替换为符号,如果只是%% ,需要设置下面的ST mark is text: yes
spell = [魔法卡%%]
trap = [陷阱卡%%]
游戏yugioh,风格standard,语言CN,Edition:MSE,P怪的中间图不包含P文本区域
head = mse version: 0.3.8\r\ngame: yugioh\r\nstylesheet: standard\r\nset info:\r\n\tlanguage: CN\r\n\tedition: MSE\r\n\tST mark is text: no\r\n\tpendulum image is small: yes
读取存档,卡片描述
text =【摇摆效果】\n%ptext%\n【怪兽效果】\n%text%\n
获取P文本
pendulum-text = 】[\s\S]*?\n([\S\s]*?)\n【
获取怪兽文本
monster-text = [果|介|述|報]】\n([\S\s]*)
替换特数字
replace = ([鮟|鱇|・|·]) <i>$1</i>
把空格替换为^,(占1/3字宽)
#replace = \s <sym-auto>^</sym-auto>
把A-Z替换为另外一种字体
#replace = ([A-Z]) <i>$1</i>
★lua编辑器 ★lua编辑器
在下面的文本框输入关键字,按Enter 在下面的文本框输入关键字,按Enter
...@@ -63,6 +80,8 @@ Ctrl+鼠标左键 跳转到函数定义 ...@@ -63,6 +80,8 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字 Ctrl+鼠标滑轮 缩放文字
★更新历史 ★更新历史
2.2.9.1
添加MSE设置说明
2.2.9.0 2.2.9.0
可以切换MSE的配置 可以切换MSE的配置
配置整合 配置整合
......
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