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
787dfd6d
Commit
787dfd6d
authored
Mar 27, 2017
by
DailyShana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add TYPE_LINK
parent
ced927d6
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1256 additions
and
1142 deletions
+1256
-1142
DataEditorX/Config/DataConfig.cs
DataEditorX/Config/DataConfig.cs
+6
-0
DataEditorX/Config/MyConfig.cs
DataEditorX/Config/MyConfig.cs
+5
-1
DataEditorX/Core/Card.cs
DataEditorX/Core/Card.cs
+2
-2
DataEditorX/Core/DataBase.cs
DataEditorX/Core/DataBase.cs
+16
-6
DataEditorX/Core/Info/CardRace.cs
DataEditorX/Core/Info/CardRace.cs
+2
-0
DataEditorX/Core/Info/CardType.cs
DataEditorX/Core/Info/CardType.cs
+8
-4
DataEditorX/DataEditForm.Designer.cs
DataEditorX/DataEditForm.Designer.cs
+1136
-1105
DataEditorX/DataEditForm.cs
DataEditorX/DataEditForm.cs
+56
-20
DataEditorX/data/cardinfo_chinese.txt
DataEditorX/data/cardinfo_chinese.txt
+14
-4
DataEditorX/data/cardinfo_english.txt
DataEditorX/data/cardinfo_english.txt
+10
-0
DataEditorX/data/language_chinese.txt
DataEditorX/data/language_chinese.txt
+1
-0
No files found.
DataEditorX/Config/DataConfig.cs
View file @
787dfd6d
...
...
@@ -36,6 +36,7 @@ public void InitMember(string conf)
dicCardRules
=
new
Dictionary
<
long
,
string
>();
dicSetnames
=
new
Dictionary
<
long
,
string
>();
dicCardTypes
=
new
Dictionary
<
long
,
string
>();
dicLinkMarkers
=
new
Dictionary
<
long
,
string
>();
dicCardcategorys
=
new
Dictionary
<
long
,
string
>();
dicCardAttributes
=
new
Dictionary
<
long
,
string
>();
dicCardRaces
=
new
Dictionary
<
long
,
string
>();
...
...
@@ -47,6 +48,7 @@ public void InitMember(string conf)
dicCardRules
=
DataManager
.
Read
(
text
,
MyConfig
.
TAG_RULE
);
dicSetnames
=
DataManager
.
Read
(
text
,
MyConfig
.
TAG_SETNAME
);
dicCardTypes
=
DataManager
.
Read
(
text
,
MyConfig
.
TAG_TYPE
);
dicLinkMarkers
=
DataManager
.
Read
(
text
,
MyConfig
.
TAG_MARKER
);
dicCardcategorys
=
DataManager
.
Read
(
text
,
MyConfig
.
TAG_CATEGORY
);
dicCardAttributes
=
DataManager
.
Read
(
text
,
MyConfig
.
TAG_ATTRIBUTE
);
dicCardRaces
=
DataManager
.
Read
(
text
,
MyConfig
.
TAG_RACE
);
...
...
@@ -78,6 +80,10 @@ public void InitMember(string conf)
/// </summary>
public
Dictionary
<
long
,
string
>
dicCardTypes
=
null
;
/// <summary>
/// 连接标志
/// </summary>
public
Dictionary
<
long
,
string
>
dicLinkMarkers
=
null
;
/// <summary>
/// 效果类型
/// </summary>
public
Dictionary
<
long
,
string
>
dicCardcategorys
=
null
;
...
...
DataEditorX/Config/MyConfig.cs
View file @
787dfd6d
...
...
@@ -165,8 +165,12 @@ public class MyConfig : XMLReader
/// 系列名
/// </summary>
public
const
string
TAG_SETNAME
=
"setname"
;
/// <summary>
/// 连接标志
/// </summary>
public
const
string
TAG_MARKER
=
"link marker"
;
#
endregion
#
region
读取内容
/// <summary>
/// 读取字符串值
...
...
DataEditorX/Core/Card.cs
View file @
787dfd6d
...
...
@@ -123,11 +123,11 @@ public void SetSetCode(params string[] setcodes)
}
public
long
GetLeftScale
()
{
return
(
this
.
level
>>
0x18
)
&
0xff
;
return
(
this
.
level
>>
24
)
&
0xff
;
}
public
long
GetRightScale
()
{
return
(
this
.
level
>>
0x10
)
&
0xff
;
return
(
this
.
level
>>
16
)
&
0xff
;
}
#
endregion
...
...
DataEditorX/Core/DataBase.cs
View file @
787dfd6d
...
...
@@ -342,7 +342,11 @@ public static string GetSelectSQL(Card c)
sb
.
Append
(
" and datas.attribute = "
+
c
.
attribute
.
ToString
());
if
((
c
.
level
&
0xff
)
>
0
)
sb
.
Append
(
" and (datas.level & 255) = "
+
toInt
(
c
.
level
&
0xff
));
if
(
c
.
race
>
0
)
if
((
c
.
level
&
0xff000000
)
>
0
)
sb
.
Append
(
" and (datas.level & 4278190080) = "
+
toInt
(
c
.
level
&
0xff000000
));
if
((
c
.
level
&
0xff0000
)
>
0
)
sb
.
Append
(
" and (datas.level & 16711680) = "
+
toInt
(
c
.
level
&
0xff0000
));
if
(
c
.
race
>
0
)
sb
.
Append
(
" and datas.race = "
+
toInt
(
c
.
race
));
if
(
c
.
type
>
0
)
sb
.
Append
(
" and datas.type & "
+
toInt
(
c
.
type
)+
" = "
+
toInt
(
c
.
type
));
...
...
@@ -353,11 +357,17 @@ public static string GetSelectSQL(Card c)
sb
.
Append
(
" and datas.type & 1 = 1 and datas.atk = 0"
);
else
if
(
c
.
atk
<
0
||
c
.
atk
>
0
)
sb
.
Append
(
" and datas.atk = "
+
c
.
atk
.
ToString
());
if
(
c
.
def
==-
1
)
sb
.
Append
(
" and datas.type & 1 = 1 and datas.def = 0"
);
else
if
(
c
.
def
<
0
||
c
.
def
>
0
)
sb
.
Append
(
" and datas.def = "
+
c
.
def
.
ToString
());
if
(
c
.
IsType
(
Info
.
CardType
.
TYPE_LINK
))
{
sb
.
Append
(
" and datas.def &"
+
c
.
def
.
ToString
()
+
"="
+
c
.
def
.
ToString
());
}
else
{
if
(
c
.
def
==
-
1
)
sb
.
Append
(
" and datas.type & 1 = 1 and datas.def = 0"
);
else
if
(
c
.
def
<
0
||
c
.
def
>
0
)
sb
.
Append
(
" and datas.def = "
+
c
.
def
.
ToString
());
}
if
(
c
.
id
>
0
&&
c
.
alias
>
0
)
sb
.
Append
(
" and datas.id BETWEEN "
+
c
.
alias
.
ToString
()+
" and "
+
c
.
id
.
ToString
());
...
...
DataEditorX/Core/Info/CardRace.cs
View file @
787dfd6d
...
...
@@ -63,5 +63,7 @@ public enum CardRace : long
RACE_CREATORGOD
=
0x400000
,
///<summary>幻龙</summary>
RACE_WYRM
=
0x800000
,
///<summary>电子界</summary>
RACE_CYBERSE
=
0x1000000
,
}
}
DataEditorX/Core/Info/CardType.cs
View file @
787dfd6d
...
...
@@ -52,14 +52,18 @@ public enum CardType : long
TYPE_FIELD
=
0x80000
,
///<summary>反击</summary>
TYPE_COUNTER
=
0x100000
,
///<summary>
翻
转</summary>
///<summary>
反
转</summary>
TYPE_FLIP
=
0x200000
,
///<summary>卡通</summary>
TYPE_TOON
=
0x400000
,
///<summary>超量</summary>
TYPE_XYZ
=
0x800000
,
///<summary>摇摆</summary>
TYPE_PENDULUM
=
0x1000000
,
///<summary>灵摆</summary>
TYPE_PENDULUM
=
0x1000000
,
///<summary>特殊召唤</summary>
TYPE_SPSUMMON
=
0x2000000
,
///<summary>连接</summary>
TYPE_LINK
=
0x4000000
,
}
}
}
DataEditorX/DataEditForm.Designer.cs
View file @
787dfd6d
This source diff could not be displayed because it is too large. You can
view the blob
instead.
DataEditorX/DataEditForm.cs
View file @
787dfd6d
...
...
@@ -266,6 +266,9 @@ public void InitControl(DataConfig datacfg)
InitComboBox
(
cb_cardlevel
,
datacfg
.
dicCardLevels
);
//卡片类型
InitCheckPanel
(
pl_cardtype
,
datacfg
.
dicCardTypes
);
//连接标记
InitCheckPanel
(
pl_markers
,
datacfg
.
dicLinkMarkers
);
SetEnabled
(
pl_markers
,
false
);
//效果类型
InitCheckPanel
(
pl_category
,
datacfg
.
dicCardcategorys
);
//系列名
...
...
@@ -290,14 +293,29 @@ void InitCheckPanel(FlowLayoutPanel fpanel, Dictionary<long, string> dic)
_cbox
.
Text
=
dic
[
key
];
_cbox
.
AutoSize
=
true
;
_cbox
.
Margin
=
fpanel
.
Margin
;
_cbox
.
CheckedChanged
+=
_cbox_CheckedChanged
;
//_cbox.Click += PanelOnCheckClick;
fpanel
.
Controls
.
Add
(
_cbox
);
}
fpanel
.
ResumeLayout
(
false
);
fpanel
.
PerformLayout
();
}
//初始化ComboBox
void
InitComboBox
(
ComboBox
cb
,
Dictionary
<
long
,
string
>
tempdic
)
private
void
_cbox_CheckedChanged
(
object
sender
,
EventArgs
e
)
{
CheckBox
cbox
=
(
CheckBox
)
sender
;
if
(
cbox
.
Parent
==
pl_cardtype
)
{
if
((
long
)
cbox
.
Tag
==
(
long
)
Core
.
Info
.
CardType
.
TYPE_LINK
)
{
SetEnabled
(
pl_markers
,
cbox
.
Checked
);
tb_def
.
ReadOnly
=
cbox
.
Checked
;
}
}
}
//初始化ComboBox
void
InitComboBox
(
ComboBox
cb
,
Dictionary
<
long
,
string
>
tempdic
)
{
InitComboBox
(
cb
,
DataManager
.
GetKeys
(
tempdic
),
DataManager
.
GetValues
(
tempdic
));
...
...
@@ -357,6 +375,14 @@ void SetCheck(FlowLayoutPanel fpl, long number)
}
//return strType;
}
void
SetEnabled
(
FlowLayoutPanel
fpl
,
bool
set
)
{
foreach
(
Control
c
in
fpl
.
Controls
)
{
CheckBox
cbox
=(
CheckBox
)
c
;
cbox
.
Enabled
=
set
;
}
}
//设置combobox
void
SetSelect
(
ComboBox
cb
,
long
k
)
{
...
...
@@ -482,13 +508,20 @@ public void SetCard(Card c)
tb_setcode4
.
Text
=
setcodes
[
3
].
ToString
(
"x"
);
//type,category
SetCheck
(
pl_cardtype
,
c
.
type
);
SetCheck
(
pl_category
,
c
.
category
);
if
(
c
.
IsType
(
Core
.
Info
.
CardType
.
TYPE_LINK
))
SetCheck
(
pl_markers
,
c
.
def
);
else
SetCheck
(
pl_markers
,
0
);
SetCheck
(
pl_category
,
c
.
category
);
//Pendulum
tb_pleft
.
Text
=
((
c
.
level
>>
0x18
)
&
0xff
).
ToString
();
tb_pright
.
Text
=
((
c
.
level
>>
0x10
)
&
0xff
).
ToString
();
tb_pleft
.
Text
=
((
c
.
level
>>
24
)
&
0xff
).
ToString
();
tb_pright
.
Text
=
((
c
.
level
>>
16
)
&
0xff
).
ToString
();
//atk,def
tb_atk
.
Text
=
(
c
.
atk
<
0
)
?
"?"
:
c
.
atk
.
ToString
();
tb_def
.
Text
=
(
c
.
def
<
0
)
?
"?"
:
c
.
def
.
ToString
();
if
(
c
.
IsType
(
Core
.
Info
.
CardType
.
TYPE_LINK
))
tb_def
.
Text
=
"0"
;
else
tb_def
.
Text
=
(
c
.
def
<
0
)
?
"?"
:
c
.
def
.
ToString
();
tb_cardcode
.
Text
=
c
.
id
.
ToString
();
tb_cardalias
.
Text
=
c
.
alias
.
ToString
();
SetImage
(
c
.
id
.
ToString
());
...
...
@@ -520,21 +553,28 @@ public Card GetCard()
c
.
category
=
GetCheck
(
pl_category
);
int
.
TryParse
(
tb_pleft
.
Text
,
out
temp
);
c
.
level
+=
(
temp
<<
0x18
);
c
.
level
+=
(
temp
<<
24
);
int
.
TryParse
(
tb_pright
.
Text
,
out
temp
);
c
.
level
+=
(
temp
<<
0x10
);
c
.
level
+=
(
temp
<<
16
);
if
(
tb_atk
.
Text
==
"?"
||
tb_atk
.
Text
==
"?"
)
c
.
atk
=
-
2
;
else
if
(
tb_atk
.
Text
==
"."
)
c
.
atk
=
-
1
;
else
int
.
TryParse
(
tb_atk
.
Text
,
out
c
.
atk
);
if
(
tb_def
.
Text
==
"?"
||
tb_def
.
Text
==
"?"
)
c
.
def
=
-
2
;
else
if
(
tb_def
.
Text
==
"."
)
c
.
def
=
-
1
;
else
int
.
TryParse
(
tb_def
.
Text
,
out
c
.
def
);
if
(
c
.
IsType
(
Core
.
Info
.
CardType
.
TYPE_LINK
))
{
c
.
def
=
(
int
)
GetCheck
(
pl_markers
);
}
else
{
if
(
tb_def
.
Text
==
"?"
||
tb_def
.
Text
==
"?"
)
c
.
def
=
-
2
;
else
if
(
tb_def
.
Text
==
"."
)
c
.
def
=
-
1
;
else
int
.
TryParse
(
tb_def
.
Text
,
out
c
.
def
);
}
long
.
TryParse
(
tb_cardcode
.
Text
,
out
c
.
id
);
long
.
TryParse
(
tb_cardalias
.
Text
,
out
c
.
alias
);
...
...
@@ -633,16 +673,12 @@ public bool Open(string file)
return
true
;
}
//setcode
, 灵摆刻度
的搜索
//setcode的搜索
public
bool
CardFilter
(
Card
c
,
Card
sc
)
{
bool
res
=
true
;
if
(
sc
.
setcode
!=
0
)
res
&=
c
.
IsSetCode
(
sc
.
setcode
&
0xffff
);
if
(
sc
.
GetLeftScale
()
!=
0
)
res
&=
(
c
.
GetLeftScale
()
==
sc
.
GetLeftScale
());
if
(
sc
.
GetRightScale
()
!=
0
)
res
&=
(
c
.
GetRightScale
()
==
sc
.
GetRightScale
());
return
res
;
}
//设置卡片列表的结果
...
...
@@ -678,7 +714,7 @@ public void SetCards(Card[] cards, bool isfresh)
tb_pagenum
.
Text
=
pageNum
.
ToString
();
cardlist
.
Clear
();
lv_cardlist
.
Items
.
Clear
();
SetCard
(
new
Card
(
0
));
//
SetCard(new Card(0));
}
}
//搜索卡片
...
...
DataEditorX/data/cardinfo_chinese.txt
View file @
787dfd6d
...
...
@@ -29,6 +29,15 @@
0xb 11★
0xc 12★
0xd 13★
##link marker
0x1 ↙
0x2 ↓
0x4 ↘
0x8 ←
0x20 →
0x40 ↖
0x80 ↑
0x100 ↗
##category
0x1 魔陷破坏
0x2 怪兽破坏
...
...
@@ -92,30 +101,31 @@
##type
0x1 怪兽
0x2 魔法
0x4 陷阱
0x4 陷阱
0x8 N/A
0x10 通常
0x20 效果
0x40 融合
0x80 仪式
0x100 N/A
0x200 灵魂
0x200 灵魂
0x400 同盟
0x800 二重
0x1000 调整
0x2000 同调
0x4000 衍生物
0x4000 衍生物
0x8000 N/A
0x10000 速攻
0x20000 永续
0x40000 装备
0x80000 场地
0x100000 反击
0x100000 反击
0x200000 反转
0x400000 卡通
0x800000 超量
0x1000000 灵摆
0x2000000 特殊召唤
0x4000000 连接
##setname
-1 自定义
0x0 系列
...
...
DataEditorX/data/cardinfo_english.txt
View file @
787dfd6d
...
...
@@ -29,6 +29,15 @@
0xb 11★
0xc 12★
0xd 13★
##link marker
0x1 ↙
0x2 ↓
0x4 ↘
0x8 ←
0x20 →
0x40 ↖
0x80 ↑
0x100 ↗
##category
0x1 S/T Destroy
0x2 Destroy Monster
...
...
@@ -116,6 +125,7 @@
0x800000 Xyz
0x1000000 Pendulum
0x2000000 SPSummon
0x4000000 Link
##setname
-1 Custom
0x0 Archetype
...
...
DataEditorX/data/language_chinese.txt
View file @
787dfd6d
...
...
@@ -15,6 +15,7 @@ CodeEditForm.mainMenu.menuitem_about 关于
#
DataEditForm.btn_img 导入图片
DataEditForm.lb_types 卡片类型
DataEditForm.lb_markers 连接标记
DataEditForm.lb_tiptexts 脚本提示文字
DataEditForm.lb_categorys 效果分类
DataEditForm.lb_cardcode 卡片密码
...
...
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