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
Show 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
...
@@ -353,8 +353,12 @@ bool savefile(bool saveas)
...
@@ -353,8 +353,12 @@ bool savefile(bool saveas)
if
(
saveas
)
if
(
saveas
)
{
{
using
(
SaveFileDialog
sfdlg
=
new
SaveFileDialog
())
using
(
SaveFileDialog
sfdlg
=
new
SaveFileDialog
())
{
try
{
{
sfdlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
sfdlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
}
catch
{
}
if
(
sfdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
sfdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
this
.
nowFile
=
sfdlg
.
FileName
;
this
.
nowFile
=
sfdlg
.
FileName
;
...
@@ -445,8 +449,12 @@ void AboutToolStripMenuItemClick(object sender, EventArgs e)
...
@@ -445,8 +449,12 @@ void AboutToolStripMenuItemClick(object sender, EventArgs e)
void
Menuitem_openClick
(
object
sender
,
EventArgs
e
)
void
Menuitem_openClick
(
object
sender
,
EventArgs
e
)
{
{
using
(
OpenFileDialog
sfdlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
sfdlg
=
new
OpenFileDialog
())
{
try
{
{
sfdlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
sfdlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
}
catch
{
}
if
(
sfdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
sfdlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
this
.
nowFile
=
sfdlg
.
FileName
;
this
.
nowFile
=
sfdlg
.
FileName
;
...
...
DataEditorX/DataEditForm.cs
View file @
6874592a
...
@@ -1129,7 +1129,11 @@ void Menuitem_openClick(object sender, EventArgs e)
...
@@ -1129,7 +1129,11 @@ void Menuitem_openClick(object sender, EventArgs e)
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
this
.
Open
(
dlg
.
FileName
);
this
.
Open
(
dlg
.
FileName
);
...
@@ -1142,7 +1146,11 @@ void Menuitem_newClick(object sender, EventArgs e)
...
@@ -1142,7 +1146,11 @@ void Menuitem_newClick(object sender, EventArgs e)
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
if
(
DataBase
.
Create
(
dlg
.
FileName
))
if
(
DataBase
.
Create
(
dlg
.
FileName
))
...
@@ -1166,7 +1174,11 @@ void Menuitem_readydkClick(object sender, EventArgs e)
...
@@ -1166,7 +1174,11 @@ void Menuitem_readydkClick(object sender, EventArgs e)
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectYdkPath
);
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectYdkPath
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ydkType
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ydkType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
this
.
tmpCodes
.
Clear
();
this
.
tmpCodes
.
Clear
();
...
@@ -1379,7 +1391,11 @@ void CopyTo(Card[] cards)
...
@@ -1379,7 +1391,11 @@ void CopyTo(Card[] cards)
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
filename
=
dlg
.
FileName
;
filename
=
dlg
.
FileName
;
...
@@ -1446,7 +1462,11 @@ void SaveAsMSE(bool onlyselect)
...
@@ -1446,7 +1462,11 @@ void SaveAsMSE(bool onlyselect)
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
selectMseset
);
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
selectMseset
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
MseType
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
MseType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
bool
isUpdate
=
false
;
bool
isUpdate
=
false
;
...
@@ -1473,7 +1493,11 @@ void ImportImageFromSelect()
...
@@ -1473,7 +1493,11 @@ void ImportImageFromSelect()
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectImage
)
+
"-"
+
this
.
tb_cardname
.
Text
;
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectImage
)
+
"-"
+
this
.
tb_cardname
.
Text
;
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ImageType
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ImageType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
//dlg.FileName;
//dlg.FileName;
...
@@ -1605,7 +1629,11 @@ void Menuitem_exportdataClick(object sender, EventArgs e)
...
@@ -1605,7 +1629,11 @@ void Menuitem_exportdataClick(object sender, EventArgs e)
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
{
dlg
.
InitialDirectory
=
this
.
ygopath
.
gamepath
;
dlg
.
InitialDirectory
=
this
.
ygopath
.
gamepath
;
try
{
dlg
.
Filter
=
"Zip|(*.zip|All Files(*.*)|*.*"
;
dlg
.
Filter
=
"Zip|(*.zip|All Files(*.*)|*.*"
;
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
this
.
tasker
.
SetTask
(
MyTask
.
ExportData
,
this
.
tasker
.
SetTask
(
MyTask
.
ExportData
,
...
@@ -1855,7 +1883,11 @@ private void menuitem_readmse_Click(object sender, EventArgs e)
...
@@ -1855,7 +1883,11 @@ private void menuitem_readmse_Click(object sender, EventArgs e)
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
selectMseset
);
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
selectMseset
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
MseType
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
MseType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
bool
isUpdate
=
MyMsg
.
Question
(
LMSG
.
IfReplaceExistingImage
);
bool
isUpdate
=
MyMsg
.
Question
(
LMSG
.
IfReplaceExistingImage
);
...
@@ -1988,7 +2020,11 @@ void Menuitem_exportMSEimageClick(object sender, EventArgs e)
...
@@ -1988,7 +2020,11 @@ void Menuitem_exportMSEimageClick(object sender, EventArgs e)
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
selectMseset
);
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
selectMseset
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
MseType
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
MseType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
string
mseset
=
dlg
.
FileName
;
string
mseset
=
dlg
.
FileName
;
...
@@ -2045,7 +2081,11 @@ void Menuitem_autoreturnClick(object sender, EventArgs e)
...
@@ -2045,7 +2081,11 @@ void Menuitem_autoreturnClick(object sender, EventArgs e)
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
Card
[]
cards
=
DataBase
.
Read
(
this
.
nowCdbFile
,
true
,
""
);
Card
[]
cards
=
DataBase
.
Read
(
this
.
nowCdbFile
,
true
,
""
);
...
@@ -2083,7 +2123,11 @@ void Menuitem_replaceClick(object sender, EventArgs e)
...
@@ -2083,7 +2123,11 @@ void Menuitem_replaceClick(object sender, EventArgs e)
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
SelectDataBasePath
);
try
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
catch
{
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
Card
[]
cards
=
DataBase
.
Read
(
this
.
nowCdbFile
,
true
,
""
);
Card
[]
cards
=
DataBase
.
Read
(
this
.
nowCdbFile
,
true
,
""
);
...
...
DataEditorX/MainForm.cs
View file @
6874592a
...
@@ -344,13 +344,21 @@ void Menuitem_openClick(object sender, EventArgs e)
...
@@ -344,13 +344,21 @@ void Menuitem_openClick(object sender, EventArgs e)
{
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
OpenFile
);
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
OpenFile
);
if
(
this
.
GetActive
()
!=
null
||
this
.
dockPanel
.
Contents
.
Count
==
0
)
//判断当前窗口是不是DataEditor
if
(
this
.
GetActive
()
!=
null
||
this
.
dockPanel
.
Contents
.
Count
==
0
)
//判断当前窗口是不是DataEditor
{
try
{
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
}
catch
{
}
}
else
else
{
try
{
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
}
}
catch
{
}
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
...
@@ -372,13 +380,21 @@ void Menuitem_newClick(object sender, EventArgs e)
...
@@ -372,13 +380,21 @@ void Menuitem_newClick(object sender, EventArgs e)
{
{
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
NewFile
);
dlg
.
Title
=
LanguageHelper
.
GetMsg
(
LMSG
.
NewFile
);
if
(
this
.
GetActive
()
!=
null
)
//判断当前窗口是不是DataEditor
if
(
this
.
GetActive
()
!=
null
)
//判断当前窗口是不是DataEditor
{
try
{
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
CdbType
);
}
}
catch
{
}
}
else
else
{
try
{
{
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
dlg
.
Filter
=
LanguageHelper
.
GetMsg
(
LMSG
.
ScriptFilter
);
}
}
catch
{
}
}
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
if
(
dlg
.
ShowDialog
()
==
DialogResult
.
OK
)
{
{
...
...
DataEditorX/data/language_chinese.txt
View file @
6874592a
...
@@ -173,3 +173,4 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
...
@@ -173,3 +173,4 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x4b 从MSE存档导出图片失败。
0x4b 从MSE存档导出图片失败。
0x4c 测试完成,没有发现语法错误。
0x4c 测试完成,没有发现语法错误。
0x4d 一次性打开大量文件将导致卡顿,是否继续?
0x4d 一次性打开大量文件将导致卡顿,是否继续?
0x4e 下载完成,即将重新启动程序以完成更新。
\ No newline at end of file
DataEditorX/data/language_english.txt
View file @
6874592a
...
@@ -169,3 +169,4 @@ MainForm.mainMenu.menuitem_closeall Close All
...
@@ -169,3 +169,4 @@ MainForm.mainMenu.menuitem_closeall Close All
0x4b Failed to export MSE-set to images fail.
0x4b Failed to export MSE-set to images fail.
0x4c No syntax error found.
0x4c No syntax error found.
0x4d It is not recommended to open lots of file at a time. Continue?
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