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
6874592a
Commit
6874592a
authored
Jul 17, 2020
by
JoyJ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
try to fix linux openfiledialog filter bug
parent
2d7bbbb9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
88 additions
and
18 deletions
+88
-18
DataEditorX/CodeEditForm.cs
DataEditorX/CodeEditForm.cs
+10
-2
DataEditorX/DataEditForm.cs
DataEditorX/DataEditForm.cs
+55
-11
DataEditorX/MainForm.cs
DataEditorX/MainForm.cs
+20
-4
DataEditorX/data/language_chinese.txt
DataEditorX/data/language_chinese.txt
+1
-0
DataEditorX/data/language_english.txt
DataEditorX/data/language_english.txt
+2
-1
No files found.
DataEditorX/CodeEditForm.cs
View file @
6874592a
...
...
@@ -354,7 +354,11 @@ bool savefile(bool saveas)
{
using
(
SaveFileDialog
sfdlg
=
new
SaveFileDialog
())
{
sfdlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
try
{
sfdlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
}
catch
{
}
if
(
sfdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
this
.
nowFile
=
sfdlg
.
FileName
;
...
...
@@ -446,7 +450,11 @@ void Menuitem_openClick(object sender, EventArgs e)
{
using
(
OpenFileDialog
sfdlg
=
new
OpenFileDialog
())
{
sfdlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
try
{
sfdlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
}
catch
{
}
if
(
sfdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
this
.
nowFile
=
sfdlg
.
FileName
;
...
...
DataEditorX/DataEditForm.cs
View file @
6874592a
...
...
@@ -1129,7 +1129,11 @@ void Menuitem_openClick(object sender, EventArgs e)
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
this
.
Open
(
dlg
.
FileName
);
...
...
@@ -1142,7 +1146,11 @@ void Menuitem_newClick(object sender, EventArgs e)
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
if
(
DataBase
.
Create
(
dlg
.
FileName
))
...
...
@@ -1166,7 +1174,11 @@ void Menuitem_readydkClick(object sender, EventArgs e)
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectYdkPath
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ydkType
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ydkType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
this
.
tmpCodes
.
Clear
();
...
...
@@ -1379,7 +1391,11 @@ void CopyTo(Card[] cards)
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
filename
=
dlg
.
FileName
;
...
...
@@ -1446,7 +1462,11 @@ void SaveAsMSE(bool onlyselect)
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
selectMseset
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
MseType
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
MseType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
bool
isUpdate
=
false
;
...
...
@@ -1473,7 +1493,11 @@ void ImportImageFromSelect()
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectImage
)
+
"-"
+
this
.
tb_cardname
.
Text
;
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ImageType
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ImageType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
//dlg.FileName;
...
...
@@ -1605,7 +1629,11 @@ void Menuitem_exportdataClick(object sender, EventArgs e)
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
dlg
.
InitialDirectory
=
this
.
ygopath
.
gamepath
;
dlg
.
Filter
=
"Zip|(*.zip|All Files(*.*)|*.*"
;
try
{
dlg
.
Filter
=
"Zip|(*.zip|All Files(*.*)|*.*"
;
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
this
.
tasker
.
SetTask
(
MyTask
.
ExportData
,
...
...
@@ -1855,7 +1883,11 @@ private void menuitem_readmse_Click(object sender, EventArgs e)
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
selectMseset
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
MseType
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
MseType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
bool
isUpdate
=
MyMsg
.
Question
(
LMSG
.
IfReplaceExistingImage
);
...
...
@@ -1988,7 +2020,11 @@ void Menuitem_exportMSEimageClick(object sender, EventArgs e)
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
selectMseset
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
MseType
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
MseType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
string
mseset
=
dlg
.
FileName
;
...
...
@@ -2045,7 +2081,11 @@ void Menuitem_autoreturnClick(object sender, EventArgs e)
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
Card
[]
cards
=
DataBase
.
Read
(
this
.
nowCdbFile
,
true
,
""
);
...
...
@@ -2083,7 +2123,11 @@ void Menuitem_replaceClick(object sender, EventArgs e)
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
Card
[]
cards
=
DataBase
.
Read
(
this
.
nowCdbFile
,
true
,
""
);
...
...
DataEditorX/MainForm.cs
View file @
6874592a
...
...
@@ -345,11 +345,19 @@ void Menuitem_openClick(object sender, EventArgs e)
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
OpenFile
);
if
(
this
.
GetActive
()
!=
null
||
this
.
dockPanel
.
Contents
.
Count
==
0
)
//判断当前窗口是不是DataEditor
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
catch
{
}
}
else
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
}
catch
{
}
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
...
...
@@ -373,11 +381,19 @@ void Menuitem_newClick(object sender, EventArgs e)
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
NewFile
);
if
(
this
.
GetActive
()
!=
null
)
//判断当前窗口是不是DataEditor
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
catch
{
}
}
else
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
}
catch
{
}
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
...
...
DataEditorX/data/language_chinese.txt
View file @
6874592a
...
...
@@ -173,3 +173,4 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x4b 从MSE存档导出图片失败。
0x4c 测试完成,没有发现语法错误。
0x4d 一次性打开大量文件将导致卡顿,是否继续?
0x4e 下载完成,即将重新启动程序以完成更新。
\ No newline at end of file
DataEditorX/data/language_english.txt
View file @
6874592a
...
...
@@ -168,4 +168,5 @@ MainForm.mainMenu.menuitem_closeall Close All
0x4a Successfully exported MSE-set to images.
0x4b Failed to export MSE-set to images fail.
0x4c No syntax error found.
0x4d It is not recommended to open lots of file at a time. Continue?
\ No newline at end of file
0x4d It is not recommended to open lots of file at a time. Continue?
0x4e Download completed; the application will be restarted.
\ No newline at end of file
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