Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
DataEditorX
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
聖園ミカ
DataEditorX
Commits
b9be8388
Commit
b9be8388
authored
Jan 05, 2015
by
keyongyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LanguageHelper
parent
5491a5a2
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
115 additions
and
104 deletions
+115
-104
DataEditorX/CodeEditForm.cs
DataEditorX/CodeEditForm.cs
+5
-5
DataEditorX/Config/MyConfig.cs
DataEditorX/Config/MyConfig.cs
+2
-0
DataEditorX/Controls/History.cs
DataEditorX/Controls/History.cs
+2
-2
DataEditorX/DataEditForm.cs
DataEditorX/DataEditForm.cs
+26
-26
DataEditorX/Language/LanguageHelper.cs
DataEditorX/Language/LanguageHelper.cs
+21
-20
DataEditorX/Language/MyMsg.cs
DataEditorX/Language/MyMsg.cs
+8
-8
DataEditorX/MainForm.Designer.cs
DataEditorX/MainForm.Designer.cs
+1
-2
DataEditorX/MainForm.cs
DataEditorX/MainForm.cs
+19
-37
DataEditorX/Program.cs
DataEditorX/Program.cs
+31
-4
win32/DataEditorX.exe
win32/DataEditorX.exe
+0
-0
No files found.
DataEditorX/CodeEditForm.cs
View file @
b9be8388
...
@@ -246,7 +246,7 @@ bool savefile(bool saveas)
...
@@ -246,7 +246,7 @@ bool savefile(bool saveas)
{
{
using
(
SaveFileDialog
sfdlg
=
new
SaveFileDialog
())
using
(
SaveFileDialog
sfdlg
=
new
SaveFileDialog
())
{
{
sfdlg
.
Filter
=
L
ANG
.
GetMsg
(
LMSG
.
ScriptFilter
);
sfdlg
.
Filter
=
L
anguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
if
(
sfdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
sfdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
nowFile
=
sfdlg
.
FileName
;
nowFile
=
sfdlg
.
FileName
;
...
@@ -323,9 +323,9 @@ void QuitToolStripMenuItemClick(object sender, EventArgs e)
...
@@ -323,9 +323,9 @@ void QuitToolStripMenuItemClick(object sender, EventArgs e)
void
AboutToolStripMenuItemClick
(
object
sender
,
EventArgs
e
)
void
AboutToolStripMenuItemClick
(
object
sender
,
EventArgs
e
)
{
{
MyMsg
.
Show
(
MyMsg
.
Show
(
L
ANG
.
GetMsg
(
LMSG
.
About
)
+
"\t"
+
Application
.
ProductName
+
"\n"
L
anguageHelper
.
GetMsg
(
LMSG
.
About
)
+
"\t"
+
Application
.
ProductName
+
"\n"
+
L
ANG
.
GetMsg
(
LMSG
.
Version
)
+
"\t1.1.0.0\n"
+
L
anguageHelper
.
GetMsg
(
LMSG
.
Version
)
+
"\t1.1.0.0\n"
+
L
ANG
.
GetMsg
(
LMSG
.
Author
)
+
"\t柯永裕\n"
+
L
anguageHelper
.
GetMsg
(
LMSG
.
Author
)
+
"\t柯永裕\n"
+
"Email:\t247321453@qq.com"
);
+
"Email:\t247321453@qq.com"
);
}
}
...
@@ -333,7 +333,7 @@ void Menuitem_openClick(object sender, EventArgs e)
...
@@ -333,7 +333,7 @@ void Menuitem_openClick(object sender, EventArgs e)
{
{
using
(
OpenFileDialog
sfdlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
sfdlg
=
new
OpenFileDialog
())
{
{
sfdlg
.
Filter
=
L
ANG
.
GetMsg
(
LMSG
.
ScriptFilter
);
sfdlg
.
Filter
=
L
anguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
if
(
sfdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
sfdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
nowFile
=
sfdlg
.
FileName
;
nowFile
=
sfdlg
.
FileName
;
...
...
DataEditorX/Config/MyConfig.cs
View file @
b9be8388
...
@@ -14,6 +14,8 @@ namespace DataEditorX.Config
...
@@ -14,6 +14,8 @@ namespace DataEditorX.Config
public
class
MyConfig
:
XMLReader
public
class
MyConfig
:
XMLReader
{
{
#
region
常量
#
region
常量
public
const
string
TAG_SAVE_LAGN
=
"-savelanguage"
;
public
const
string
TAG_SAVE_LAGN2
=
"-sl"
;
/// <summary>
/// <summary>
/// 窗口消息 打开文件
/// 窗口消息 打开文件
/// </summary>
/// </summary>
...
...
DataEditorX/Controls/History.cs
View file @
b9be8388
...
@@ -108,7 +108,7 @@ public void MenuHistory()
...
@@ -108,7 +108,7 @@ public void MenuHistory()
mainForm
.
AddCdbMenu
(
tsmi
);
mainForm
.
AddCdbMenu
(
tsmi
);
}
}
mainForm
.
AddCdbMenu
(
new
ToolStripSeparator
());
mainForm
.
AddCdbMenu
(
new
ToolStripSeparator
());
ToolStripMenuItem
tsmiclear
=
new
ToolStripMenuItem
(
L
ANG
.
GetMsg
(
LMSG
.
ClearHistory
));
ToolStripMenuItem
tsmiclear
=
new
ToolStripMenuItem
(
L
anguageHelper
.
GetMsg
(
LMSG
.
ClearHistory
));
tsmiclear
.
Click
+=
MenuHistoryClear_Click
;
tsmiclear
.
Click
+=
MenuHistoryClear_Click
;
mainForm
.
AddCdbMenu
(
tsmiclear
);
mainForm
.
AddCdbMenu
(
tsmiclear
);
//lua历史
//lua历史
...
@@ -120,7 +120,7 @@ public void MenuHistory()
...
@@ -120,7 +120,7 @@ public void MenuHistory()
mainForm
.
AddLuaMenu
(
tsmi
);
mainForm
.
AddLuaMenu
(
tsmi
);
}
}
mainForm
.
AddLuaMenu
(
new
ToolStripSeparator
());
mainForm
.
AddLuaMenu
(
new
ToolStripSeparator
());
ToolStripMenuItem
tsmiclear2
=
new
ToolStripMenuItem
(
L
ANG
.
GetMsg
(
LMSG
.
ClearHistory
));
ToolStripMenuItem
tsmiclear2
=
new
ToolStripMenuItem
(
L
anguageHelper
.
GetMsg
(
LMSG
.
ClearHistory
));
tsmiclear2
.
Click
+=
MenuHistoryClear2_Click
;
tsmiclear2
.
Click
+=
MenuHistoryClear2_Click
;
mainForm
.
AddLuaMenu
(
tsmiclear2
);
mainForm
.
AddLuaMenu
(
tsmiclear2
);
}
}
...
...
DataEditorX/DataEditForm.cs
View file @
b9be8388
...
@@ -824,9 +824,9 @@ void Tb_edittextTextChanged(object sender, EventArgs e)
...
@@ -824,9 +824,9 @@ void Tb_edittextTextChanged(object sender, EventArgs e)
void
Menuitem_aboutClick
(
object
sender
,
EventArgs
e
)
void
Menuitem_aboutClick
(
object
sender
,
EventArgs
e
)
{
{
MyMsg
.
Show
(
MyMsg
.
Show
(
L
ANG
.
GetMsg
(
LMSG
.
About
)
+
"\t"
+
Application
.
ProductName
+
"\n"
L
anguageHelper
.
GetMsg
(
LMSG
.
About
)
+
"\t"
+
Application
.
ProductName
+
"\n"
+
L
ANG
.
GetMsg
(
LMSG
.
Version
)
+
"\t"
+
Application
.
ProductVersion
+
"\n"
+
L
anguageHelper
.
GetMsg
(
LMSG
.
Version
)
+
"\t"
+
Application
.
ProductVersion
+
"\n"
+
L
ANG
.
GetMsg
(
LMSG
.
Author
)
+
"\t柯永裕\n"
+
L
anguageHelper
.
GetMsg
(
LMSG
.
Author
)
+
"\t柯永裕\n"
+
"Email:\t247321453@qq.com"
);
+
"Email:\t247321453@qq.com"
);
}
}
...
@@ -839,7 +839,7 @@ public void CheckUpdate(bool showNew)
...
@@ -839,7 +839,7 @@ public void CheckUpdate(bool showNew)
if
(!
isRun
())
if
(!
isRun
())
{
{
tasker
.
SetTask
(
MyTask
.
CheckUpdate
,
null
,
showNew
.
ToString
());
tasker
.
SetTask
(
MyTask
.
CheckUpdate
,
null
,
showNew
.
ToString
());
Run
(
L
ANG
.
GetMsg
(
LMSG
.
checkUpdate
));
Run
(
L
anguageHelper
.
GetMsg
(
LMSG
.
checkUpdate
));
}
}
}
}
bool
CancelTask
()
bool
CancelTask
()
...
@@ -874,8 +874,8 @@ void Menuitem_openClick(object sender, EventArgs e)
...
@@ -874,8 +874,8 @@ void Menuitem_openClick(object sender, EventArgs e)
{
{
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
{
dlg
.
Title
=
L
ANG
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Title
=
L
anguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Filter
=
L
ANG
.
GetMsg
(
LMSG
.
CdbType
);
dlg
.
Filter
=
L
anguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
Open
(
dlg
.
FileName
);
Open
(
dlg
.
FileName
);
...
@@ -887,8 +887,8 @@ void Menuitem_newClick(object sender, EventArgs e)
...
@@ -887,8 +887,8 @@ void Menuitem_newClick(object sender, EventArgs e)
{
{
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
{
dlg
.
Title
=
L
ANG
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Title
=
L
anguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Filter
=
L
ANG
.
GetMsg
(
LMSG
.
CdbType
);
dlg
.
Filter
=
L
anguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
if
(
DataBase
.
Create
(
dlg
.
FileName
))
if
(
DataBase
.
Create
(
dlg
.
FileName
))
...
@@ -906,8 +906,8 @@ void Menuitem_readydkClick(object sender, EventArgs e)
...
@@ -906,8 +906,8 @@ void Menuitem_readydkClick(object sender, EventArgs e)
return
;
return
;
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
{
dlg
.
Title
=
L
ANG
.
GetMsg
(
LMSG
.
SelectYdkPath
);
dlg
.
Title
=
L
anguageHelper
.
GetMsg
(
LMSG
.
SelectYdkPath
);
dlg
.
Filter
=
L
ANG
.
GetMsg
(
LMSG
.
ydkType
);
dlg
.
Filter
=
L
anguageHelper
.
GetMsg
(
LMSG
.
ydkType
);
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
tmpCodes
.
Clear
();
tmpCodes
.
Clear
();
...
@@ -925,7 +925,7 @@ void Menuitem_readimagesClick(object sender, EventArgs e)
...
@@ -925,7 +925,7 @@ void Menuitem_readimagesClick(object sender, EventArgs e)
return
;
return
;
using
(
FolderBrowserDialog
fdlg
=
new
FolderBrowserDialog
())
using
(
FolderBrowserDialog
fdlg
=
new
FolderBrowserDialog
())
{
{
fdlg
.
Description
=
L
ANG
.
GetMsg
(
LMSG
.
SelectImagePath
);
fdlg
.
Description
=
L
anguageHelper
.
GetMsg
(
LMSG
.
SelectImagePath
);
if
(
fdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
fdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
tmpCodes
.
Clear
();
tmpCodes
.
Clear
();
...
@@ -994,7 +994,7 @@ void BgWorker1RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerC
...
@@ -994,7 +994,7 @@ void BgWorker1RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerC
tasker
.
Cancel
();
tasker
.
Cancel
();
if
(
bgWorker1
.
IsBusy
)
if
(
bgWorker1
.
IsBusy
)
bgWorker1
.
CancelAsync
();
bgWorker1
.
CancelAsync
();
MyMsg
.
Show
(
L
ANG
.
GetMsg
(
LMSG
.
TaskError
)
+
"\n"
+
e
.
Error
);
MyMsg
.
Show
(
L
anguageHelper
.
GetMsg
(
LMSG
.
TaskError
)
+
"\n"
+
e
.
Error
);
}
}
else
if
(
tasker
.
IsCancel
()
||
e
.
Cancelled
)
else
if
(
tasker
.
IsCancel
()
||
e
.
Cancelled
)
{
//取消任务
{
//取消任务
...
@@ -1091,8 +1091,8 @@ void CopyTo(Card[] cards)
...
@@ -1091,8 +1091,8 @@ void CopyTo(Card[] cards)
string
filename
=
null
;
string
filename
=
null
;
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
{
dlg
.
Title
=
L
ANG
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Title
=
L
anguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Filter
=
L
ANG
.
GetMsg
(
LMSG
.
CdbType
);
dlg
.
Filter
=
L
anguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
filename
=
dlg
.
FileName
;
filename
=
dlg
.
FileName
;
...
@@ -1119,7 +1119,7 @@ void Menuitem_cutimagesClick(object sender, EventArgs e)
...
@@ -1119,7 +1119,7 @@ void Menuitem_cutimagesClick(object sender, EventArgs e)
bool
isreplace
=
MyMsg
.
Question
(
LMSG
.
IfReplaceExistingImage
);
bool
isreplace
=
MyMsg
.
Question
(
LMSG
.
IfReplaceExistingImage
);
tasker
.
SetTask
(
MyTask
.
CutImages
,
cardlist
.
ToArray
(),
tasker
.
SetTask
(
MyTask
.
CutImages
,
cardlist
.
ToArray
(),
ygopath
.
picpath
,
isreplace
.
ToString
());
ygopath
.
picpath
,
isreplace
.
ToString
());
Run
(
L
ANG
.
GetMsg
(
LMSG
.
CutImage
));
Run
(
L
anguageHelper
.
GetMsg
(
LMSG
.
CutImage
));
}
}
void
Menuitem_saveasmse_selectClick
(
object
sender
,
EventArgs
e
)
void
Menuitem_saveasmse_selectClick
(
object
sender
,
EventArgs
e
)
{
{
...
@@ -1144,8 +1144,8 @@ void SaveAsMSE(bool onlyselect)
...
@@ -1144,8 +1144,8 @@ void SaveAsMSE(bool onlyselect)
//select save mse-set
//select save mse-set
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
{
dlg
.
Title
=
L
ANG
.
GetMsg
(
LMSG
.
selectMseset
);
dlg
.
Title
=
L
anguageHelper
.
GetMsg
(
LMSG
.
selectMseset
);
dlg
.
Filter
=
L
ANG
.
GetMsg
(
LMSG
.
MseType
);
dlg
.
Filter
=
L
anguageHelper
.
GetMsg
(
LMSG
.
MseType
);
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
bool
isUpdate
=
false
;
bool
isUpdate
=
false
;
...
@@ -1154,7 +1154,7 @@ void SaveAsMSE(bool onlyselect)
...
@@ -1154,7 +1154,7 @@ void SaveAsMSE(bool onlyselect)
#endif
#endif
tasker
.
SetTask
(
MyTask
.
SaveAsMSE
,
cards
,
tasker
.
SetTask
(
MyTask
.
SaveAsMSE
,
cards
,
dlg
.
FileName
,
isUpdate
.
ToString
());
dlg
.
FileName
,
isUpdate
.
ToString
());
Run
(
L
ANG
.
GetMsg
(
LMSG
.
SaveMse
));
Run
(
L
anguageHelper
.
GetMsg
(
LMSG
.
SaveMse
));
}
}
}
}
}
}
...
@@ -1168,8 +1168,8 @@ void ImportImageFromSelect()
...
@@ -1168,8 +1168,8 @@ void ImportImageFromSelect()
return
;
return
;
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
{
dlg
.
Title
=
L
ANG
.
GetMsg
(
LMSG
.
SelectImage
)
+
"-"
+
tb_cardname
.
Text
;
dlg
.
Title
=
L
anguageHelper
.
GetMsg
(
LMSG
.
SelectImage
)
+
"-"
+
tb_cardname
.
Text
;
dlg
.
Filter
=
L
ANG
.
GetMsg
(
LMSG
.
ImageType
);
dlg
.
Filter
=
L
anguageHelper
.
GetMsg
(
LMSG
.
ImageType
);
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
//dlg.FileName;
//dlg.FileName;
...
@@ -1264,13 +1264,13 @@ void Menuitem_convertimageClick(object sender, EventArgs e)
...
@@ -1264,13 +1264,13 @@ void Menuitem_convertimageClick(object sender, EventArgs e)
return
;
return
;
using
(
FolderBrowserDialog
fdlg
=
new
FolderBrowserDialog
())
using
(
FolderBrowserDialog
fdlg
=
new
FolderBrowserDialog
())
{
{
fdlg
.
Description
=
L
ANG
.
GetMsg
(
LMSG
.
SelectImagePath
);
fdlg
.
Description
=
L
anguageHelper
.
GetMsg
(
LMSG
.
SelectImagePath
);
if
(
fdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
fdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
bool
isreplace
=
MyMsg
.
Question
(
LMSG
.
IfReplaceExistingImage
);
bool
isreplace
=
MyMsg
.
Question
(
LMSG
.
IfReplaceExistingImage
);
tasker
.
SetTask
(
MyTask
.
ConvertImages
,
null
,
tasker
.
SetTask
(
MyTask
.
ConvertImages
,
null
,
fdlg
.
SelectedPath
,
ygopath
.
gamepath
,
isreplace
.
ToString
());
fdlg
.
SelectedPath
,
ygopath
.
gamepath
,
isreplace
.
ToString
());
Run
(
L
ANG
.
GetMsg
(
LMSG
.
ConvertImage
));
Run
(
L
anguageHelper
.
GetMsg
(
LMSG
.
ConvertImage
));
}
}
}
}
}
}
...
@@ -1292,7 +1292,7 @@ void Menuitem_exportdataClick(object sender, EventArgs e)
...
@@ -1292,7 +1292,7 @@ void Menuitem_exportdataClick(object sender, EventArgs e)
tasker
.
SetTask
(
MyTask
.
ExportData
,
tasker
.
SetTask
(
MyTask
.
ExportData
,
GetCardList
(
false
),
GetCardList
(
false
),
ygopath
.
gamepath
,
dlg
.
FileName
);
ygopath
.
gamepath
,
dlg
.
FileName
);
Run
(
L
ANG
.
GetMsg
(
LMSG
.
ExportData
));
Run
(
L
anguageHelper
.
GetMsg
(
LMSG
.
ExportData
));
}
}
}
}
...
@@ -1490,15 +1490,15 @@ private void menuitem_readmse_Click(object sender, EventArgs e)
...
@@ -1490,15 +1490,15 @@ private void menuitem_readmse_Click(object sender, EventArgs e)
//select open mse-set
//select open mse-set
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
{
dlg
.
Title
=
L
ANG
.
GetMsg
(
LMSG
.
selectMseset
);
dlg
.
Title
=
L
anguageHelper
.
GetMsg
(
LMSG
.
selectMseset
);
dlg
.
Filter
=
L
ANG
.
GetMsg
(
LMSG
.
MseType
);
dlg
.
Filter
=
L
anguageHelper
.
GetMsg
(
LMSG
.
MseType
);
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
bool
isUpdate
=
false
;
//是否替换存在的图片
bool
isUpdate
=
false
;
//是否替换存在的图片
isUpdate
=
MyMsg
.
Question
(
LMSG
.
IfReplaceExistingImage
);
isUpdate
=
MyMsg
.
Question
(
LMSG
.
IfReplaceExistingImage
);
tasker
.
SetTask
(
MyTask
.
ReadMSE
,
null
,
tasker
.
SetTask
(
MyTask
.
ReadMSE
,
null
,
dlg
.
FileName
,
isUpdate
.
ToString
());
dlg
.
FileName
,
isUpdate
.
ToString
());
Run
(
L
ANG
.
GetMsg
(
LMSG
.
ReadMSE
));
Run
(
L
anguageHelper
.
GetMsg
(
LMSG
.
ReadMSE
));
}
}
}
}
}
}
...
...
DataEditorX/Language/LanguageHelper.cs
View file @
b9be8388
...
@@ -17,18 +17,19 @@ namespace DataEditorX.Language
...
@@ -17,18 +17,19 @@ namespace DataEditorX.Language
/// <summary>
/// <summary>
/// Description of Language.
/// Description of Language.
/// </summary>
/// </summary>
public
static
class
LANG
public
class
LanguageHelper
{
{
static
Dictionary
<
string
,
string
>
mWordsl
ist
=
new
Dictionary
<
string
,
string
>();
static
Dictionary
<
string
,
string
>
gWordsL
ist
=
new
Dictionary
<
string
,
string
>();
static
SortedList
<
LMSG
,
string
>
msgl
ist
=
new
SortedList
<
LMSG
,
string
>();
static
SortedList
<
LMSG
,
string
>
gMsgL
ist
=
new
SortedList
<
LMSG
,
string
>();
const
char
SEP_CONTROL
=
'.'
;
const
char
SEP_CONTROL
=
'.'
;
const
char
SEP_LINE
=
'\t'
;
const
char
SEP_LINE
=
'\t'
;
Dictionary
<
string
,
string
>
mWordslist
=
new
Dictionary
<
string
,
string
>();
#
region
获取消息文字
#
region
获取消息文字
public
static
string
GetMsg
(
LMSG
lMsg
)
public
static
string
GetMsg
(
LMSG
lMsg
)
{
{
if
(
msgl
ist
.
IndexOfKey
(
lMsg
)
>=
0
)
if
(
gMsgL
ist
.
IndexOfKey
(
lMsg
)
>=
0
)
return
msgl
ist
[
lMsg
];
return
gMsgL
ist
[
lMsg
];
else
else
return
lMsg
.
ToString
().
Replace
(
"_"
,
" "
);
return
lMsg
.
ToString
().
Replace
(
"_"
,
" "
);
}
}
...
@@ -53,7 +54,7 @@ public static void SetFormLabel(Form fm)
...
@@ -53,7 +54,7 @@ public static void SetFormLabel(Form fm)
static
bool
GetLabel
(
string
key
,
out
string
title
)
static
bool
GetLabel
(
string
key
,
out
string
title
)
{
{
string
v
;
string
v
;
if
(
mWordsl
ist
.
TryGetValue
(
key
,
out
v
))
if
(
gWordsL
ist
.
TryGetValue
(
key
,
out
v
))
{
{
title
=
v
;
title
=
v
;
return
true
;
return
true
;
...
@@ -138,7 +139,7 @@ static void SetMenuItem(string pName, ToolStripItem tsi)
...
@@ -138,7 +139,7 @@ static void SetMenuItem(string pName, ToolStripItem tsi)
#
endregion
#
endregion
#
region
获取控件信息
#
region
获取控件信息
public
static
void
GetFormLabel
(
Form
fm
)
public
void
GetFormLabel
(
Form
fm
)
{
{
if
(
fm
==
null
)
if
(
fm
==
null
)
return
;
return
;
...
@@ -149,13 +150,13 @@ public static void GetFormLabel(Form fm)
...
@@ -149,13 +150,13 @@ public static void GetFormLabel(Form fm)
//fm.PerformLayout();
//fm.PerformLayout();
}
}
static
void
AddLabel
(
string
key
,
string
title
)
void
AddLabel
(
string
key
,
string
title
)
{
{
if
(!
mWordslist
.
ContainsKey
(
key
))
if
(!
mWordslist
.
ContainsKey
(
key
))
mWordslist
.
Add
(
key
,
title
);
mWordslist
.
Add
(
key
,
title
);
}
}
static
void
GetControlLabel
(
Control
c
,
string
pName
,
void
GetControlLabel
(
Control
c
,
string
pName
,
string
formName
)
string
formName
)
{
{
if
(!
string
.
IsNullOrEmpty
(
pName
))
if
(!
string
.
IsNullOrEmpty
(
pName
))
...
@@ -203,7 +204,7 @@ static void AddLabel(string key, string title)
...
@@ -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
))
if
(
string
.
IsNullOrEmpty
(
tsi
.
Name
))
return
;
return
;
...
@@ -229,7 +230,7 @@ static void GetMenuItem(string pName, ToolStripItem tsi)
...
@@ -229,7 +230,7 @@ static void GetMenuItem(string pName, ToolStripItem tsi)
#
endregion
#
endregion
#
region
保存语言文件
#
region
保存语言文件
public
static
bool
SaveLanguage
(
string
conf
)
public
bool
SaveLanguage
(
string
conf
)
{
{
using
(
FileStream
fs
=
new
FileStream
(
conf
,
FileMode
.
Create
,
FileAccess
.
Write
))
using
(
FileStream
fs
=
new
FileStream
(
conf
,
FileMode
.
Create
,
FileAccess
.
Write
))
{
{
...
@@ -239,14 +240,14 @@ public static bool SaveLanguage(string conf)
...
@@ -239,14 +240,14 @@ public static bool SaveLanguage(string conf)
sw
.
WriteLine
(
k
+
SEP_LINE
+
mWordslist
[
k
]);
sw
.
WriteLine
(
k
+
SEP_LINE
+
mWordslist
[
k
]);
}
}
sw
.
WriteLine
(
"#"
);
sw
.
WriteLine
(
"#"
);
foreach
(
LMSG
k
in
msgl
ist
.
Keys
)
foreach
(
LMSG
k
in
gMsgL
ist
.
Keys
)
{
{
//记得替换换行符
//记得替换换行符
sw
.
WriteLine
(
"0x"
+
((
uint
)
k
).
ToString
(
"x"
)
+
SEP_LINE
+
msgl
ist
[
k
].
Replace
(
"\n"
,
"\\n"
));
sw
.
WriteLine
(
"0x"
+
((
uint
)
k
).
ToString
(
"x"
)
+
SEP_LINE
+
gMsgL
ist
[
k
].
Replace
(
"\n"
,
"\\n"
));
}
}
foreach
(
LMSG
k
in
Enum
.
GetValues
(
typeof
(
LMSG
)))
foreach
(
LMSG
k
in
Enum
.
GetValues
(
typeof
(
LMSG
)))
{
{
if
(!
msgl
ist
.
ContainsKey
(
k
))
if
(!
gMsgL
ist
.
ContainsKey
(
k
))
sw
.
WriteLine
(
"0x"
+
((
uint
)
k
).
ToString
(
"x"
)
+
SEP_LINE
+
k
.
ToString
());
sw
.
WriteLine
(
"0x"
+
((
uint
)
k
).
ToString
(
"x"
)
+
SEP_LINE
+
k
.
ToString
());
}
}
sw
.
Close
();
sw
.
Close
();
...
@@ -261,8 +262,8 @@ public static void LoadFormLabels(string f)
...
@@ -261,8 +262,8 @@ public static void LoadFormLabels(string f)
{
{
if
(!
File
.
Exists
(
f
))
if
(!
File
.
Exists
(
f
))
return
;
return
;
mWordsl
ist
.
Clear
();
gWordsL
ist
.
Clear
();
msgl
ist
.
Clear
();
gMsgL
ist
.
Clear
();
using
(
FileStream
fs
=
new
FileStream
(
f
,
FileMode
.
Open
,
FileAccess
.
Read
))
using
(
FileStream
fs
=
new
FileStream
(
f
,
FileMode
.
Open
,
FileAccess
.
Read
))
{
{
StreamReader
sr
=
new
StreamReader
(
fs
,
Encoding
.
UTF8
);
StreamReader
sr
=
new
StreamReader
(
fs
,
Encoding
.
UTF8
);
...
@@ -280,13 +281,13 @@ public static void LoadFormLabels(string f)
...
@@ -280,13 +281,13 @@ public static void LoadFormLabels(string f)
{
{
uint
.
TryParse
(
words
[
0
].
Replace
(
"0x"
,
""
),
NumberStyles
.
HexNumber
,
null
,
out
utemp
);
uint
.
TryParse
(
words
[
0
].
Replace
(
"0x"
,
""
),
NumberStyles
.
HexNumber
,
null
,
out
utemp
);
ltemp
=
(
LMSG
)
utemp
;
ltemp
=
(
LMSG
)
utemp
;
if
(
msgl
ist
.
IndexOfKey
(
ltemp
)
<
0
)
//记得替换换行符
if
(
gMsgL
ist
.
IndexOfKey
(
ltemp
)
<
0
)
//记得替换换行符
msgl
ist
.
Add
(
ltemp
,
words
[
1
].
Replace
(
"\\n"
,
"\n"
));
gMsgL
ist
.
Add
(
ltemp
,
words
[
1
].
Replace
(
"\\n"
,
"\n"
));
}
}
else
if
(!
line
.
StartsWith
(
"#"
))
//加载界面语言
else
if
(!
line
.
StartsWith
(
"#"
))
//加载界面语言
{
{
if
(!
mWordsl
ist
.
ContainsKey
(
words
[
0
]))
if
(!
gWordsL
ist
.
ContainsKey
(
words
[
0
]))
mWordsl
ist
.
Add
(
words
[
0
],
words
[
1
]);
gWordsL
ist
.
Add
(
words
[
0
],
words
[
1
]);
}
}
}
}
sr
.
Close
();
sr
.
Close
();
...
...
DataEditorX/Language/MyMsg.cs
View file @
b9be8388
...
@@ -22,10 +22,10 @@ public static class MyMsg
...
@@ -22,10 +22,10 @@ public static class MyMsg
static
string
info
,
warning
,
error
,
question
;
static
string
info
,
warning
,
error
,
question
;
static
MyMsg
()
static
MyMsg
()
{
{
info
=
L
ANG
.
GetMsg
(
LMSG
.
titleInfo
);
info
=
L
anguageHelper
.
GetMsg
(
LMSG
.
titleInfo
);
warning
=
L
ANG
.
GetMsg
(
LMSG
.
titleWarning
);
warning
=
L
anguageHelper
.
GetMsg
(
LMSG
.
titleWarning
);
error
=
L
ANG
.
GetMsg
(
LMSG
.
titleError
);
error
=
L
anguageHelper
.
GetMsg
(
LMSG
.
titleError
);
question
=
L
ANG
.
GetMsg
(
LMSG
.
titleQuestion
);
question
=
L
anguageHelper
.
GetMsg
(
LMSG
.
titleQuestion
);
}
}
public
static
void
Show
(
string
strMsg
)
public
static
void
Show
(
string
strMsg
)
{
{
...
@@ -53,22 +53,22 @@ public static bool Question(string strQues)
...
@@ -53,22 +53,22 @@ public static bool Question(string strQues)
}
}
public
static
void
Show
(
LMSG
msg
)
public
static
void
Show
(
LMSG
msg
)
{
{
MessageBox
.
Show
(
L
ANG
.
GetMsg
(
msg
),
info
,
MessageBox
.
Show
(
L
anguageHelper
.
GetMsg
(
msg
),
info
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Information
);
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Information
);
}
}
public
static
void
Warning
(
LMSG
msg
)
public
static
void
Warning
(
LMSG
msg
)
{
{
MessageBox
.
Show
(
L
ANG
.
GetMsg
(
msg
),
warning
,
MessageBox
.
Show
(
L
anguageHelper
.
GetMsg
(
msg
),
warning
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Warning
);
}
}
public
static
void
Error
(
LMSG
msg
)
public
static
void
Error
(
LMSG
msg
)
{
{
MessageBox
.
Show
(
L
ANG
.
GetMsg
(
msg
),
error
,
MessageBox
.
Show
(
L
anguageHelper
.
GetMsg
(
msg
),
error
,
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
);
MessageBoxButtons
.
OK
,
MessageBoxIcon
.
Error
);
}
}
public
static
bool
Question
(
LMSG
msg
)
public
static
bool
Question
(
LMSG
msg
)
{
{
if
(
MessageBox
.
Show
(
L
ANG
.
GetMsg
(
msg
),
question
,
if
(
MessageBox
.
Show
(
L
anguageHelper
.
GetMsg
(
msg
),
question
,
MessageBoxButtons
.
OKCancel
,
MessageBoxButtons
.
OKCancel
,
MessageBoxIcon
.
Question
)==
DialogResult
.
OK
)
MessageBoxIcon
.
Question
)==
DialogResult
.
OK
)
return
true
;
return
true
;
...
...
DataEditorX/MainForm.Designer.cs
View file @
b9be8388
...
@@ -343,8 +343,7 @@ private void InitializeComponent()
...
@@ -343,8 +343,7 @@ private void InitializeComponent()
this
.
Name
=
"MainForm"
;
this
.
Name
=
"MainForm"
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
StartPosition
=
System
.
Windows
.
Forms
.
FormStartPosition
.
CenterScreen
;
this
.
Text
=
"MainForm"
;
this
.
Text
=
"MainForm"
;
this
.
FormClosing
+=
new
System
.
Windows
.
Forms
.
FormClosingEventHandler
(
this
.
MainFormFormClosing
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
MainForm_Load
);
this
.
Load
+=
new
System
.
EventHandler
(
this
.
MainFormLoad
);
this
.
mainMenu
.
ResumeLayout
(
false
);
this
.
mainMenu
.
ResumeLayout
(
false
);
this
.
mainMenu
.
PerformLayout
();
this
.
mainMenu
.
PerformLayout
();
this
.
ResumeLayout
(
false
);
this
.
ResumeLayout
(
false
);
...
...
DataEditorX/MainForm.cs
View file @
b9be8388
...
@@ -42,10 +42,6 @@ public partial class MainForm : Form, IMainForm
...
@@ -42,10 +42,6 @@ public partial class MainForm : Form, IMainForm
#
region
设置界面,消息语言
#
region
设置界面,消息语言
public
MainForm
()
public
MainForm
()
{
{
//检查更新
Thread
th
=
new
Thread
(
CheckUpdate
);
th
.
IsBackground
=
true
;
//如果exe结束,则线程终止
th
.
Start
();
//初始化控件
//初始化控件
InitializeComponent
();
InitializeComponent
();
}
}
...
@@ -103,11 +99,11 @@ void Init()
...
@@ -103,11 +99,11 @@ void Init()
//读取历史记录
//读取历史记录
history
.
ReadHistory
(
MyPath
.
Combine
(
datapath
,
MyConfig
.
FILE_HISTORY
));
history
.
ReadHistory
(
MyPath
.
Combine
(
datapath
,
MyConfig
.
FILE_HISTORY
));
//加载多语言
//加载多语言
L
ANG
.
LoadFormLabels
(
conflang
);
L
anguageHelper
.
LoadFormLabels
(
conflang
);
}
}
void
InitForm
()
void
InitForm
()
{
{
L
ANG
.
SetFormLabel
(
this
);
L
anguageHelper
.
SetFormLabel
(
this
);
//设置所有窗口的语言
//设置所有窗口的语言
DockContentCollection
contents
=
dockPanel1
.
Contents
;
DockContentCollection
contents
=
dockPanel1
.
Contents
;
...
@@ -115,7 +111,7 @@ void InitForm()
...
@@ -115,7 +111,7 @@ void InitForm()
{
{
if
(
dc
is
Form
)
if
(
dc
is
Form
)
{
{
L
ANG
.
SetFormLabel
((
Form
)
dc
);
L
anguageHelper
.
SetFormLabel
((
Form
)
dc
);
}
}
}
}
//添加历史菜单
//添加历史菜单
...
@@ -182,7 +178,7 @@ void OpenScript(string file)
...
@@ -182,7 +178,7 @@ void OpenScript(string file)
{
{
CodeEditForm
cf
=
new
CodeEditForm
();
CodeEditForm
cf
=
new
CodeEditForm
();
//设置界面语言
//设置界面语言
L
ANG
.
SetFormLabel
(
cf
);
L
anguageHelper
.
SetFormLabel
(
cf
);
//设置cdb列表
//设置cdb列表
cf
.
SetCDBList
(
history
.
GetcdbHistory
());
cf
.
SetCDBList
(
history
.
GetcdbHistory
());
//初始化函数提示
//初始化函数提示
...
@@ -200,7 +196,7 @@ void OpenDataBase(string file)
...
@@ -200,7 +196,7 @@ void OpenDataBase(string file)
else
else
def
=
new
DataEditForm
(
datapath
,
file
);
def
=
new
DataEditForm
(
datapath
,
file
);
//设置语言
//设置语言
L
ANG
.
SetFormLabel
(
def
);
L
anguageHelper
.
SetFormLabel
(
def
);
//初始化界面数据
//初始化界面数据
def
.
InitControl
(
datacfg
);
def
.
InitControl
(
datacfg
);
def
.
Show
(
dockPanel1
,
DockState
.
Document
);
def
.
Show
(
dockPanel1
,
DockState
.
Document
);
...
@@ -257,28 +253,6 @@ bool FindEditForm(string file, bool isOpen)
...
@@ -257,28 +253,6 @@ bool FindEditForm(string file, bool isOpen)
}
}
#
endregion
#
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
窗口管理
#
region
窗口管理
//关闭当前
//关闭当前
void
CloseToolStripMenuItemClick
(
object
sender
,
EventArgs
e
)
void
CloseToolStripMenuItemClick
(
object
sender
,
EventArgs
e
)
...
@@ -342,11 +316,11 @@ void Menuitem_openClick(object sender, EventArgs e)
...
@@ -342,11 +316,11 @@ void Menuitem_openClick(object sender, EventArgs e)
{
{
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
{
dlg
.
Title
=
L
ANG
.
GetMsg
(
LMSG
.
OpenFile
);
dlg
.
Title
=
L
anguageHelper
.
GetMsg
(
LMSG
.
OpenFile
);
if
(
GetActive
()
!=
null
||
dockPanel1
.
Contents
.
Count
==
0
)
//判断当前窗口是不是DataEditor
if
(
GetActive
()
!=
null
||
dockPanel1
.
Contents
.
Count
==
0
)
//判断当前窗口是不是DataEditor
dlg
.
Filter
=
L
ANG
.
GetMsg
(
LMSG
.
CdbType
);
dlg
.
Filter
=
L
anguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
else
else
dlg
.
Filter
=
L
ANG
.
GetMsg
(
LMSG
.
ScriptFilter
);
dlg
.
Filter
=
L
anguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
string
file
=
dlg
.
FileName
;
string
file
=
dlg
.
FileName
;
...
@@ -365,11 +339,11 @@ void Menuitem_newClick(object sender, EventArgs e)
...
@@ -365,11 +339,11 @@ void Menuitem_newClick(object sender, EventArgs e)
{
{
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
{
dlg
.
Title
=
L
ANG
.
GetMsg
(
LMSG
.
NewFile
);
dlg
.
Title
=
L
anguageHelper
.
GetMsg
(
LMSG
.
NewFile
);
if
(
GetActive
()
!=
null
)
//判断当前窗口是不是DataEditor
if
(
GetActive
()
!=
null
)
//判断当前窗口是不是DataEditor
dlg
.
Filter
=
L
ANG
.
GetMsg
(
LMSG
.
CdbType
);
dlg
.
Filter
=
L
anguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
else
else
dlg
.
Filter
=
L
ANG
.
GetMsg
(
LMSG
.
ScriptFilter
);
dlg
.
Filter
=
L
anguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
string
file
=
dlg
.
FileName
;
string
file
=
dlg
.
FileName
;
...
@@ -513,5 +487,13 @@ private void bgWorker1_RunWorkerCompleted(object sender, System.ComponentModel.R
...
@@ -513,5 +487,13 @@ private void bgWorker1_RunWorkerCompleted(object sender, System.ComponentModel.R
InitForm
();
InitForm
();
}
}
#
endregion
#
endregion
private
void
MainForm_Load
(
object
sender
,
EventArgs
e
)
{
//检查更新
Thread
th
=
new
Thread
(
CheckUpdate
);
th
.
IsBackground
=
true
;
//如果exe结束,则线程终止
th
.
Start
();
}
}
}
}
}
DataEditorX/Program.cs
View file @
b9be8388
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
using
System.Reflection
;
using
System.Reflection
;
using
System.Windows.Forms
;
using
System.Windows.Forms
;
using
DataEditorX.Config
;
using
DataEditorX.Config
;
using
DataEditorX.Language
;
namespace
DataEditorX
namespace
DataEditorX
{
{
...
@@ -20,8 +21,15 @@ internal sealed class Program
...
@@ -20,8 +21,15 @@ internal sealed class Program
[
STAThread
]
[
STAThread
]
private
static
void
Main
(
string
[]
args
)
private
static
void
Main
(
string
[]
args
)
{
{
string
file
=
(
args
.
Length
>
0
)
?
args
[
0
]
:
""
;
string
arg
=
(
args
.
Length
>
0
)
?
args
[
0
]
:
""
;
if
(
MyConfig
.
OpenOnExistForm
(
file
))
//在已经存在的窗口打开文件
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
);
Environment
.
Exit
(
1
);
else
//新建窗口
else
//新建窗口
{
{
...
@@ -29,13 +37,32 @@ private static void Main(string[] args)
...
@@ -29,13 +37,32 @@ private static void Main(string[] args)
Application
.
SetCompatibleTextRenderingDefault
(
false
);
Application
.
SetCompatibleTextRenderingDefault
(
false
);
MainForm
mainForm
=
new
MainForm
();
MainForm
mainForm
=
new
MainForm
();
//设置将要打开的文件
//设置将要打开的文件
mainForm
.
setOpenFile
(
file
);
mainForm
.
setOpenFile
(
arg
);
//数据目录
//数据目录
mainForm
.
SetDataPath
(
MyPath
.
Combine
(
Application
.
StartupPath
,
MyConfig
.
TAG_DATA
));
mainForm
.
SetDataPath
(
MyPath
.
Combine
(
Application
.
StartupPath
,
MyConfig
.
TAG_DATA
));
Application
.
Run
(
mainForm
);
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"
);
}
}
}
}
}
win32/DataEditorX.exe
View file @
b9be8388
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment