Commit c99eb604 authored by keyongyu's avatar keyongyu

2.2.8.0

parent a7145efa
......@@ -363,8 +363,8 @@ void AboutToolStripMenuItemClick(object sender, EventArgs e)
MyMsg.Show(
LANG.GetMsg(LMSG.About)+"\t"+Application.ProductName+"\n"
+LANG.GetMsg(LMSG.Version)+"\t1.1.0.0\n"
+LANG.GetMsg(LMSG.Author)+"\t247321453\n"
+"Email:\tkeyoyu@foxmail.com");
+ LANG.GetMsg(LMSG.Author) + "\t柯永裕\n"
+"Email:\t247321453@qq.com\n\n我的支付宝账户就是Email,谢谢大家捐助。");
}
void Menuitem_openClick(object sender, EventArgs e)
......
......@@ -199,16 +199,16 @@ public string idString
public bool IsSetCode(long sc)
{
if((this.setcode&0xffff)==sc)
return true;
else if(((this.setcode>>0x10)&0xffff)==sc)
return true;
else if(((this.setcode>>0x20)&0xffff)==sc)
return true;
else if(((this.setcode>>0x30)&0xffff)==sc)
return true;
else
return false;
long settype = sc & 0xfff;
long setsubtype = sc & 0xf000;
long setcode = this.setcode;
while (setcode != 0)
{
if ((setcode & 0xfff) == settype && (setcode & 0xf000 & setsubtype) == setsubtype)
return true;
setcode = setcode >> 0x10;
}
return false;
}
/// <summary>
/// 卡片是否不相等
......
......@@ -70,36 +70,40 @@ public void Cancel()
cardlist=cards;
mArgs=args;
}
public static void CheckVersion(bool showNew)
{
string newver = CheckUpdate.Check(
ConfigurationManager.AppSettings["updateURL"]);
int iver, iver2;
int.TryParse(Application.ProductVersion.Replace(".", ""), out iver);
int.TryParse(newver.Replace(".", ""), out iver2);
if (iver2 > iver)
{//has new version
if (!MyMsg.Question(LMSG.HaveNewVersion))
return;
}
else if (iver2 > 0)
{//now is last version
if (!showNew)
return;
if (!MyMsg.Question(LMSG.NowIsNewVersion))
return;
}
else
{
if (!showNew)
return;
MyMsg.Error(LMSG.CheckUpdateFail);
return;
}
if (CheckUpdate.DownLoad(
MyPath.Combine(Application.StartupPath, newver + ".zip")))
MyMsg.Show(LMSG.DownloadSucceed);
else
MyMsg.Show(LMSG.DownloadFail);
}
public void OnCheckUpdate(bool showNew){
string newver=CheckUpdate.Check(
ConfigurationManager.AppSettings["updateURL"]);
int iver,iver2;
int.TryParse(Application.ProductVersion.Replace(".",""), out iver);
int.TryParse(newver.Replace(".",""), out iver2);
if(iver2>iver)
{//has new version
if(!MyMsg.Question(LMSG.HaveNewVersion))
return;
}
else if(iver2>0)
{//now is last version
if(!showNew)
return;
if(!MyMsg.Question(LMSG.NowIsNewVersion))
return;
}
else
{
if(!showNew)
return;
MyMsg.Error(LMSG.CheckUpdateFail);
return;
}
if(CheckUpdate.DownLoad(
MyPath.Combine(Application.StartupPath, newver+".zip")))
MyMsg.Show(LMSG.DownloadSucceed);
else
MyMsg.Show(LMSG.DownloadFail);
TaskHelper.CheckVersion(showNew);
}
public void CutImages(string imgpath,bool isreplace)
{
......
......@@ -101,10 +101,10 @@ void DataEditFormLoad(object sender, EventArgs e)
//设置空白卡片
oldCard=new Card(0);
SetCard(oldCard);
if(File.Exists(nowCdbFile))
if (nowCdbFile !=null && File.Exists(nowCdbFile))
Open(nowCdbFile);
//checkupdate(false);//检查更新
// CheckUpdate(false);//检查更新
}
//窗体关闭
void DataEditFormFormClosing(object sender, FormClosingEventArgs e)
......@@ -982,15 +982,15 @@ void Menuitem_aboutClick(object sender, EventArgs e)
MyMsg.Show(
LANG.GetMsg(LMSG.About)+"\t"+Application.ProductName+"\n"
+LANG.GetMsg(LMSG.Version)+"\t"+Application.ProductVersion+"\n"
+LANG.GetMsg(LMSG.Author)+"\t247321453\n"
+"Email:\tkeyoyu@foxmail.com");
+ LANG.GetMsg(LMSG.Author) + "\t柯永裕\n"
+ "Email:\t247321453@qq.com\n\n我的支付宝账户就是Email,谢谢大家捐助。");
}
void Menuitem_checkupdateClick(object sender, EventArgs e)
{
checkupdate(true);
CheckUpdate(true);
}
void checkupdate(bool showNew)
public void CheckUpdate(bool showNew)
{
if(!isRun())
{
......
......@@ -67,6 +67,7 @@ private void InitializeComponent()
this.menuitem_comp2 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_history = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_shistory = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator5 = new System.Windows.Forms.ToolStripSeparator();
this.menuitem_quit = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_windows = new System.Windows.Forms.ToolStripMenuItem();
......@@ -76,7 +77,7 @@ private void InitializeComponent()
this.menuitem_close = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_closeother = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_closeall = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_shistory = new System.Windows.Forms.ToolStripMenuItem();
this.bgWorker1 = new System.ComponentModel.BackgroundWorker();
this.menuStrip1.SuspendLayout();
this.SuspendLayout();
//
......@@ -262,6 +263,12 @@ private void InitializeComponent()
this.menuitem_history.Size = new System.Drawing.Size(261, 22);
this.menuitem_history.Text = "History(&H)";
//
// menuitem_shistory
//
this.menuitem_shistory.Name = "menuitem_shistory";
this.menuitem_shistory.Size = new System.Drawing.Size(261, 22);
this.menuitem_shistory.Text = "Script History";
//
// toolStripSeparator5
//
this.toolStripSeparator5.Name = "toolStripSeparator5";
......@@ -328,11 +335,9 @@ private void InitializeComponent()
this.menuitem_closeall.Text = "Close All";
this.menuitem_closeall.Click += new System.EventHandler(this.CloseAllToolStripMenuItemClick);
//
// menuitem_shistory
// bgWorker1
//
this.menuitem_shistory.Name = "menuitem_shistory";
this.menuitem_shistory.Size = new System.Drawing.Size(261, 22);
this.menuitem_shistory.Text = "Script History";
this.bgWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.bgWorker1_DoWork);
//
// MainForm
//
......@@ -381,6 +386,7 @@ private void InitializeComponent()
private System.Windows.Forms.MenuStrip menuStrip1;
private WeifenLuo.WinFormsUI.Docking.DockPanel dockPanel1;
private System.Windows.Forms.ToolStripMenuItem menuitem_shistory;
private System.ComponentModel.BackgroundWorker bgWorker1;
}
}
......@@ -42,7 +42,7 @@ public partial class MainForm : Form
public MainForm(string datapath, string file)
{
Init(datapath);
if(file.EndsWith("lua",StringComparison.OrdinalIgnoreCase))
if(MainForm.isScript(file))
OpenScript(file);
else
Open(file);
......@@ -73,6 +73,7 @@ void Init(string datapath)
LANG.SetLanguage(this);
ReadHistory();
MenuHistory();
bgWorker1.RunWorkerAsync();
}
#endregion
......@@ -283,7 +284,6 @@ public void Open(string file)
LANG.SetLanguage(def);
InitDataEditor();
def.InitGameData(datacfg);
def.DockAreas = DockAreas.Document;
def.Show(dockPanel1, DockState.Document);
}
......@@ -367,7 +367,7 @@ void DataEditorToolStripMenuItemClick(object sender, EventArgs e)
#region form
void MainFormLoad(object sender, System.EventArgs e)
{
//
}
void MainFormFormClosing(object sender, FormClosingEventArgs e)
......@@ -587,5 +587,10 @@ void Menuitem_findluafuncClick(object sender, EventArgs e)
}
}
#endregion
private void bgWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
TaskHelper.CheckVersion(false);
}
}
}
......@@ -118,7 +118,10 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>130, 17</value>
<value>135, 17</value>
</metadata>
<metadata name="bgWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>25</value>
......
......@@ -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.5")]
[assembly: AssemblyVersion("2.2.8.0")]
[DataEditorX]2.2.7.5[DataEditorX]
[DataEditorX]2.2.8.0[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★捐助
如果你觉得这个软件做得好,可以捐助。
姓名:柯永裕
支付宝帐号:247321453@qq.com
★文件关联
.lua notepad++/sublime text/DataEditorX
.cdb DataEditorX
......@@ -58,6 +63,9 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.8.0
修正setcode搜索
在打开的时候,自动检查更新
2.2.7.5
lua编辑器,编辑完,返回当前页数
2.2.7.4
......
No preview for this file type
[DataEditorX]2.2.7.5[DataEditorX]
[DataEditorX]2.2.8.0[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★捐助
如果你觉得这个软件做得好,可以捐助。
姓名:柯永裕
支付宝帐号:247321453@qq.com
★文件关联
.lua notepad++/sublime text/DataEditorX
.cdb DataEditorX
......@@ -58,6 +63,9 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字
★更新历史
2.2.8.0
修正setcode搜索
在打开的时候,自动检查更新
2.2.7.5
lua编辑器,编辑完,返回当前页数
2.2.7.4
......
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