Commit 8508b6bf authored by DailyShana's avatar DailyShana

2.3.0.9

parent 582aebf2
......@@ -109,7 +109,7 @@ public static string CheckDir(string dir,string defalut)
/// <returns></returns>
public static string getFileName(string tag,string lang)
{
return tag+"_" + lang + ".txt";
return tag + "_" + lang + ".txt";
}
/// <summary>
/// 由tag和lang获取文件名
......
using System;
using System.Xml;
using System.IO;
using System.Globalization;
using DataEditorX.Common;
using System.Windows.Forms;
using System.Diagnostics;
......@@ -89,6 +90,10 @@ public class MyConfig : XMLReader
/// 自动检查更新
/// </summary>
public const string TAG_AUTO_CHECK_UPDATE = "auto_check_update";
/// <summary>
/// 检查系统语言
/// </summary>
public const string TAG_CHECK_SYSLANG = "check_system_language";
/// <summary>
/// 一般的裁剪
/// </summary>
......@@ -257,6 +262,24 @@ public static bool readBoolean(string key)
/// <returns></returns>
public static string GetLanguageFile(string path)
{
if (readBoolean(TAG_CHECK_SYSLANG) && Directory.Exists(path))
{
Save(TAG_CHECK_SYSLANG, "false");
string[] words = CultureInfo.InstalledUICulture.EnglishName.Split(' ');
string syslang = words[0];
string[] files = Directory.GetFiles(path);
foreach (string file in files)
{
string name = MyPath.getFullFileName(MyConfig.TAG_LANGUAGE, file);
if (string.IsNullOrEmpty(name))
continue;
if (syslang.Equals(name, StringComparison.OrdinalIgnoreCase))
{
Save(MyConfig.TAG_LANGUAGE, syslang);
break;
}
}
}
return MyPath.Combine(path, MyPath.getFileName(MyConfig.TAG_LANGUAGE, GetAppConfig(TAG_LANGUAGE)));
}
/// <summary>
......
......@@ -73,6 +73,7 @@ private void InitializeComponent()
this.menuitem_help = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_about = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_checkupdate = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_autocheckupdate = new System.Windows.Forms.ToolStripMenuItem();
this.menuitem_github = new System.Windows.Forms.ToolStripMenuItem();
this.cb_cardattribute = new System.Windows.Forms.ComboBox();
this.tb_cardname = new System.Windows.Forms.TextBox();
......@@ -119,13 +120,13 @@ private void InitializeComponent()
this.tb_setcode3 = new System.Windows.Forms.TextBox();
this.tb_setcode4 = new System.Windows.Forms.TextBox();
this.lb_cardcode = new System.Windows.Forms.Label();
this.menuitem_autocheckupdate = new System.Windows.Forms.ToolStripMenuItem();
this.pl_category = new System.Windows.Forms.DFlowLayoutPanel();
this.pl_cardtype = new System.Windows.Forms.DFlowLayoutPanel();
this.lb_scripttext = new System.Windows.Forms.DListBox();
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_language = new System.Windows.Forms.ToolStripMenuItem();
this.mainMenu.SuspendLayout();
this.SuspendLayout();
//
......@@ -392,6 +393,7 @@ private void InitializeComponent()
//
this.menuitem_help.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.menuitem_about,
this.menuitem_language,
this.menuitem_checkupdate,
this.menuitem_autocheckupdate,
this.menuitem_github});
......@@ -414,6 +416,13 @@ private void InitializeComponent()
this.menuitem_checkupdate.Text = "Check Update";
this.menuitem_checkupdate.Click += new System.EventHandler(this.Menuitem_checkupdateClick);
//
// menuitem_autocheckupdate
//
this.menuitem_autocheckupdate.Name = "menuitem_autocheckupdate";
this.menuitem_autocheckupdate.Size = new System.Drawing.Size(189, 22);
this.menuitem_autocheckupdate.Text = "Auto Check Update";
this.menuitem_autocheckupdate.Click += new System.EventHandler(this.menuitem_autocheckupdate_Click);
//
// menuitem_github
//
this.menuitem_github.Name = "menuitem_github";
......@@ -950,13 +959,6 @@ private void InitializeComponent()
this.lb_cardcode.TabIndex = 7;
this.lb_cardcode.Text = "Card Code";
//
// menuitem_autocheckupdate
//
this.menuitem_autocheckupdate.Name = "menuitem_autocheckupdate";
this.menuitem_autocheckupdate.Size = new System.Drawing.Size(189, 22);
this.menuitem_autocheckupdate.Text = "Auto Check Update";
this.menuitem_autocheckupdate.Click += new System.EventHandler(this.menuitem_autocheckupdate_Click);
//
// pl_category
//
this.pl_category.Anchor = System.Windows.Forms.AnchorStyles.Top;
......@@ -1028,6 +1030,12 @@ private void InitializeComponent()
this.ch_cardname.Text = "Card Name";
this.ch_cardname.Width = 140;
//
// menuitem_language
//
this.menuitem_language.Name = "menuitem_language";
this.menuitem_language.Size = new System.Drawing.Size(189, 22);
this.menuitem_language.Text = "Language";
//
// DataEditForm
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
......@@ -1188,5 +1196,6 @@ private void InitializeComponent()
private System.Windows.Forms.ToolStripMenuItem menuitem_openfileinthis;
private System.Windows.Forms.ToolStripMenuItem menuitem_saveasenter;
private System.Windows.Forms.ToolStripMenuItem menuitem_autocheckupdate;
private System.Windows.Forms.ToolStripMenuItem menuitem_language;
}
}
......@@ -141,6 +141,8 @@ void DataEditFormLoad(object sender, EventArgs e)
Open(nowCdbFile);
//获取MSE配菜单
AddMenuItemFormMSE();
//
GetLanguageItem();
// CheckUpdate(false);//检查更新
}
//窗体关闭
......@@ -1383,8 +1385,8 @@ void SetMseConfig_Click(object sender, EventArgs e)
}
#endregion
#region 查找lua函数
private void menuitem_findluafunc_Click(object sender, EventArgs e)
#region 查找lua函数
private void menuitem_findluafunc_Click(object sender, EventArgs e)
{
string funtxt = MyPath.Combine(datapath, MyConfig.FILE_FUNCTION);
using (FolderBrowserDialog fd = new FolderBrowserDialog())
......@@ -1528,10 +1530,45 @@ private void menuitem_autocheckupdate_Click(object sender, EventArgs e)
menuitem_autocheckupdate.Checked = !menuitem_autocheckupdate.Checked;
MyConfig.Save(MyConfig.TAG_AUTO_CHECK_UPDATE, menuitem_autocheckupdate.Checked.ToString().ToLower());
}
#endregion
#endregion
#region 语言菜单
void GetLanguageItem()
{
if (!Directory.Exists(datapath))
return;
menuitem_language.DropDownItems.Clear();
string[] files = Directory.GetFiles(datapath);
foreach (string file in files)
{
string name = MyPath.getFullFileName(MyConfig.TAG_LANGUAGE, file);
if (string.IsNullOrEmpty(name))
continue;
TextInfo txinfo = new CultureInfo(CultureInfo.InstalledUICulture.Name).TextInfo;
ToolStripMenuItem tsmi = new ToolStripMenuItem(txinfo.ToTitleCase(name));
tsmi.ToolTipText = file;
tsmi.Click += SetLanguage_Click;
if (MyConfig.readString(MyConfig.TAG_LANGUAGE).Equals(name, StringComparison.OrdinalIgnoreCase))
tsmi.Checked = true;
menuitem_language.DropDownItems.Add(tsmi);
}
}
void SetLanguage_Click(object sender, EventArgs e)
{
if (isRun())
return;
if (sender is ToolStripMenuItem)
{
ToolStripMenuItem tsmi = (ToolStripMenuItem)sender;
MyConfig.Save(MyConfig.TAG_LANGUAGE, tsmi.Text);
GetLanguageItem();
MyMsg.Show(LMSG.PlzRestart);
}
}
#endregion
#region 空格
private void menuitem_saveasenter_Click(object sender, EventArgs e)
#region 空格
private void menuitem_saveasenter_Click(object sender, EventArgs e)
{
using (SaveFileDialog dlg = new SaveFileDialog())
{
......
......@@ -89,7 +89,9 @@ public enum LMSG : uint
SaveFileOK = 0x45,
IfSaveScript =0x46,
ReadMSE = 0x47,
ReadMSEisOK= 0x48,
ReadMSEisOK = 0x48,
PlzRestart = 0x49,
COUNT,
}
}
......@@ -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.8")]
[assembly: AssemblyVersion("2.3.0.9")]
......@@ -15,7 +15,9 @@
<!-- 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" />
<add key="language" value="english" />
<!-- Check system language when running program first time -->
<add key="check_system_language" value="true" />
<!-- async load data -->
<add key="async" value="false" />
<!-- DataEditorX source code -->
......
★更新历史
2.3.0.9
改进多语言支持
2.3.0.8
可以选择是否自动检查更新
2.3.0.7
......
......@@ -122,7 +122,7 @@
0x1002 真次世代 レアル·ジェネクス
0x2002 盟军·次世代 A·ジェネクス
0x3 N/A
0x4 亚马逊 アマネス
0x4 亚马逊 アマネス
0x5 秘仪之力 アルカナフォース
0x6 暗黑界
0x7 古代的机械 アンティーク・ギア
......
This diff is collapsed.
......@@ -59,6 +59,7 @@ DataEditForm.mainMenu.menuitem_convertimage 批量导入卡图
DataEditForm.mainMenu.menuitem_cancelTask 取消任务
DataEditForm.mainMenu.menuitem_help 帮助(&H)
DataEditForm.mainMenu.menuitem_about 关于
DataEditForm.mainMenu.menuitem_language 语言
DataEditForm.mainMenu.menuitem_checkupdate 检查更新
DataEditForm.mainMenu.menuitem_autocheckupdate 自动检查更新
DataEditForm.mainMenu.menuitem_github 源码
......@@ -154,4 +155,5 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x45 保存完成
0x46 是否保存脚本?
0x47 读取MSE存档
0x48 读取MSE存档完成!
\ No newline at end of file
0x48 读取MSE存档完成!
0x49 请重启程序使更改生效
\ No newline at end of file
......@@ -13,7 +13,7 @@ CodeEditForm.mainMenu.menuitem_setcard Set DataBase
CodeEditForm.mainMenu.menuitem_help Help(&H)
CodeEditForm.mainMenu.menuitem_about About
#
DataEditForm.btn_img Import Image
DataEditForm.btn_img Import Img
DataEditForm.lb_types Card type
DataEditForm.lb_tiptexts Script texts
DataEditForm.lb_categorys Category
......@@ -28,8 +28,8 @@ DataEditForm.btn_del Delete
DataEditForm.btn_undo Undo
DataEditForm.btn_mod Modify
DataEditForm.btn_add Add
DataEditForm.btn_PageDown Page Up
DataEditForm.btn_PageUp Page Down
#DataEditForm.btn_PageDown Page Down
#DataEditForm.btn_PageUp Page Up
DataEditForm.lv_cardlist.0 Card Code
DataEditForm.lv_cardlist.1 Card Name
DataEditForm.mainMenu.menuitem_file Fil(&F)
......@@ -58,9 +58,10 @@ DataEditForm.mainMenu.menuitem_importmseimg Set MSE'Image
DataEditForm.mainMenu.menuitem_cancelTask Cancel Task
DataEditForm.mainMenu.menuitem_help Help(&H)
DataEditForm.mainMenu.menuitem_about About
DataEditForm.mainMenu.menuitem_language Laguage
DataEditForm.mainMenu.menuitem_checkupdate Check Update
DataEditForm.mainMenu.menuitem_autocheckupdate Auto Check Update
DataEditForm.mainMenu.menuitem_github GitHub
DataEditForm.mainMenu.menuitem_github Sourse Code in GitHub
#
MainForm.mainMenu.menuitem_file File(&F)
MainForm.mainMenu.menuitem_open Open
......@@ -154,4 +155,5 @@ MainForm.mainMenu.menuitem_closeall Close All
0x45 Save OK
0x46 If Save Script?
0x47 Read MSE-set
0x48 Read MSE-set is OK.
\ No newline at end of file
0x48 Read MSE-set is OK.
0x49 Please restart program to apply changes.
\ No newline at end of file
[DataEditorX]2.3.0.8[DataEditorX]
[DataEditorX]2.3.0.9[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★运行环境(Environment)
......
No preview for this file type
......@@ -15,7 +15,9 @@
<!-- 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" />
<add key="language" value="english" />
<!-- Check system language when running program first time -->
<add key="check_system_language" value="true" />
<!-- async load data -->
<add key="async" value="false" />
<!-- DataEditorX source code -->
......
......@@ -3,30 +3,34 @@
<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" /> -->
connectionString="Data Source=.;Initial Catalog=DBName;Integrated Security=True"
providerName="System.Data.SqlClient" /> -->
</connectionStrings>
<appSettings>
<!-- access these values via the property:
System.Configuration.ConfigurationManager.AppSettings[key]
-->
<!-- auto enter length -->
<add key="autolength" value="30" />
System.Configuration.ConfigurationManager.AppSettings[key]
-->
<!-- auto enter length -->
<add key="autolength" value="30" />
<!-- 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" />
<!-- Language data/cardinfo_xxxx.txt data/language_xxx.txt -->
<add key="language" value="english" />
<!-- Check system language when running program first time -->
<add key="check_system_language" value="true" />
<!-- 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" />
<!-- 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 -->
<!-- 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" />
<!-- check update when opening application automatically -->
<add key="auto_check_update" 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" />
......@@ -37,8 +41,8 @@
IME = false English
-->
<add key="IME" value="false" />
<add key="wordwrap" value="true" />
<add key="tabisspace" value="false" />
<add key="wordwrap" value="true" />
<add key="tabisspace" value="false" />
<add key="fontname" value="Consolas" />
<add key="fontsize" value="14.5" />
</appSettings>
......
★更新历史
2.3.0.9
改进多语言支持
2.3.0.8
可以选择是否自动检查更新
2.3.0.7
......
......@@ -122,7 +122,7 @@
0x1002 真次世代 レアル·ジェネクス
0x2002 盟军·次世代 A·ジェネクス
0x3 N/A
0x4 亚马逊 アマネス
0x4 亚马逊 アマネス
0x5 秘仪之力 アルカナフォース
0x6 暗黑界
0x7 古代的机械 アンティーク・ギア
......
This diff is collapsed.
......@@ -59,6 +59,7 @@ DataEditForm.mainMenu.menuitem_convertimage 批量导入卡图
DataEditForm.mainMenu.menuitem_cancelTask 取消任务
DataEditForm.mainMenu.menuitem_help 帮助(&H)
DataEditForm.mainMenu.menuitem_about 关于
DataEditForm.mainMenu.menuitem_language 语言
DataEditForm.mainMenu.menuitem_checkupdate 检查更新
DataEditForm.mainMenu.menuitem_autocheckupdate 自动检查更新
DataEditForm.mainMenu.menuitem_github 源码
......@@ -154,4 +155,5 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x45 保存完成
0x46 是否保存脚本?
0x47 读取MSE存档
0x48 读取MSE存档完成!
\ No newline at end of file
0x48 读取MSE存档完成!
0x49 请重启程序使更改生效
\ No newline at end of file
......@@ -13,7 +13,7 @@ CodeEditForm.mainMenu.menuitem_setcard Set DataBase
CodeEditForm.mainMenu.menuitem_help Help(&H)
CodeEditForm.mainMenu.menuitem_about About
#
DataEditForm.btn_img Import Image
DataEditForm.btn_img Import Img
DataEditForm.lb_types Card type
DataEditForm.lb_tiptexts Script texts
DataEditForm.lb_categorys Category
......@@ -28,8 +28,8 @@ DataEditForm.btn_del Delete
DataEditForm.btn_undo Undo
DataEditForm.btn_mod Modify
DataEditForm.btn_add Add
DataEditForm.btn_PageDown Page Up
DataEditForm.btn_PageUp Page Down
#DataEditForm.btn_PageDown Page Down
#DataEditForm.btn_PageUp Page Up
DataEditForm.lv_cardlist.0 Card Code
DataEditForm.lv_cardlist.1 Card Name
DataEditForm.mainMenu.menuitem_file Fil(&F)
......@@ -58,9 +58,10 @@ DataEditForm.mainMenu.menuitem_importmseimg Set MSE'Image
DataEditForm.mainMenu.menuitem_cancelTask Cancel Task
DataEditForm.mainMenu.menuitem_help Help(&H)
DataEditForm.mainMenu.menuitem_about About
DataEditForm.mainMenu.menuitem_language Laguage
DataEditForm.mainMenu.menuitem_checkupdate Check Update
DataEditForm.mainMenu.menuitem_autocheckupdate Auto Check Update
DataEditForm.mainMenu.menuitem_github GitHub
DataEditForm.mainMenu.menuitem_github Sourse Code in GitHub
#
MainForm.mainMenu.menuitem_file File(&F)
MainForm.mainMenu.menuitem_open Open
......@@ -154,4 +155,5 @@ MainForm.mainMenu.menuitem_closeall Close All
0x45 Save OK
0x46 If Save Script?
0x47 Read MSE-set
0x48 Read MSE-set is OK.
\ No newline at end of file
0x48 Read MSE-set is OK.
0x49 Please restart program to apply changes.
\ No newline at end of file
[DataEditorX]2.3.0.8[DataEditorX]
[DataEditorX]2.3.0.9[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