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
5cf7bf28
Commit
5cf7bf28
authored
Feb 27, 2016
by
keyongyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.4.1.1
parent
95e53e76
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
561 additions
and
435 deletions
+561
-435
.gitignore
.gitignore
+1
-0
DataEditorX/Config/MyConfig.cs
DataEditorX/Config/MyConfig.cs
+9
-5
DataEditorX/Core/DataBase.cs
DataEditorX/Core/DataBase.cs
+29
-0
DataEditorX/Core/Mse/CardPack.cs
DataEditorX/Core/Mse/CardPack.cs
+66
-0
DataEditorX/Core/Mse/MseMaker.cs
DataEditorX/Core/Mse/MseMaker.cs
+20
-5
DataEditorX/Core/TaskHelper.cs
DataEditorX/Core/TaskHelper.cs
+424
-418
DataEditorX/DataEditorX.csproj
DataEditorX/DataEditorX.csproj
+1
-0
DataEditorX/Properties/AssemblyInfo.cs
DataEditorX/Properties/AssemblyInfo.cs
+1
-1
DataEditorX/app.config
DataEditorX/app.config
+2
-0
DataEditorX/changed.txt
DataEditorX/changed.txt
+2
-0
DataEditorX/readme.txt
DataEditorX/readme.txt
+1
-1
win32/DataEditorX.exe
win32/DataEditorX.exe
+0
-0
win32/DataEditorX.exe.config
win32/DataEditorX.exe.config
+2
-0
win32/changed.txt
win32/changed.txt
+2
-0
win32/data/history.txt
win32/data/history.txt
+0
-4
win32/readme.txt
win32/readme.txt
+1
-1
win32/win32.zip
win32/win32.zip
+0
-0
No files found.
.gitignore
View file @
5cf7bf28
...
@@ -228,3 +228,4 @@ pip-log.txt
...
@@ -228,3 +228,4 @@ pip-log.txt
#Mr Developer
#Mr Developer
.mr.developer.cfg
.mr.developer.cfg
/win32/*.cdb
DataEditorX/Config/MyConfig.cs
View file @
5cf7bf28
...
@@ -246,12 +246,16 @@ public static Area readArea(string key)
...
@@ -246,12 +246,16 @@ public static Area readArea(string key)
/// </summary>
/// </summary>
/// <param name="key"></param>
/// <param name="key"></param>
/// <returns></returns>
/// <returns></returns>
public
static
bool
readBoolean
(
string
key
)
public
static
bool
readBoolean
(
string
key
,
bool
def
=
false
)
{
{
if
(
readString
(
key
).
ToLower
()
==
"true"
)
string
val
=
readString
(
key
);
return
true
;
if
(
"true"
.
Equals
(
val
,
StringComparison
.
OrdinalIgnoreCase
)){
else
return
true
;
return
false
;
}
if
(
"false"
.
Equals
(
val
,
StringComparison
.
OrdinalIgnoreCase
)){
return
false
;
}
return
def
;
}
}
#
endregion
#
endregion
...
...
DataEditorX/Core/DataBase.cs
View file @
5cf7bf28
...
@@ -492,5 +492,34 @@ public static string GetDeleteSQL(Card c)
...
@@ -492,5 +492,34 @@ public static string GetDeleteSQL(Card c)
sw
.
Close
();
sw
.
Close
();
}
}
}
}
public
static
CardPack
findPack
(
string
db
,
long
id
){
CardPack
cardpack
=
null
;
if
(
File
.
Exists
(
db
)
&&
id
>=
0
)
{
using
(
SQLiteConnection
sqliteconn
=
new
SQLiteConnection
(
@"Data Source="
+
db
)
)
{
sqliteconn
.
Open
();
using
(
SQLiteCommand
sqlitecommand
=
new
SQLiteCommand
(
sqliteconn
)
)
{
sqlitecommand
.
CommandText
=
"select id,pack_id,pack,rarity,date from pack where id="
+
id
+
" order by date desc"
;
using
(
SQLiteDataReader
reader
=
sqlitecommand
.
ExecuteReader
()
)
{
if
(
reader
.
Read
())
{
cardpack
=
new
CardPack
(
id
);
cardpack
.
pack_id
=
reader
.
GetString
(
1
);
cardpack
.
pack_name
=
reader
.
GetString
(
2
);
cardpack
.
rarity
=
reader
.
GetString
(
3
);
cardpack
.
date
=
reader
.
GetString
(
4
);
}
reader
.
Close
();
}
}
sqliteconn
.
Close
();
}
}
return
cardpack
;
}
}
}
}
}
DataEditorX/Core/Mse/CardPack.cs
0 → 100644
View file @
5cf7bf28
/*
* 由SharpDevelop创建。
* 用户: Hasee
* 日期: 2016/2/27
* 时间: 7:55
*
* 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
*/
using
System
;
namespace
DataEditorX.Core
{
/// <summary>
/// Description of CardPack.
/// </summary>
public
class
CardPack
{
public
CardPack
(
long
id
)
{
this
.
card_id
=
id
;
}
public
long
card_id
{
get
;
private
set
;
}
public
string
pack_id
;
public
string
pack_name
;
public
string
rarity
;
public
string
date
;
public
string
getMseRarity
(){
if
(
rarity
==
null
)
return
"common"
;
rarity
=
rarity
.
Trim
().
ToLower
();
if
(
rarity
.
Equals
(
"common"
)){
return
"common"
;
}
if
(
rarity
.
Equals
(
"rare"
)){
return
"rare"
;
}
if
(
rarity
.
Equals
(
"super"
)
||
rarity
.
Equals
(
"super rare"
)){
return
"super rare"
;
}
if
(
rarity
.
Contains
(
"secret"
)){
return
"secret rare"
;
}
if
(
rarity
.
Contains
(
"parallel"
)){
return
"parallel rare"
;
}
if
(
rarity
.
Contains
(
"ultimate"
)){
return
"ultimate rare"
;
}
if
(
rarity
.
Contains
(
"ultra"
)){
return
"ultra rare"
;
}
if
(
rarity
.
Contains
(
"gold"
)){
return
"gold tech"
;
}
if
(
rarity
.
Contains
(
"promo"
)){
return
"promo"
;
}
return
"common"
;
}
}
}
DataEditorX/Core/Mse/MseMaker.cs
View file @
5cf7bf28
...
@@ -45,6 +45,8 @@ public class MseMaker
...
@@ -45,6 +45,8 @@ public class MseMaker
public
const
string
TAG_TEXT
=
"rule text"
;
public
const
string
TAG_TEXT
=
"rule text"
;
public
const
string
TAG_ATK
=
"attack"
;
public
const
string
TAG_ATK
=
"attack"
;
public
const
string
TAG_DEF
=
"defense"
;
public
const
string
TAG_DEF
=
"defense"
;
public
const
string
TAG_NUMBER
=
"number"
;
public
const
string
TAG_RARITY
=
"rarity"
;
public
const
string
TAG_PENDULUM
=
"pendulum"
;
public
const
string
TAG_PENDULUM
=
"pendulum"
;
public
const
string
TAG_PSCALE1
=
"pendulum scale 1"
;
public
const
string
TAG_PSCALE1
=
"pendulum scale 1"
;
public
const
string
TAG_PSCALE2
=
"pendulum scale 2"
;
public
const
string
TAG_PSCALE2
=
"pendulum scale 2"
;
...
@@ -368,7 +370,7 @@ public string[] GetTypes(Card c)
...
@@ -368,7 +370,7 @@ public string[] GetTypes(Card c)
#
region
写存档
#
region
写存档
//写存档
//写存档
public
Dictionary
<
Card
,
string
>
WriteSet
(
string
file
,
Card
[]
cards
)
public
Dictionary
<
Card
,
string
>
WriteSet
(
string
file
,
Card
[]
cards
,
string
cardpack_db
,
bool
rarity
=
true
)
{
{
// MessageBox.Show(""+cfg.replaces.Keys[0]+"/"+cfg.replaces[cfg.replaces.Keys[0]]);
// MessageBox.Show(""+cfg.replaces.Keys[0]+"/"+cfg.replaces[cfg.replaces.Keys[0]]);
Dictionary
<
Card
,
string
>
list
=
new
Dictionary
<
Card
,
string
>();
Dictionary
<
Card
,
string
>
list
=
new
Dictionary
<
Card
,
string
>();
...
@@ -386,10 +388,11 @@ public string[] GetTypes(Card c)
...
@@ -386,10 +388,11 @@ public string[] GetTypes(Card c)
list
.
Add
(
c
,
jpg
);
list
.
Add
(
c
,
jpg
);
jpg
=
Path
.
GetFileName
(
jpg
);
jpg
=
Path
.
GetFileName
(
jpg
);
}
}
CardPack
cardpack
=
DataBase
.
findPack
(
cardpack_db
,
c
.
id
);
if
(
c
.
IsType
(
CardType
.
TYPE_SPELL
)
||
c
.
IsType
(
CardType
.
TYPE_TRAP
))
if
(
c
.
IsType
(
CardType
.
TYPE_SPELL
)
||
c
.
IsType
(
CardType
.
TYPE_TRAP
))
sw
.
WriteLine
(
getSpellTrap
(
c
,
jpg
,
c
.
IsType
(
CardType
.
TYPE_SPELL
)));
sw
.
WriteLine
(
getSpellTrap
(
c
,
jpg
,
c
.
IsType
(
CardType
.
TYPE_SPELL
)
,
cardpack
,
rarity
));
else
else
sw
.
WriteLine
(
getMonster
(
c
,
jpg
,
c
.
IsType
(
CardType
.
TYPE_PENDULUM
)));
sw
.
WriteLine
(
getMonster
(
c
,
jpg
,
c
.
IsType
(
CardType
.
TYPE_PENDULUM
)
,
cardpack
,
rarity
));
}
}
sw
.
WriteLine
(
cfg
.
end
);
sw
.
WriteLine
(
cfg
.
end
);
sw
.
Close
();
sw
.
Close
();
...
@@ -398,7 +401,7 @@ public string[] GetTypes(Card c)
...
@@ -398,7 +401,7 @@ public string[] GetTypes(Card c)
return
list
;
return
list
;
}
}
//怪兽,pendulum怪兽
//怪兽,pendulum怪兽
string
getMonster
(
Card
c
,
string
img
,
bool
isPendulum
)
string
getMonster
(
Card
c
,
string
img
,
bool
isPendulum
,
CardPack
cardpack
=
null
,
bool
rarity
=
true
)
{
{
StringBuilder
sb
=
new
StringBuilder
();
StringBuilder
sb
=
new
StringBuilder
();
string
[]
types
=
GetTypes
(
c
);
string
[]
types
=
GetTypes
(
c
);
...
@@ -413,6 +416,12 @@ string getMonster(Card c, string img, bool isPendulum)
...
@@ -413,6 +416,12 @@ string getMonster(Card c, string img, bool isPendulum)
sb
.
AppendLine
(
GetLine
(
TAG_TYPE2
,
cn2tw
(
types
[
1
])));
sb
.
AppendLine
(
GetLine
(
TAG_TYPE2
,
cn2tw
(
types
[
1
])));
sb
.
AppendLine
(
GetLine
(
TAG_TYPE3
,
cn2tw
(
types
[
2
])));
sb
.
AppendLine
(
GetLine
(
TAG_TYPE3
,
cn2tw
(
types
[
2
])));
sb
.
AppendLine
(
GetLine
(
TAG_TYPE4
,
cn2tw
(
types
[
3
])));
sb
.
AppendLine
(
GetLine
(
TAG_TYPE4
,
cn2tw
(
types
[
3
])));
if
(
cardpack
!=
null
){
sb
.
AppendLine
(
GetLine
(
TAG_NUMBER
,
cardpack
.
pack_id
));
if
(
rarity
){
sb
.
AppendLine
(
GetLine
(
TAG_RARITY
,
cardpack
.
getMseRarity
()));
}
}
if
(
isPendulum
)
//P怪兽
if
(
isPendulum
)
//P怪兽
{
{
string
text
=
GetDesc
(
c
.
desc
,
cfg
.
regx_monster
);
string
text
=
GetDesc
(
c
.
desc
,
cfg
.
regx_monster
);
...
@@ -439,7 +448,7 @@ string getMonster(Card c, string img, bool isPendulum)
...
@@ -439,7 +448,7 @@ string getMonster(Card c, string img, bool isPendulum)
return
sb
.
ToString
();
return
sb
.
ToString
();
}
}
//魔法陷阱
//魔法陷阱
string
getSpellTrap
(
Card
c
,
string
img
,
bool
isSpell
)
string
getSpellTrap
(
Card
c
,
string
img
,
bool
isSpell
,
CardPack
cardpack
=
null
,
bool
rarity
=
true
)
{
{
StringBuilder
sb
=
new
StringBuilder
();
StringBuilder
sb
=
new
StringBuilder
();
sb
.
AppendLine
(
TAG_CARD
+
":"
);
sb
.
AppendLine
(
TAG_CARD
+
":"
);
...
@@ -448,6 +457,12 @@ string getSpellTrap(Card c, string img, bool isSpell)
...
@@ -448,6 +457,12 @@ string getSpellTrap(Card c, string img, bool isSpell)
sb
.
AppendLine
(
GetLine
(
TAG_ATTRIBUTE
,
isSpell
?
"spell"
:
"trap"
));
sb
.
AppendLine
(
GetLine
(
TAG_ATTRIBUTE
,
isSpell
?
"spell"
:
"trap"
));
sb
.
AppendLine
(
GetLine
(
TAG_LEVEL
,
GetSpellTrapSymbol
(
c
,
isSpell
)));
sb
.
AppendLine
(
GetLine
(
TAG_LEVEL
,
GetSpellTrapSymbol
(
c
,
isSpell
)));
sb
.
AppendLine
(
GetLine
(
TAG_IMAGE
,
img
));
sb
.
AppendLine
(
GetLine
(
TAG_IMAGE
,
img
));
if
(
cardpack
!=
null
){
sb
.
AppendLine
(
GetLine
(
TAG_NUMBER
,
cardpack
.
pack_id
));
if
(
rarity
){
sb
.
AppendLine
(
GetLine
(
TAG_RARITY
,
cardpack
.
getMseRarity
()));
}
}
sb
.
AppendLine
(
" "
+
TAG_TEXT
+
":"
);
sb
.
AppendLine
(
" "
+
TAG_TEXT
+
":"
);
sb
.
AppendLine
(
" "
+
ReText
(
reItalic
(
c
.
desc
)));
sb
.
AppendLine
(
" "
+
ReText
(
reItalic
(
c
.
desc
)));
sb
.
AppendLine
(
GetLine
(
TAG_CODE
,
c
.
idString
));
sb
.
AppendLine
(
GetLine
(
TAG_CODE
,
c
.
idString
));
...
...
DataEditorX/Core/TaskHelper.cs
View file @
5cf7bf28
This diff is collapsed.
Click to expand it.
DataEditorX/DataEditorX.csproj
View file @
5cf7bf28
...
@@ -108,6 +108,7 @@
...
@@ -108,6 +108,7 @@
<Compile
Include=
"Config\DataManager.cs"
/>
<Compile
Include=
"Config\DataManager.cs"
/>
<Compile
Include=
"Config\ImageSet.cs"
/>
<Compile
Include=
"Config\ImageSet.cs"
/>
<Compile
Include=
"Core\LuaFunction.cs"
/>
<Compile
Include=
"Core\LuaFunction.cs"
/>
<Compile
Include=
"Core\Mse\CardPack.cs"
/>
<Compile
Include=
"Core\Mse\MSECons.cs"
/>
<Compile
Include=
"Core\Mse\MSECons.cs"
/>
<Compile
Include=
"Core\Mse\MseMaker.cs"
/>
<Compile
Include=
"Core\Mse\MseMaker.cs"
/>
<Compile
Include=
"Core\Mse\MSEConfig.cs"
/>
<Compile
Include=
"Core\Mse\MSEConfig.cs"
/>
...
...
DataEditorX/Properties/AssemblyInfo.cs
View file @
5cf7bf28
...
@@ -28,4 +28,4 @@
...
@@ -28,4 +28,4 @@
//
//
// You can specify all the values or you can use the default the Revision and
// You can specify all the values or you can use the default the Revision and
// Build Numbers by using the '*' as shown below:
// Build Numbers by using the '*' as shown below:
[
assembly
:
AssemblyVersion
(
"2.4.1.
0
"
)]
[
assembly
:
AssemblyVersion
(
"2.4.1.
1
"
)]
DataEditorX/app.config
View file @
5cf7bf28
...
@@ -46,5 +46,7 @@
...
@@ -46,5 +46,7 @@
<!--
MSE
path
-->
<!--
MSE
path
-->
<
add
key
=
"mse_path"
value
=
"./MagicSetEditor2/mse.exe"
/>
<
add
key
=
"mse_path"
value
=
"./MagicSetEditor2/mse.exe"
/>
<
add
key
=
"mse_exprotpath"
value
=
"./exprot"
/>
<
add
key
=
"mse_exprotpath"
value
=
"./exprot"
/>
<
add
key
=
"mse_auto_rarity"
value
=
"true"
/>
<
add
key
=
"pack_db"
value
=
"./pack.cdb"
/>
</
appSettings
>
</
appSettings
>
</
configuration
>
</
configuration
>
\ No newline at end of file
DataEditorX/changed.txt
View file @
5cf7bf28
★更新历史
★更新历史
2.4.1.1
新增卡包数据库,支持导出带卡包信息和rarity
2.4.1.0
2.4.1.0
更新数据
更新数据
2.4.0.9
2.4.0.9
...
...
DataEditorX/readme.txt
View file @
5cf7bf28
[DataEditorX]2.4.1.
0
[DataEditorX]
[DataEditorX]2.4.1.
1
[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★运行环境(Environment)
★运行环境(Environment)
...
...
win32/DataEditorX.exe
View file @
5cf7bf28
No preview for this file type
win32/DataEditorX.exe.config
View file @
5cf7bf28
...
@@ -46,5 +46,7 @@
...
@@ -46,5 +46,7 @@
<!--
MSE
path
-->
<!--
MSE
path
-->
<
add
key
=
"mse_path"
value
=
"./MagicSetEditor2/mse.exe"
/>
<
add
key
=
"mse_path"
value
=
"./MagicSetEditor2/mse.exe"
/>
<
add
key
=
"mse_exprotpath"
value
=
"./exprot"
/>
<
add
key
=
"mse_exprotpath"
value
=
"./exprot"
/>
<
add
key
=
"mse_auto_rarity"
value
=
"true"
/>
<
add
key
=
"pack_db"
value
=
"./pack.cdb"
/>
</
appSettings
>
</
appSettings
>
</
configuration
>
</
configuration
>
\ No newline at end of file
win32/changed.txt
View file @
5cf7bf28
★更新历史
★更新历史
2.4.1.1
新增卡包数据库,支持导出带卡包信息和rarity
2.4.1.0
2.4.1.0
更新数据
更新数据
2.4.0.9
2.4.0.9
...
...
win32/data/history.txt
deleted
100644 → 0
View file @
95e53e76
# database history
D:\code\a.cdb
D:\code\italian.cdb
# script history
\ No newline at end of file
win32/readme.txt
View file @
5cf7bf28
[DataEditorX]2.4.1.
0
[DataEditorX]
[DataEditorX]2.4.1.
1
[DataEditorX]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
[URL]https://github.com/247321453/DataEditorX/raw/master/win32/win32.zip[URL]
★运行环境(Environment)
★运行环境(Environment)
...
...
win32/win32.zip
View file @
5cf7bf28
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