Commit 9f3b4475 authored by keyongyu's avatar keyongyu

2.2.9.4

parent 6fe93422
......@@ -257,6 +257,10 @@ private void InitializeComponent()
this.documentMap1.Text = "documentMap1";
this.documentMap1.Visible = false;
//
// backgroundWorker1
//
this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork);
//
// CodeEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......
......@@ -17,7 +17,6 @@
using System.Text.RegularExpressions;
using DataEditorX.Core;
using DataEditorX.Config;
using System.Configuration;
using DataEditorX.Controls;
namespace DataEditorX
......
using System;
using System.Collections.Generic;
using System.Text;

namespace DataEditorX.Common
{
/// <summary>
/// 区域
/// </summary>
public class Area
{
public Area()
......@@ -13,10 +13,21 @@ public Area()
width = 0;
height = 0;
}
/// <summary>
/// 左
/// </summary>
public int left;
/// <summary>
/// 顶
/// </summary>
public int top;
/// <summary>
/// 宽
/// </summary>
public int width;
/// <summary>
/// 高
/// </summary>
public int height;
}
}
......@@ -5,30 +5,40 @@
* 时间: 9:58
*
*/
using System;
using System.IO;
using System.Net;
using System.Text;
using System.Windows.Forms;
namespace DataEditorX
namespace DataEditorX.Common
{
/// <summary>
/// Description of CheckUpdate.
/// 检查更新
/// </summary>
public static class CheckUpdate
{
static CheckUpdate()
{
//连接数
ServicePointManager.DefaultConnectionLimit = 255;
}
/// <summary>
/// 下载URL
/// </summary>
public static string URL = "";
static string HEAD = "[DataEditorX]", HEAD2 = "[URL]";
public static bool isOK = false;
/// <summary>
/// 从HEAD获取版本号
/// </summary>
const string HEAD = "[DataEditorX]";
const string HEAD2 = "[URL]";
public const string DEFALUT = "0.0.0.0";
public const int VER_LENGTH = 4;
const int VER_LENGTH = 4;
#region 检查版本
/// <summary>
/// 获取新版本
/// </summary>
/// <param name="VERURL">链接</param>
/// <returns>版本号</returns>
public static string GetNewVersion(string VERURL)
{
string urlver = DEFALUT;
......@@ -53,7 +63,12 @@ public static string GetNewVersion(string VERURL)
}
return urlver;
}
//检查版本号,格式0.0.0.0
/// <summary>
/// 检查版本号,格式0.0.0.0
/// </summary>
/// <param name="ver">0.0.0.0</param>
/// <param name="oldver">0.0.0.0</param>
/// <returns>是否有新版本</returns>
public static bool CheckVersion(string ver, string oldver)
{
bool hasNew = false;
......@@ -61,12 +76,12 @@ public static bool CheckVersion(string ver, string oldver)
string[] oldvers = oldver.Split('.');
if (vers.Length == oldvers.Length && vers.Length == VER_LENGTH)
{
int j, k;
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)
if (j > k)//新的版本号大于旧的
{
hasNew = true;
break;
......@@ -82,6 +97,11 @@ public static bool CheckVersion(string ver, string oldver)
#endregion
#region 获取网址内容
/// <summary>
/// 获取网址内容
/// </summary>
/// <param name="url">网址</param>
/// <returns>内容</returns>
public static string GetHtmlContentByUrl(string url)
{
string htmlContent = string.Empty;
......@@ -116,6 +136,11 @@ public static string GetHtmlContentByUrl(string url)
#endregion
#region 下载文件
/// <summary>
/// 下载文件
/// </summary>
/// <param name="filename">保存文件路径</param>
/// <returns>是否下载成功</returns>
public static bool DownLoad(string filename)
{
try
......@@ -142,10 +167,9 @@ public static bool DownLoad(string filename)
}
catch (System.Exception)
{
isOK = false;
return false;
}
isOK = true;
return isOK;
return true;
}
#endregion
}
......
......@@ -2,17 +2,15 @@
* date :2014-02-07
* desc :图像处理,裁剪,缩放,保存
*/
using System;
using System.IO;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Imaging;
using DataEditorX.Common;
namespace DataEditorX.Common
{
/// <summary>
/// Description of ImageHelper.
/// 图片裁剪,缩放,保存高质量jpg
/// </summary>
public static class MyBitmap
{
......@@ -30,9 +28,13 @@ public static Bitmap Zoom(Bitmap sourceBitmap, int newWidth, int newHeight)
{
Bitmap b = new Bitmap(newWidth, newHeight);
Graphics graphics = Graphics.FromImage(b);
//合成:高质量,低速度
graphics.CompositingQuality = CompositingQuality.HighQuality;
//去除锯齿
graphics.SmoothingMode = SmoothingMode.HighQuality;
//偏移:高质量,低速度
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
//插补算法
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
Rectangle newRect = new Rectangle(0, 0, newWidth, newHeight);
Rectangle srcRect = new Rectangle(0, 0, sourceBitmap.Width, sourceBitmap.Height);
......@@ -45,6 +47,12 @@ public static Bitmap Zoom(Bitmap sourceBitmap, int newWidth, int newHeight)
#endregion
#region 裁剪
/// <summary>
/// 裁剪图片
/// </summary>
/// <param name="sourceBitmap">图片源</param>
/// <param name="area">区域</param>
/// <returns></returns>
public static Bitmap Cut(Bitmap sourceBitmap, Area area)
{
return Cut(sourceBitmap, area.left, area.top, area.width, area.height);
......@@ -64,16 +72,26 @@ public static Bitmap Cut(Bitmap sourceBitmap, int StartX, int StartY, int cutWid
{
int w = sourceBitmap.Width;
int h = sourceBitmap.Height;
//裁剪的区域宽度调整
if ( ( StartX + cutWidth ) > w )
{
cutWidth = w - StartX;
}
//裁剪的区域高度调整
if ( ( StartY + cutHeight ) > h )
{
cutHeight = h - StartY;
}
Bitmap bitmap = new Bitmap(cutWidth, cutHeight);
Graphics graphics = Graphics.FromImage(bitmap);
//合成:高质量,低速度
graphics.CompositingQuality = CompositingQuality.HighQuality;
//去除锯齿
graphics.SmoothingMode = SmoothingMode.HighQuality;
//偏移:高质量,低速度
graphics.PixelOffsetMode = PixelOffsetMode.HighQuality;
//插补算法
graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
Rectangle cutRect = new Rectangle(0, 0, cutWidth, cutHeight);
Rectangle srcRect = new Rectangle(StartX, StartY, cutWidth, cutHeight);
graphics.DrawImage(sourceBitmap, cutRect, srcRect, GraphicsUnit.Pixel);
......@@ -97,9 +115,9 @@ public static bool SaveAsJPEG(Bitmap bitmap, string filename, int quality)
if ( bitmap != null )
{
string path=Path.GetDirectoryName(filename);
if(!Directory.Exists(path))
if(!Directory.Exists(path))//创建文件夹
Directory.CreateDirectory(path);
if(File.Exists(filename))
if(File.Exists(filename))//删除旧文件
File.Delete(filename);
ImageCodecInfo[] codecs = ImageCodecInfo.GetImageEncoders();
ImageCodecInfo ici = null;
......
......@@ -12,11 +12,16 @@
namespace System.IO
{
/// <summary>
/// Description of MyPath.
/// 路径处理
/// </summary>
public class MyPath
{
public static string GetFullPath(string dir)
/// <summary>
/// 从相对路径获取真实路径
/// </summary>
/// <param name="dir"></param>
/// <returns></returns>
public static string GetRealPath(string dir)
{
string path = Application.StartupPath;
if (dir.StartsWith("."))
......@@ -25,7 +30,12 @@ public static string GetFullPath(string dir)
}
return dir;
}
public static string Combine(params string[] paths)
/// <summary>
/// 合并路径
/// </summary>
/// <param name="paths"></param>
/// <returns></returns>
public static string Combine(params string[] paths)
{
if (paths.Length == 0)
{
......@@ -68,24 +78,52 @@ public static string Combine(params string[] paths)
return builder.ToString();
}
}
//检查目录是否合法
/// <summary>
/// 检查目录是否合法
/// </summary>
/// <param name="dir">目录</param>
/// <param name="defalut">不合法时,采取的目录</param>
/// <returns></returns>
public static string CheckDir(string dir,string defalut)
{
DirectoryInfo fo;
try
{
fo = new DirectoryInfo(MyPath.GetFullPath(dir));
fo = new DirectoryInfo(MyPath.GetRealPath(dir));
}
catch
{
catch{
//路径不合法
fo = new DirectoryInfo(defalut);
}
if (!fo.Exists)
fo.Create();
dir = fo.FullName;
return dir;
}
}
/// <summary>
/// 根据tag获取文件名
/// tag_lang.txt
/// </summary>
/// <param name="tag">前面</param>
/// <param name="lang"></param>
/// <returns></returns>
public static string getFileName(string tag,string lang)
{
return tag+"_" + lang + ".txt";
}
/// <summary>
/// 由tag和lang获取文件名
/// </summary>
/// <param name="tag"></param>
/// <param name="file"></param>
/// <returns></returns>
public static string getFullFileName(string tag, string file)
{
string name = Path.GetFileNameWithoutExtension(file);
if (!name.StartsWith(tag + "_"))
return "";
else
return name.Replace(tag + "_", "");
}
}
}
......@@ -15,8 +15,27 @@ namespace System
/// </summary>
public class User32
{
/// <summary>
/// 发送窗口消息
/// </summary>
/// <param name="hWnd"></param>
/// <param name="msg"></param>
/// <param name="wParam"></param>
/// <param name="lParam"></param>
/// <returns></returns>
[DllImport("User32.dll", EntryPoint = "SendMessage")]
public static extern int SendMessage(IntPtr hWnd, int msg, uint wParam, uint lParam);
/// <summary>
/// 设置窗口的位置
/// </summary>
/// <param name="hWnd"></param>
/// <param name="hWndInsertAfter"></param>
/// <param name="x"></param>
/// <param name="y"></param>
/// <param name="Width"></param>
/// <param name="Height"></param>
/// <param name="flags"></param>
/// <returns></returns>
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern int SetWindowPos(IntPtr hWnd, int hWndInsertAfter, int x, int y, int Width, int Height, int flags);
/// <summary>
......@@ -25,10 +44,5 @@ public class User32
/// <returns></returns>
[DllImport("user32.dll", CharSet = CharSet.Auto)]
public static extern System.IntPtr GetForegroundWindow();
public static void WindowToTop()
{
}
}
}
\ No newline at end of file
......@@ -21,6 +21,7 @@ public enum Compression : ushort {
/// <summary>Deflate compression method</summary>
Deflate = 8 }
#region ZipFileEntry
/// <summary>
/// Represents an entry in Zip file directory
/// </summary>
......@@ -56,6 +57,7 @@ public override string ToString()
return this.FilenameInZip;
}
}
#endregion
#region Public fields
/// <summary>True if UTF8 encoding for filename and comments, false if default (CP 437)</summary>
......
......@@ -27,19 +27,28 @@ public void Init()
//函数提示
Dictionary<string, string> tooltipDic;
//自动完成
//函数列表
List<AutocompleteItem> funList;
//常量列表
List<AutocompleteItem> conList;
/// <summary>
/// 输入提示
/// </summary>
public Dictionary<string, string> TooltipDic
{
get { return tooltipDic; }
}
/// <summary>
/// 函数列表
/// </summary>
public AutocompleteItem[] FunList
{
get { return funList.ToArray(); }
}
/// <summary>
/// 常量列表
/// </summary>
public AutocompleteItem[] ConList
{
get { return conList.ToArray(); }
......@@ -47,8 +56,11 @@ public AutocompleteItem[] ConList
#endregion
#region 系列名/指示物
//系列名
public void SetNames(Dictionary<long, string> dic)
/// <summary>
/// 设置系列名
/// </summary>
/// <param name="dic"></param>
public void SetNames(SortedList<long, string> dic)
{
foreach (long k in dic.Keys)
{
......@@ -59,7 +71,10 @@ public void SetNames(Dictionary<long, string> dic)
}
}
}
//指示物
/// <summary>
/// 读取指示物
/// </summary>
/// <param name="file"></param>
public void AddStrings(string file)
{
if (File.Exists(file))
......@@ -67,6 +82,7 @@ public void AddStrings(string file)
string[] lines = File.ReadAllLines(file);
foreach (string line in lines)
{
//特殊胜利和指示物
if (line.StartsWith("!victory")
|| line.StartsWith("!counter"))
{
......@@ -83,7 +99,10 @@ public void AddStrings(string file)
#endregion
#region function
//函数
/// <summary>
/// 添加函数
/// </summary>
/// <param name="funtxt"></param>
public void AddFunction(string funtxt)
{
if (!File.Exists(funtxt))
......@@ -108,6 +127,7 @@ public void AddFunction(string funtxt)
if (t < w && t > 0)
{
//找到函数
name = line.Substring(t + 1, w - t - 1);
isFind = true;
desc = line;
......@@ -173,6 +193,7 @@ public void AddConstant(string conlua)
string k = line, desc = line;
int t = line.IndexOf("=");
int t2 = line.IndexOf("--");
//常量 = 0x1 ---注释
k = (t > 0) ? line.Substring(0, t).TrimEnd(new char[] { ' ', '\t' })
: line;
desc = (t > 0) ? line.Substring(t + 1).Replace("--", "\n")
......
......@@ -7,7 +7,15 @@ namespace DataEditorX.Config
{
public class ConfHelper
{
/// <summary>
/// 内容分隔符
/// </summary>
public const string SEP_LINE = " ";
/// <summary>
/// 从行获取值
/// </summary>
/// <param name="line"></param>
/// <returns></returns>
public static string getValue(string line)
{
int t = line.IndexOf('=');
......@@ -15,6 +23,11 @@ public static string getValue(string line)
return line.Substring(t + 1).Trim();
return "";
}
/// <summary>
/// 从词中获取第一个值
/// </summary>
/// <param name="word"></param>
/// <returns></returns>
public static string getValue1(string word)
{
int i = word.IndexOf(SEP_LINE);
......@@ -22,6 +35,11 @@ public static string getValue1(string word)
return word.Substring(0, i);
return "";
}
/// <summary>
/// 从词中获取第二个值
/// </summary>
/// <param name="word"></param>
/// <returns></returns>
public static string getValue2(string word)
{
int i = word.IndexOf(SEP_LINE);
......@@ -29,10 +47,20 @@ public static string getValue2(string word)
return word.Substring(i + SEP_LINE.Length);
return "";
}
/// <summary>
/// 获取多行值,替换\n \t
/// </summary>
/// <param name="line"></param>
/// <returns></returns>
public static string getMultLineValue(string line)
{
return getRegex(getValue(line));
}
/// <summary>
/// 替换特殊符
/// </summary>
/// <param name="word"></param>
/// <returns></returns>
public static string getRegex(string word)
{
StringBuilder sb = new StringBuilder(word);
......@@ -42,6 +70,11 @@ public static string getRegex(string word)
sb.Replace("[:space:]", " ");
return sb.ToString();
}
/// <summary>
/// 获取boolean值
/// </summary>
/// <param name="line"></param>
/// <returns></returns>
public static bool getBooleanValue(string line)
{
if (getValue(line).ToLower() == "true")
......@@ -49,7 +82,12 @@ public static bool getBooleanValue(string line)
else
return false;
}
/// <summary>
/// 获取int值
/// </summary>
/// <param name="line"></param>
/// <param name="defalut">失败的值</param>
/// <returns></returns>
public static int getIntegerValue(string line, int defalut)
{
int i;
......@@ -61,6 +99,12 @@ public static int getIntegerValue(string line, int defalut)
catch{}
return defalut;
}
/// <summary>
/// 从行获取内容添加到字典
/// race 0x1 xxx
/// </summary>
/// <param name="dic"></param>
/// <param name="line"></param>
public static void DicAdd(Dictionary<long, string> dic, string line)
{
int i = line.IndexOf("0x");
......
......@@ -24,18 +24,22 @@ public DataConfig(string conf)
{
InitMember(conf);
}
/// <summary>
/// 初始化成员
/// </summary>
/// <param name="conf"></param>
public void InitMember(string conf)
{
//conf = MyPath.Combine(datapath, MyConfig.FILE_INFO);
if(!File.Exists(conf))
{
dicCardRules = new Dictionary<long, string>();
dicSetnames =new Dictionary<long, string>();
dicCardTypes =new Dictionary<long, string>();
dicCardcategorys =new Dictionary<long, string>();
dicCardAttributes =new Dictionary<long, string>();
dicCardRaces =new Dictionary<long, string>();
dicCardLevels =new Dictionary<long, string>();
dicCardRules = new SortedList<long, string>();
dicSetnames = new SortedList<long, string>();
dicCardTypes = new SortedList<long, string>();
dicCardcategorys = new SortedList<long, string>();
dicCardAttributes = new SortedList<long, string>();
dicCardRaces = new SortedList<long, string>();
dicCardLevels = new SortedList<long, string>();
return;
}
//提取内容
......@@ -49,13 +53,33 @@ public void InitMember(string conf)
dicCardLevels = DataManager.Read(text, MyConfig.TAG_LEVEL);
}
public Dictionary<long, string> dicCardRules = null;
public Dictionary<long, string> dicCardAttributes = null;
public Dictionary<long, string> dicCardRaces = null;
public Dictionary<long, string> dicCardLevels = null;
public Dictionary<long, string> dicSetnames = null;
public Dictionary<long, string> dicCardTypes = null;
public Dictionary<long, string> dicCardcategorys = null;
/// <summary>
/// 规则
/// </summary>
public SortedList<long, string> dicCardRules = null;
/// <summary>
/// 属性
/// </summary>
public SortedList<long, string> dicCardAttributes = null;
/// <summary>
/// 种族
/// </summary>
public SortedList<long, string> dicCardRaces = null;
/// <summary>
/// 等级
/// </summary>
public SortedList<long, string> dicCardLevels = null;
/// <summary>
/// 系列名
/// </summary>
public SortedList<long, string> dicSetnames = null;
/// <summary>
/// 卡片类型
/// </summary>
public SortedList<long, string> dicCardTypes = null;
/// <summary>
/// 效果类型
/// </summary>
public SortedList<long, string> dicCardcategorys = null;
}
}
......@@ -16,8 +16,17 @@ namespace DataEditorX.Config
{
public class DataManager
{
/// <summary>
/// 内容开头
/// </summary>
public const string TAG_START = "##";
/// <summary>
/// 内容结尾
/// </summary>
public const string TAG_END = "#";
/// <summary>
/// 行分隔符
/// </summary>
public const char SEP_LINE = '\t';
#region 根据tag获取内容
......@@ -46,7 +55,7 @@ public static string subString(string content, string tag)
/// <param name="content">字符串</param>
/// <param name="tag">开始的标志</param>
/// <returns></returns>
public static Dictionary<long, string> Read(string content, string tag)
public static SortedList<long, string> Read(string content, string tag)
{
return Read(subString(content,tag));
}
......@@ -56,7 +65,7 @@ public static string subString(string content, string tag)
/// <param name="strFile"></param>
/// <param name="encode"></param>
/// <returns></returns>
public static Dictionary<long, string> Read(string strFile, Encoding encode)
public static SortedList<long, string> Read(string strFile, Encoding encode)
{
return Read(File.ReadAllLines(strFile, encode));
}
......@@ -65,7 +74,7 @@ public static string subString(string content, string tag)
/// </summary>
/// <param name="content"></param>
/// <returns></returns>
public static Dictionary<long, string> Read(string content)
public static SortedList<long, string> Read(string content)
{
string text = reReturn(content);
return Read(text.Split('\n'));
......@@ -75,9 +84,9 @@ public static string subString(string content, string tag)
/// </summary>
/// <param name="lines"></param>
/// <returns></returns>
public static Dictionary<long, string> Read(string[] lines)
public static SortedList<long, string> Read(string[] lines)
{
Dictionary<long, string> tempDic = new Dictionary<long, string>();
SortedList<long, string> tempDic = new SortedList<long, string>();
long lkey;
foreach (string line in lines)
{
......@@ -100,47 +109,35 @@ public static string subString(string content, string tag)
#endregion
#region 查找
/// <summary>
///
/// </summary>
/// <param name="dic"></param>
/// <param name="strValue"></param>
/// <param name="defaultKey"></param>
/// <returns></returns>
public static long GetKey(
Dictionary<long, string> dic,
string strValue,
long defaultKey
){
long lkey=defaultKey;
if(!dic.ContainsValue(strValue))
return lkey;
foreach(long key in dic.Keys)
public static List<long> GetKeys(SortedList<long, string> dic)
{
List<long> list = new List<long>();
foreach (long l in dic.Keys)
{
if(dic[key]==strValue)
{
lkey=key;
break;
}
list.Add(l);
}
return lkey;
return list;
}
#endregion
#region value
public static string[] GetValues(Dictionary<long, string> dic)
public static string[] GetValues(SortedList<long, string> dic)
{
int length=dic.Count;
string[] words=new string[1];
words[0]="N/A";
if(length > 0)
string[] strs = new string[dic.Count];
int j = strs.Length;
if (j == 0)
return strs;
for (int i = 0; i < j; i++)
{
words=new string[length];
dic.Values.CopyTo(words,0);
strs[i] = dic.Values[i];
}
return words;
return strs;
}
public static string GetValue(Dictionary<long, string> dic,long key){
/// <summary>
/// 获取值
/// </summary>
/// <param name="dic"></param>
/// <param name="key"></param>
/// <returns></returns>
public static string GetValue(SortedList<long, string> dic, long key)
{
if(dic.ContainsKey(key))
return dic[key].Trim();
return key.ToString("x");
......
......@@ -12,19 +12,17 @@
namespace DataEditorX.Config
{
/// <summary>
/// 裁剪图片是、配置
/// </summary>
public class ImageSet
{
bool isInit;
public ImageSet(){
isInit=false;
Init();
}
public void Init()
//初始化
void Init()
{
if(isInit)
return;
isInit=true;
this.normalArea = MyConfig.readArea(MyConfig.TAG_IMAGE_OTHER);
this.xyzArea = MyConfig.readArea(MyConfig.TAG_IMAGE_XYZ);
......@@ -40,10 +38,37 @@ public void Init()
this.quilty = MyConfig.readInteger(MyConfig.TAG_IMAGE_QUILTY, 95);
}
/// <summary>
/// jpeg质量
/// </summary>
public int quilty;
public int w,h,W,H;
/// <summary>
/// 小图的宽
/// </summary>
public int w;
/// <summary>
/// 小图的高
/// </summary>
public int h;
/// <summary>
/// 大图的宽
/// </summary>
public int W;
/// <summary>
/// 大图的高
/// </summary>
public int H;
/// <summary>
/// 怪兽的中间图
/// </summary>
public Area normalArea;
/// <summary>
/// xyz怪兽的中间图
/// </summary>
public Area xyzArea;
/// <summary>
/// p怪的中间图
/// </summary>
public Area pendulumArea;
}
}
......@@ -20,7 +20,9 @@ namespace DataEditorX.Config
/// </summary>
public class MSEConfig
{
public const string TAG = "mse";
public const string TAG_HEAD = "head";
public const string TAG_END = "end";
public const string TAG_CN2TW = "cn2tw";
public const string TAG_SPELL = "spell";
public const string TAG_TRAP = "trap";
......@@ -52,7 +54,7 @@ public void SetConfig(string config, string path)
regx_monster = "(\\s\\S*?)";
regx_pendulum = "(\\s\\S*?)";
//设置文件名
configName = getLanguage(config);
configName = MyPath.getFullFileName(MSEConfig.TAG, config);
replaces = new Dictionary<string, string>();
......@@ -69,6 +71,8 @@ public void SetConfig(string config, string path)
str_spell = ConfHelper.getValue(line);
else if (line.StartsWith(TAG_HEAD))
head = ConfHelper.getMultLineValue(line);
else if (line.StartsWith(TAG_END))
end = ConfHelper.getMultLineValue(line);
else if (line.StartsWith(TAG_TEXT))
temp_text = ConfHelper.getMultLineValue(line);
else if (line.StartsWith(TAG_TRAP))
......@@ -108,28 +112,17 @@ public void init(string path)
Iscn2tw = false;
//读取配置
string tmp = MyPath.Combine(path, getFileName(MyConfig.readString(MyConfig.TAG_MSE)));
string tmp = MyPath.Combine(path, MyPath.getFileName(MSEConfig.TAG, MyConfig.readString(MyConfig.TAG_MSE)));
if (!File.Exists(tmp))
{
tmp = MyPath.Combine(path, getFileName(FILE_CONFIG_NAME));
tmp = MyPath.Combine(path, MyPath.getFileName(MSEConfig.TAG, FILE_CONFIG_NAME));
if(!File.Exists(tmp))
return;//如果默认的也不存在
}
SetConfig(tmp, path);
}
public static string getFileName(string lang)
{
return "mse_" + lang + ".txt";
}
public static string getLanguage(string file)
{
string name = Path.GetFileNameWithoutExtension(file);
if (!name.StartsWith("mse_"))
return "";
else
return name.Replace("mse_", "");
}
//每个存档最大数
public int maxcount;
......@@ -150,6 +143,8 @@ public static string getLanguage(string file)
public string regx_monster;
//存档头部
public string head;
//存档结尾
public string end;
public Dictionary<long, string> typeDic;
public Dictionary<long, string> raceDic;
}
......
......@@ -4,48 +4,150 @@
namespace DataEditorX.Config
{
class MyConfig
/// <summary>
/// 配置
/// </summary>
public class MyConfig
{
#region 常量
/// <summary>
/// 窗口消息 打开文件
/// </summary>
public const int WM_OPEN = 0x0401;
/// <summary>
/// 最大历史数量
/// </summary>
public const int MAX_HISTORY = 0x10;
/// <summary>
/// 数据目录
/// </summary>
public const string TAG_DATA = "data";
/// <summary>
/// MSE
/// </summary>
public const string TAG_MSE = "mse";
/// <summary>
/// 卡片信息
/// </summary>
public const string TAG_CARDINFO = "cardinfo";
/// <summary>
/// 语言
/// </summary>
public const string TAG_LANGUAGE = "language";
/// <summary>
/// 临时文件
/// </summary>
public const string FILE_TEMP = "open.tmp";
/// <summary>
/// 历史记录
/// </summary>
public const string FILE_HISTORY = "history.txt";
/// <summary>
/// 函数
/// </summary>
public const string FILE_FUNCTION = "_functions.txt";
/// <summary>
/// 常量
/// </summary>
public const string FILE_CONSTANT = "constant.lua";
/// <summary>
/// 指示物,胜利提示
/// </summary>
public const string FILE_STRINGS = "strings.conf";
/// <summary>
/// 源码链接
/// </summary>
public const string TAG_SOURCE_URL = "sourceURL";
/// <summary>
/// 升级链接
/// </summary>
public const string TAG_UPDATE_URL = "updateURL";
/// <summary>
/// 一般的裁剪
/// </summary>
public const string TAG_IMAGE_OTHER = "image_other";
/// <summary>
/// xyz的裁剪
/// </summary>
public const string TAG_IMAGE_XYZ = "image_xyz";
/// <summary>
/// Pendulum的裁剪
/// </summary>
public const string TAG_IMAGE_PENDULUM = "image_pendulum";
/// <summary>
/// 图片的宽高,小图w,h大图W,H,共4个
/// </summary>
public const string TAG_IMAGE_SIZE = "image";
/// <summary>
/// 图片质量
/// </summary>
public const string TAG_IMAGE_QUILTY = "image_quilty";
//CodeEditor
/// <summary>
/// 字体名
/// </summary>
public const string TAG_FONT_NAME = "fontname";
/// <summary>
/// 字体大小
/// </summary>
public const string TAG_FONT_SIZE = "fontsize";
/// <summary>
/// 支持中文
/// </summary>
public const string TAG_IME = "IME";
/// <summary>
/// 自动换行
/// </summary>
public const string TAG_WORDWRAP = "wordwrap";
/// <summary>
/// tab替换为空格
/// </summary>
public const string TAG_TAB2SPACES = "tabisspace";
/// <summary>
/// 规则
/// </summary>
public const string TAG_RULE = "rule";
/// <summary>
/// 种族
/// </summary>
public const string TAG_RACE = "race";
/// <summary>
/// 属性
/// </summary>
public const string TAG_ATTRIBUTE = "attribute";
/// <summary>
/// 等级
/// </summary>
public const string TAG_LEVEL = "level";
/// <summary>
/// 效果分类
/// </summary>
public const string TAG_CATEGORY = "category";
/// <summary>
/// 类型
/// </summary>
public const string TAG_TYPE = "type";
/// <summary>
/// 系列名
/// </summary>
public const string TAG_SETNAME = "setname";
#endregion
/// <summary>
/// 读取字符串值
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public static string readString(string key)
{
return GetAppConfig(key);
}
/// <summary>
/// 读取int值
/// </summary>
/// <param name="key"></param>
/// <param name="def"></param>
/// <returns></returns>
public static int readInteger(string key, int def)
{
int i;
......@@ -53,6 +155,12 @@ public static int readInteger(string key, int def)
return i;
return def;
}
/// <summary>
/// 读取float值
/// </summary>
/// <param name="key"></param>
/// <param name="def"></param>
/// <returns></returns>
public static float readFloat(string key, float def)
{
float i;
......@@ -60,6 +168,12 @@ public static float readFloat(string key, float def)
return i;
return def;
}
/// <summary>
/// 读取int数组
/// </summary>
/// <param name="key"></param>
/// <param name="length"></param>
/// <returns></returns>
public static int[] readIntegers(string key, int length)
{
string temp = readString(key);
......@@ -75,6 +189,11 @@ public static int[] readIntegers(string key, int length)
}
return ints;
}
/// <summary>
/// 读取区域
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public static Area readArea(string key)
{
int[] ints = readIntegers(key, 4);
......@@ -88,6 +207,11 @@ public static Area readArea(string key)
}
return a;
}
/// <summary>
/// 读取boolean
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
public static bool readBoolean(string key)
{
if (readString(key).ToLower() == "true")
......@@ -95,7 +219,11 @@ public static bool readBoolean(string key)
else
return false;
}
/// <summary>
/// 保存值
/// </summary>
/// <param name="appKey"></param>
/// <param name="appValue"></param>
public static void Save(string appKey, string appValue)
{
XmlDocument xDoc = new XmlDocument();
......@@ -115,6 +243,11 @@ public static void Save(string appKey, string appValue)
}
xDoc.Save(System.Windows.Forms.Application.ExecutablePath + ".config");
}
/// <summary>
/// 获取值
/// </summary>
/// <param name="appKey"></param>
/// <returns></returns>
public static string GetAppConfig(string appKey)
{
XmlDocument xDoc = new XmlDocument();
......@@ -130,13 +263,23 @@ public static string GetAppConfig(string appKey)
}
return string.Empty;
}
/// <summary>
/// 语言配置文件名
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
public static string GetLanguageFile(string path)
{
return MyPath.Combine(path, MyConfig.TAG_LANGUAGE + "_" + GetAppConfig(TAG_LANGUAGE) + ".txt");
return MyPath.Combine(path, MyPath.getFileName(MyConfig.TAG_LANGUAGE, GetAppConfig(TAG_LANGUAGE)));
}
/// <summary>
/// 卡片信息配置文件名
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
public static string GetCardInfoFile(string path)
{
return MyPath.Combine(path, MyConfig.TAG_CARDINFO + "_" + GetAppConfig(TAG_LANGUAGE)+".txt");
return MyPath.Combine(path, MyPath.getFileName(MyConfig.TAG_CARDINFO, GetAppConfig(TAG_LANGUAGE)));
}
}
......
......@@ -29,7 +29,7 @@ protected override void OnMouseMove(MouseEventArgs e)
base.OnMouseMove(e);
lastMouseCoord = e.Location;
}
//函数提示
protected override void OnToolTip()
{
if (ToolTip == null)
......@@ -61,6 +61,7 @@ protected override void OnToolTip()
ToolTip.Show(ea.ToolTipText, this, new Point(lastMouseCoord.X, lastMouseCoord.Y + CharHeight));
}
}
//高亮当前词
void FctbTextChangedDelayed(object sender, TextChangedEventArgs e)
{
//delete all markers
......
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using DataEditorX.Core;
using DataEditorX.Config;
......@@ -9,16 +8,8 @@
namespace DataEditorX.Controls
{
interface IMainForm
{
void CdbMenuClear();
void LuaMenuClear();
void AddCdbMenu(ToolStripItem item);
void AddLuaMenu(ToolStripItem item);
void Open(string file);
}
class History
public class History
{
IMainForm mainForm;
string historyFile;
......
using System.Windows.Forms;
namespace DataEditorX.Controls
{
public interface IMainForm
{
void CdbMenuClear();
void LuaMenuClear();
void AddCdbMenu(ToolStripItem item);
void AddLuaMenu(ToolStripItem item);
void Open(string file);
}
}
......@@ -16,7 +16,7 @@
namespace FastColoredTextBoxNS
{
/// <summary>
/// Description of FastColoredTextBoxEx.
/// ygocore的lua高亮,夜间
/// </summary>
public class MySyntaxHighlighter : SyntaxHighlighter
{
......
......@@ -82,7 +82,11 @@ public override bool Equals(object obj)
else
return false;
}
/// <summary>
/// 比较卡片,除脚本提示文本
/// </summary>
/// <param name="other"></param>
/// <returns></returns>
public bool EqualsData(Card other)
{
bool equalBool = true;
......@@ -157,12 +161,21 @@ public override int GetHashCode()
{
return left.Equals(right);
}
/// <summary>
/// 是否是某类型
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
public bool IsType(CardType type){
if((this.type & (long)type) == (long)type)
return true;
return false;
}
/// <summary>
/// 是否是某系列
/// </summary>
/// <param name="sc"></param>
/// <returns></returns>
public bool IsSetCode(long sc)
{
long settype = sc & 0xfff;
......@@ -186,6 +199,9 @@ public bool IsSetCode(long sc)
#endregion
#region 卡片文字信息
/// <summary>
/// 密码字符串
/// </summary>
public string idString
{
get { return id.ToString("00000000"); }
......@@ -205,6 +221,12 @@ public override string ToString()
str = name +"[" +idString +"]\n["+YGOUtil.GetTypeString(type)+"]\n"+redesc();
return str;
}
public string ToShortString(){
return this.name+" ["+idString+"]";
}
public string ToLongString(){
return ToString();
}
string levelString()
{
......
......@@ -9,17 +9,38 @@
namespace DataEditorX.Core
{
/// <summary>
/// Description of CardAttribute.
/// </summary>
public enum CardAttribute : int
{
ATTRIBUTE_EARTH =0x01 ,//--地
ATTRIBUTE_WATER =0x02 ,//--水
ATTRIBUTE_FIRE =0x04 ,//--炎
ATTRIBUTE_WIND =0x08 ,//--风
ATTRIBUTE_LIGHT =0x10 ,//--光
ATTRIBUTE_DARK =0x20 ,//--暗
ATTRIBUTE_DEVINE =0x40 ,//--神
}
/// <summary>
/// 卡片属性
/// </summary>
public enum CardAttribute : int
{
/// <summary>
/// 地
/// </summary>
ATTRIBUTE_EARTH = 0x01,
/// <summary>
/// 水
/// </summary>
ATTRIBUTE_WATER = 0x02,
/// <summary>
/// 炎
/// </summary>
ATTRIBUTE_FIRE = 0x04,
/// <summary>
/// 风
/// </summary>
ATTRIBUTE_WIND = 0x08,
/// <summary>
/// 光
/// </summary>
ATTRIBUTE_LIGHT = 0x10,
/// <summary>
/// 暗
/// </summary>
ATTRIBUTE_DARK = 0x20,
/// <summary>
/// 神
/// </summary>
ATTRIBUTE_DEVINE = 0x40,
}
}
......@@ -9,34 +9,58 @@
namespace DataEditorX.Core
{
/// <summary>
/// Description of CardEffect.
/// </summary>
public enum CardRace : long
{
RACE_WARRIOR =0x1 ,//--战士
RACE_SPELLCASTER =0x2 ,//--魔法师
RACE_FAIRY =0x4 ,//--天使
RACE_FIEND =0x8 ,//--恶魔
RACE_ZOMBIE =0x10 ,//--不死
RACE_MACHINE =0x20 ,//--机械
RACE_AQUA =0x40 ,//--水
RACE_PYRO =0x80 ,//--炎
RACE_ROCK =0x100 ,//--岩石
RACE_WINDBEAST =0x200 ,//--鸟兽
RACE_PLANT =0x400 ,//--植物
RACE_INSECT =0x800 ,//--昆虫
RACE_THUNDER =0x1000 ,//--雷
RACE_DRAGON =0x2000 ,//--龙
RACE_BEAST =0x4000 ,//--兽
RACE_BEASTWARRIOR =0x8000 ,//--兽战士
RACE_DINOSAUR =0x10000 ,//--恐龙
RACE_FISH =0x20000 ,//--鱼
RACE_SEASERPENT =0x40000 ,//--海龙
RACE_REPTILE =0x80000 ,//--爬虫
RACE_PSYCHO =0x100000 ,//--念动力
RACE_DEVINE =0x200000 ,//--幻神兽
RACE_CREATORGOD =0x400000 ,//--创造神
RACE_WYRM =0x800000 ,//--幻龙
}
/// <summary>
/// 卡片种族
/// </summary>
public enum CardRace : long
{
///<summary>战士</summary>
RACE_WARRIOR = 0x1,
///<summary>魔法师</summary>
RACE_SPELLCASTER = 0x2,
///<summary>天使</summary>
RACE_FAIRY = 0x4,
///<summary>恶魔</summary>
RACE_FIEND = 0x8,
///<summary>不死</summary>
RACE_ZOMBIE = 0x10,
///<summary>机械</summary>
RACE_MACHINE = 0x20,
///<summary>水</summary>
RACE_AQUA = 0x40,
///<summary>炎</summary>
RACE_PYRO = 0x80,
///<summary>岩石</summary>
RACE_ROCK = 0x100,
///<summary>鸟兽</summary>
RACE_WINDBEAST = 0x200,
///<summary>植物</summary>
RACE_PLANT = 0x400,
///<summary>昆虫</summary>
RACE_INSECT = 0x800,
///<summary>雷</summary>
RACE_THUNDER = 0x1000,
///<summary>龙</summary>
RACE_DRAGON = 0x2000,
///<summary>兽</summary>
RACE_BEAST = 0x4000,
///<summary>兽战士</summary>
RACE_BEASTWARRIOR = 0x8000,
///<summary>恐龙</summary>
RACE_DINOSAUR = 0x10000,
///<summary>鱼</summary>
RACE_FISH = 0x20000,
///<summary>海龙</summary>
RACE_SEASERPENT = 0x40000,
///<summary>爬虫</summary>
RACE_REPTILE = 0x80000,
///<summary>念动力</summary>
RACE_PSYCHO = 0x100000,
///<summary>幻神兽</summary>
RACE_DEVINE = 0x200000,
///<summary>创造神</summary>
RACE_CREATORGOD = 0x400000,
///<summary>幻龙</summary>
RACE_WYRM = 0x800000,
}
}
......@@ -10,32 +10,56 @@
namespace DataEditorX.Core
{
/// <summary>
/// Description of CardType.
/// 卡片类型
/// </summary>
public enum CardType : long
{
TYPE_MONSTER =0x1 ,//--怪兽卡
TYPE_SPELL =0x2 ,//--魔法卡
TYPE_TRAP =0x4 ,//--陷阱卡
TYPE_NORMAL =0x10 ,//--通常
TYPE_EFFECT =0x20 ,//--效果
TYPE_FUSION =0x40 ,//--融合
TYPE_RITUAL =0x80 ,//--仪式
TYPE_TRAPMONSTER =0x100 ,//--陷阱怪兽
TYPE_SPIRIT =0x200 ,//--灵魂
TYPE_UNION =0x400 ,//--同盟
TYPE_DUAL =0x800 ,//--二重
TYPE_TUNER =0x1000 ,//--调整
TYPE_SYNCHRO =0x2000 ,//--同调
TYPE_TOKEN =0x4000 ,//--衍生物
TYPE_QUICKPLAY =0x10000 ,//--速攻
TYPE_CONTINUOUS =0x20000 ,//--永续
TYPE_EQUIP =0x40000 ,//--装备
TYPE_FIELD =0x80000 ,//--场地
TYPE_COUNTER =0x100000 ,//--反击
TYPE_FLIP =0x200000 ,//--翻转
TYPE_TOON =0x400000 ,//--卡通
TYPE_XYZ =0x800000 ,//--超量
TYPE_PENDULUM =0x1000000 ,//--摇摆
///<summary>怪兽卡</summary>
TYPE_MONSTER =0x1 ,
///<summary>魔法卡</summary>
TYPE_SPELL =0x2 ,
///<summary>陷阱卡</summary>
TYPE_TRAP =0x4 ,
///<summary>通常</summary>
TYPE_NORMAL =0x10 ,
///<summary>效果</summary>
TYPE_EFFECT =0x20 ,
///<summary>融合</summary>
TYPE_FUSION =0x40 ,
///<summary>仪式</summary>
TYPE_RITUAL =0x80 ,
///<summary>陷阱怪兽</summary>
TYPE_TRAPMONSTER =0x100 ,
///<summary>灵魂</summary>
TYPE_SPIRIT =0x200 ,
///<summary>同盟</summary>
TYPE_UNION =0x400 ,
///<summary>二重</summary>
TYPE_DUAL =0x800 ,
///<summary>调整</summary>
TYPE_TUNER =0x1000 ,
///<summary>同调</summary>
TYPE_SYNCHRO =0x2000 ,
///<summary>衍生物</summary>
TYPE_TOKEN =0x4000 ,
///<summary>速攻</summary>
TYPE_QUICKPLAY =0x10000 ,
///<summary>永续</summary>
TYPE_CONTINUOUS =0x20000 ,
///<summary>装备</summary>
TYPE_EQUIP =0x40000 ,
///<summary>场地</summary>
TYPE_FIELD =0x80000 ,
///<summary>反击</summary>
TYPE_COUNTER =0x100000 ,
///<summary>翻转</summary>
TYPE_FLIP =0x200000 ,
///<summary>卡通</summary>
TYPE_TOON =0x400000 ,
///<summary>超量</summary>
TYPE_XYZ =0x800000 ,
///<summary>摇摆</summary>
TYPE_PENDULUM =0x1000000 ,
}
}
......@@ -14,7 +14,7 @@
namespace DataEditorX.Core
{
/// <summary>
/// Description of SQLite.
/// SQLite 操作
/// </summary>
public static class DataBase
{
......@@ -107,7 +107,7 @@ public static int Command(string DB, params string[] SQLs)
}
catch
{
trans.Rollback();
trans.Rollback();//出错,回滚
result = -1;
}
finally
......
......@@ -19,10 +19,7 @@ namespace DataEditorX
/// </summary>
public class LuaFunction
{
#region log
static string oldfun;
static string logtxt;
static string funclisttxt;
#region 日志log
static void ResetLog(string file)
{
File.Delete(logtxt);
......@@ -33,13 +30,16 @@ static void Log(string str)
}
#endregion
#region old functions
#region old functions
static string oldfun;
static string logtxt;
static string funclisttxt;
static SortedList<string,string> funclist=new SortedList<string,string>();
public static SortedList<string,string> Read(string funtxt)
//读取旧函数
public static void Read(string funtxt)
{
funclist.Clear();
oldfun=funtxt;
SortedList<string,string> list=new SortedList<string,string>();
if(File.Exists(funtxt))
{
string[] lines=File.ReadAllLines(funtxt);
......@@ -54,21 +54,11 @@ static void Log(string str)
continue;
if(line.StartsWith("●"))
{
//add
if(!string.IsNullOrEmpty(name))
{
if(list.ContainsKey(name)){
list[name] +=Environment.NewLine+desc;
funclist[name] +=Environment.NewLine+desc;
}
else{
list.Add(name, desc);
funclist.Add(name, desc);
}
}
//添加之前的函数
AddOldFun(name, desc);
int w=line.IndexOf("(");
int t=line.IndexOf(" ");
//获取当前名字
if(t<w && t>0){
name=line.Substring(t+1,w-t-1);
isFind=true;
......@@ -79,40 +69,32 @@ static void Log(string str)
desc+=Environment.NewLine+line;
}
}
if(!string.IsNullOrEmpty(name))
{
if(list.ContainsKey(name)){
list[name] +=Environment.NewLine+desc;
funclist[name] +=Environment.NewLine+desc;
}
else{
list.Add(name, desc);
funclist.Add(name, desc);
}
}
AddOldFun(name, desc);
}
return list;
//return list;
}
static void AddOldFun(string name, string desc)
{
if (!string.IsNullOrEmpty(name))
{
if (funclist.ContainsKey(name))//存在,则添加注释
{
funclist[name] += Environment.NewLine + desc;
}
else
{//不存在,则添加函数
funclist.Add(name, desc);
}
}
}
#endregion
static void Save()
{
if(string.IsNullOrEmpty(oldfun))
return;
using(FileStream fs=new FileStream(oldfun+"_sort.txt",
FileMode.Create,
FileAccess.Write))
{
StreamWriter sw=new StreamWriter(fs,Encoding.UTF8);
foreach(string k in funclist.Keys)
{
sw.WriteLine("●"+funclist[k]);
}
sw.Close();
}
}
#region find libs
/// <summary>
/// 查找lua函数
/// </summary>
/// <param name="path"></param>
/// <returns></returns>
public static bool Find(string path)
{
string name="interpreter.cpp";
......@@ -122,7 +104,7 @@ public static bool Find(string path)
ResetLog(logtxt);
funclisttxt =Path.Combine(path, "_functions.txt");
File.Delete(funclisttxt);
if(!File.Exists(file)){
if(!File.Exists(file)){//判断用户选择的目录
Log("error: no find file "+file);
if(File.Exists(file2)){
file=file2;
......@@ -138,11 +120,12 @@ public static bool Find(string path)
,RegexOptions.Multiline);
MatchCollection libsMatch=libRex.Matches(texts);
Log("log:count "+libsMatch.Count.ToString());
foreach ( Match m in libsMatch )
foreach ( Match m in libsMatch )//获取lib函数库
{
if(m.Groups.Count>2){
string word=m.Groups[1].Value;
Log("log:find "+word);
//分别去获取函数库的函数
GetFunctions(word, m.Groups[2].Value,
Path.Combine(path,"lib"+word+".cpp"));
}
......@@ -150,6 +133,24 @@ public static bool Find(string path)
Save();
return true;
}
//保存
static void Save()
{
if (string.IsNullOrEmpty(oldfun))
return;
using (FileStream fs = new FileStream(oldfun + "_sort.txt",
FileMode.Create,
FileAccess.Write))
{
StreamWriter sw = new StreamWriter(fs, Encoding.UTF8);
foreach (string k in funclist.Keys)
{
sw.WriteLine("●" + funclist[k]);
}
sw.Close();
}
}
#endregion
#region find function name
......@@ -157,6 +158,7 @@ static string ToTitle(string str)
{
return str.Substring(0, 1).ToUpper()+str.Substring(1);
}
//获取函数库的lua函数名,和对应的c++函数
static Dictionary<string,string> GetFunctionNames(string texts,string name)
{
Dictionary<string,string> dic=new Dictionary<string, string>();
......@@ -178,6 +180,7 @@ static string ToTitle(string str)
#endregion
#region find code
//查找c++代码
static string FindCode(string texts,string name)
{
Regex reg=new Regex(@"int32\s+?"+name
......@@ -197,6 +200,7 @@ static string FindCode(string texts,string name)
#endregion
#region find return
//查找返回类型
static string FindReturn(string texts,string name)
{
string restr="";
......@@ -228,6 +232,7 @@ static string FindReturn(string texts,string name)
#endregion
#region find args
//查找参数
static string getUserType(string str)
{
if(str.IndexOf("card")>=0)
......@@ -301,6 +306,7 @@ static string FindArgs(string texts,string name)
#endregion
#region find old
//查找旧函数的描述
static string FindOldDesc(string name)
{
if(funclist.ContainsKey(name))
......@@ -310,6 +316,7 @@ static string FindOldDesc(string name)
#endregion
#region Save Functions
//保存函数
public static void GetFunctions(string name,string texts,string file)
{
if(!File.Exists(file)){
......
......@@ -15,22 +15,25 @@
namespace DataEditorX.Core
{
/// <summary>
/// Description of MSE.
/// MSE制作
/// </summary>
public class MseMaker
{
#region 常量
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";
/// <summary>种族</summary>
public const string TAG_TYPE1 = "type 1";
/// <summary>效果1</summary>
public const string TAG_TYPE2 = "type 2";
/// <summary>效果2/summary>
public const string TAG_TYPE3 = "type 3";
/// <summary>效果3</summary>
public const string TAG_TYPE4 = "type 4";
public const string TAG_TEXT = "rule text";
public const string TAG_ATK = "attack";
......@@ -40,14 +43,41 @@ public class MseMaker
public const string TAG_PSCALE2 = "pendulum scale 2";
public const string TAG_PEND_TEXT = "pendulum text";
public const string TAG_CODE = "gamecode";
/// <summary>无</summary>
public const string KEY_ATTRIBUTE_NONE = "none";
/// <summary>暗</summary>
public const string KEY_ATTRIBUTE_DARK = "dark";
/// <summary>神</summary>
public const string KEY_ATTRIBUTE_DIVINE = "divine";
/// <summary>地</summary>
public const string KEY_ATTRIBUTE_EARTH = "earth";
/// <summary>火</summary>
public const string KEY_ATTRIBUTE_FIRE = "fire";
/// <summary>光</summary>
public const string KEY_ATTRIBUTE_LIGHT = "light";
/// <summary>水</summary>
public const string KEY_ATTRIBUTE_WATER = "water";
/// <summary>风</summary>
public const string KEY_ATTRIBUTE_WIND = "wind";
/// <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";
#endregion
#region 成员,初始化
MSEConfig cfg;
public int MaxNum
......@@ -130,6 +160,7 @@ public string GetST(Card c, bool isSpell)
//获取图片路径
public static string GetCardImagePath(string picpath, Card c)
{
//密码,带0密码,卡名
string jpg = MyPath.Combine(picpath, c.id + ".jpg");
string jpg2 = MyPath.Combine(picpath, c.idString + ".jpg");
string jpg3 = MyPath.Combine(picpath, c.name + ".jpg");
......@@ -254,42 +285,45 @@ public string GetType(CardType ctype)
//获取卡片类型
public string[] GetTypes(Card c)
{
string[] types = new string[] { "normal monster", "", "", "" };
//卡片类型,效果1,效果2,效果3
string[] types = new string[] { CARD_NORMAL, "", "", "" };
if (c.IsType(CardType.TYPE_MONSTER))
{//卡片类型和第1效果
if (c.IsType(CardType.TYPE_XYZ))
{
types[0] = "xyz monster";
types[0] = CARD_XYZ;
types[1] = GetType(CardType.TYPE_XYZ);
}
else if (c.IsType(CardType.TYPE_TOKEN))
{
types[0] = (c.race == 0) ? "token card" : "token monster";
types[0] = (c.race == 0) ? CARD_TOKEN2
: CARD_TOKEN;
types[1] = GetType(CardType.TYPE_TOKEN);
}
else if (c.IsType(CardType.TYPE_RITUAL))
{
types[0] = "ritual monster";
types[0] = CARD_RITUAL;
types[1] = GetType(CardType.TYPE_RITUAL);
}
else if (c.IsType(CardType.TYPE_FUSION))
{
types[0] = "fusion monster";
types[0] = CARD_FUSION;
types[1] = GetType(CardType.TYPE_FUSION);
}
else if (c.IsType(CardType.TYPE_SYNCHRO))
{
types[0] = "synchro monster";
types[0] = CARD_SYNCHRO;
types[1] = GetType(CardType.TYPE_SYNCHRO);
}
else if (c.IsType(CardType.TYPE_EFFECT))
{
types[0] = "effect monster";
types[0] = CARD_EFFECT;
}
else
types[0] = "normal monster";
types[0] = CARD_NORMAL;
//同调
if (types[0] == "synchro monster" || types[0] == "token monster")
if (types[0] == CARD_SYNCHRO
|| types[0] == CARD_TOKEN)
{
if (c.IsType(CardType.TYPE_TUNER)
&& c.IsType(CardType.TYPE_EFFECT))
......@@ -306,14 +340,14 @@ public string[] GetTypes(Card c)
types[2] = GetType(CardType.TYPE_EFFECT);
}
}
else if (types[0] == "normal monster")
else if (types[0] == CARD_NORMAL)
{
if (c.IsType(CardType.TYPE_PENDULUM))//灵摆
types[1] = GetType(CardType.TYPE_PENDULUM);
else if (c.IsType(CardType.TYPE_TUNER))//调整
types[1] = GetType(CardType.TYPE_TUNER);
}
else if (types[0] != "effect monster")
else if (types[0] != CARD_EFFECT)
{//效果
if (c.IsType(CardType.TYPE_EFFECT))
types[2] = GetType(CardType.TYPE_EFFECT);
......@@ -343,7 +377,7 @@ public string[] GetTypes(Card c)
}
}
if (c.race == 0)
if (c.race == 0)//如果没有种族
{
types[1] = "";
types[2] = "";
......@@ -397,7 +431,7 @@ string getMonster(Card c, string img, bool isPendulum)
sb.AppendLine(GetLine(TAG_TYPE2, cn2tw(types[1])));
sb.AppendLine(GetLine(TAG_TYPE3, cn2tw(types[2])));
sb.AppendLine(GetLine(TAG_TYPE4, cn2tw(types[3])));
if (isPendulum)
if (isPendulum)//P怪兽
{
string text = GetDesc(c.desc, cfg.regx_monster);
if (string.IsNullOrEmpty(text))
......@@ -411,7 +445,7 @@ string getMonster(Card c, string img, bool isPendulum)
sb.AppendLine(" " + TAG_PEND_TEXT + ":");
sb.AppendLine(" "+GetDesc(c.desc, cfg.regx_pendulum));
}
else
else//一般怪兽
{
sb.AppendLine(" " + TAG_TEXT + ":");
sb.AppendLine(" " + ReText(c.desc));
......
......@@ -23,34 +23,67 @@ namespace DataEditorX.Core
{
public enum MyTask
{
///<summary>空</summary>
NONE,
///<summary>检查更新</summary>
CheckUpdate,
///<summary>导出数据</summary>
ExportData,
///<summary>保存为MSE存档</summary>
SaveAsMSE,
///<summary>裁剪图片</summary>
CutImages,
///<summary>转换图片</summary>
ConvertImages,
}
/// <summary>
/// Description of TaskHelper.
/// 任务
/// </summary>
public class TaskHelper
{
#region Member
/// <summary>
/// 当前任务
/// </summary>
private MyTask nowTask = MyTask.NONE;
/// <summary>
/// 上一次任务
/// </summary>
private MyTask lastTask = MyTask.NONE;
/// <summary>
/// 当前卡片列表
/// </summary>
private Card[] cardlist;
/// <summary>
/// 任务参数
/// </summary>
private string[] mArgs;
private ImageSet imgSet = new ImageSet();
/// <summary>
/// 图片设置
/// </summary>
private ImageSet imgSet;
/// <summary>
/// MSE转换
/// </summary>
private MseMaker mseHelper;
/// <summary>
/// 是否取消
/// </summary>
private bool isCancel = false;
/// <summary>
/// 是否在运行
/// </summary>
private bool isRun = false;
/// <summary>
/// 后台工作线程
/// </summary>
private BackgroundWorker worker;
public TaskHelper(string datapath, BackgroundWorker worker, MSEConfig mcfg)
{
this.worker = worker;
mseHelper = new MseMaker(mcfg);
imgSet.Init();
imgSet = new ImageSet();
}
public MseMaker MseHelper
{
......@@ -75,12 +108,14 @@ public MyTask getLastTask()
#endregion
#region Other
//设置任务
public void SetTask(MyTask myTask, Card[] cards, params string[] args)
{
nowTask = myTask;
cardlist = cards;
mArgs = args;
}
//转换图片
public void ToImg(string img, string saveimg1, string saveimg2)
{
if (!File.Exists(img))
......@@ -147,15 +182,15 @@ public void CutImages(string imgpath, bool isreplace)
{
Bitmap bp = new Bitmap(jpg);
Bitmap bmp = null;
if (c.IsType(CardType.TYPE_XYZ))
if (c.IsType(CardType.TYPE_XYZ))//超量
{
bmp = MyBitmap.Cut(bp, imgSet.xyzArea);
}
else if (c.IsType(CardType.TYPE_PENDULUM))
else if (c.IsType(CardType.TYPE_PENDULUM))//P怪兽
{
bmp = MyBitmap.Cut(bp, imgSet.pendulumArea);
}
else
else//一般
{
bmp = MyBitmap.Cut(bp, imgSet.normalArea);
}
......@@ -189,14 +224,15 @@ public void ConvertImages(string imgpath, string gamepath, bool isreplace)
{
if (File.Exists(f))
{
//存在大图
Bitmap bmp = new Bitmap(f);
//大图,如果替换,或者不存在
if (isreplace || !File.Exists(jpg_b))
{
MyBitmap.SaveAsJPEG(MyBitmap.Zoom(bmp, imgSet.W, imgSet.H),
jpg_b, imgSet.quilty);
}
//小图,如果替换,或者不存在
if (isreplace || !File.Exists(jpg_s))
{
MyBitmap.SaveAsJPEG(MyBitmap.Zoom(bmp, imgSet.w, imgSet.h),
......@@ -216,16 +252,19 @@ public string MSEImage
}
public void SaveMSEs(string file, Card[] cards, bool isUpdate)
{
if (mseHelper.MaxNum == 0)
if(cards == null)
return;
int c = cards.Length;
//不分开,或者卡片数小于单个存档的最大值
if (mseHelper.MaxNum == 0 || c < mseHelper.MaxNum)
SaveMSE(1, file, cards, isUpdate);
else
{
int c = cards.Length;
int nums = c / mseHelper.MaxNum;
if (nums * mseHelper.MaxNum < c)
if (nums * mseHelper.MaxNum < c)//计算需要分多少个存档
nums++;
List<Card> clist = new List<Card>();
for (int i = 0; i < nums; i++)
for (int i = 0; i < nums; i++)//分别生成存档
{
clist.Clear();
for (int j = 0; j < mseHelper.MaxNum; j++)
......@@ -251,7 +290,7 @@ public void SaveMSE(int num, string file, Card[] cards, bool isUpdate)
int count = images.Length;
using (ZipStorer zips = ZipStorer.Create(file, ""))
{
zips.EncodeUTF8 = true;
zips.EncodeUTF8 = true;//zip里面的文件名为utf8
zips.AddFile(setFile, "set", "");
foreach (string img in images)
{
......@@ -276,8 +315,11 @@ public void ExportData(string zipname)
int count = cards.Length;
string path = Path.GetDirectoryName(zipname);
string name = Path.GetFileNameWithoutExtension(zipname);
//数据库
string cdbfile = zipname + ".cdb";
//说明
string readme = MyPath.Combine(path, name + ".txt");
//新卡ydk
string deckydk = MyPath.Combine(path, "deck/" + name + ".ydk");
string pics = MyPath.Combine(path, "pics");
string thumb = MyPath.Combine(pics, "thumbnail");
......
This diff is collapsed.
This diff is collapsed.
......@@ -78,6 +78,7 @@
<Compile Include="Common\MyPath.cs" />
<Compile Include="Controls\History.cs" />
<Compile Include="Controls\IEditForm.cs" />
<Compile Include="Controls\IMainForm.cs" />
<Compile Include="Controls\MySyntaxHighlighter.cs" />
<Compile Include="Common\MyBitmap.cs" />
<Compile Include="Common\User32.cs" />
......
......@@ -56,7 +56,6 @@ private void InitializeComponent()
this.menuitem_open = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_new = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_save = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_findluafunc = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_copyselect = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_copyall = new System.Windows.Forms.ToolStripMenuItem();
......@@ -153,7 +152,6 @@ private void InitializeComponent()
this.menuitem_open,
this.menuitem_new,
this.menuitem_save,
this.menuitem_findluafunc,
this.toolStripSeparator3,
this.menuitem_copyselect,
this.menuitem_copyall,
......@@ -194,13 +192,6 @@ private void InitializeComponent()
this.menuitem_save.Text = "Save";
this.menuitem_save.Click += new System.EventHandler(this.Menuitem_saveClick);
//
// menuitem_findluafunc
//
this.menuitem_findluafunc.Name = "menuitem_findluafunc";
this.menuitem_findluafunc.Size = new System.Drawing.Size(261, 22);
this.menuitem_findluafunc.Text = "Find LuaFunctons";
this.menuitem_findluafunc.Click += new System.EventHandler(this.Menuitem_findluafuncClick);
//
// toolStripSeparator3
//
this.toolStripSeparator3.Name = "toolStripSeparator3";
......@@ -357,8 +348,7 @@ private void InitializeComponent()
this.ResumeLayout(false);
this.PerformLayout();
}
private System.Windows.Forms.ToolStripMenuItem menuitem_findluafunc;
}
private System.Windows.Forms.ToolStripMenuItem menuitem_save;
private System.Windows.Forms.ToolStripMenuItem menuitem_codeeditor;
private System.Windows.Forms.ToolStripMenuItem menuitem_copyall;
......
......@@ -26,8 +26,6 @@ public partial class MainForm : Form, IMainForm
string datapath;
//语言配置
string conflang;
//函数列表
string funtxt;
//数据库对比
DataEditForm compare1, compare2;
//临时卡片
......@@ -55,7 +53,7 @@ public void SetDataPath(string datapath)
YGOUtil.SetConfig(datacfg);
//代码提示
funtxt = MyPath.Combine(datapath, MyConfig.FILE_FUNCTION);
string funtxt = MyPath.Combine(datapath, MyConfig.FILE_FUNCTION);
string conlua = MyPath.Combine(datapath, MyConfig.FILE_CONSTANT);
string confstring = MyPath.Combine(datapath, MyConfig.FILE_STRINGS);
codecfg = new CodeConfig();
......@@ -125,9 +123,10 @@ protected override void DefWndProc(ref System.Windows.Forms.Message m)
if (File.Exists(file))
{
this.Activate();
String openfile = File.ReadAllText(file);
//获取需要打开的文件路径
Open(File.ReadAllText(file));
File.Delete(file);
Open(openfile);
//File.Delete(file);
}
break;
default:
......@@ -163,7 +162,7 @@ void OpenDataBase(string file)
//设置语言
LANG.SetFormLabel(def);
//初始化界面数据
def.InitGameData(datacfg);
def.InitControl(datacfg);
def.Show(dockPanel1, DockState.Document);
}
//打开文件
......@@ -463,21 +462,6 @@ void CompareDB()
#endregion
#region 获取函数列表
void Menuitem_findluafuncClick(object sender, EventArgs e)
{
using (FolderBrowserDialog fd = new FolderBrowserDialog())
{
fd.Description = "Folder Name: ocgcore";
if (fd.ShowDialog() == DialogResult.OK)
{
LuaFunction.Read(funtxt);//先读取旧函数列表
LuaFunction.Find(fd.SelectedPath);//查找新函数,并保存
MessageBox.Show("OK");
}
}
}
#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.2")]
[assembly: AssemblyVersion("2.2.9.4")]
......@@ -43,6 +43,7 @@ DataEditForm.mainMenu.menu_setting 设置(&S)
DataEditForm.mainMenu.menuitem_importmseimg 设置为MSE图片库
DataEditForm.mainMenu.menuitem_mseconfig 设置MSE的配置文件
DataEditForm.mainMenu.menu_tools 工具(&T)
DataEditForm.mainMenu.menuitem_findluafunc 从C++源码查找Lua函数
DataEditForm.mainMenu.menuitem_readydk 从卡组文件读取卡片(&Y)
DataEditForm.mainMenu.menuitem_readimages 从卡图文件夹读取卡片(&I)
DataEditForm.mainMenu.menuitem_compdb 压缩数据库
......@@ -62,7 +63,6 @@ MainForm.mainMenu.menuitem_file 文件(&F)
MainForm.mainMenu.menuitem_open 打开
MainForm.mainMenu.menuitem_new 新建
MainForm.mainMenu.menuitem_save 保存
MainForm.mainMenu.menuitem_findluafunc 从C++源码查找Lua函数
MainForm.mainMenu.menuitem_copyselect 复制选中卡片
MainForm.mainMenu.menuitem_copyall 复制所有卡片
MainForm.mainMenu.menuitem_pastecards 粘贴卡片
......
......@@ -15,6 +15,7 @@ spell = [魔法卡%%]
trap = [陷阱卡%%]
############################ language,style,other setting
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
############################
......
......@@ -15,6 +15,7 @@ spell = [魔法卡%%]
trap = [陷阱卡%%]
############################ language,style,other setting
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
############################
......
......@@ -12,6 +12,7 @@ spell = [Sepll Card%%]
trap = [Trap Card%%]
############################ language,style,other setting
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
end = version control:\n\ttype: none\napprentice code:
############################ Text
text = Pendulum Text :\n%ptext%\nMonster Text :\n%text%\n
############################
......
......@@ -13,6 +13,7 @@ spell = %%
trap = %%
############################ language,style,other setting
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
############################
......@@ -31,7 +32,7 @@ replace = ([·]) ・
###########################
##race
race 0x1 戦士族
race 0x2 魔法
race 0x2 魔法使い
race 0x4 天使族
race 0x8 悪魔族
race 0x10 アンデット族
......
[DataEditorX]2.2.9.2[DataEditorX]
[DataEditorX]2.2.9.4[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★文件关联(File association)
......@@ -80,6 +80,11 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.9.4
DataEditor
修改游戏数据的查找方式()Dic = >sortlist,加快卡片显示速度
2.2.9.3
修复CodeEditor
2.2.9.2
读取MSE存档暂未实现
修改DataEditor界面
......
No preview for this file type
......@@ -10,9 +10,9 @@
<!-- access these values via the property:
System.Configuration.ConfigurationManager.AppSettings[key]
-->
<!-- MSE language -->
<add key="mse" value="mse_chs.txt" />
<!-- Language -->
<!-- MSE language data/mse_xxx.txt -->
<add key="mse" value="Chinese-Simplified" />
<!-- Language data/cardinfo_xxxx.txt data/language_xxx.txt -->
<add key="language" value="chinese" />
<!-- DataEditorX source code -->
<add key="sourceURL" value="https://github.com/247321453/DataEditorX" />
......
......@@ -2,4 +2,11 @@
F:\games\ygopro\cards.cdb
F:\games\ygopro\p.zip.cdb
# script history
F:\games\ygopro\script\c259314.lua
F:\games\ygopro\script\c359563.lua
F:\games\ygopro\script\c218704.lua
F:\games\ygopro\script\c42338879.lua
F:\games\ygopro\script\c42391240.lua
F:\games\ygopro\script\c191749.lua
F:\games\ygopro\script\c50755.lua
F:\games\ygopro\script\c41777.lua
\ No newline at end of file
......@@ -43,6 +43,7 @@ DataEditForm.mainMenu.menu_setting 设置(&S)
DataEditForm.mainMenu.menuitem_importmseimg 设置为MSE图片库
DataEditForm.mainMenu.menuitem_mseconfig 设置MSE的配置文件
DataEditForm.mainMenu.menu_tools 工具(&T)
DataEditForm.mainMenu.menuitem_findluafunc 从C++源码查找Lua函数
DataEditForm.mainMenu.menuitem_readydk 从卡组文件读取卡片(&Y)
DataEditForm.mainMenu.menuitem_readimages 从卡图文件夹读取卡片(&I)
DataEditForm.mainMenu.menuitem_compdb 压缩数据库
......@@ -62,7 +63,6 @@ MainForm.mainMenu.menuitem_file 文件(&F)
MainForm.mainMenu.menuitem_open 打开
MainForm.mainMenu.menuitem_new 新建
MainForm.mainMenu.menuitem_save 保存
MainForm.mainMenu.menuitem_findluafunc 从C++源码查找Lua函数
MainForm.mainMenu.menuitem_copyselect 复制选中卡片
MainForm.mainMenu.menuitem_copyall 复制所有卡片
MainForm.mainMenu.menuitem_pastecards 粘贴卡片
......
......@@ -15,6 +15,7 @@ spell = [魔法卡%%]
trap = [陷阱卡%%]
############################ language,style,other setting
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
############################
......
......@@ -15,6 +15,7 @@ spell = [魔法卡%%]
trap = [陷阱卡%%]
############################ language,style,other setting
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
############################
......
......@@ -12,6 +12,7 @@ spell = [Sepll Card%%]
trap = [Trap Card%%]
############################ language,style,other setting
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
end = version control:\n\ttype: none\napprentice code:
############################ Text
text = Pendulum Text :\n%ptext%\nMonster Text :\n%text%\n
############################
......
......@@ -13,6 +13,7 @@ spell = %%
trap = %%
############################ language,style,other setting
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
############################
......@@ -31,7 +32,7 @@ replace = ([·]) ・
###########################
##race
race 0x1 戦士族
race 0x2 魔法
race 0x2 魔法使い
race 0x4 天使族
race 0x8 悪魔族
race 0x10 アンデット族
......
[DataEditorX]2.2.9.2[DataEditorX]
[DataEditorX]2.2.9.4[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★文件关联(File association)
......@@ -80,6 +80,11 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.9.4
DataEditor
修改游戏数据的查找方式()Dic = >sortlist,加快卡片显示速度
2.2.9.3
修复CodeEditor
2.2.9.2
读取MSE存档暂未实现
修改DataEditor界面
......
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