Commit 1bea0f6c authored by keyongyu's avatar keyongyu

2.2.9.5

parent 9f3b4475
...@@ -31,10 +31,14 @@ public partial class CodeEditForm : DockContent, IEditForm ...@@ -31,10 +31,14 @@ public partial class CodeEditForm : DockContent, IEditForm
MarkerStyle SameWordsStyle = new MarkerStyle(new SolidBrush(Color.FromArgb(40, Color.White))); MarkerStyle SameWordsStyle = new MarkerStyle(new SolidBrush(Color.FromArgb(40, Color.White)));
#endregion #endregion
#region init #region init 函数提示菜单
//自动完成
AutocompleteMenu popupMenu; AutocompleteMenu popupMenu;
//函数
AutocompleteMenu popupMenu_fun; AutocompleteMenu popupMenu_fun;
//常量
AutocompleteMenu popupMenu_con; AutocompleteMenu popupMenu_con;
//搜索
AutocompleteMenu popupMenu_find; AutocompleteMenu popupMenu_find;
string nowFile; string nowFile;
string title; string title;
...@@ -77,6 +81,7 @@ void InitForm() ...@@ -77,6 +81,7 @@ void InitForm()
popupMenu_find.Items.Width = 300; popupMenu_find.Items.Width = 300;
title = this.Text; title = this.Text;
//设置字体,大小
string fontname = MyConfig.readString(MyConfig.TAG_FONT_NAME); string fontname = MyConfig.readString(MyConfig.TAG_FONT_NAME);
float fontsize = MyConfig.readFloat(MyConfig.TAG_FONT_SIZE, 14); float fontsize = MyConfig.readFloat(MyConfig.TAG_FONT_SIZE, 14);
fctb.Font = new Font(fontname, fontsize); fctb.Font = new Font(fontname, fontsize);
...@@ -99,7 +104,7 @@ public void LoadXml(string xmlfile) ...@@ -99,7 +104,7 @@ public void LoadXml(string xmlfile)
#endregion #endregion
#region Open #region IEditForm接口
public void SetActived() public void SetActived()
{ {
this.Activate(); this.Activate();
...@@ -116,6 +121,10 @@ public bool Create(string file) ...@@ -116,6 +121,10 @@ public bool Create(string file)
{ {
return Open(file); return Open(file);
} }
public bool Save()
{
return savefile(string.IsNullOrEmpty(nowFile));
}
public bool Open(string file) public bool Open(string file)
{ {
if (!string.IsNullOrEmpty(file)) if (!string.IsNullOrEmpty(file))
...@@ -128,7 +137,7 @@ public bool Open(string file) ...@@ -128,7 +137,7 @@ public bool Open(string file)
nowFile = file; nowFile = file;
string cdb = MyPath.Combine( string cdb = MyPath.Combine(
Path.GetDirectoryName(file), "../cards.cdb"); Path.GetDirectoryName(file), "../cards.cdb");
SetCardDB(cdb); SetCardDB(cdb);//后台加载卡片数据
fctb.OpenFile(nowFile, new UTF8Encoding(false)); fctb.OpenFile(nowFile, new UTF8Encoding(false));
oldtext = fctb.Text; oldtext = fctb.Text;
SetTitle(); SetTitle();
...@@ -137,23 +146,10 @@ public bool Open(string file) ...@@ -137,23 +146,10 @@ public bool Open(string file)
return false; return false;
} }
void HideMenu()
{
if (this.MdiParent == null)
return;
mainMenu.Visible = false;
menuitem_file.Visible = false;
menuitem_file.Enabled = false;
}
void CodeEditFormLoad(object sender, EventArgs e)
{
HideMenu();
fctb.OnTextChangedDelayed(fctb.Range);
}
#endregion #endregion
#region doc map #region 文档视图
//文档视图
void ShowMapToolStripMenuItemClick(object sender, EventArgs e) void ShowMapToolStripMenuItemClick(object sender, EventArgs e)
{ {
if (menuitem_showmap.Checked) if (menuitem_showmap.Checked)
...@@ -171,7 +167,7 @@ void ShowMapToolStripMenuItemClick(object sender, EventArgs e) ...@@ -171,7 +167,7 @@ void ShowMapToolStripMenuItemClick(object sender, EventArgs e)
} }
#endregion #endregion
#region title #region 设置标题
void SetTitle() void SetTitle()
{ {
string str = title; string str = title;
...@@ -179,7 +175,7 @@ void SetTitle() ...@@ -179,7 +175,7 @@ void SetTitle()
str = title; str = title;
else else
str = nowFile + "-" + title; str = nowFile + "-" + title;
if (this.MdiParent != null) if (this.MdiParent != null)//如果父容器不为空
{ {
if (string.IsNullOrEmpty(nowFile)) if (string.IsNullOrEmpty(nowFile))
this.Text = title; this.Text = title;
...@@ -197,7 +193,7 @@ void CodeEditFormEnter(object sender, EventArgs e) ...@@ -197,7 +193,7 @@ void CodeEditFormEnter(object sender, EventArgs e)
} }
#endregion #endregion
#region tooltip #region 自动完成
public void InitTooltip(CodeConfig codeconfig) public void InitTooltip(CodeConfig codeconfig)
{ {
this.tooltipDic = codeconfig.TooltipDic; this.tooltipDic = codeconfig.TooltipDic;
...@@ -208,7 +204,7 @@ public void InitTooltip(CodeConfig codeconfig) ...@@ -208,7 +204,7 @@ public void InitTooltip(CodeConfig codeconfig)
popupMenu_con.Items.SetAutocompleteItems(codeconfig.ConList); popupMenu_con.Items.SetAutocompleteItems(codeconfig.ConList);
popupMenu_fun.Items.SetAutocompleteItems(codeconfig.FunList); popupMenu_fun.Items.SetAutocompleteItems(codeconfig.FunList);
} }
//查找函数说明
string FindTooltip(string word) string FindTooltip(string word)
{ {
string desc = ""; string desc = "";
...@@ -223,6 +219,7 @@ string FindTooltip(string word) ...@@ -223,6 +219,7 @@ string FindTooltip(string word)
} }
return desc; return desc;
} }
//悬停的函数说明
void FctbToolTipNeeded(object sender, ToolTipNeededEventArgs e) void FctbToolTipNeeded(object sender, ToolTipNeededEventArgs e)
{ {
if (!string.IsNullOrEmpty(e.HoveredWord)) if (!string.IsNullOrEmpty(e.HoveredWord))
...@@ -238,6 +235,7 @@ void FctbToolTipNeeded(object sender, ToolTipNeededEventArgs e) ...@@ -238,6 +235,7 @@ void FctbToolTipNeeded(object sender, ToolTipNeededEventArgs e)
if (tl > 0) if (tl > 0)
{ {
//获取卡片信息
if (cardlist.ContainsKey(tl)) if (cardlist.ContainsKey(tl))
desc = cardlist[tl]; desc = cardlist[tl];
} }
...@@ -252,19 +250,19 @@ void FctbToolTipNeeded(object sender, ToolTipNeededEventArgs e) ...@@ -252,19 +250,19 @@ void FctbToolTipNeeded(object sender, ToolTipNeededEventArgs e)
} }
#endregion #endregion
#region Key #region 按键监听
void FctbKeyDown(object sender, KeyEventArgs e) void FctbKeyDown(object sender, KeyEventArgs e)
{ {
if (e.KeyData == (Keys.K | Keys.Control)) if (e.KeyData == (Keys.K | Keys.Control))
{ {
//forced show (MinFragmentLength will be ignored) //forced show (MinFragmentLength will be ignored)
popupMenu_fun.Show(true); popupMenu_fun.Show(true);//显示函数列表
e.Handled = true; e.Handled = true;
} }
else if (e.KeyData == (Keys.T | Keys.Control)) else if (e.KeyData == (Keys.T | Keys.Control))
{ {
//forced show (MinFragmentLength will be ignored) //forced show (MinFragmentLength will be ignored)
popupMenu_con.Show(true); popupMenu_con.Show(true);//显示常量列表
e.Handled = true; e.Handled = true;
} }
//else if(e.KeyData == Keys(Keys.Control | Keys //else if(e.KeyData == Keys(Keys.Control | Keys
...@@ -272,7 +270,7 @@ void FctbKeyDown(object sender, KeyEventArgs e) ...@@ -272,7 +270,7 @@ void FctbKeyDown(object sender, KeyEventArgs e)
#endregion #endregion
#region input #region input
//显示/隐藏输入框
void Menuitem_showinputClick(object sender, EventArgs e) void Menuitem_showinputClick(object sender, EventArgs e)
{ {
if (menuitem_showinput.Checked) if (menuitem_showinput.Checked)
...@@ -289,6 +287,21 @@ void Menuitem_showinputClick(object sender, EventArgs e) ...@@ -289,6 +287,21 @@ void Menuitem_showinputClick(object sender, EventArgs e)
#endregion #endregion
#region menu #region menu
//如果是作为mdi,则隐藏菜单
void HideMenu()
{
if (this.MdiParent == null)
return;
mainMenu.Visible = false;
menuitem_file.Visible = false;
menuitem_file.Enabled = false;
}
void CodeEditFormLoad(object sender, EventArgs e)
{
HideMenu();
fctb.OnTextChangedDelayed(fctb.Range);
}
void Menuitem_findClick(object sender, EventArgs e) void Menuitem_findClick(object sender, EventArgs e)
{ {
fctb.ShowFindDialog(); fctb.ShowFindDialog();
...@@ -298,6 +311,7 @@ void Menuitem_replaceClick(object sender, EventArgs e) ...@@ -298,6 +311,7 @@ void Menuitem_replaceClick(object sender, EventArgs e)
{ {
fctb.ShowReplaceDialog(); fctb.ShowReplaceDialog();
} }
#region 保存文件
bool savefile(bool saveas) bool savefile(bool saveas)
{ {
string alltext = fctb.Text; string alltext = fctb.Text;
...@@ -320,10 +334,7 @@ bool savefile(bool saveas) ...@@ -320,10 +334,7 @@ bool savefile(bool saveas)
File.WriteAllText(nowFile, alltext, new UTF8Encoding(false)); File.WriteAllText(nowFile, alltext, new UTF8Encoding(false));
return true; return true;
} }
public bool Save()
{
return savefile(string.IsNullOrEmpty(nowFile));
}
public bool SaveAs() public bool SaveAs()
{ {
return savefile(true); return savefile(true);
...@@ -337,7 +348,7 @@ void SaveAsToolStripMenuItemClick(object sender, EventArgs e) ...@@ -337,7 +348,7 @@ void SaveAsToolStripMenuItemClick(object sender, EventArgs e)
{ {
SaveAs(); SaveAs();
} }
#endregion
void QuitToolStripMenuItemClick(object sender, EventArgs e) void QuitToolStripMenuItemClick(object sender, EventArgs e)
{ {
this.Close(); this.Close();
...@@ -356,7 +367,7 @@ void Menuitem_openClick(object sender, EventArgs e) ...@@ -356,7 +367,7 @@ void Menuitem_openClick(object sender, EventArgs e)
{ {
using (OpenFileDialog sfdlg = new OpenFileDialog()) using (OpenFileDialog sfdlg = new OpenFileDialog())
{ {
sfdlg.Filter = "Script(*.lua)|*.lua|All Files(*.*)|*.*"; sfdlg.Filter = LANG.GetMsg(LMSG.ScriptFilter);
if (sfdlg.ShowDialog() == DialogResult.OK) if (sfdlg.ShowDialog() == DialogResult.OK)
{ {
nowFile = sfdlg.FileName; nowFile = sfdlg.FileName;
...@@ -367,7 +378,8 @@ void Menuitem_openClick(object sender, EventArgs e) ...@@ -367,7 +378,8 @@ void Menuitem_openClick(object sender, EventArgs e)
#endregion #endregion
#region find #region 搜索函数
//搜索函数
void Tb_inputKeyDown(object sender, KeyEventArgs e) void Tb_inputKeyDown(object sender, KeyEventArgs e)
{ {
if (e.KeyCode == Keys.Enter) if (e.KeyCode == Keys.Enter)
...@@ -391,7 +403,7 @@ void Tb_inputKeyDown(object sender, KeyEventArgs e) ...@@ -391,7 +403,7 @@ void Tb_inputKeyDown(object sender, KeyEventArgs e)
} }
#endregion #endregion
#region close #region 关闭提示保存
void CodeEditFormFormClosing(object sender, FormClosingEventArgs e) void CodeEditFormFormClosing(object sender, FormClosingEventArgs e)
{ {
if (!string.IsNullOrEmpty(oldtext)) if (!string.IsNullOrEmpty(oldtext))
...@@ -410,7 +422,7 @@ void CodeEditFormFormClosing(object sender, FormClosingEventArgs e) ...@@ -410,7 +422,7 @@ void CodeEditFormFormClosing(object sender, FormClosingEventArgs e)
} }
#endregion #endregion
#region card tooltip #region 卡片提示
public void SetCDBList(string[] cdbs) public void SetCDBList(string[] cdbs)
{ {
if (cdbs == null) if (cdbs == null)
...@@ -455,7 +467,7 @@ public void SetCards(Card[] cards) ...@@ -455,7 +467,7 @@ public void SetCards(Card[] cards)
} }
#endregion #endregion
#region selection #region 选择高亮
void FctbSelectionChangedDelayed(object sender, EventArgs e) void FctbSelectionChangedDelayed(object sender, EventArgs e)
{ {
tb_input.Text = fctb.SelectedText; tb_input.Text = fctb.SelectedText;
...@@ -475,7 +487,7 @@ void FctbSelectionChangedDelayed(object sender, EventArgs e) ...@@ -475,7 +487,7 @@ void FctbSelectionChangedDelayed(object sender, EventArgs e)
} }
#endregion #endregion
#region goto function define #region 调转函数
void FctbMouseClick(object sender, MouseEventArgs e) void FctbMouseClick(object sender, MouseEventArgs e)
{ {
var fragment = fctb.Selection.GetFragment(@"\w"); var fragment = fctb.Selection.GetFragment(@"\w");
......
...@@ -88,10 +88,6 @@ public static bool CheckVersion(string ver, string oldver) ...@@ -88,10 +88,6 @@ public static bool CheckVersion(string ver, string oldver)
} }
} }
} }
#if DEBUG
MessageBox.Show("new:" + ver + ",oldver:" + oldver + ",hasnew:" + hasNew.ToString());
#endif
return hasNew; return hasNew;
} }
#endregion #endregion
......
...@@ -60,7 +60,7 @@ public AutocompleteItem[] ConList ...@@ -60,7 +60,7 @@ public AutocompleteItem[] ConList
/// 设置系列名 /// 设置系列名
/// </summary> /// </summary>
/// <param name="dic"></param> /// <param name="dic"></param>
public void SetNames(SortedList<long, string> dic) public void SetNames(Dictionary<long, string> dic)
{ {
foreach (long k in dic.Keys) foreach (long k in dic.Keys)
{ {
......
...@@ -33,13 +33,13 @@ public void InitMember(string conf) ...@@ -33,13 +33,13 @@ public void InitMember(string conf)
//conf = MyPath.Combine(datapath, MyConfig.FILE_INFO); //conf = MyPath.Combine(datapath, MyConfig.FILE_INFO);
if(!File.Exists(conf)) if(!File.Exists(conf))
{ {
dicCardRules = new SortedList<long, string>(); dicCardRules = new Dictionary<long, string>();
dicSetnames = new SortedList<long, string>(); dicSetnames = new Dictionary<long, string>();
dicCardTypes = new SortedList<long, string>(); dicCardTypes = new Dictionary<long, string>();
dicCardcategorys = new SortedList<long, string>(); dicCardcategorys = new Dictionary<long, string>();
dicCardAttributes = new SortedList<long, string>(); dicCardAttributes = new Dictionary<long, string>();
dicCardRaces = new SortedList<long, string>(); dicCardRaces = new Dictionary<long, string>();
dicCardLevels = new SortedList<long, string>(); dicCardLevels = new Dictionary<long, string>();
return; return;
} }
//提取内容 //提取内容
...@@ -56,30 +56,30 @@ public void InitMember(string conf) ...@@ -56,30 +56,30 @@ public void InitMember(string conf)
/// <summary> /// <summary>
/// 规则 /// 规则
/// </summary> /// </summary>
public SortedList<long, string> dicCardRules = null; public Dictionary<long, string> dicCardRules = null;
/// <summary> /// <summary>
/// 属性 /// 属性
/// </summary> /// </summary>
public SortedList<long, string> dicCardAttributes = null; public Dictionary<long, string> dicCardAttributes = null;
/// <summary> /// <summary>
/// 种族 /// 种族
/// </summary> /// </summary>
public SortedList<long, string> dicCardRaces = null; public Dictionary<long, string> dicCardRaces = null;
/// <summary> /// <summary>
/// 等级 /// 等级
/// </summary> /// </summary>
public SortedList<long, string> dicCardLevels = null; public Dictionary<long, string> dicCardLevels = null;
/// <summary> /// <summary>
/// 系列名 /// 系列名
/// </summary> /// </summary>
public SortedList<long, string> dicSetnames = null; public Dictionary<long, string> dicSetnames = null;
/// <summary> /// <summary>
/// 卡片类型 /// 卡片类型
/// </summary> /// </summary>
public SortedList<long, string> dicCardTypes = null; public Dictionary<long, string> dicCardTypes = null;
/// <summary> /// <summary>
/// 效果类型 /// 效果类型
/// </summary> /// </summary>
public SortedList<long, string> dicCardcategorys = null; public Dictionary<long, string> dicCardcategorys = null;
} }
} }
...@@ -55,7 +55,7 @@ public static string subString(string content, string tag) ...@@ -55,7 +55,7 @@ public static string subString(string content, string tag)
/// <param name="content">字符串</param> /// <param name="content">字符串</param>
/// <param name="tag">开始的标志</param> /// <param name="tag">开始的标志</param>
/// <returns></returns> /// <returns></returns>
public static SortedList<long, string> Read(string content, string tag) public static Dictionary<long, string> Read(string content, string tag)
{ {
return Read(subString(content,tag)); return Read(subString(content,tag));
} }
...@@ -65,7 +65,7 @@ public static string subString(string content, string tag) ...@@ -65,7 +65,7 @@ public static string subString(string content, string tag)
/// <param name="strFile"></param> /// <param name="strFile"></param>
/// <param name="encode"></param> /// <param name="encode"></param>
/// <returns></returns> /// <returns></returns>
public static SortedList<long, string> Read(string strFile, Encoding encode) public static Dictionary<long, string> Read(string strFile, Encoding encode)
{ {
return Read(File.ReadAllLines(strFile, encode)); return Read(File.ReadAllLines(strFile, encode));
} }
...@@ -74,7 +74,7 @@ public static string subString(string content, string tag) ...@@ -74,7 +74,7 @@ public static string subString(string content, string tag)
/// </summary> /// </summary>
/// <param name="content"></param> /// <param name="content"></param>
/// <returns></returns> /// <returns></returns>
public static SortedList<long, string> Read(string content) public static Dictionary<long, string> Read(string content)
{ {
string text = reReturn(content); string text = reReturn(content);
return Read(text.Split('\n')); return Read(text.Split('\n'));
...@@ -84,9 +84,9 @@ public static string subString(string content, string tag) ...@@ -84,9 +84,9 @@ public static string subString(string content, string tag)
/// </summary> /// </summary>
/// <param name="lines"></param> /// <param name="lines"></param>
/// <returns></returns> /// <returns></returns>
public static SortedList<long, string> Read(string[] lines) public static Dictionary<long, string> Read(string[] lines)
{ {
SortedList<long, string> tempDic = new SortedList<long, string>(); Dictionary<long, string> tempDic = new Dictionary<long, string>();
long lkey; long lkey;
foreach (string line in lines) foreach (string line in lines)
{ {
...@@ -109,7 +109,7 @@ public static string subString(string content, string tag) ...@@ -109,7 +109,7 @@ public static string subString(string content, string tag)
#endregion #endregion
#region 查找 #region 查找
public static List<long> GetKeys(SortedList<long, string> dic) public static List<long> GetKeys(Dictionary<long, string> dic)
{ {
List<long> list = new List<long>(); List<long> list = new List<long>();
foreach (long l in dic.Keys) foreach (long l in dic.Keys)
...@@ -118,17 +118,14 @@ public static List<long> GetKeys(SortedList<long, string> dic) ...@@ -118,17 +118,14 @@ public static List<long> GetKeys(SortedList<long, string> dic)
} }
return list; return list;
} }
public static string[] GetValues(SortedList<long, string> dic) public static string[] GetValues(Dictionary<long, string> dic)
{ {
string[] strs = new string[dic.Count]; List<string> list = new List<string>();
int j = strs.Length; foreach (long l in dic.Keys)
if (j == 0)
return strs;
for (int i = 0; i < j; i++)
{ {
strs[i] = dic.Values[i]; list.Add(dic[l]);
} }
return strs; return list.ToArray();
} }
/// <summary> /// <summary>
/// 获取值 /// 获取值
...@@ -136,7 +133,7 @@ public static string[] GetValues(SortedList<long, string> dic) ...@@ -136,7 +133,7 @@ public static string[] GetValues(SortedList<long, string> dic)
/// <param name="dic"></param> /// <param name="dic"></param>
/// <param name="key"></param> /// <param name="key"></param>
/// <returns></returns> /// <returns></returns>
public static string GetValue(SortedList<long, string> dic, long key) public static string GetValue(Dictionary<long, string> dic, long key)
{ {
if(dic.ContainsKey(key)) if(dic.ContainsKey(key))
return dic[key].Trim(); return dic[key].Trim();
......
using System.Xml; using System;
using System.Xml;
using System.IO; using System.IO;
using DataEditorX.Common; using DataEditorX.Common;
using System.Windows.Forms;
namespace DataEditorX.Config namespace DataEditorX.Config
{ {
...@@ -23,6 +25,10 @@ public class MyConfig ...@@ -23,6 +25,10 @@ public class MyConfig
/// </summary> /// </summary>
public const string TAG_DATA = "data"; public const string TAG_DATA = "data";
/// <summary> /// <summary>
/// 将要打开
/// </summary>
//public const string TAG_OPEN = "open";
/// <summary>
/// MSE /// MSE
/// </summary> /// </summary>
public const string TAG_MSE = "mse"; public const string TAG_MSE = "mse";
...@@ -133,6 +139,7 @@ public class MyConfig ...@@ -133,6 +139,7 @@ public class MyConfig
public const string TAG_SETNAME = "setname"; public const string TAG_SETNAME = "setname";
#endregion #endregion
#region 读取内容
/// <summary> /// <summary>
/// 读取字符串值 /// 读取字符串值
/// </summary> /// </summary>
...@@ -219,6 +226,9 @@ public static bool readBoolean(string key) ...@@ -219,6 +226,9 @@ public static bool readBoolean(string key)
else else
return false; return false;
} }
#endregion
#region XML操作config
/// <summary> /// <summary>
/// 保存值 /// 保存值
/// </summary> /// </summary>
...@@ -263,6 +273,8 @@ public static string GetAppConfig(string appKey) ...@@ -263,6 +273,8 @@ public static string GetAppConfig(string appKey)
} }
return string.Empty; return string.Empty;
} }
#endregion
/// <summary> /// <summary>
/// 语言配置文件名 /// 语言配置文件名
/// </summary> /// </summary>
...@@ -281,6 +293,19 @@ public static string GetCardInfoFile(string path) ...@@ -281,6 +293,19 @@ public static string GetCardInfoFile(string path)
{ {
return MyPath.Combine(path, MyPath.getFileName(MyConfig.TAG_CARDINFO, GetAppConfig(TAG_LANGUAGE))); return MyPath.Combine(path, MyPath.getFileName(MyConfig.TAG_CARDINFO, GetAppConfig(TAG_LANGUAGE)));
} }
/// <summary>
/// 发送消息打开文件
/// </summary>
/// <param name="file"></param>
public static void Open(IntPtr win, string file)
{
//把需要打开的文件写入临时文件
string tmpfile = Path.Combine(Application.StartupPath, MyConfig.FILE_TEMP);
File.WriteAllText(tmpfile, file);
//发送消息
User32.SendMessage(win, MyConfig.WM_OPEN, 0, 0);
Environment.Exit(1);
}
} }
} }
This diff is collapsed.
...@@ -11,80 +11,83 @@ namespace DataEditorX.Language ...@@ -11,80 +11,83 @@ namespace DataEditorX.Language
{ {
public enum LMSG : uint public enum LMSG : uint
{ {
titleInfo=0, titleInfo = 0 ,
titleError, titleError = 0x1,
titleWarning, titleWarning = 0x2,
titleQuestion, titleQuestion = 0x3,
CreateSucceed, CreateSucceed = 0x4,
CreateFail, CreateFail = 0x5,
AddSucceed, AddSucceed = 0x6,
AddFail, AddFail = 0x7,
CodeCanNotIsZero, CodeCanNotIsZero = 0x8,
ItIsExists, ItIsExists = 0x9,
ItIsNotChanged, ItIsNotChanged = 0xa,
IfDeleteCard, IfDeleteCard = 0xb,
IfCreateScript, IfCreateScript = 0xc,
IfOpenDataBase, IfOpenDataBase = 0xd,
IfReplaceExistingCard, IfReplaceExistingCard = 0xe,
NowIsNewVersion, NowIsNewVersion = 0xf,
CheckUpdateFail,
HaveNewVersion, CheckUpdateFail = 0x10,
FileIsNotExists, HaveNewVersion = 0x11,
NotSelectDataBase, FileIsNotExists = 0x12,
SelectDataBasePath, NotSelectDataBase = 0x13,
SelectYdkPath, SelectDataBasePath = 0x14,
SelectImagePath, SelectYdkPath = 0x15,
DownloadSucceed, SelectImagePath = 0x16,
DownloadFail, DownloadSucceed = 0x17,
NotSelectScriptText, DownloadFail = 0x18,
DeleteSucceed, NotSelectScriptText = 0x19,
DeleteFail, DeleteSucceed = 0x1a,
ModifySucceed, DeleteFail = 0x1b,
ModifyFail, ModifySucceed = 0x1c,
About, ModifyFail = 0x1d,
Version, About = 0x1e,
Author, Version = 0x1f,
CdbType, Author = 0x20,
ydkType, CdbType = 0x21,
Setcode_error, ydkType = 0x22,
SelectImage, Setcode_error = 0x23,
ImageType, SelectImage = 0x24,
RunError, ImageType =0x25,
checkUpdate, RunError = 0x26,
CopyCardsToDB, checkUpdate = 0x27,
CopyCardsToDBIsOK, CopyCardsToDB = 0x28,
selectMseset, CopyCardsToDBIsOK =0x29,
MseType, selectMseset = 0x2a,
SaveMse, MseType = 0x2b,
SaveMseOK, SaveMse = 0x2c,
CutImage, SaveMseOK = 0x2d,
CutImageOK, CutImage = 0x2e,
NoSelectCard, CutImageOK = 0x2f,
IfReplaceExistingImage,
ConvertImage, NoSelectCard = 0x30,
ConvertImageOK, IfReplaceExistingImage = 0x31,
CompDBOK, ConvertImage = 0x32,
OnlySet, ConvertImageOK = 0x33,
CancelTask, CompDBOK = 0x34,
PauseTask, OnlySet = 0x35,
ResumeTask, CancelTask = 0x36,
TaskError, PauseTask = 0x37,
IfCancelTask, ResumeTask = 0x38,
CopyCards, TaskError = 0x39,
PasteCards, IfCancelTask = 0x3a,
ClearHistory, CopyCards = 0x3b,
ExportData, PasteCards = 0x3c,
ExportDataOK, ClearHistory = 0x3d,
CheckText, ExportData = 0x3e,
CompareOK, ExportDataOK = 0x3f,
OpenFile,
ScriptFilter, CheckText = 0x40,
NewFile, CompareOK = 0x41,
SaveFileOK, OpenFile = 0x42,
IfSaveScript, ScriptFilter =0x43,
NewFile = 0x44,
SaveFileOK = 0x45,
IfSaveScript =0x46,
COUNT, COUNT,
} }
} }
...@@ -37,10 +37,11 @@ private static void Main(string[] args) ...@@ -37,10 +37,11 @@ private static void Main(string[] args)
else else
{ {
//把需要打开的文件写入临时文件 //把需要打开的文件写入临时文件
string tmpfile = Path.Combine(Application.StartupPath, MyConfig.FILE_TEMP); //string tmpfile = Path.Combine(Application.StartupPath, MyConfig.FILE_TEMP);
File.WriteAllText(tmpfile, file); //File.WriteAllText(tmpfile, file);
//发送消息 //发送消息
User32.SendMessage(instance.MainWindowHandle, MyConfig.WM_OPEN, 0, 0); //User32.SendMessage(instance.MainWindowHandle, MyConfig.WM_OPEN, 0, 0);
MyConfig.Open(instance.MainWindowHandle, file);
Environment.Exit(1); Environment.Exit(1);
} }
} }
......
...@@ -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.4")] [assembly: AssemblyVersion("2.2.9.5")]
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
0x800000 超量 0x800000 超量
0x1000000 灵摆 0x1000000 灵摆
##setname ##setname
-1 自定义
0x0 系列 0x0 系列
0x1 正义盟军 A·O·J 0x1 正义盟军 A·O·J
0x2 次世代 ジェネクス 0x2 次世代 ジェネクス
......
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
0x800000 Xyz 0x800000 Xyz
0x1000000 Pendulum 0x1000000 Pendulum
##setname ##setname
-1 Custom
0x0 SetName 0x0 SetName
0x1 A·O·J 0x1 A·O·J
0x2 ジェネクス 0x2 ジェネクス
......
[DataEditorX]2.2.9.4[DataEditorX] [DataEditorX]2.2.9.5[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)
...@@ -80,6 +80,8 @@ Ctrl+鼠标左键 跳转到函数定义 ...@@ -80,6 +80,8 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字 Ctrl+鼠标滑轮 缩放文字
★更新历史 ★更新历史
2.2.9.5
优化选择框
2.2.9.4 2.2.9.4
DataEditor DataEditor
修改游戏数据的查找方式()Dic = >sortlist,加快卡片显示速度 修改游戏数据的查找方式()Dic = >sortlist,加快卡片显示速度
......
No preview for this file type
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
0x800000 超量 0x800000 超量
0x1000000 灵摆 0x1000000 灵摆
##setname ##setname
-1 自定义
0x0 系列 0x0 系列
0x1 正义盟军 A·O·J 0x1 正义盟军 A·O·J
0x2 次世代 ジェネクス 0x2 次世代 ジェネクス
......
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
0x800000 Xyz 0x800000 Xyz
0x1000000 Pendulum 0x1000000 Pendulum
##setname ##setname
-1 Custom
0x0 SetName 0x0 SetName
0x1 A·O·J 0x1 A·O·J
0x2 ジェネクス 0x2 ジェネクス
......
# database history # database history
F:\games\ygopro\cards.cdb F:\games\ygopro\cards.cdb
F:\games\ygopro\p.zip.cdb
# script history # script history
F:\games\ygopro\script\c168917.lua
F:\games\ygopro\script\c218704.lua
F:\games\ygopro\script\c126218.lua
F:\games\ygopro\script\c259314.lua F:\games\ygopro\script\c259314.lua
F:\games\ygopro\script\c62121.lua
F:\games\ygopro\script\c359563.lua F:\games\ygopro\script\c359563.lua
F:\games\ygopro\script\c218704.lua
F:\games\ygopro\script\c42338879.lua F:\games\ygopro\script\c42338879.lua
F:\games\ygopro\script\c42391240.lua F:\games\ygopro\script\c42391240.lua
F:\games\ygopro\script\c191749.lua F:\games\ygopro\script\c191749.lua
......
[DataEditorX]2.2.9.4[DataEditorX] [DataEditorX]2.2.9.5[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)
...@@ -80,6 +80,8 @@ Ctrl+鼠标左键 跳转到函数定义 ...@@ -80,6 +80,8 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字 Ctrl+鼠标滑轮 缩放文字
★更新历史 ★更新历史
2.2.9.5
优化选择框
2.2.9.4 2.2.9.4
DataEditor DataEditor
修改游戏数据的查找方式()Dic = >sortlist,加快卡片显示速度 修改游戏数据的查找方式()Dic = >sortlist,加快卡片显示速度
......
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