Commit f4145c82 authored by keyongyu's avatar keyongyu

2.2.4.0

parent 87d82437
......@@ -108,7 +108,7 @@ public void Open(string file)
fs.Close();
}
nowFile=file;
string cdb=Path.Combine(
string cdb=MyPath.Combine(
Path.GetDirectoryName(file),"../cards.cdb");
if(File.Exists(cdb))
SetCards(cdb);
......@@ -474,8 +474,12 @@ void FctbMouseClick(object sender, MouseEventArgs e)
return;
if(e.Button == MouseButtons.Left && Control.ModifierKeys == Keys.Control)
{
//MessageBox.Show("GO");
fctb.SelectNext(@"function\s+?\S+?\."+text+@"\(",false,RegexOptions.Singleline);
List<int> linenums=fctb.FindLines(@"function\s+?\S+?\."+text+@"\(",RegexOptions.Singleline);
if(linenums.Count>0)
{
fctb.Navigate(linenums[0]);
//MessageBox.Show(linenums[0].ToString());
}
}
}
}
......
/*
* 由SharpDevelop创建。
* 用户: Acer
* 日期: 2014-10-26
* 时间: 10:26
*
*/
using System;
using System.Text;
namespace System.IO
{
/// <summary>
/// Description of MyPath.
/// </summary>
public class MyPath
{
public static string Combine(params string[] paths)
{
if (paths.Length == 0)
{
throw new ArgumentException("please input path");
}
else
{
StringBuilder builder = new StringBuilder();
string spliter = Path.DirectorySeparatorChar.ToString();
string firstPath = paths[0];
if (firstPath.StartsWith("HTTP", StringComparison.OrdinalIgnoreCase))
{
spliter = "/";
}
if (!firstPath.EndsWith(spliter))
{
firstPath = firstPath + spliter;
}
builder.Append(firstPath);
for (int i = 1; i < paths.Length; i++)
{
string nextPath = paths[i];
if (nextPath.StartsWith("/") || nextPath.StartsWith("\\"))
{
nextPath = nextPath.Substring(1);
}
if (i != paths.Length - 1)//not the last one
{
if (nextPath.EndsWith("/") || nextPath.EndsWith("\\"))
{
nextPath = nextPath.Substring(0, nextPath.Length - 1) + spliter;
}
else
{
nextPath = nextPath + spliter;
}
}
builder.Append(nextPath);
}
return builder.ToString();
}
}
}
}
......@@ -43,9 +43,9 @@ public string[] WriteSet(string file,Card[] cards,string pic)
sw.WriteLine(cfg.head);
foreach(Card c in cards)
{
string jpg=Path.Combine(pic,c.id+".jpg");
string jpg1=Path.Combine(pic,c.idString+".jpg");
string jpg2=Path.Combine(pic,c.name+".jpg");
string jpg=MyPath.Combine(pic,c.id+".jpg");
string jpg1=MyPath.Combine(pic,c.idString+".jpg");
string jpg2=MyPath.Combine(pic,c.name+".jpg");
if(File.Exists(jpg)){
list.Add(jpg);
jpg=Path.GetFileName(jpg);
......
......@@ -95,7 +95,7 @@ public void Cancel()
return;
}
if(CheckUpdate.DownLoad(
Path.Combine(Application.StartupPath, newver+".zip")))
MyPath.Combine(Application.StartupPath, newver+".zip")))
MyMsg.Show(LMSG.DownloadSucceed);
else
MyMsg.Show(LMSG.DownloadFail);
......@@ -110,8 +110,8 @@ public void CutImages(string imgpath,string savepath,bool isreplace)
break;
i++;
worker.ReportProgress((i/count), string.Format("{0}/{1}",i,count));
string jpg=Path.Combine(imgpath, c.id+".jpg");
string savejpg=Path.Combine(savepath, c.id+".jpg");
string jpg=MyPath.Combine(imgpath, c.id+".jpg");
string savejpg=MyPath.Combine(savepath, c.id+".jpg");
if(File.Exists(jpg) && (isreplace || !File.Exists(savejpg))){
Bitmap bp=new Bitmap(jpg);
Bitmap bmp=null;
......@@ -145,8 +145,8 @@ public void CutImages(string imgpath,string savepath,bool isreplace)
}
public void ConvertImages(string imgpath,string gamepath,bool isreplace)
{
string picspath=Path.Combine(gamepath,"pics");
string thubpath=Path.Combine(picspath,"thumbnail");
string picspath=MyPath.Combine(gamepath,"pics");
string thubpath=MyPath.Combine(picspath,"thumbnail");
string[] files=Directory.GetFiles(imgpath);
int i=0;
int count=files.Length;
......@@ -158,8 +158,8 @@ public void ConvertImages(string imgpath,string gamepath,bool isreplace)
worker.ReportProgress(i/count, string.Format("{0}/{1}",i,count));
string ex=Path.GetExtension(f).ToLower();
string name=Path.GetFileNameWithoutExtension(f);
string jpg_b=Path.Combine(picspath,name+".jpg");
string jpg_s=Path.Combine(thubpath,name+".jpg");
string jpg_b=MyPath.Combine(picspath,name+".jpg");
string jpg_s=MyPath.Combine(thubpath,name+".jpg");
if(ex==".jpg"||ex==".png"||ex==".bmp"){
if(File.Exists(f)){
//存在大图
......@@ -212,12 +212,12 @@ public void ExportData(string cdbfile)
int count=cards.Length;
string path=Path.GetDirectoryName(cdbfile);
string name=Path.GetFileNameWithoutExtension(cdbfile);
string zipname=Path.Combine(path, name+".zip");
string readme=Path.Combine(path, name+".txt");
string deckydk=Path.Combine(path, "deck/"+name+".ydk");
string pics=Path.Combine(path,"pics");
string thumb=Path.Combine(pics,"thumbnail");
string script=Path.Combine(path,"script");
string zipname=MyPath.Combine(path, name+".zip");
string readme=MyPath.Combine(path, name+".txt");
string deckydk=MyPath.Combine(path, "deck/"+name+".ydk");
string pics=MyPath.Combine(path,"pics");
string thumb=MyPath.Combine(pics,"thumbnail");
string script=MyPath.Combine(path,"script");
if(File.Exists(zipname))
File.Delete(zipname);
......@@ -233,9 +233,9 @@ public void ExportData(string cdbfile)
i++;
worker.ReportProgress(i/count, string.Format("{0}/{1}",i,count));
//zips.AddFile(
string jpg1=Path.Combine(pics, c.id.ToString()+".jpg");
string jpg2=Path.Combine(thumb, c.id.ToString()+".jpg");
string lua=Path.Combine(script, "c"+c.id.ToString()+".lua");
string jpg1=MyPath.Combine(pics, c.id.ToString()+".jpg");
string jpg2=MyPath.Combine(thumb, c.id.ToString()+".jpg");
string lua=MyPath.Combine(script, "c"+c.id.ToString()+".lua");
if(File.Exists(jpg1))
zips.AddFile(jpg1,"pics/"+c.id.ToString()+".jpg","");
......
......@@ -73,7 +73,7 @@ public DataEditForm()
{
Application.Exit();
}
datapath=Path.Combine(Application.StartupPath, dir);
datapath=MyPath.Combine(Application.StartupPath, dir);
InitPath(datapath);
Initialize();
}
......@@ -200,17 +200,17 @@ void SetCDB(string cdb)
}
else
GAMEPATH=Application.StartupPath;
PICPATH=Path.Combine(GAMEPATH,"pics");
PICPATH2=Path.Combine(PICPATH,"thumbnail");
LUAPTH=Path.Combine(GAMEPATH,"script");
PICPATH=MyPath.Combine(GAMEPATH,"pics");
PICPATH2=MyPath.Combine(PICPATH,"thumbnail");
LUAPTH=MyPath.Combine(GAMEPATH,"script");
}
//初始化文件路径
void InitPath(string datapath)
{
this.datapath=datapath;
confcover= Path.Combine(datapath, "cover.jpg");
confcover= MyPath.Combine(datapath, "cover.jpg");
IMAGEPATH=Path.Combine(Application.StartupPath,"Images");
IMAGEPATH=MyPath.Combine(Application.StartupPath,"Images");
if(File.Exists(confcover))
m_cover=Image.FromFile(confcover);
......@@ -845,7 +845,7 @@ public bool OpenScript()
{
if(!Check())
return false;
string lua=Path.Combine(LUAPTH,"c"+tb_cardcode.Text+".lua");
string lua=MyPath.Combine(LUAPTH,"c"+tb_cardcode.Text+".lua");
if(!File.Exists(lua))
{
if(! Directory.Exists(LUAPTH))
......@@ -1444,13 +1444,13 @@ void ImportImage(string file,string tid)
if(menuitem_importmseimg.Checked){
if(!Directory.Exists(IMAGEPATH))
Directory.CreateDirectory(IMAGEPATH);
f=Path.Combine(IMAGEPATH, tid+".jpg");
f=MyPath.Combine(IMAGEPATH, tid+".jpg");
File.Copy(file, f, true);
}
else{
f=Path.Combine(PICPATH,tid+".jpg");
f=MyPath.Combine(PICPATH,tid+".jpg");
tasker.ToImg(file,f,
Path.Combine(PICPATH2,tid+".jpg"));
MyPath.Combine(PICPATH2,tid+".jpg"));
}
setImage(tid);
}
......@@ -1465,9 +1465,9 @@ void setImage(string id)
&& pl_image.BackgroundImage!=m_cover)
pl_image.BackgroundImage.Dispose();
Bitmap temp;
string pic=Path.Combine(PICPATH, id+".jpg");
string pic2=Path.Combine(IMAGEPATH, id+".jpg");
string pic3=Path.Combine(IMAGEPATH, new Card(id).idString+".jpg");
string pic=MyPath.Combine(PICPATH, id+".jpg");
string pic2=MyPath.Combine(IMAGEPATH, id+".jpg");
string pic3=MyPath.Combine(IMAGEPATH, new Card(id).idString+".jpg");
if(menuitem_importmseimg.Checked && File.Exists(pic2))
{
temp=new Bitmap(pic2);
......
......@@ -68,6 +68,7 @@
<Compile Include="Common\CheckUpdate.cs" />
<Compile Include="Common\DoubleContorl.cs" />
<Compile Include="Common\FastColoredTextBoxEx.cs" />
<Compile Include="Common\MyPath.cs" />
<Compile Include="Common\MySyntaxHighlighter.cs" />
<Compile Include="Common\MyBitmap.cs" />
<Compile Include="Common\User32.cs" />
......
......@@ -68,15 +68,15 @@ void Init(string datapath)
list=new Dictionary<DataEditForm,string>();
this.datapath=datapath;
datacfg=new DataConfig(datapath);
cdbHistoryFile =Path.Combine(datapath, "history.txt");
conflang = Path.Combine(datapath, "language-mainform.txt");
conflang_de = Path.Combine(datapath, "language-dataeditor.txt");
conflang_ce = Path.Combine(datapath, "language-codeeditor.txt");
conflang_pe = Path.Combine(datapath, "language-puzzleditor.txt");
fieldtxt= Path.Combine(datapath, "Puzzle.txt");
confmsg = Path.Combine(datapath, "message.txt");
funtxt = Path.Combine(datapath, "_functions.txt");
conlua = Path.Combine(datapath, "constant.lua");
cdbHistoryFile =MyPath.Combine(datapath, "history.txt");
conflang = MyPath.Combine(datapath, "language-mainform.txt");
conflang_de = MyPath.Combine(datapath, "language-dataeditor.txt");
conflang_ce = MyPath.Combine(datapath, "language-codeeditor.txt");
conflang_pe = MyPath.Combine(datapath, "language-puzzleditor.txt");
fieldtxt= MyPath.Combine(datapath, "Puzzle.txt");
confmsg = MyPath.Combine(datapath, "message.txt");
funtxt = MyPath.Combine(datapath, "_functions.txt");
conlua = MyPath.Combine(datapath, "constant.lua");
InitializeComponent();
LANG.InitForm(this, conflang);
LANG.LoadMessage(confmsg);
......
......@@ -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.3.4")]
[assembly: AssemblyVersion("2.2.4.0")]
[DataEditorX]2.2.3.4[DataEditorX]
[DataEditorX]2.2.4.0[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
......@@ -54,15 +54,15 @@ Ctrl+鼠标滑轮 缩放文字
替换复制:如果存在卡片,就用最新的替换
不替换复制:如果存在卡片,就跳过
★bug反馈
Email:247321453@qq.com
提交版本前,请检查更新。
支持多语言化
★支持多语言化
DataEditorX.exe.config
<add key="language" value="chinese" />简体
<add key="language" value="english" />英文
★bug反馈
Email:247321453@qq.com
提交版本前,请检查更新。
标题:(DataEditorX+版本号)
内容:
错误提示文字:(弹出出错框,请按Ctrl+C,然后找地方粘贴)
......@@ -73,6 +73,8 @@ DataEditorX.exe.config
描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史
2.2.4.0
lua编辑器,Ctrl+鼠标左键 跳转到函数定义
2.2.3.4
english pengulum text
2.2.3.3
......
No preview for this file type
......@@ -5,17 +5,17 @@ E:\github\DataEditorX\DataEditorX\chinese\constant.lua
F:\games\ygocore\script\constant.lua
F:\games\ygocore\script\utility.lua
F:\games\ygocore\script\c99995595.lua
F:\games\ygopro\cards.cdb
F:\games\ygocore\script\c135598.lua
F:\games\ygocore\single\[sample]BerserkDragon.lua
F:\games\ygopro\script\c102380.lua
F:\c14513016.lua
F:\games\ygocore\script\c114932.lua
F:\games\ygocore\script\c131182.lua
F:\games\ygopro\script\c123709.lua
F:\games\ygopro\script\c168917.lua
F:\games\ygocore\script\c900787.lua
F:\games\ygocore\script\c126218.lua
F:\games\ygopro\script\c126218.lua
F:\games\ygopro\script\c191749.lua
F:\Propro的翻译\EN的cards.cdb
\ No newline at end of file
F:\Propro的翻译\EN的cards.cdb
F:\games\ygopro\cards.cdb
F:\games\ygopro\script\c168917.lua
F:\games\ygocore\script\c114932.lua
F:\games\ygocore\script\c126218.lua
\ No newline at end of file
[DataEditorX]2.2.3.4[DataEditorX]
[DataEditorX]2.2.4.0[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★使用前,请关联lua的打开方式,例如记事本,notepad++,等。
......@@ -54,15 +54,15 @@ Ctrl+鼠标滑轮 缩放文字
替换复制:如果存在卡片,就用最新的替换
不替换复制:如果存在卡片,就跳过
★bug反馈
Email:247321453@qq.com
提交版本前,请检查更新。
支持多语言化
★支持多语言化
DataEditorX.exe.config
<add key="language" value="chinese" />简体
<add key="language" value="english" />英文
★bug反馈
Email:247321453@qq.com
提交版本前,请检查更新。
标题:(DataEditorX+版本号)
内容:
错误提示文字:(弹出出错框,请按Ctrl+C,然后找地方粘贴)
......@@ -73,6 +73,8 @@ DataEditorX.exe.config
描述不详细的bug,我修复不了。(都不知道是bug是什么)
★更新历史
2.2.4.0
lua编辑器,Ctrl+鼠标左键 跳转到函数定义
2.2.3.4
english pengulum text
2.2.3.3
......
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