Commit 16bed39c authored by keyongyu's avatar keyongyu

2.2.1.0

parent 937fc508
......@@ -145,12 +145,11 @@ void FctbTextChangedDelayed(object sender, TextChangedEventArgs e)
#region title
void SetTitle()
{
string name=fctb.GetLineText(0);
string str=title;
if(string.IsNullOrEmpty(nowFile))
str=title;
else
str=nowFile+name;
str=nowFile;
if(this.MdiParent !=null)
{
if(string.IsNullOrEmpty(nowFile))
......@@ -249,8 +248,8 @@ void Menuitem_showinputClick(object sender, EventArgs e)
}
#endregion
void SaveToolStripMenuItemClick(object sender, EventArgs e)
#region menu
public void Save()
{
if(string.IsNullOrEmpty(nowFile))
{
......@@ -260,6 +259,7 @@ void SaveToolStripMenuItemClick(object sender, EventArgs e)
if(sfdlg.ShowDialog()==DialogResult.OK)
{
nowFile=sfdlg.FileName;
SetTitle();
}
else
return;
......@@ -267,7 +267,7 @@ void SaveToolStripMenuItemClick(object sender, EventArgs e)
}
fctb.SaveToFile(nowFile, new UTF8Encoding(false));
}
void SaveAsToolStripMenuItemClick(object sender, EventArgs e)
public void SaveAs()
{
using(SaveFileDialog sfdlg=new SaveFileDialog())
{
......@@ -282,6 +282,14 @@ void SaveAsToolStripMenuItemClick(object sender, EventArgs e)
fctb.SaveToFile(nowFile, new UTF8Encoding(false));
}
void SaveToolStripMenuItemClick(object sender, EventArgs e)
{
Save();
}
void SaveAsToolStripMenuItemClick(object sender, EventArgs e)
{
SaveAs();
}
void QuitToolStripMenuItemClick(object sender, EventArgs e)
{
......@@ -309,5 +317,7 @@ void Menuitem_openClick(object sender, EventArgs e)
}
}
}
#endregion
}
}
......@@ -80,6 +80,10 @@ public enum LMSG : uint
ExportDataOK,
CheckText,
CompareOK,
OpenFile,
OpenFileFilter,
NewFile,
SaveFileOK,
COUNT,
}
}
This diff is collapsed.
......@@ -28,13 +28,6 @@ public partial class MainForm : Form
#region member
bool isInitAuto=false;
bool isInitDataEditor=false;
public const int CLOSE_ONE=1;
public const int CLOSE_OTHER=2;
public const int CLOSE_ALL=3;
public const int WM_OPEN=0x0401;
public const int WM_OPEN_SCRIPT=0x0402;
public const string TMPFILE="open.tmp";
public const int MAX_HISTORY=0x20;
string cdbHistoryFile;
List<string> cdblist;
string datapath;
......@@ -89,12 +82,21 @@ void Init(string datapath)
}
#endregion
#region const
public const int CLOSE_ONE=1;
public const int CLOSE_OTHER=2;
public const int CLOSE_ALL=3;
public const int WM_OPEN=0x0401;
public const int WM_OPEN_SCRIPT=0x0402;
public const string TMPFILE="open.tmp";
public const int MAX_HISTORY=0x20;
public static bool isScript(string file)
{
if(file.EndsWith("lua",StringComparison.OrdinalIgnoreCase))
return true;
return false;
}
#endregion
#region History
void ReadHistory()
......@@ -303,7 +305,10 @@ void CloseToolStripMenuItemClick(object sender, EventArgs e)
{
CloseMdi(MainForm.CLOSE_ONE);
}
void Menuitem_codeeditorClick(object sender, EventArgs e)
{
OpenScript(null);
}
void CloseMdi(int type)
{
DockContentCollection contents = dockPanel1.Contents;
......@@ -342,8 +347,8 @@ void Menuitem_openClick(object sender, EventArgs e)
{
using(OpenFileDialog dlg=new OpenFileDialog())
{
dlg.Title=LANG.GetMsg(LMSG.SelectDataBasePath);
dlg.Filter=LANG.GetMsg(LMSG.CdbType);
dlg.Title=LANG.GetMsg(LMSG.OpenFile);
dlg.Filter=LANG.GetMsg(LMSG.OpenFileFilter);
if(dlg.ShowDialog()==DialogResult.OK)
{
string file=dlg.FileName;
......@@ -357,15 +362,15 @@ void Menuitem_openClick(object sender, EventArgs e)
void QuitToolStripMenuItemClick(object sender, EventArgs e)
{
Application.Exit();
this.Close();
}
void Menuitem_newClick(object sender, EventArgs e)
{
using(SaveFileDialog dlg=new SaveFileDialog())
{
dlg.Title=LANG.GetMsg(LMSG.SelectDataBasePath);
dlg.Filter=LANG.GetMsg(LMSG.CdbType);
dlg.Title=LANG.GetMsg(LMSG.NewFile);
dlg.Filter=LANG.GetMsg(LMSG.OpenFileFilter);
if(dlg.ShowDialog()==DialogResult.OK)
{
string file=dlg.FileName;
......@@ -382,6 +387,15 @@ void Menuitem_newClick(object sender, EventArgs e)
}
}
}
void Menuitem_saveClick(object sender, EventArgs e)
{
CodeEditForm cf= dockPanel1.ActiveContent as CodeEditForm;
if(cf!=null)
{
cf.Save();
MyMsg.Show(LMSG.SaveFileOK);
}
}
#endregion
#region copy
......@@ -481,6 +495,7 @@ void Menuitem_comp2Click(object sender, EventArgs e)
}
#endregion
#region complate
void InitCodeEditor(string funtxt,string conlua)
{
if(!isInitDataEditor)
......@@ -500,6 +515,8 @@ void InitCodeEditor(string funtxt,string conlua)
}
}
#endregion
#region function
void AddFunction(string funtxt)
{
......@@ -564,7 +581,8 @@ void AddFuncTooltip(string name,string desc)
{
string fname=GetFunName(name);
if(!tooltipDic.ContainsKey(fname)){
tooltipDic.Add(fname, desc);
tooltipDic.Add(fname, desc
);
AutocompleteItem aitem=new AutocompleteItem(fname);
aitem.ToolTipTitle = fname;
aitem.ToolTipText = desc;
......@@ -615,9 +633,5 @@ void AddConstant(string conlua)
}
#endregion
void Menuitem_codeeditorClick(object sender, EventArgs e)
{
OpenScript(null);
}
}
}
......@@ -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.0.0")]
[assembly: AssemblyVersion("2.2.1.0")]
......@@ -407,8 +407,6 @@ o_range表示可选择的表示形式。
设置Label属性
●void Effect.SetCategory(Effect e, integer cate)
设置Category属性
●void Effect.SetCategory(Effect e, integer cate)
设置Category属性
●void Effect.SetCondition(Effect e, function con_func)
设置Condition属性
●void Effect.SetCost(Effect e, function cost_func)
......@@ -1000,8 +998,6 @@ integer target_player=player])
●boolean Duel.CheckNormalSummonActivity(integer player)
检查玩家player本回合有没有进行过通常召唤的行为。包括召唤和set
●boolean Duel.CheckFlipSummonActivity(integer player)
检查玩家player本回合有没有进行过反转召唤的行为。
●boolean Duel.CheckFlipSummonActivity(integer player)
检查玩家player本回合有没有进行过特殊召唤的行为。
特殊召唤的行为包括:
进行了入连锁和不入连锁的特殊召唤;
......
MainForm->menuitem_file 文件(&F)
MainForm->menuitem_new 新建(&N)
MainForm->menuitem_open 打开(&O)
MainForm->menuitem_save 保存(&S)
MainForm->menuitem_copyselect 复制所选卡片
MainForm->menuitem_copyall 复制当前结果的所有卡片
MainForm->menuitem_pastecards 粘贴卡片
......
......@@ -31,8 +31,8 @@
0x1e 关于:
0x1f 版本:
0x20 作者:
0x21 cdb文件(*.cdb)|*.cdb|所有文件(*.*)|*.*
0x22 ydk文件(*.ydk)|*.ydk|所有文件(*.*)|*.*
0x21 数据库文件(*.cdb)|*.cdb|所有文件(*.*)|*.*
0x22 卡组文件(*.ydk)|*.ydk|所有文件(*.*)|*.*
0x23 系列号输入出错!
0x24 选择卡片图像
0x25 jpg图像(*.jpg)|*.jpg|bmp图像(*.bmp)|*.bmp|png图像(*.png)|*.png|所有文件(*.*)|*.*
......@@ -63,4 +63,8 @@
0x3e 正在导出数据
0x3f 导出数据完成
0x40 是否对比卡片信息?
0x41 对比完成
\ No newline at end of file
0x41 对比完成
0x42 打开文件
0x43 数据库文件(*.cdb)|*.cdb|脚本文件(*.lua)|*.lua|所有文件(*.*)|*.*
0x44 新建文件
0x45 保存完成
\ No newline at end of file
MainForm->menuitem_file File
MainForm->menuitem_new New DataBase
MainForm->menuitem_open Open DataBase
MainForm->menuitem_new New
MainForm->menuitem_open Open
MainForm->menuitem_save Save
MainForm->menuitem_copyselect Copy Select Cards
MainForm->menuitem_copyall Copy All Cards
MainForm->menuitem_pastecards Paste Cards
......
......@@ -63,4 +63,8 @@
0x3e Exporting Data
0x3f Export Data OK
0x40 Compare Cards With Text?
0x41 Cards is Compared.
\ No newline at end of file
0x41 Cards is Compared.
0x42 Open File
0x43 DataBase(*.cdb)|*.cdb|Script(*.lua)|*.lua|all files(*.*)|*.*
0x44 New File
0x45 Save OK
\ No newline at end of file
[DataEditorX]2.2.0.0[DataEditorX]
[DataEditorX]2.2.1.0[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
......@@ -66,6 +66,8 @@ DataEditorX.exe.config
描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史
2.2.1.0
lua编辑器的文件菜单整合
2.2.0.0
增加lua编辑器,支持关联lua文件
等待:
......
No preview for this file type
......@@ -407,8 +407,6 @@ o_range表示可选择的表示形式。
设置Label属性
●void Effect.SetCategory(Effect e, integer cate)
设置Category属性
●void Effect.SetCategory(Effect e, integer cate)
设置Category属性
●void Effect.SetCondition(Effect e, function con_func)
设置Condition属性
●void Effect.SetCost(Effect e, function cost_func)
......@@ -1000,8 +998,6 @@ integer target_player=player])
●boolean Duel.CheckNormalSummonActivity(integer player)
检查玩家player本回合有没有进行过通常召唤的行为。包括召唤和set
●boolean Duel.CheckFlipSummonActivity(integer player)
检查玩家player本回合有没有进行过反转召唤的行为。
●boolean Duel.CheckFlipSummonActivity(integer player)
检查玩家player本回合有没有进行过特殊召唤的行为。
特殊召唤的行为包括:
进行了入连锁和不入连锁的特殊召唤;
......
MainForm->menuitem_file 文件(&F)
MainForm->menuitem_new 新建(&N)
MainForm->menuitem_open 打开(&O)
MainForm->menuitem_save 保存(&S)
MainForm->menuitem_copyselect 复制所选卡片
MainForm->menuitem_copyall 复制当前结果的所有卡片
MainForm->menuitem_pastecards 粘贴卡片
......
......@@ -31,8 +31,8 @@
0x1e 关于:
0x1f 版本:
0x20 作者:
0x21 cdb文件(*.cdb)|*.cdb|所有文件(*.*)|*.*
0x22 ydk文件(*.ydk)|*.ydk|所有文件(*.*)|*.*
0x21 数据库文件(*.cdb)|*.cdb|所有文件(*.*)|*.*
0x22 卡组文件(*.ydk)|*.ydk|所有文件(*.*)|*.*
0x23 系列号输入出错!
0x24 选择卡片图像
0x25 jpg图像(*.jpg)|*.jpg|bmp图像(*.bmp)|*.bmp|png图像(*.png)|*.png|所有文件(*.*)|*.*
......@@ -63,4 +63,8 @@
0x3e 正在导出数据
0x3f 导出数据完成
0x40 是否对比卡片信息?
0x41 对比完成
\ No newline at end of file
0x41 对比完成
0x42 打开文件
0x43 数据库文件(*.cdb)|*.cdb|脚本文件(*.lua)|*.lua|所有文件(*.*)|*.*
0x44 新建文件
0x45 保存完成
\ No newline at end of file
MainForm->menuitem_file File
MainForm->menuitem_new New DataBase
MainForm->menuitem_open Open DataBase
MainForm->menuitem_new New
MainForm->menuitem_open Open
MainForm->menuitem_save Save
MainForm->menuitem_copyselect Copy Select Cards
MainForm->menuitem_copyall Copy All Cards
MainForm->menuitem_pastecards Paste Cards
......
......@@ -63,4 +63,8 @@
0x3e Exporting Data
0x3f Export Data OK
0x40 Compare Cards With Text?
0x41 Cards is Compared.
\ No newline at end of file
0x41 Cards is Compared.
0x42 Open File
0x43 DataBase(*.cdb)|*.cdb|Script(*.lua)|*.lua|all files(*.*)|*.*
0x44 New File
0x45 Save OK
\ No newline at end of file
[DataEditorX]2.2.0.0[DataEditorX]
[DataEditorX]2.2.1.0[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
......@@ -66,6 +66,8 @@ DataEditorX.exe.config
描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史
2.2.1.0
lua编辑器的文件菜单整合
2.2.0.0
增加lua编辑器,支持关联lua文件
等待:
......
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