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
1
Issues
1
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
nanahira
DataEditorX
Commits
e334cd54
Commit
e334cd54
authored
May 20, 2014
by
247321453
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add
parent
a0d4736a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
118 additions
and
41 deletions
+118
-41
DataEditorX/DataEditForm.Designer.cs
DataEditorX/DataEditForm.Designer.cs
+19
-9
DataEditorX/DataEditForm.cs
DataEditorX/DataEditForm.cs
+65
-23
DataEditorX/DataEditorX.csproj
DataEditorX/DataEditorX.csproj
+1
-0
DataEditorX/MyMsg.cs
DataEditorX/MyMsg.cs
+15
-6
DataEditorX/readme.txt
DataEditorX/readme.txt
+17
-3
DataEditorX/update.txt
DataEditorX/update.txt
+1
-0
No files found.
DataEditorX/DataEditForm.Designer.cs
View file @
e334cd54
...
...
@@ -99,6 +99,7 @@ private void InitializeComponent()
this
.
label9
=
new
System
.
Windows
.
Forms
.
Label
();
this
.
pl_cardtype
=
new
System
.
Windows
.
Forms
.
DFlowLayoutPanel
();
this
.
pl_category
=
new
System
.
Windows
.
Forms
.
DFlowLayoutPanel
();
this
.
menuitem_copyselectto
=
new
System
.
Windows
.
Forms
.
ToolStripMenuItem
();
this
.
menuStrip1
.
SuspendLayout
();
this
.
SuspendLayout
();
//
...
...
@@ -119,6 +120,7 @@ private void InitializeComponent()
this
.
menuitem_file
.
DropDownItems
.
AddRange
(
new
System
.
Windows
.
Forms
.
ToolStripItem
[]
{
this
.
menuitem_open
,
this
.
menuitem_new
,
this
.
menuitem_copyselectto
,
this
.
menuitem_copyto
,
this
.
tsep1
,
this
.
menuitem_readydk
,
...
...
@@ -133,7 +135,7 @@ private void InitializeComponent()
//
this
.
menuitem_open
.
Name
=
"menuitem_open"
;
this
.
menuitem_open
.
ShortcutKeys
=
((
System
.
Windows
.
Forms
.
Keys
)((
System
.
Windows
.
Forms
.
Keys
.
Control
|
System
.
Windows
.
Forms
.
Keys
.
O
)));
this
.
menuitem_open
.
Size
=
new
System
.
Drawing
.
Size
(
16
5
,
22
);
this
.
menuitem_open
.
Size
=
new
System
.
Drawing
.
Size
(
16
9
,
22
);
this
.
menuitem_open
.
Text
=
"打开(&O)"
;
this
.
menuitem_open
.
Click
+=
new
System
.
EventHandler
(
this
.
Menuitem_openClick
);
//
...
...
@@ -141,45 +143,45 @@ private void InitializeComponent()
//
this
.
menuitem_new
.
Name
=
"menuitem_new"
;
this
.
menuitem_new
.
ShortcutKeys
=
((
System
.
Windows
.
Forms
.
Keys
)((
System
.
Windows
.
Forms
.
Keys
.
Control
|
System
.
Windows
.
Forms
.
Keys
.
N
)));
this
.
menuitem_new
.
Size
=
new
System
.
Drawing
.
Size
(
16
5
,
22
);
this
.
menuitem_new
.
Size
=
new
System
.
Drawing
.
Size
(
16
9
,
22
);
this
.
menuitem_new
.
Text
=
"新建(&N)"
;
this
.
menuitem_new
.
Click
+=
new
System
.
EventHandler
(
this
.
Menuitem_newClick
);
//
// menuitem_copyto
//
this
.
menuitem_copyto
.
Name
=
"menuitem_copyto"
;
this
.
menuitem_copyto
.
Size
=
new
System
.
Drawing
.
Size
(
16
5
,
22
);
this
.
menuitem_copyto
.
Text
=
"复制
到(&C)
"
;
this
.
menuitem_copyto
.
Size
=
new
System
.
Drawing
.
Size
(
16
9
,
22
);
this
.
menuitem_copyto
.
Text
=
"复制
全部卡片到...
"
;
this
.
menuitem_copyto
.
Click
+=
new
System
.
EventHandler
(
this
.
Menuitem_copytoClick
);
//
// tsep1
//
this
.
tsep1
.
Name
=
"tsep1"
;
this
.
tsep1
.
Size
=
new
System
.
Drawing
.
Size
(
16
2
,
6
);
this
.
tsep1
.
Size
=
new
System
.
Drawing
.
Size
(
16
6
,
6
);
//
// menuitem_readydk
//
this
.
menuitem_readydk
.
Name
=
"menuitem_readydk"
;
this
.
menuitem_readydk
.
Size
=
new
System
.
Drawing
.
Size
(
16
5
,
22
);
this
.
menuitem_readydk
.
Size
=
new
System
.
Drawing
.
Size
(
16
9
,
22
);
this
.
menuitem_readydk
.
Text
=
"读取ydk(&Y)"
;
this
.
menuitem_readydk
.
Click
+=
new
System
.
EventHandler
(
this
.
Menuitem_readydkClick
);
//
// menuitem_readimages
//
this
.
menuitem_readimages
.
Name
=
"menuitem_readimages"
;
this
.
menuitem_readimages
.
Size
=
new
System
.
Drawing
.
Size
(
16
5
,
22
);
this
.
menuitem_readimages
.
Size
=
new
System
.
Drawing
.
Size
(
16
9
,
22
);
this
.
menuitem_readimages
.
Text
=
"读取图片(&I)"
;
this
.
menuitem_readimages
.
Click
+=
new
System
.
EventHandler
(
this
.
Menuitem_readimagesClick
);
//
// tsep3
//
this
.
tsep3
.
Name
=
"tsep3"
;
this
.
tsep3
.
Size
=
new
System
.
Drawing
.
Size
(
16
2
,
6
);
this
.
tsep3
.
Size
=
new
System
.
Drawing
.
Size
(
16
6
,
6
);
//
// menuitem_quit
//
this
.
menuitem_quit
.
Name
=
"menuitem_quit"
;
this
.
menuitem_quit
.
Size
=
new
System
.
Drawing
.
Size
(
16
5
,
22
);
this
.
menuitem_quit
.
Size
=
new
System
.
Drawing
.
Size
(
16
9
,
22
);
this
.
menuitem_quit
.
Text
=
"退出(&Q)"
;
this
.
menuitem_quit
.
Click
+=
new
System
.
EventHandler
(
this
.
Menuitem_quitClick
);
//
...
...
@@ -715,6 +717,13 @@ private void InitializeComponent()
this
.
pl_category
.
Size
=
new
System
.
Drawing
.
Size
(
303
,
166
);
this
.
pl_category
.
TabIndex
=
13
;
//
// menuitem_copyselectto
//
this
.
menuitem_copyselectto
.
Name
=
"menuitem_copyselectto"
;
this
.
menuitem_copyselectto
.
Size
=
new
System
.
Drawing
.
Size
(
169
,
22
);
this
.
menuitem_copyselectto
.
Text
=
"复制选中卡片到..."
;
this
.
menuitem_copyselectto
.
Click
+=
new
System
.
EventHandler
(
this
.
Menuitem_copyselecttoClick
);
//
// DataEditForm
//
this
.
AutoScaleDimensions
=
new
System
.
Drawing
.
SizeF
(
6F
,
12F
);
...
...
@@ -780,6 +789,7 @@ private void InitializeComponent()
this
.
ResumeLayout
(
false
);
this
.
PerformLayout
();
}
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
menuitem_copyselectto
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
menuitem_github
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
menuitem_new
;
private
System
.
Windows
.
Forms
.
ToolStripMenuItem
menuitem_showimage
;
...
...
DataEditorX/DataEditForm.cs
View file @
e334cd54
...
...
@@ -460,7 +460,7 @@ public bool Check()
return
true
;
else
{
MyMsg
.
Warning
(
MyMsg
.
WARN
_NoSelectCDB
);
MyMsg
.
Warning
(
MyMsg
.
ERROR
_NoSelectCDB
);
return
false
;
}
}
...
...
@@ -469,7 +469,7 @@ public bool Open(string cdbFile)
{
if
(!
File
.
Exists
(
cdbFile
))
{
MyMsg
.
Error
(
string
.
Format
(
MyMsg
.
ERROR_FileNotExisit
,
cdbFile
));
MyMsg
.
Error
(
string
.
Format
(
MyMsg
.
ERROR_File
_
NotExisit
,
cdbFile
));
return
false
;
}
nowCdbFile
=
cdbFile
;
...
...
@@ -541,9 +541,17 @@ public bool AddCard()
MyMsg
.
Error
(
MyMsg
.
ERROR_CardCodeIsZero
);
return
false
;
}
foreach
(
Card
ckey
in
cardlist
)
{
if
(
c
.
id
==
ckey
.
id
)
{
MyMsg
.
Warning
(
string
.
Format
(
MyMsg
.
ERROR_Card_IsExisit
,
ckey
.
ToString
()));
return
false
;
}
}
if
(
DataBase
.
Command
(
nowCdbFile
,
DataBase
.
GetInsertSQL
(
c
,
true
))>=
2
)
{
MyMsg
.
Show
(
string
.
Format
(
MyMsg
.
INFO_Addition
,
c
.
ToString
()));
MyMsg
.
Show
(
string
.
Format
(
MyMsg
.
INFO_Addition
_Card
,
c
.
ToString
()));
Search
(
srcCard
,
true
);
return
true
;
}
...
...
@@ -567,10 +575,24 @@ public bool ModCard()
MyMsg
.
Error
(
MyMsg
.
ERROR_CardCodeIsZero
);
return
false
;
}
if
(
DataBase
.
Command
(
nowCdbFile
,
DataBase
.
GetUpdateSQL
(
c
))>
0
)
string
sql
;
if
(
c
.
id
!=
oldCard
.
id
)
{
MyMsg
.
Show
(
string
.
Format
(
MyMsg
.
INFO_Modifty
,
c
.
ToString
()));
if
(
MyMsg
.
Question
(
string
.
Format
(
MyMsg
.
QUES_Delete_Card
,
oldCard
.
ToString
())))
{
if
(
DataBase
.
Command
(
nowCdbFile
,
DataBase
.
GetDeleteSQL
(
oldCard
))<
2
)
{
MyMsg
.
Error
(
MyMsg
.
ERROR_DeleteFail
);
return
false
;
}
}
sql
=
DataBase
.
GetInsertSQL
(
c
,
false
);
}
else
sql
=
DataBase
.
GetUpdateSQL
(
c
);
if
(
DataBase
.
Command
(
nowCdbFile
,
sql
)>
0
)
{
MyMsg
.
Show
(
string
.
Format
(
MyMsg
.
INFO_Modifty_Card
,
c
.
ToString
()));
Search
(
srcCard
,
true
);
}
else
...
...
@@ -585,7 +607,7 @@ public bool DelCards()
int
ic
=
lv_cardlist
.
SelectedItems
.
Count
;
if
(
ic
>=
0
)
return
false
;
if
(!
MyMsg
.
Question
(
string
.
Format
(
MyMsg
.
QUES_Delete
Card
,
ic
)))
if
(!
MyMsg
.
Question
(
string
.
Format
(
MyMsg
.
QUES_Delete
_Cards
,
ic
)))
return
false
;
List
<
string
>
sql
=
new
List
<
string
>();
foreach
(
ListViewItem
lvitem
in
lv_cardlist
.
SelectedItems
)
...
...
@@ -619,7 +641,7 @@ public bool OpenScript()
string
lua
=
Path
.
Combine
(
LUAPTH
,
"c"
+
tb_cardcode
.
Text
+
".lua"
);
if
(!
File
.
Exists
(
lua
))
{
if
(
MyMsg
.
Question
(
string
.
Format
(
MyMsg
.
QUES_Create
Lua
,
lua
)))
if
(
MyMsg
.
Question
(
string
.
Format
(
MyMsg
.
QUES_Create
_Lua_
,
lua
)))
{
File
.
Create
(
lua
);
}
...
...
@@ -763,8 +785,8 @@ void Menuitem_openClick(object sender, EventArgs e)
{
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
dlg
.
Title
=
"选择卡片数据库(cdb文件)"
;
dlg
.
Filter
=
"cdb文件(*.cdb)|*.cdb|所有文件(*.*)|*.*"
;
dlg
.
Title
=
MyMsg
.
STR_OpenCDB
;
dlg
.
Filter
=
MyMsg
.
STR_CDBFilter
;
if
(
dlg
.
ShowDialog
()==
DialogResult
.
OK
)
{
Open
(
dlg
.
FileName
);
...
...
@@ -775,8 +797,8 @@ void Menuitem_newClick(object sender, EventArgs e)
{
using
(
SaveFileDialog
dlg
=
new
SaveFileDialog
())
{
dlg
.
Title
=
"选择卡片数据库(cdb文件)保存位置"
;
dlg
.
Filter
=
"cdb文件(*.cdb)|*.cdb|所有文件(*.*)|*.*"
;
dlg
.
Title
=
MyMsg
.
STR_SaveCDB
;
dlg
.
Filter
=
MyMsg
.
STR_CDBFilter
;
if
(
dlg
.
ShowDialog
()==
DialogResult
.
OK
)
{
if
(
DataBase
.
Create
(
dlg
.
FileName
))
...
...
@@ -787,31 +809,52 @@ void Menuitem_newClick(object sender, EventArgs e)
}
}
void
Menuitem_copytoClick
(
object
sender
,
EventArgs
e
)
{
CopyTo
(
false
);
}
void
Menuitem_copyselecttoClick
(
object
sender
,
EventArgs
e
)
{
CopyTo
(
true
);
}
void
CopyTo
(
bool
onlyselect
)
{
if
(!
Check
())
return
;
List
<
Card
>
cards
=
new
List
<
Card
>();
if
(
onlyselect
)
{
foreach
(
ListViewItem
lvitem
in
lv_cardlist
.
SelectedItems
)
{
int
index
=
lvitem
.
Index
+(
page
-
1
)*
MaxRow
;
if
(
index
<
cardlist
.
Count
)
cards
.
Add
(
cardlist
[
index
]);
}
}
else
cards
.
AddRange
(
cardlist
.
ToArray
());
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
dlg
.
Title
=
"选择卡片数据库(cdb文件)"
;
dlg
.
Filter
=
"cdb文件(*.cdb)|*.cdb|所有文件(*.*)|*.*"
;
dlg
.
Title
=
MyMsg
.
STR_OpenCDB
;
dlg
.
Filter
=
MyMsg
.
STR_CDBFilter
;
if
(
dlg
.
ShowDialog
()==
DialogResult
.
OK
)
{
if
(
MyMsg
.
Question
(
"是否覆盖已经存在的卡片?"
))
DataBase
.
CopyDB
(
dlg
.
FileName
,
false
,
card
list
.
ToArray
());
if
(
MyMsg
.
Question
(
MyMsg
.
QUES_ReplaceCard
))
DataBase
.
CopyDB
(
dlg
.
FileName
,
false
,
card
s
.
ToArray
());
else
DataBase
.
CopyDB
(
dlg
.
FileName
,
true
,
card
list
.
ToArray
());
DataBase
.
CopyDB
(
dlg
.
FileName
,
true
,
card
s
.
ToArray
());
}
}
}
}
void
Menuitem_readydkClick
(
object
sender
,
EventArgs
e
)
{
if
(!
Check
())
return
;
using
(
OpenFileDialog
dlg
=
new
OpenFileDialog
())
{
dlg
.
Title
=
"选择卡组文件(ydk文件)"
;
dlg
.
Filter
=
"ydk文件(*.ydk)|*.ydk|所有文件(*.*)|*.*"
;
dlg
.
Title
=
MyMsg
.
STR_Openydk
;
dlg
.
Filter
=
MyMsg
.
STR_ydkFilter
;
if
(
dlg
.
ShowDialog
()==
DialogResult
.
OK
)
{
SetCards
(
DataBase
.
ReadYdk
(
nowCdbFile
,
dlg
.
FileName
),
false
);
...
...
@@ -825,7 +868,7 @@ void Menuitem_readimagesClick(object sender, EventArgs e)
return
;
using
(
FolderBrowserDialog
fdlg
=
new
FolderBrowserDialog
())
{
fdlg
.
Description
=
"请选择卡片图像目录"
;
fdlg
.
Description
=
MyMsg
.
STR_SelectImages
;
if
(
fdlg
.
ShowDialog
()==
DialogResult
.
OK
)
{
SetCards
(
DataBase
.
ReadImage
(
nowCdbFile
,
fdlg
.
SelectedPath
),
false
);
...
...
@@ -859,6 +902,5 @@ void OnimgFormClosed(object sender, EventArgs e)
}
#
endregion
}
}
DataEditorX/DataEditorX.csproj
View file @
e334cd54
...
...
@@ -102,6 +102,7 @@
<None
Include=
"readme.txt"
>
<CopyToOutputDirectory>
PreserveNewest
</CopyToOutputDirectory>
</None>
<None
Include=
"update.txt"
/>
</ItemGroup>
<Import
Project=
"$(MSBuildToolsPath)\Microsoft.CSharp.targets"
/>
</Project>
\ No newline at end of file
DataEditorX/MyMsg.cs
View file @
e334cd54
...
...
@@ -18,18 +18,27 @@ public static class MyMsg
public
static
readonly
string
ABOUT
=
"程序:DataEditorX\n作者:247321453\nE-mail:247321453@qq.com\n"
;
public
static
readonly
string
ERROR_NoSeclectScriptText
=
"请选中脚本文本"
;
public
static
readonly
string
INFO_Delete
=
"删除成功!"
;
public
static
readonly
string
INFO_Modifty
=
"修改 {0} 成功!"
;
public
static
readonly
string
INFO_Addition
=
"添加 {0} 成功!"
;
public
static
readonly
string
INFO_Modifty
_Card
=
"修改 {0} 成功!"
;
public
static
readonly
string
INFO_Addition
_Card
=
"添加 {0} 成功!"
;
public
static
readonly
string
INFO_NoChanged
=
"卡片没有被修改!"
;
public
static
readonly
string
ERROR_NoCard
=
"没有卡片!"
;
public
static
readonly
string
WARN_NoSelectCDB
=
"请打开一个数据库!"
;
public
static
readonly
string
ERROR_FileNotExisit
=
"文件不存在!\n{0}"
;
public
static
readonly
string
ERROR_NoSelectCDB
=
"请打开一个数据库!"
;
public
static
readonly
string
ERROR_Card_IsExisit
=
"卡片已经存在!\n{0}"
;
public
static
readonly
string
ERROR_File_NotExisit
=
"文件不存在!\n{0}"
;
public
static
readonly
string
ERROR_ModiftyFail
=
"修改失败!"
;
public
static
readonly
string
ERROR_AdditionFail
=
"修添加失败!"
;
public
static
readonly
string
ERROR_CardCodeIsZero
=
"卡片密码必须大于0!"
;
public
static
readonly
string
ERROR_DeleteFail
=
"删除失败!"
;
public
static
readonly
string
QUES_CreateLua
=
"是否创建脚本?\n{0}"
;
public
static
readonly
string
QUES_DeleteCard
=
"是否删除选择的{0}张卡?"
;
public
static
readonly
string
QUES_Create_Lua_
=
"是否创建脚本?\n{0}"
;
public
static
readonly
string
QUES_Delete_Card
=
"是否删除卡片?\n{0}"
;
public
static
readonly
string
QUES_Delete_Cards
=
"是否删除选择的{0}张卡?"
;
public
static
readonly
string
QUES_ReplaceCard
=
"是否覆盖已经存在的卡片?"
;
public
static
readonly
string
STR_OpenCDB
=
"选择卡片数据库(cdb文件)"
;
public
static
readonly
string
STR_SaveCDB
=
"选择卡片数据库(cdb文件)保存位置"
;
public
static
readonly
string
STR_Openydk
=
"选择卡组文件(ydk文件)"
;
public
static
readonly
string
STR_SelectImages
=
"请选择卡片图像目录"
;
public
static
readonly
string
STR_CDBFilter
=
"cdb文件(*.cdb)|*.cdb|所有文件(*.*)|*.*"
;
public
static
readonly
string
STR_ydkFilter
=
"ydk文件(*.ydk)|*.ydk|所有文件(*.*)|*.*"
;
public
static
void
Show
(
string
strMsg
)
{
MessageBox
.
Show
(
strMsg
,
"提示"
,
...
...
DataEditorX/readme.txt
View file @
e334cd54
配置文件
DataEditorX.txt
★卡片复制:
替换复制:如果存在卡片,就用最新的替换
不替换复制:如果存在卡片,就跳过
★卡片搜索
1.不支持系列名,ATK,DEF搜索
2.支持卡片名称,描述,规则,属性,等级,种族,卡片类型,效果类型,密码
3.密码范围搜索示例:
--大于密码10000000的卡片 卡片密码: 10000000 同名卡: -1
--小于密码10000000的卡片 卡片密码: -1 同名卡: 10000000
--大于密码10000000,小于20000000的卡片 卡片密码: 10000000 同名卡: 20000000
★配置文件
1.游戏目录
2.更新网址
3.源码网址
DataEditorX.txt
F:\game\YGOPRO
http://247321453.ys168.com
https://github.com/247321453/DataEditorX
\ No newline at end of file
https://github.com/247321453/DataEditorX
DataEditorX/update.txt
0 → 100644
View file @
e334cd54
201405201023
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