Commit 79c92359 authored by keyongyu's avatar keyongyu

2.2.7.2

parent 1491cfc3
This diff is collapsed.
......@@ -36,6 +36,7 @@ public partial class CodeEditForm : DockContent
AutocompleteMenu popupMenu_con;
AutocompleteMenu popupMenu_find;
string nowFile;
public string NowFile { get { return nowFile; } }
string title;
string oldtext;
Dictionary<string,string> tooltipDic;
......@@ -84,7 +85,6 @@ void InitForm()
fctb.ImeMode=ImeMode.On;
}
public void LoadXml(string xmlfile)
{
fctb.DescriptionFile=xmlfile;
......
......@@ -33,7 +33,6 @@ public partial class MainForm : Form
string conflang,conflang_de,conflang_ce,confmsg,conflang_pe;
DataEditForm compare1,compare2;
Card[] tCards;
Dictionary<DataEditForm,string> list;
//
DataConfig datacfg = null;
CodeConfig codecfg = null;
......@@ -57,7 +56,6 @@ void Init(string datapath)
tCards = null;
hittorylist = new List<string>();
list = new Dictionary<DataEditForm,string>();
this.datapath = datapath;
InitDataEditor();
InitCodeEditor();
......@@ -180,11 +178,13 @@ void MenuHistoryItem_Click(object sender, EventArgs e)
{
ToolStripMenuItem tsmi=sender as ToolStripMenuItem;
if(tsmi!=null){
string file=tsmi.Text;
if(MainForm.isScript(file))
OpenScript(file);
else
Open(tsmi.Text);
string file = tsmi.Text;
if (MainForm.isScript(file))
{
OpenScript(file);
}
else
Open(file);
}
}
#endregion
......@@ -224,6 +224,10 @@ public void OpenScript(string file)
if(!string.IsNullOrEmpty(file) && File.Exists(file)){
AddHistory(file);
}
if (checkOpen(file))
return;
if (OpenInNull(file))
return;
CodeEditForm cf=new CodeEditForm();
LANG.InitForm(cf, conflang_ce);
LANG.SetLanguage(cf);
......@@ -258,6 +262,11 @@ void InitDataEditor()
}
public void Open(string file)
{
if (MainForm.isScript(file))
{
OpenScript(file);
return;
}
if(!string.IsNullOrEmpty(file) && File.Exists(file)){
AddHistory(file);
}
......@@ -275,20 +284,38 @@ public void Open(string file)
InitDataEditor();
def.InitGameData(datacfg);
def.DockAreas = DockAreas.Document;
def.FormClosed+=new FormClosedEventHandler(def_FormClosed);
def.Show(dockPanel1, DockState.Document);
list.Add(def, "");
}
bool checkOpen(string file)
{
foreach(DataEditForm df in list.Keys)
DockContentCollection contents = dockPanel1.Contents;
foreach (DockContent dc in contents)
{
if(df!=null && !df.IsDisposed)
{
if(df.getNowCDB()==file)
return true;
}
if (!MainForm.isScript(file))
{
DataEditForm df = dc as DataEditForm;
if (df != null && !df.IsDisposed)
{
if (df.getNowCDB() == file)
{
df.Show();
return true;
}
}
}
else
{
CodeEditForm cf = dc as CodeEditForm;
if (cf != null && !cf.IsDisposed)
{
if (cf.NowFile == file)
{
cf.Show();
return true;
}
}
}
}
return false;
}
......@@ -296,26 +323,38 @@ bool OpenInNull(string file)
{
if(string.IsNullOrEmpty(file) || !File.Exists(file))
return false;
foreach(DataEditForm df in list.Keys)
{
if(df!=null && !df.IsDisposed)
{
if(string.IsNullOrEmpty(df.getNowCDB())){
df.Open(file);
return true;
}
}
}
return false;
}
DockContentCollection contents = dockPanel1.Contents;
foreach (DockContent dc in contents)
{
if (!MainForm.isScript(file))
{
DataEditForm df = dc as DataEditForm;
if (df != null && !df.IsDisposed)
{
if (string.IsNullOrEmpty(df.getNowCDB()))
{
df.Open(file);
df.Show();
return true;
}
}
}
else
{
CodeEditForm cf = dc as CodeEditForm;
if (cf != null && !cf.IsDisposed)
{
if (string.IsNullOrEmpty(cf.NowFile))
{
cf.Open(file);
cf.Show();
return true;
}
void def_FormClosed(object sender, FormClosedEventArgs e)
{
DataEditForm df=sender as DataEditForm;
if(df!=null)
{
list.Remove(df);
}
}
}
}
return false;
}
void DataEditorToolStripMenuItemClick(object sender, EventArgs 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.7.1")]
[assembly: AssemblyVersion("2.2.7.2")]
[DataEditorX]2.2.7.1[DataEditorX]
[DataEditorX]2.2.7.2[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★文件关联
......@@ -58,6 +58,8 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.7.2
打开脚本,重复的时候,显示标签
2.2.7.1
历史记录分离,脚本编辑器的卡片信息描述
2.2.7.0
......
No preview for this file type
# history
F:\games\ygopro\script\c78835747.lua
F:\games\ygopro\p.zip.cdb
\ No newline at end of file
F:\games\ygopro\script\c50485594.lua
F:\games\ygopro\script\c17857780.lua
F:\games\ygopro\script\c47198668.lua
F:\games\ygopro\script\c168917.lua
F:\games\ygopro\script\c65518099.lua
F:\games\ygopro\p.zip.cdb
F:\games\ygopro\script\c64496451.lua
F:\games\ygopro\script\c78835747.lua
\ No newline at end of file
[DataEditorX]2.2.7.1[DataEditorX]
[DataEditorX]2.2.7.2[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★文件关联
......@@ -58,6 +58,8 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.7.2
打开脚本,重复的时候,显示标签
2.2.7.1
历史记录分离,脚本编辑器的卡片信息描述
2.2.7.0
......
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