Commit b9be8388 authored by keyongyu's avatar keyongyu

LanguageHelper

parent 5491a5a2
......@@ -246,7 +246,7 @@ bool savefile(bool saveas)
{
using (SaveFileDialog sfdlg = new SaveFileDialog())
{
sfdlg.Filter = LANG.GetMsg(LMSG.ScriptFilter);
sfdlg.Filter = LanguageHelper.GetMsg(LMSG.ScriptFilter);
if (sfdlg.ShowDialog() == DialogResult.OK)
{
nowFile = sfdlg.FileName;
......@@ -323,9 +323,9 @@ void QuitToolStripMenuItemClick(object sender, EventArgs e)
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) + "\t柯永裕\n"
LanguageHelper.GetMsg(LMSG.About) + "\t" + Application.ProductName + "\n"
+ LanguageHelper.GetMsg(LMSG.Version) + "\t1.1.0.0\n"
+ LanguageHelper.GetMsg(LMSG.Author) + "\t柯永裕\n"
+ "Email:\t247321453@qq.com");
}
......@@ -333,7 +333,7 @@ void Menuitem_openClick(object sender, EventArgs e)
{
using (OpenFileDialog sfdlg = new OpenFileDialog())
{
sfdlg.Filter = LANG.GetMsg(LMSG.ScriptFilter);
sfdlg.Filter = LanguageHelper.GetMsg(LMSG.ScriptFilter);
if (sfdlg.ShowDialog() == DialogResult.OK)
{
nowFile = sfdlg.FileName;
......
......@@ -14,6 +14,8 @@ namespace DataEditorX.Config
public class MyConfig : XMLReader
{
#region 常量
public const string TAG_SAVE_LAGN = "-savelanguage";
public const string TAG_SAVE_LAGN2 = "-sl";
/// <summary>
/// 窗口消息 打开文件
/// </summary>
......
......@@ -108,7 +108,7 @@ public void MenuHistory()
mainForm.AddCdbMenu(tsmi);
}
mainForm.AddCdbMenu(new ToolStripSeparator());
ToolStripMenuItem tsmiclear = new ToolStripMenuItem(LANG.GetMsg(LMSG.ClearHistory));
ToolStripMenuItem tsmiclear = new ToolStripMenuItem(LanguageHelper.GetMsg(LMSG.ClearHistory));
tsmiclear.Click += MenuHistoryClear_Click;
mainForm.AddCdbMenu(tsmiclear);
//lua历史
......@@ -120,7 +120,7 @@ public void MenuHistory()
mainForm.AddLuaMenu(tsmi);
}
mainForm.AddLuaMenu(new ToolStripSeparator());
ToolStripMenuItem tsmiclear2 = new ToolStripMenuItem(LANG.GetMsg(LMSG.ClearHistory));
ToolStripMenuItem tsmiclear2 = new ToolStripMenuItem(LanguageHelper.GetMsg(LMSG.ClearHistory));
tsmiclear2.Click += MenuHistoryClear2_Click;
mainForm.AddLuaMenu(tsmiclear2);
}
......
......@@ -824,9 +824,9 @@ void Tb_edittextTextChanged(object sender, EventArgs e)
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) + "\t柯永裕\n"
LanguageHelper.GetMsg(LMSG.About) + "\t" + Application.ProductName + "\n"
+ LanguageHelper.GetMsg(LMSG.Version) + "\t" + Application.ProductVersion + "\n"
+ LanguageHelper.GetMsg(LMSG.Author) + "\t柯永裕\n"
+ "Email:\t247321453@qq.com");
}
......@@ -839,7 +839,7 @@ public void CheckUpdate(bool showNew)
if (!isRun())
{
tasker.SetTask(MyTask.CheckUpdate, null, showNew.ToString());
Run(LANG.GetMsg(LMSG.checkUpdate));
Run(LanguageHelper.GetMsg(LMSG.checkUpdate));
}
}
bool CancelTask()
......@@ -874,8 +874,8 @@ void Menuitem_openClick(object sender, EventArgs e)
{
using (OpenFileDialog dlg = new OpenFileDialog())
{
dlg.Title = LANG.GetMsg(LMSG.SelectDataBasePath);
dlg.Filter = LANG.GetMsg(LMSG.CdbType);
dlg.Title = LanguageHelper.GetMsg(LMSG.SelectDataBasePath);
dlg.Filter = LanguageHelper.GetMsg(LMSG.CdbType);
if (dlg.ShowDialog() == DialogResult.OK)
{
Open(dlg.FileName);
......@@ -887,8 +887,8 @@ void Menuitem_newClick(object sender, EventArgs e)
{
using (SaveFileDialog dlg = new SaveFileDialog())
{
dlg.Title = LANG.GetMsg(LMSG.SelectDataBasePath);
dlg.Filter = LANG.GetMsg(LMSG.CdbType);
dlg.Title = LanguageHelper.GetMsg(LMSG.SelectDataBasePath);
dlg.Filter = LanguageHelper.GetMsg(LMSG.CdbType);
if (dlg.ShowDialog() == DialogResult.OK)
{
if (DataBase.Create(dlg.FileName))
......@@ -906,8 +906,8 @@ void Menuitem_readydkClick(object sender, EventArgs e)
return;
using (OpenFileDialog dlg = new OpenFileDialog())
{
dlg.Title = LANG.GetMsg(LMSG.SelectYdkPath);
dlg.Filter = LANG.GetMsg(LMSG.ydkType);
dlg.Title = LanguageHelper.GetMsg(LMSG.SelectYdkPath);
dlg.Filter = LanguageHelper.GetMsg(LMSG.ydkType);
if (dlg.ShowDialog() == DialogResult.OK)
{
tmpCodes.Clear();
......@@ -925,7 +925,7 @@ void Menuitem_readimagesClick(object sender, EventArgs e)
return;
using (FolderBrowserDialog fdlg = new FolderBrowserDialog())
{
fdlg.Description = LANG.GetMsg(LMSG.SelectImagePath);
fdlg.Description = LanguageHelper.GetMsg(LMSG.SelectImagePath);
if (fdlg.ShowDialog() == DialogResult.OK)
{
tmpCodes.Clear();
......@@ -994,7 +994,7 @@ void BgWorker1RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerC
tasker.Cancel();
if (bgWorker1.IsBusy)
bgWorker1.CancelAsync();
MyMsg.Show(LANG.GetMsg(LMSG.TaskError) + "\n" + e.Error);
MyMsg.Show(LanguageHelper.GetMsg(LMSG.TaskError) + "\n" + e.Error);
}
else if (tasker.IsCancel() || e.Cancelled)
{//取消任务
......@@ -1091,8 +1091,8 @@ void CopyTo(Card[] cards)
string filename = null;
using (OpenFileDialog dlg = new OpenFileDialog())
{
dlg.Title = LANG.GetMsg(LMSG.SelectDataBasePath);
dlg.Filter = LANG.GetMsg(LMSG.CdbType);
dlg.Title = LanguageHelper.GetMsg(LMSG.SelectDataBasePath);
dlg.Filter = LanguageHelper.GetMsg(LMSG.CdbType);
if (dlg.ShowDialog() == DialogResult.OK)
{
filename = dlg.FileName;
......@@ -1119,7 +1119,7 @@ void Menuitem_cutimagesClick(object sender, EventArgs e)
bool isreplace = MyMsg.Question(LMSG.IfReplaceExistingImage);
tasker.SetTask(MyTask.CutImages, cardlist.ToArray(),
ygopath.picpath, isreplace.ToString());
Run(LANG.GetMsg(LMSG.CutImage));
Run(LanguageHelper.GetMsg(LMSG.CutImage));
}
void Menuitem_saveasmse_selectClick(object sender, EventArgs e)
{
......@@ -1144,8 +1144,8 @@ void SaveAsMSE(bool onlyselect)
//select save mse-set
using (SaveFileDialog dlg = new SaveFileDialog())
{
dlg.Title = LANG.GetMsg(LMSG.selectMseset);
dlg.Filter = LANG.GetMsg(LMSG.MseType);
dlg.Title = LanguageHelper.GetMsg(LMSG.selectMseset);
dlg.Filter = LanguageHelper.GetMsg(LMSG.MseType);
if (dlg.ShowDialog() == DialogResult.OK)
{
bool isUpdate = false;
......@@ -1154,7 +1154,7 @@ void SaveAsMSE(bool onlyselect)
#endif
tasker.SetTask(MyTask.SaveAsMSE, cards,
dlg.FileName, isUpdate.ToString());
Run(LANG.GetMsg(LMSG.SaveMse));
Run(LanguageHelper.GetMsg(LMSG.SaveMse));
}
}
}
......@@ -1168,8 +1168,8 @@ void ImportImageFromSelect()
return;
using (OpenFileDialog dlg = new OpenFileDialog())
{
dlg.Title = LANG.GetMsg(LMSG.SelectImage) + "-" + tb_cardname.Text;
dlg.Filter = LANG.GetMsg(LMSG.ImageType);
dlg.Title = LanguageHelper.GetMsg(LMSG.SelectImage) + "-" + tb_cardname.Text;
dlg.Filter = LanguageHelper.GetMsg(LMSG.ImageType);
if (dlg.ShowDialog() == DialogResult.OK)
{
//dlg.FileName;
......@@ -1264,13 +1264,13 @@ void Menuitem_convertimageClick(object sender, EventArgs e)
return;
using (FolderBrowserDialog fdlg = new FolderBrowserDialog())
{
fdlg.Description = LANG.GetMsg(LMSG.SelectImagePath);
fdlg.Description = LanguageHelper.GetMsg(LMSG.SelectImagePath);
if (fdlg.ShowDialog() == DialogResult.OK)
{
bool isreplace = MyMsg.Question(LMSG.IfReplaceExistingImage);
tasker.SetTask(MyTask.ConvertImages, null,
fdlg.SelectedPath, ygopath.gamepath, isreplace.ToString());
Run(LANG.GetMsg(LMSG.ConvertImage));
Run(LanguageHelper.GetMsg(LMSG.ConvertImage));
}
}
}
......@@ -1292,7 +1292,7 @@ void Menuitem_exportdataClick(object sender, EventArgs e)
tasker.SetTask(MyTask.ExportData,
GetCardList(false),
ygopath.gamepath, dlg.FileName);
Run(LANG.GetMsg(LMSG.ExportData));
Run(LanguageHelper.GetMsg(LMSG.ExportData));
}
}
......@@ -1490,15 +1490,15 @@ private void menuitem_readmse_Click(object sender, EventArgs e)
//select open mse-set
using (OpenFileDialog dlg = new OpenFileDialog())
{
dlg.Title = LANG.GetMsg(LMSG.selectMseset);
dlg.Filter = LANG.GetMsg(LMSG.MseType);
dlg.Title = LanguageHelper.GetMsg(LMSG.selectMseset);
dlg.Filter = LanguageHelper.GetMsg(LMSG.MseType);
if (dlg.ShowDialog() == DialogResult.OK)
{
bool isUpdate = false;//是否替换存在的图片
isUpdate = MyMsg.Question(LMSG.IfReplaceExistingImage);
tasker.SetTask(MyTask.ReadMSE, null,
dlg.FileName, isUpdate.ToString());
Run(LANG.GetMsg(LMSG.ReadMSE));
Run(LanguageHelper.GetMsg(LMSG.ReadMSE));
}
}
}
......
......@@ -17,18 +17,19 @@ namespace DataEditorX.Language
/// <summary>
/// Description of Language.
/// </summary>
public static class LANG
public class LanguageHelper
{
static Dictionary<string, string> mWordslist = new Dictionary<string, string>();
static SortedList<LMSG, string> msglist = new SortedList<LMSG, string>();
static Dictionary<string, string> gWordsList = new Dictionary<string, string>();
static SortedList<LMSG, string> gMsgList = new SortedList<LMSG, string>();
const char SEP_CONTROL = '.';
const char SEP_LINE = '\t';
Dictionary<string, string> mWordslist = new Dictionary<string, string>();
#region 获取消息文字
public static string GetMsg(LMSG lMsg)
{
if (msglist.IndexOfKey(lMsg) >= 0)
return msglist[lMsg];
if (gMsgList.IndexOfKey(lMsg) >= 0)
return gMsgList[lMsg];
else
return lMsg.ToString().Replace("_", " ");
}
......@@ -53,7 +54,7 @@ public static void SetFormLabel(Form fm)
static bool GetLabel(string key, out string title)
{
string v;
if (mWordslist.TryGetValue(key, out v))
if (gWordsList.TryGetValue(key, out v))
{
title = v;
return true;
......@@ -138,7 +139,7 @@ static void SetMenuItem(string pName, ToolStripItem tsi)
#endregion
#region 获取控件信息
public static void GetFormLabel(Form fm)
public void GetFormLabel(Form fm)
{
if (fm == null)
return;
......@@ -149,13 +150,13 @@ public static void GetFormLabel(Form fm)
//fm.PerformLayout();
}
static void AddLabel(string key, string title)
void AddLabel(string key, string title)
{
if (!mWordslist.ContainsKey(key))
mWordslist.Add(key, title);
}
static void GetControlLabel(Control c, string pName,
void GetControlLabel(Control c, string pName,
string formName)
{
if (!string.IsNullOrEmpty(pName))
......@@ -203,7 +204,7 @@ static void AddLabel(string key, string title)
}
}
static void GetMenuItem(string pName, ToolStripItem tsi)
void GetMenuItem(string pName, ToolStripItem tsi)
{
if (string.IsNullOrEmpty(tsi.Name))
return;
......@@ -229,7 +230,7 @@ static void GetMenuItem(string pName, ToolStripItem tsi)
#endregion
#region 保存语言文件
public static bool SaveLanguage(string conf)
public bool SaveLanguage(string conf)
{
using (FileStream fs = new FileStream(conf, FileMode.Create, FileAccess.Write))
{
......@@ -239,14 +240,14 @@ public static bool SaveLanguage(string conf)
sw.WriteLine(k + SEP_LINE + mWordslist[k]);
}
sw.WriteLine("#");
foreach (LMSG k in msglist.Keys)
foreach (LMSG k in gMsgList.Keys)
{
//记得替换换行符
sw.WriteLine("0x" + ((uint)k).ToString("x") + SEP_LINE + msglist[k].Replace("\n", "\\n"));
sw.WriteLine("0x" + ((uint)k).ToString("x") + SEP_LINE + gMsgList[k].Replace("\n", "\\n"));
}
foreach (LMSG k in Enum.GetValues(typeof(LMSG)))
{
if (!msglist.ContainsKey(k))
if (!gMsgList.ContainsKey(k))
sw.WriteLine("0x" + ((uint)k).ToString("x") + SEP_LINE + k.ToString());
}
sw.Close();
......@@ -261,8 +262,8 @@ public static void LoadFormLabels(string f)
{
if (!File.Exists(f))
return;
mWordslist.Clear();
msglist.Clear();
gWordsList.Clear();
gMsgList.Clear();
using (FileStream fs = new FileStream(f, FileMode.Open, FileAccess.Read))
{
StreamReader sr = new StreamReader(fs, Encoding.UTF8);
......@@ -280,13 +281,13 @@ public static void LoadFormLabels(string f)
{
uint.TryParse(words[0].Replace("0x", ""), NumberStyles.HexNumber, null, out utemp);
ltemp = (LMSG)utemp;
if (msglist.IndexOfKey(ltemp) < 0)//记得替换换行符
msglist.Add(ltemp, words[1].Replace("\\n", "\n"));
if (gMsgList.IndexOfKey(ltemp) < 0)//记得替换换行符
gMsgList.Add(ltemp, words[1].Replace("\\n", "\n"));
}
else if (!line.StartsWith("#"))//加载界面语言
{
if (!mWordslist.ContainsKey(words[0]))
mWordslist.Add(words[0], words[1]);
if (!gWordsList.ContainsKey(words[0]))
gWordsList.Add(words[0], words[1]);
}
}
sr.Close();
......
......@@ -22,10 +22,10 @@ public static class MyMsg
static string info, warning, error, question;
static MyMsg()
{
info = LANG.GetMsg(LMSG.titleInfo);
warning = LANG.GetMsg(LMSG.titleWarning);
error = LANG.GetMsg(LMSG.titleError);
question = LANG.GetMsg(LMSG.titleQuestion);
info = LanguageHelper.GetMsg(LMSG.titleInfo);
warning = LanguageHelper.GetMsg(LMSG.titleWarning);
error = LanguageHelper.GetMsg(LMSG.titleError);
question = LanguageHelper.GetMsg(LMSG.titleQuestion);
}
public static void Show(string strMsg)
{
......@@ -53,22 +53,22 @@ public static bool Question(string strQues)
}
public static void Show(LMSG msg)
{
MessageBox.Show(LANG.GetMsg(msg), info,
MessageBox.Show(LanguageHelper.GetMsg(msg), info,
MessageBoxButtons.OK, MessageBoxIcon.Information);
}
public static void Warning(LMSG msg)
{
MessageBox.Show(LANG.GetMsg(msg), warning,
MessageBox.Show(LanguageHelper.GetMsg(msg), warning,
MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
public static void Error(LMSG msg)
{
MessageBox.Show(LANG.GetMsg(msg), error,
MessageBox.Show(LanguageHelper.GetMsg(msg), error,
MessageBoxButtons.OK, MessageBoxIcon.Error);
}
public static bool Question(LMSG msg)
{
if(MessageBox.Show(LANG.GetMsg(msg), question,
if(MessageBox.Show(LanguageHelper.GetMsg(msg), question,
MessageBoxButtons.OKCancel,
MessageBoxIcon.Question)==DialogResult.OK)
return true;
......
......@@ -343,8 +343,7 @@ private void InitializeComponent()
this.Name = "MainForm";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "MainForm";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainFormFormClosing);
this.Load += new System.EventHandler(this.MainFormLoad);
this.Load += new System.EventHandler(this.MainForm_Load);
this.mainMenu.ResumeLayout(false);
this.mainMenu.PerformLayout();
this.ResumeLayout(false);
......
......@@ -42,10 +42,6 @@ public partial class MainForm : Form, IMainForm
#region 设置界面,消息语言
public MainForm()
{
//检查更新
Thread th = new Thread(CheckUpdate);
th.IsBackground = true;//如果exe结束,则线程终止
th.Start();
//初始化控件
InitializeComponent();
}
......@@ -103,11 +99,11 @@ void Init()
//读取历史记录
history.ReadHistory(MyPath.Combine(datapath, MyConfig.FILE_HISTORY));
//加载多语言
LANG.LoadFormLabels(conflang);
LanguageHelper.LoadFormLabels(conflang);
}
void InitForm()
{
LANG.SetFormLabel(this);
LanguageHelper.SetFormLabel(this);
//设置所有窗口的语言
DockContentCollection contents = dockPanel1.Contents;
......@@ -115,7 +111,7 @@ void InitForm()
{
if (dc is Form)
{
LANG.SetFormLabel((Form)dc);
LanguageHelper.SetFormLabel((Form)dc);
}
}
//添加历史菜单
......@@ -182,7 +178,7 @@ void OpenScript(string file)
{
CodeEditForm cf = new CodeEditForm();
//设置界面语言
LANG.SetFormLabel(cf);
LanguageHelper.SetFormLabel(cf);
//设置cdb列表
cf.SetCDBList(history.GetcdbHistory());
//初始化函数提示
......@@ -200,7 +196,7 @@ void OpenDataBase(string file)
else
def = new DataEditForm(datapath, file);
//设置语言
LANG.SetFormLabel(def);
LanguageHelper.SetFormLabel(def);
//初始化界面数据
def.InitControl(datacfg);
def.Show(dockPanel1, DockState.Document);
......@@ -257,28 +253,6 @@ bool FindEditForm(string file, bool isOpen)
}
#endregion
#region 加载,关闭
void MainFormLoad(object sender, System.EventArgs e)
{
//检查更新
//bgWorker1.RunWorkerAsync();
}
void MainFormFormClosing(object sender, FormClosingEventArgs e)
{
#if DEBUG
LANG.GetFormLabel(this);
DockContentCollection contents = dockPanel1.Contents;
foreach (DockContent dc in contents)
{
LANG.GetFormLabel(dc);
}
//获取窗体文字
LANG.SaveLanguage(conflang + ".bak");
#endif
}
#endregion
#region 窗口管理
//关闭当前
void CloseToolStripMenuItemClick(object sender, EventArgs e)
......@@ -342,11 +316,11 @@ void Menuitem_openClick(object sender, EventArgs e)
{
using (OpenFileDialog dlg = new OpenFileDialog())
{
dlg.Title = LANG.GetMsg(LMSG.OpenFile);
dlg.Title = LanguageHelper.GetMsg(LMSG.OpenFile);
if (GetActive() != null || dockPanel1.Contents.Count == 0)//判断当前窗口是不是DataEditor
dlg.Filter = LANG.GetMsg(LMSG.CdbType);
dlg.Filter = LanguageHelper.GetMsg(LMSG.CdbType);
else
dlg.Filter = LANG.GetMsg(LMSG.ScriptFilter);
dlg.Filter = LanguageHelper.GetMsg(LMSG.ScriptFilter);
if (dlg.ShowDialog() == DialogResult.OK)
{
string file = dlg.FileName;
......@@ -365,11 +339,11 @@ void Menuitem_newClick(object sender, EventArgs e)
{
using (SaveFileDialog dlg = new SaveFileDialog())
{
dlg.Title = LANG.GetMsg(LMSG.NewFile);
dlg.Title = LanguageHelper.GetMsg(LMSG.NewFile);
if (GetActive() != null)//判断当前窗口是不是DataEditor
dlg.Filter = LANG.GetMsg(LMSG.CdbType);
dlg.Filter = LanguageHelper.GetMsg(LMSG.CdbType);
else
dlg.Filter = LANG.GetMsg(LMSG.ScriptFilter);
dlg.Filter = LanguageHelper.GetMsg(LMSG.ScriptFilter);
if (dlg.ShowDialog() == DialogResult.OK)
{
string file = dlg.FileName;
......@@ -513,5 +487,13 @@ private void bgWorker1_RunWorkerCompleted(object sender, System.ComponentModel.R
InitForm();
}
#endregion
private void MainForm_Load(object sender, EventArgs e)
{
//检查更新
Thread th = new Thread(CheckUpdate);
th.IsBackground = true;//如果exe结束,则线程终止
th.Start();
}
}
}
......@@ -12,6 +12,7 @@
using System.Reflection;
using System.Windows.Forms;
using DataEditorX.Config;
using DataEditorX.Language;
namespace DataEditorX
{
......@@ -20,8 +21,15 @@ internal sealed class Program
[STAThread]
private static void Main(string[] args)
{
string file = (args.Length > 0) ? args[0] : "";
if (MyConfig.OpenOnExistForm(file))//在已经存在的窗口打开文件
string arg = (args.Length > 0) ? args[0] : "";
if (arg == MyConfig.TAG_SAVE_LAGN || arg == MyConfig.TAG_SAVE_LAGN2)
{
//保存语言
SaveLanguage();
MessageBox.Show("Save Language OK.");
Environment.Exit(1);
}
if (MyConfig.OpenOnExistForm(arg))//在已经存在的窗口打开文件
Environment.Exit(1);
else//新建窗口
{
......@@ -29,13 +37,32 @@ private static void Main(string[] args)
Application.SetCompatibleTextRenderingDefault(false);
MainForm mainForm = new MainForm();
//设置将要打开的文件
mainForm.setOpenFile(file);
mainForm.setOpenFile(arg);
//数据目录
mainForm.SetDataPath(MyPath.Combine(Application.StartupPath, MyConfig.TAG_DATA));
Application.Run(mainForm);
}
}
}
static void SaveLanguage()
{
string datapath = MyPath.Combine(Application.StartupPath, MyConfig.TAG_DATA);
string conflang = MyConfig.GetLanguageFile(datapath);
LanguageHelper.LoadFormLabels(conflang);
LanguageHelper langhelper = new LanguageHelper();
MainForm form1 = new MainForm();
LanguageHelper.SetFormLabel(form1);
langhelper.GetFormLabel(form1);
DataEditForm form2 = new DataEditForm();
LanguageHelper.SetFormLabel(form2);
langhelper.GetFormLabel(form2);
CodeEditForm form3 = new CodeEditForm();
LanguageHelper.SetFormLabel(form3);
langhelper.GetFormLabel(form3);
// LANG.GetFormLabel(this);
//获取窗体文字
langhelper.SaveLanguage(conflang + ".bak");
}
}
}
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