Commit d42ec5d5 authored by keyongyu's avatar keyongyu

2.3.0.3

parent 68a0521d
using System;
using System.Collections.Generic;
using System.Text;
namespace DataEditorX.Common
{
public class StrUtil
{
public static string AutoEnter(string str, int lineNum, string re)
{
if (str == null || str.Length == 0 || re == null || re.Length == 0)
return str;
char[] ch = str.ToCharArray();
int count = ch.Length;
StringBuilder sb = new StringBuilder();
int i = 0;
foreach (char c in ch)
{
int ic = c;
if (ic > 128)
i += 2;
else
i += 1;
sb.Append(c);
if (i >= lineNum)
{
sb.Append(re);
i = 0;
}
}
return sb.ToString();
}
}
}
......@@ -44,6 +44,7 @@ public class MyConfig : XMLReader
/// 语言
/// </summary>
public const string TAG_LANGUAGE = "language";
public const string TAG_AUTO_LEN = "autolength";
/// <summary>
/// 临时文件
/// </summary>
......
......@@ -124,6 +124,7 @@ private void InitializeComponent()
this.lv_cardlist = new System.Windows.Forms.DListView();
this.ch_cardcode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.ch_cardname = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.menuitem_saveasenter = new System.Windows.Forms.ToolStripMenuItem();
this.mainMenu.SuspendLayout();
this.SuspendLayout();
//
......@@ -279,6 +280,7 @@ private void InitializeComponent()
this.menuitem_compdb,
this.menuitem_findluafunc,
this.menuitem_exportdata,
this.menuitem_saveasenter,
this.tsep5,
this.menuitem_cutimages,
this.menuitem_convertimage,
......@@ -1010,6 +1012,13 @@ private void InitializeComponent()
this.ch_cardname.Text = "Card Name";
this.ch_cardname.Width = 140;
//
// menuitem_saveasenter
//
this.menuitem_saveasenter.Name = "menuitem_saveasenter";
this.menuitem_saveasenter.Size = new System.Drawing.Size(212, 22);
this.menuitem_saveasenter.Text = "Save as Auto Enter";
this.menuitem_saveasenter.Click += new System.EventHandler(this.menuitem_saveasenter_Click);
//
// DataEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -1168,5 +1177,6 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem menuitem_operacardsfile;
private System.Windows.Forms.ToolStripSeparator tsep2;
private System.Windows.Forms.ToolStripMenuItem menuitem_openfileinthis;
private System.Windows.Forms.ToolStripMenuItem menuitem_saveasenter;
}
}
......@@ -12,6 +12,7 @@
using System.IO;
using System.Windows.Forms;
using DataEditorX.Common;
using DataEditorX.Core;
using DataEditorX.Language;
using WeifenLuo.WinFormsUI.Docking;
......@@ -1528,5 +1529,32 @@ private void menuitem_openfileinthis_Click(object sender, EventArgs e)
MyConfig.Save(MyConfig.TAG_OPEN_IN_THIS, menuitem_openfileinthis.Checked.ToString().ToLower());
}
#endregion
private void menuitem_saveasenter_Click(object sender, EventArgs e)
{
using (SaveFileDialog dlg = new SaveFileDialog())
{
dlg.Title = LanguageHelper.GetMsg(LMSG.SelectDataBasePath);
dlg.Filter = LanguageHelper.GetMsg(LMSG.CdbType);
if (dlg.ShowDialog() == DialogResult.OK)
{
if (DataBase.Create(dlg.FileName))
{
//
Card[] cards = DataBase.Read(nowCdbFile, true, "");
int count = cards.Length;
if (cards == null || cards.Length == 0)
return;
int len = MyConfig.readInteger(MyConfig.TAG_AUTO_LEN, 30);
for (int i = 0; i < count; i++)
{
cards[i].desc = StrUtil.AutoEnter(cards[i].desc, len, " ");
}
DataBase.CopyDB(dlg.FileName, false, cards);
MyMsg.Show(LMSG.CopyCardsToDBIsOK);
}
}
}
}
}
}
......@@ -69,6 +69,7 @@
</Compile>
<Compile Include="Common\CheckUpdate.cs" />
<Compile Include="Common\ConfHelper.cs" />
<Compile Include="Common\StrUtil.cs" />
<Compile Include="Common\XMLReader.cs" />
<Compile Include="Config\YgoPath.cs" />
<Compile Include="Controls\DoubleContorl.cs">
......
......@@ -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.3.0.2")]
[assembly: AssemblyVersion("2.3.0.3")]
......@@ -10,6 +10,8 @@
<!-- access these values via the property:
System.Configuration.ConfigurationManager.AppSettings[key]
-->
<!-- auto enter length -->
<add key="autolength" value="32" />
<!-- MSE language data/mse_xxx.txt -->
<add key="mse" value="Chinese-Simplified" />
<!-- Language data/cardinfo_xxxx.txt data/language_xxx.txt -->
......
★更新历史
2.3.0.3
为了适应ygopro1033.3,增加分行
配置config的autolength,控制每多少个字符,换行
2.3.0.2
MSE存档文本处理
2.3.0.1
......
......@@ -46,6 +46,7 @@ DataEditForm.mainMenu.menu_data 数据(&D)
DataEditForm.mainMenu.menuitem_operacardsfile 同步操作卡片图片和脚本
DataEditForm.mainMenu.menuitem_openfileinthis 用CodeEditor打开脚本
DataEditForm.mainMenu.menuitem_findluafunc 从C++源码查找Lua函数
DataEditForm.mainMenu.menuitem_saveasenter 自动分行
DataEditForm.mainMenu.menuitem_readydk 从卡组文件读取卡片(&Y)
DataEditForm.mainMenu.menuitem_readimages 从卡图文件夹读取卡片(&I)
DataEditForm.mainMenu.menuitem_compdb 压缩数据库
......
......@@ -47,6 +47,7 @@ DataEditForm.mainMenu.menuitem_readydk Read From ydk File(&Y)
DataEditForm.mainMenu.menuitem_readimages Read From Images Path(&I)
DataEditForm.mainMenu.menuitem_compdb Compress DataBase
DataEditForm.mainMenu.menuitem_exportdata Export Data As zip
DataEditForm.mainMenu.menuitem_saveasenter Auto Enter
DataEditForm.mainMenu.menuitem_mseconfig Set MSE Config
DataEditForm.mainMenu.menuitem_readmse Read MSE-set
DataEditForm.mainMenu.menuitem_saveasmse_select Save Selected As MSE-set
......
[DataEditorX]2.3.0.2[DataEditorX]
[DataEditorX]2.3.0.3[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★运行环境(Environment)
......
No preview for this file type
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<!-- Example connection to a SQL Server Database on localhost. -->
<!-- <add name="ExampleConnectionString"
<connectionStrings>
<!-- Example connection to a SQL Server Database on localhost. -->
<!-- <add name="ExampleConnectionString"
connectionString="Data Source=.;Initial Catalog=DBName;Integrated Security=True"
providerName="System.Data.SqlClient" /> -->
</connectionStrings>
<appSettings>
<!-- access these values via the property:
</connectionStrings>
<appSettings>
<!-- access these values via the property:
System.Configuration.ConfigurationManager.AppSettings[key]
-->
<!-- MSE language data/mse_xxx.txt -->
<add key="mse" value="Chinese-Simplified" />
<!-- auto enter length -->
<add key="autolength" value="32" />
<!-- MSE language data/mse_xxx.txt -->
<add key="mse" value="Chinese-Simplified" />
<!-- Language data/cardinfo_xxxx.txt data/language_xxx.txt -->
<add key="language" value="chinese" />
<!-- async load data -->
<add key="async" value="false" />
<!-- DataEditorX source code -->
<add key="sourceURL" value="https://github.com/247321453/DataEditorX" />
<!-- DataEditorX update url-->
<add key="updateURL" value="https://github.com/247321453/DataEditorX/tree/master/win32/readme.txt" />
<!-- DataEditorX source code -->
<add key="sourceURL" value="https://github.com/247321453/DataEditorX" />
<!-- DataEditorX update url-->
<add key="updateURL" value="https://github.com/247321453/DataEditorX/tree/master/win32/readme.txt" />
<!-- delete,modify with card's files image script -->
<add key="opera_with_cards_file" value="true" />
<!-- open file in this.such as lua -->
<add key="open_file_in_this" value="true" />
<!-- Cut Images Setting -->
<add key="image_quilty" value="100" />
<add key="image" value="44,64,177,254" />
<add key="image_other" value="25,54,128,128" />
<add key="image_xyz" value="24,51,128,128" />
<add key="image_pendulum" value="14,46,149,120" />
<!-- CodeEdiotr Setting
<add key="image_quilty" value="100" />
<add key="image" value="44,64,177,254" />
<add key="image_other" value="25,54,128,128" />
<add key="image_xyz" value="24,51,128,128" />
<add key="image_pendulum" value="14,46,149,120" />
<!-- CodeEdiotr Setting
IME = true 使用輸入法,正常顯示文字,反應變慢
IME = false English
-->
<add key="IME" value="false" />
<add key="IME" value="false" />
<add key="wordwrap" value="true" />
<add key="tabisspace" value="false" />
<add key="fontname" value="Consolas" />
<add key="fontsize" value="14.5" />
</appSettings>
<add key="fontname" value="Consolas" />
<add key="fontsize" value="14.5" />
</appSettings>
</configuration>
\ No newline at end of file
★更新历史
2.3.0.3
为了适应ygopro1033.3,增加分行
配置config的autolength,控制每多少个字符,换行
2.3.0.2
MSE存档文本处理
2.3.0.1
......
# database history
F:\games\ygopro\test.cdb
F:\games\ygopro\cards.cdb
# script history
\ No newline at end of file
D:\Program Files (x86)\ygopro\cards2.cdb
# script history
D:\Program Files (x86)\ygopro\script\c50755.lua
\ No newline at end of file
......@@ -46,6 +46,7 @@ DataEditForm.mainMenu.menu_data 数据(&D)
DataEditForm.mainMenu.menuitem_operacardsfile 同步操作卡片图片和脚本
DataEditForm.mainMenu.menuitem_openfileinthis 用CodeEditor打开脚本
DataEditForm.mainMenu.menuitem_findluafunc 从C++源码查找Lua函数
DataEditForm.mainMenu.menuitem_saveasenter 自动分行
DataEditForm.mainMenu.menuitem_readydk 从卡组文件读取卡片(&Y)
DataEditForm.mainMenu.menuitem_readimages 从卡图文件夹读取卡片(&I)
DataEditForm.mainMenu.menuitem_compdb 压缩数据库
......
......@@ -47,6 +47,7 @@ DataEditForm.mainMenu.menuitem_readydk Read From ydk File(&Y)
DataEditForm.mainMenu.menuitem_readimages Read From Images Path(&I)
DataEditForm.mainMenu.menuitem_compdb Compress DataBase
DataEditForm.mainMenu.menuitem_exportdata Export Data As zip
DataEditForm.mainMenu.menuitem_saveasenter Auto Enter
DataEditForm.mainMenu.menuitem_mseconfig Set MSE Config
DataEditForm.mainMenu.menuitem_readmse Read MSE-set
DataEditForm.mainMenu.menuitem_saveasmse_select Save Selected As MSE-set
......
......@@ -6,7 +6,7 @@
cn2tw = false
########################### 存档最大卡片数
maxcount = 0
imagepath = E:\github\images
imagepath = ./Images
########################### Spell/Trap
#jp setting
# spell = %%
......
[DataEditorX]2.3.0.2[DataEditorX]
[DataEditorX]2.3.0.3[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★运行环境(Environment)
......
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