Commit e452bea2 authored by keyongyu's avatar keyongyu

2.2.8.2

parent 63c5c74f
......@@ -122,7 +122,7 @@ public void Open(string file)
nowFile=file;
string cdb=MyPath.Combine(
Path.GetDirectoryName(file),"../cards.cdb");
SetCards(cdb);
SetCardDB(cdb);
fctb.OpenFile(nowFile, new UTF8Encoding(false));
oldtext=fctb.Text;
SetTitle();
......@@ -365,7 +365,7 @@ void AboutToolStripMenuItemClick(object sender, EventArgs e)
LANG.GetMsg(LMSG.About)+"\t"+Application.ProductName+"\n"
+LANG.GetMsg(LMSG.Version)+"\t1.1.0.0\n"
+ LANG.GetMsg(LMSG.Author) + "\t柯永裕\n"
+"Email:\t247321453@qq.com\n\n我的支付宝账户就是Email,谢谢大家捐助。");
+"Email:\t247321453@qq.com");
}
void Menuitem_openClick(object sender, EventArgs e)
......@@ -443,25 +443,31 @@ void MenuItem_Click(object sender, EventArgs e)
ToolStripMenuItem tsmi=sender as ToolStripMenuItem;
if(tsmi!=null){
string file=tsmi.Text;
SetCards(file);
SetCardDB(file);
}
}
public void SetCards(string name)
public void SetCardDB(string name)
{
nowcdb = name;
if (!backgroundWorker1.IsBusy)
backgroundWorker1.RunWorkerAsync();
}
public void SetCards(Card[] cards)
{
if(cards ==null)
return;
cardlist.Clear();
foreach(Card c in cards)
{
cardlist.Add(c.id,c.ToString());
}
}
private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
if (nowcdb != null && File.Exists(nowcdb))
SetCards(DataBase.Read(nowcdb, true, ""));
}
public void SetCards(Card[] cards)
{
if (cards == null)
return;
cardlist.Clear();
foreach (Card c in cards)
{
cardlist.Add(c.id, c.ToString());
}
}
#endregion
#region selection
......@@ -503,10 +509,6 @@ void FctbMouseClick(object sender, MouseEventArgs e)
}
#endregion
private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
if (nowcdb !=null && File.Exists(nowcdb))
SetCards(DataBase.Read(nowcdb, true,""));
}
}
}
......@@ -7,6 +7,7 @@
*/
using System;
using System.Text;
using System.Windows.Forms;
namespace System.IO
{
......@@ -15,6 +16,15 @@ namespace System.IO
/// </summary>
public class MyPath
{
public static string GetFullPath(string dir)
{
string path = Application.StartupPath;
if (dir.StartsWith("."))
{
dir = MyPath.Combine(path, dir.Substring(2));
}
return dir;
}
public static string Combine(params string[] paths)
{
if (paths.Length == 0)
......
......@@ -97,7 +97,7 @@ string CheckDir(string dir)
DirectoryInfo fo;
try
{
fo=new DirectoryInfo(dir);
fo=new DirectoryInfo(MyPath.GetFullPath(dir));
}
catch
{
......
......@@ -983,7 +983,7 @@ void Menuitem_aboutClick(object sender, EventArgs e)
LANG.GetMsg(LMSG.About)+"\t"+Application.ProductName+"\n"
+LANG.GetMsg(LMSG.Version)+"\t"+Application.ProductVersion+"\n"
+ LANG.GetMsg(LMSG.Author) + "\t柯永裕\n"
+ "Email:\t247321453@qq.com\n\n我的支付宝账户就是Email,谢谢大家捐助。");
+ "Email:\t247321453@qq.com");
}
void Menuitem_checkupdateClick(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.8.1")]
[assembly: AssemblyVersion("2.2.8.2")]
[DataEditorX]2.2.8.1[DataEditorX]
[DataEditorX]2.2.8.2[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★捐助
......@@ -49,6 +49,8 @@ DataEditorX.exe.config
★Magic Set Editor 2
下载/更新:"Magic Set Editor 2/download.bat"
或者
https://github.com/247321453/MagicSetEditor2
★MSE存档生成设置
mse-head MSE的风格设置文件
......@@ -63,6 +65,8 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.8.2
MSE的图片库相对路径
2.2.8.1
卡片描述完善,加快打开lua的速度。
2.2.8.0
......
No preview for this file type
# history
F:\games\ygopro\cards.cdb
F:\games\ygopro\script\c47198668.lua
F:\games\ygopro\script\c255998.lua
F:\games\ygopro\script\c168917.lua
F:\games\ygopro\script\c4239451.lua
F:\games\ygopro\script\c93368494.lua
F:\games\ygopro\cards.cdb
F:\games\ygopro\script\c168917.lua
F:\games\ygopro\script\c50485594.lua
F:\games\ygopro\script\c17857780.lua
F:\games\ygopro\script\c27551.lua
......
[DataEditorX]2.2.8.1[DataEditorX]
[DataEditorX]2.2.8.2[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★捐助
......@@ -49,6 +49,8 @@ DataEditorX.exe.config
★Magic Set Editor 2
下载/更新:"Magic Set Editor 2/download.bat"
或者
https://github.com/247321453/MagicSetEditor2
★MSE存档生成设置
mse-head MSE的风格设置文件
......@@ -63,6 +65,8 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.8.2
MSE的图片库相对路径
2.2.8.1
卡片描述完善,加快打开lua的速度。
2.2.8.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