Commit 63c5c74f authored by keyongyu's avatar keyongyu

2.2.8.1

parent c99eb604
...@@ -53,6 +53,7 @@ private void InitializeComponent() ...@@ -53,6 +53,7 @@ private void InitializeComponent()
this.tb_input = new System.Windows.Forms.TextBox(); this.tb_input = new System.Windows.Forms.TextBox();
this.fctb = new FastColoredTextBoxNS.FastColoredTextBoxEx(); this.fctb = new FastColoredTextBoxNS.FastColoredTextBoxEx();
this.documentMap1 = new FastColoredTextBoxNS.DocumentMap(); this.documentMap1 = new FastColoredTextBoxNS.DocumentMap();
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.fctb)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.fctb)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
...@@ -257,6 +258,10 @@ private void InitializeComponent() ...@@ -257,6 +258,10 @@ private void InitializeComponent()
this.documentMap1.Text = "documentMap1"; this.documentMap1.Text = "documentMap1";
this.documentMap1.Visible = false; this.documentMap1.Visible = false;
// //
// backgroundWorker1
//
this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork);
//
// CodeEditForm // CodeEditForm
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
...@@ -298,6 +303,7 @@ private void InitializeComponent() ...@@ -298,6 +303,7 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem menuitem_open; private System.Windows.Forms.ToolStripMenuItem menuitem_open;
private System.Windows.Forms.ToolStripMenuItem menuitem_file; private System.Windows.Forms.ToolStripMenuItem menuitem_file;
private System.Windows.Forms.MenuStrip menuStrip1; private System.Windows.Forms.MenuStrip menuStrip1;
private System.ComponentModel.BackgroundWorker backgroundWorker1;
} }
......
...@@ -41,6 +41,7 @@ public partial class CodeEditForm : DockContent ...@@ -41,6 +41,7 @@ public partial class CodeEditForm : DockContent
string oldtext; string oldtext;
Dictionary<string,string> tooltipDic; Dictionary<string,string> tooltipDic;
bool tabisspaces = false; bool tabisspaces = false;
string nowcdb;
public CodeEditForm() public CodeEditForm()
{ {
InitForm(); InitForm();
...@@ -121,13 +122,13 @@ public void Open(string file) ...@@ -121,13 +122,13 @@ public void Open(string file)
nowFile=file; nowFile=file;
string cdb=MyPath.Combine( string cdb=MyPath.Combine(
Path.GetDirectoryName(file),"../cards.cdb"); Path.GetDirectoryName(file),"../cards.cdb");
if(File.Exists(cdb)) SetCards(cdb);
SetCards(cdb);
fctb.OpenFile(nowFile, new UTF8Encoding(false)); fctb.OpenFile(nowFile, new UTF8Encoding(false));
oldtext=fctb.Text; oldtext=fctb.Text;
SetTitle(); SetTitle();
} }
} }
void HideMenu() void HideMenu()
{ {
if(this.MdiParent ==null) if(this.MdiParent ==null)
...@@ -447,7 +448,9 @@ void MenuItem_Click(object sender, EventArgs e) ...@@ -447,7 +448,9 @@ void MenuItem_Click(object sender, EventArgs e)
} }
public void SetCards(string name) public void SetCards(string name)
{ {
SetCards(DataBase.Read(name, true,"")); nowcdb = name;
if (!backgroundWorker1.IsBusy)
backgroundWorker1.RunWorkerAsync();
} }
public void SetCards(Card[] cards) public void SetCards(Card[] cards)
{ {
...@@ -499,5 +502,11 @@ void FctbMouseClick(object sender, MouseEventArgs e) ...@@ -499,5 +502,11 @@ void FctbMouseClick(object sender, MouseEventArgs e)
} }
} }
#endregion #endregion
private void backgroundWorker1_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
{
if (nowcdb !=null && File.Exists(nowcdb))
SetCards(DataBase.Read(nowcdb, true,""));
}
} }
} }
...@@ -120,6 +120,9 @@ ...@@ -120,6 +120,9 @@
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>137, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>44</value> <value>44</value>
</metadata> </metadata>
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
* ModiftyDate :2014-02-12 * ModiftyDate :2014-02-12
*/ */
using System; using System;
using System.Text.RegularExpressions;
namespace DataEditorX.Core namespace DataEditorX.Core
{ {
...@@ -86,31 +87,36 @@ public override bool Equals(object obj) ...@@ -86,31 +87,36 @@ public override bool Equals(object obj)
/// </summary> /// </summary>
public override string ToString() public override string ToString()
{ {
string str = "";
if(IsType(CardType.TYPE_MONSTER)) if(IsType(CardType.TYPE_MONSTER))
return string.Format("{0}[{1}]\nType: 0x{2}\n{3}{4}/{5}\n {6}", str = string.Format("{0}[{1}]\n[{2}] {3}/{4}\n{5} {6}/{7}\n {8}",
name, idString,type.ToString("x"), name, idString,YGOUtil.GetTypeString(type),
YGOUtil.GetRace(race),
YGOUtil.GetAttributeString(attribute),
levelString(),atk,def,redesc()); levelString(),atk,def,redesc());
return string.Format("{0}[{1}]\nType: 0x{2}\n{3}", else
name, idString,type.ToString("x"),redesc()); str = string.Format("{0}[{1}]\n[{2}]\n{3}",
} name, idString, YGOUtil.GetTypeString(type), redesc());
return str;
}
string levelString() string levelString()
{ {
string star="["; string star="[";
long i=0,j=level&0xff; long i=0,j=level&0xff;
for(i=0;i<j;i++) for (i = 0; i < j; i++)
star +="★"; {
return star+"] "+j.ToString()+" "; if ( i>=0 && (i % 4) == 0)
star += " ";
star += "★";
}
return star+"]";
} }
string redesc() string redesc()
{ {
return desc string str = desc.Replace(Environment.NewLine, "\n");
.Replace(Environment.NewLine, "") str = Regex.Replace(str, "([。|?|?])", "$1\n");
//.Replace(",",",\n") str = str.Replace("\n\n", "\n");
.Replace("。","。\n") return str;
.Replace("?","?\n")
//.Replace(",",",\n")
//.Replace(".",".\n")
.Replace("?","?\n");
} }
public bool EqualsData(Card other) public bool EqualsData(Card other)
{ {
......
...@@ -283,7 +283,26 @@ static string GetType(CardType type) ...@@ -283,7 +283,26 @@ static string GetType(CardType type)
{ {
return DataManager.GetValue(datacfg.dicCardTypes, (long)type); return DataManager.GetValue(datacfg.dicCardTypes, (long)type);
} }
public static string GetTypeString(long type)
{
string str="";
foreach (long k in datacfg.dicCardTypes.Keys)
{
if ((type & k) == k)
str += GetType((CardType)k)+"|";
}
if (str.Length > 0)
str = str.Substring(0, str.Length - 1);
else
str = "???";
return str;
}
public static string GetSetNameString(long type)
{
return "";
}
public static string GetDesc(string desc, string regx) public static string GetDesc(string desc, string regx)
{ {
desc = desc.Replace(Environment.NewLine, "\n"); desc = desc.Replace(Environment.NewLine, "\n");
......
...@@ -234,9 +234,7 @@ public void OpenScript(string file) ...@@ -234,9 +234,7 @@ public void OpenScript(string file)
LANG.SetLanguage(cf); LANG.SetLanguage(cf);
InitCodeEditor(); InitCodeEditor();
cf.SetCDBList(hittorylist.ToArray()); cf.SetCDBList(hittorylist.ToArray());
cf.DockAreas = DockAreas.Document; cf.InitTooltip(codecfg.TooltipDic, codecfg.FunList, codecfg.ConList);
cf.InitTooltip(codecfg.TooltipDic,
codecfg.FunList, codecfg.ConList);
//cf.SetIMEMode(ImeMode.Inherit); //cf.SetIMEMode(ImeMode.Inherit);
cf.Open(file); cf.Open(file);
cf.Show(dockPanel1, DockState.Document); cf.Show(dockPanel1, DockState.Document);
......
...@@ -28,4 +28,4 @@ ...@@ -28,4 +28,4 @@
// //
// You can specify all the values or you can use the default the Revision and // You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below: // Build Numbers by using the '*' as shown below:
[assembly: AssemblyVersion("2.2.8.0")] [assembly: AssemblyVersion("2.2.8.1")]
[DataEditorX]2.2.8.0[DataEditorX] [DataEditorX]2.2.8.1[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL] [URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★捐助 ★捐助
...@@ -63,6 +63,8 @@ Ctrl+鼠标左键 跳转到函数定义 ...@@ -63,6 +63,8 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字 Ctrl+鼠标滑轮 缩放文字
★更新历史 ★更新历史
2.2.8.1
卡片描述完善,加快打开lua的速度。
2.2.8.0 2.2.8.0
修正setcode搜索 修正setcode搜索
在打开的时候,自动检查更新 在打开的时候,自动检查更新
......
No preview for this file type
# history # history
F:\games\ygopro\script\c47198668.lua
F:\games\ygopro\script\c4239451.lua
F:\games\ygopro\script\c93368494.lua
F:\games\ygopro\cards.cdb 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\c17857780.lua
F:\games\ygopro\script\c27551.lua F:\games\ygopro\script\c27551.lua
F:\games\ygopro\p.zip.cdb F:\games\ygopro\p.zip.cdb
F:\games\ygopro\script\c168917.lua
F:\games\ygopro\script\c47198668.lua
F:\games\ygopro\script\c50485594.lua
F:\games\ygopro\script\c65518099.lua F:\games\ygopro\script\c65518099.lua
F:\games\ygopro\script\c64496451.lua F:\games\ygopro\script\c64496451.lua
F:\games\ygopro\script\c78835747.lua F:\games\ygopro\script\c78835747.lua
\ No newline at end of file
[DataEditorX]2.2.8.0[DataEditorX] [DataEditorX]2.2.8.1[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL] [URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★捐助 ★捐助
...@@ -63,6 +63,8 @@ Ctrl+鼠标左键 跳转到函数定义 ...@@ -63,6 +63,8 @@ Ctrl+鼠标左键 跳转到函数定义
Ctrl+鼠标滑轮 缩放文字 Ctrl+鼠标滑轮 缩放文字
★更新历史 ★更新历史
2.2.8.1
卡片描述完善,加快打开lua的速度。
2.2.8.0 2.2.8.0
修正setcode搜索 修正setcode搜索
在打开的时候,自动检查更新 在打开的时候,自动检查更新
......
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