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
2
Issues
2
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
3b1132f8
Commit
3b1132f8
authored
May 24, 2015
by
keyongyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2.3.2.0
parent
522136b9
Changes
23
Show whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
952 additions
and
829 deletions
+952
-829
DataEditorX/Common/MyUtils.cs
DataEditorX/Common/MyUtils.cs
+52
-0
DataEditorX/Common/StrUtil.cs
DataEditorX/Common/StrUtil.cs
+1
-1
DataEditorX/Core/Mse/MSEConfig.cs
DataEditorX/Core/Mse/MSEConfig.cs
+155
-134
DataEditorX/Core/Mse/MseMaker.cs
DataEditorX/Core/Mse/MseMaker.cs
+710
-688
DataEditorX/Core/TaskHelper.cs
DataEditorX/Core/TaskHelper.cs
+2
-1
DataEditorX/DataEditorX.csproj
DataEditorX/DataEditorX.csproj
+1
-0
DataEditorX/Properties/AssemblyInfo.cs
DataEditorX/Properties/AssemblyInfo.cs
+1
-1
DataEditorX/changed.txt
DataEditorX/changed.txt
+2
-0
DataEditorX/data/mse_Chinese-Simplified.txt
DataEditorX/data/mse_Chinese-Simplified.txt
+3
-0
DataEditorX/data/mse_Chinese-Traditional.txt
DataEditorX/data/mse_Chinese-Traditional.txt
+3
-0
DataEditorX/data/mse_English.txt
DataEditorX/data/mse_English.txt
+3
-0
DataEditorX/data/mse_Japan.txt
DataEditorX/data/mse_Japan.txt
+3
-0
DataEditorX/readme.txt
DataEditorX/readme.txt
+1
-1
win32/DataEditorX.exe
win32/DataEditorX.exe
+0
-0
win32/changed.txt
win32/changed.txt
+2
-0
win32/data/language_chinese.txt
win32/data/language_chinese.txt
+0
-1
win32/data/language_english.txt
win32/data/language_english.txt
+0
-1
win32/data/mse_Chinese-Simplified.txt
win32/data/mse_Chinese-Simplified.txt
+3
-0
win32/data/mse_Chinese-Traditional.txt
win32/data/mse_Chinese-Traditional.txt
+3
-0
win32/data/mse_English.txt
win32/data/mse_English.txt
+3
-0
win32/data/mse_Japan.txt
win32/data/mse_Japan.txt
+3
-0
win32/readme.txt
win32/readme.txt
+1
-1
win32/win32.zip
win32/win32.zip
+0
-0
No files found.
DataEditorX/Common/MyUtils.cs
0 → 100644
View file @
3b1132f8
/*
* 由SharpDevelop创建。
* 用户: Acer
* 日期: 2015-5-24
* 时间: 10:55
*
* 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
*/
using
System
;
using
System.Text
;
using
System.IO
;
namespace
DataEditorX.Common
{
/// <summary>
/// Description of MyUtils.
/// </summary>
public
class
MyUtils
{
/// <summary>
/// 计算文件的MD5校验
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
public
static
string
GetMD5HashFromFile
(
string
fileName
)
{
try
{
FileStream
file
=
new
FileStream
(
fileName
,
FileMode
.
Open
);
System
.
Security
.
Cryptography
.
MD5
md5
=
new
System
.
Security
.
Cryptography
.
MD5CryptoServiceProvider
();
byte
[]
retVal
=
md5
.
ComputeHash
(
file
);
file
.
Close
();
StringBuilder
sb
=
new
StringBuilder
();
for
(
int
i
=
0
;
i
<
retVal
.
Length
;
i
++)
{
sb
.
Append
(
retVal
[
i
].
ToString
(
"x2"
));
}
return
sb
.
ToString
();
}
catch
{
}
return
""
;
}
public
static
bool
Md5isEmpty
(
string
md5
){
return
md5
==
null
||
md5
.
Length
<
16
;
}
}
}
DataEditorX/Common/StrUtil.cs
View file @
3b1132f8
...
@@ -8,7 +8,7 @@ public class StrUtil
...
@@ -8,7 +8,7 @@ public class StrUtil
{
{
public
static
string
AutoEnter
(
string
str
,
int
lineNum
,
char
re
)
public
static
string
AutoEnter
(
string
str
,
int
lineNum
,
char
re
)
{
{
if
(
str
==
null
||
str
.
Length
==
0
||
re
==
null
)
if
(
str
==
null
||
str
.
Length
==
0
)
return
str
;
return
str
;
str
=
str
.
Replace
(
"\r\n"
,
"\n"
);
str
=
str
.
Replace
(
"\r\n"
,
"\n"
);
char
[]
ch
=
str
.
ToCharArray
();
char
[]
ch
=
str
.
ToCharArray
();
...
...
DataEditorX/Core/Mse/MSEConfig.cs
View file @
3b1132f8
...
@@ -39,6 +39,8 @@ public class MSEConfig
...
@@ -39,6 +39,8 @@ public class MSEConfig
public
const
string
TAG_MAXCOUNT
=
"maxcount"
;
public
const
string
TAG_MAXCOUNT
=
"maxcount"
;
public
const
string
TAG_RACE
=
"race"
;
public
const
string
TAG_RACE
=
"race"
;
public
const
string
TAG_TYPE
=
"type"
;
public
const
string
TAG_TYPE
=
"type"
;
public
const
string
TAG_WIDTH
=
"width"
;
public
const
string
TAG_HEIGHT
=
"height"
;
public
const
string
TAG_IMAGE
=
"imagepath"
;
public
const
string
TAG_IMAGE
=
"imagepath"
;
public
const
string
TAG_REPALCE
=
"replace"
;
public
const
string
TAG_REPALCE
=
"replace"
;
...
@@ -91,10 +93,19 @@ public void SetConfig(string config, string path)
...
@@ -91,10 +93,19 @@ public void SetConfig(string config, string path)
regx_monster
=
ConfHelper
.
getValue
(
line
);
regx_monster
=
ConfHelper
.
getValue
(
line
);
else
if
(
line
.
StartsWith
(
TAG_MAXCOUNT
))
else
if
(
line
.
StartsWith
(
TAG_MAXCOUNT
))
maxcount
=
ConfHelper
.
getIntegerValue
(
line
,
0
);
maxcount
=
ConfHelper
.
getIntegerValue
(
line
,
0
);
else
if
(
line
.
StartsWith
(
TAG_WIDTH
)){
width
=
ConfHelper
.
getIntegerValue
(
line
,
0
);
}
else
if
(
line
.
StartsWith
(
TAG_HEIGHT
)){
height
=
ConfHelper
.
getIntegerValue
(
line
,
0
);
}
else
if
(
line
.
StartsWith
(
TAG_IMAGE
))
else
if
(
line
.
StartsWith
(
TAG_IMAGE
))
{
{
//如果路径不合法,则为后面的路径
//如果路径不合法,则为后面的路径
imagepath
=
MyPath
.
CheckDir
(
ConfHelper
.
getValue
(
line
),
MyPath
.
Combine
(
path
,
PATH_IMAGE
));
imagepath
=
MyPath
.
CheckDir
(
ConfHelper
.
getValue
(
line
),
MyPath
.
Combine
(
path
,
PATH_IMAGE
));
//图片缓存目录
imagecache
=
MyPath
.
Combine
(
imagepath
,
"cache"
);
MyPath
.
CreateDir
(
imagecache
);
}
}
else
if
(
line
.
StartsWith
(
TAG_REPALCE
))
else
if
(
line
.
StartsWith
(
TAG_REPALCE
))
{
//特数字替换
{
//特数字替换
...
@@ -130,12 +141,22 @@ public void init(string path)
...
@@ -130,12 +141,22 @@ public void init(string path)
}
}
SetConfig
(
tmp
,
path
);
SetConfig
(
tmp
,
path
);
}
}
/// <summary>
/// 中间图宽度
/// </summary>
public
int
width
;
/// <summary>
/// 中间图高度
/// </summary>
public
int
height
;
//每个存档最大数
//每个存档最大数
public
int
maxcount
;
public
int
maxcount
;
//图片路径
//图片路径
public
string
imagepath
;
public
string
imagepath
;
/// <summary>
/// 图片缓存路径
/// </summary>
public
string
imagecache
;
//魔法标志
//魔法标志
public
string
str_spell
;
public
string
str_spell
;
//陷阱标志
//陷阱标志
...
...
DataEditorX/Core/Mse/MseMaker.cs
View file @
3b1132f8
...
@@ -11,9 +11,11 @@
...
@@ -11,9 +11,11 @@
using
System.Text.RegularExpressions
;
using
System.Text.RegularExpressions
;
using
Microsoft.VisualBasic
;
using
Microsoft.VisualBasic
;
using
System.Drawing
;
using
DataEditorX.Core.Info
;
using
DataEditorX.Core.Info
;
using
DataEditorX.Config
;
using
DataEditorX.Config
;
using
DataEditorX.Language
;
using
DataEditorX.Language
;
using
DataEditorX.Common
;
namespace
DataEditorX.Core.Mse
namespace
DataEditorX.Core.Mse
{
{
...
@@ -720,5 +722,25 @@ public Card[] ReadCards(string set, bool repalceOld)
...
@@ -720,5 +722,25 @@ public Card[] ReadCards(string set, bool repalceOld)
return
cards
.
ToArray
();
return
cards
.
ToArray
();
}
}
#
endregion
#
endregion
public
string
getImageCache
(
string
img
){
if
(
cfg
.
width
<=
0
&&
cfg
.
height
<=
0
)
return
img
;
string
md5
=
MyUtils
.
GetMD5HashFromFile
(
img
);
if
(
MyUtils
.
Md5isEmpty
(
md5
)||
cfg
.
imagecache
==
null
){
//md5为空
return
img
;
}
string
file
=
MyPath
.
Combine
(
cfg
.
imagecache
,
md5
+
".png"
);
if
(!
File
.
Exists
(
file
)){
//生成缓存
Bitmap
bmp
=
MyBitmap
.
readImage
(
file
);
//缩放
bmp
=
MyBitmap
.
Zoom
(
bmp
,
cfg
.
width
,
cfg
.
height
);
//保存文件
MyBitmap
.
SaveAsJPEG
(
bmp
,
file
,
100
);
}
return
img
;
}
}
}
}
}
DataEditorX/Core/TaskHelper.cs
View file @
3b1132f8
...
@@ -293,7 +293,8 @@ public void SaveMSE(int num, string file, Card[] cards, bool isUpdate)
...
@@ -293,7 +293,8 @@ public void SaveMSE(int num, string file, Card[] cards, bool isUpdate)
break
;
break
;
i
++;
i
++;
worker
.
ReportProgress
(
i
/
count
,
string
.
Format
(
"{0}/{1}-{2}"
,
i
,
count
,
num
));
worker
.
ReportProgress
(
i
/
count
,
string
.
Format
(
"{0}/{1}-{2}"
,
i
,
count
,
num
));
zips
.
AddFile
(
img
,
Path
.
GetFileName
(
img
),
""
);
//TODO 先裁剪图片
zips
.
AddFile
(
mseHelper
.
getImageCache
(
img
),
Path
.
GetFileName
(
img
),
""
);
}
}
}
}
File
.
Delete
(
setFile
);
File
.
Delete
(
setFile
);
...
...
DataEditorX/DataEditorX.csproj
View file @
3b1132f8
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
</Compile>
</Compile>
<Compile
Include=
"Common\CheckUpdate.cs"
/>
<Compile
Include=
"Common\CheckUpdate.cs"
/>
<Compile
Include=
"Common\ConfHelper.cs"
/>
<Compile
Include=
"Common\ConfHelper.cs"
/>
<Compile
Include=
"Common\MyUtils.cs"
/>
<Compile
Include=
"Common\StrUtil.cs"
/>
<Compile
Include=
"Common\StrUtil.cs"
/>
<Compile
Include=
"Common\XMLReader.cs"
/>
<Compile
Include=
"Common\XMLReader.cs"
/>
<Compile
Include=
"Config\YgoPath.cs"
/>
<Compile
Include=
"Config\YgoPath.cs"
/>
...
...
DataEditorX/Properties/AssemblyInfo.cs
View file @
3b1132f8
...
@@ -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.3.
1.4
"
)]
[
assembly
:
AssemblyVersion
(
"2.3.
2.0
"
)]
DataEditorX/changed.txt
View file @
3b1132f8
★更新历史
★更新历史
2.3.2.0
MSE存档的中间图缩放
2.3.1.4
2.3.1.4
增加灵摆刻度的搜索功能
增加灵摆刻度的搜索功能
关闭数据库时清理备份文件
关闭数据库时清理备份文件
...
...
DataEditorX/data/mse_Chinese-Simplified.txt
View file @
3b1132f8
...
@@ -7,6 +7,9 @@ cn2tw = false
...
@@ -7,6 +7,9 @@ cn2tw = false
########################### 存档最大卡片数
########################### 存档最大卡片数
maxcount = 0
maxcount = 0
imagepath = ./Images
imagepath = ./Images
########################### 中间图
width = 345
height = 346
########################### Spell/Trap
########################### Spell/Trap
#jp setting
#jp setting
# spell = %%
# spell = %%
...
...
DataEditorX/data/mse_Chinese-Traditional.txt
View file @
3b1132f8
...
@@ -7,6 +7,9 @@ cn2tw = false
...
@@ -7,6 +7,9 @@ cn2tw = false
########################### Setting
########################### Setting
maxcount = 0
maxcount = 0
imagepath = ./Images
imagepath = ./Images
########################### 中间图
width = 345
height = 346
########################### Spell/Trap
########################### Spell/Trap
#jp setting
#jp setting
# spell = %%
# spell = %%
...
...
DataEditorX/data/mse_English.txt
View file @
3b1132f8
...
@@ -7,6 +7,9 @@ cn2tw = false
...
@@ -7,6 +7,9 @@ cn2tw = false
########################### Setting
########################### Setting
maxcount = 200
maxcount = 200
imagepath = ./Images
imagepath = ./Images
########################### 中间图
width = 345
height = 346
########################### Spell/Trap
########################### Spell/Trap
spell = [Sepll Card%%]
spell = [Sepll Card%%]
trap = [Trap Card%%]
trap = [Trap Card%%]
...
...
DataEditorX/data/mse_Japan.txt
View file @
3b1132f8
...
@@ -7,6 +7,9 @@ cn2tw = false
...
@@ -7,6 +7,9 @@ cn2tw = false
########################### Setting
########################### Setting
maxcount = 0
maxcount = 0
imagepath = ./Images
imagepath = ./Images
########################### 中间图
width = 345
height = 346
########################### Spell/Trap
########################### Spell/Trap
#jp setting
#jp setting
spell = %%
spell = %%
...
...
DataEditorX/readme.txt
View file @
3b1132f8
[DataEditorX]2.3.
1.4
[DataEditorX]
[DataEditorX]2.3.
2.0
[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 @
3b1132f8
No preview for this file type
win32/changed.txt
View file @
3b1132f8
★更新历史
★更新历史
2.3.2.0
MSE存档的中间图缩放
2.3.1.4
2.3.1.4
增加灵摆刻度的搜索功能
增加灵摆刻度的搜索功能
关闭数据库时清理备份文件
关闭数据库时清理备份文件
...
...
win32/data/language_chinese.txt
View file @
3b1132f8
...
@@ -157,4 +157,3 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
...
@@ -157,4 +157,3 @@ MainForm.mainMenu.menuitem_closeall 关闭所有
0x47 读取MSE存档
0x47 读取MSE存档
0x48 读取MSE存档完成!
0x48 读取MSE存档完成!
0x49 请重启程序使更改生效
0x49 请重启程序使更改生效
0x4c 是否同时删除卡图、脚本等资源?
\ No newline at end of file
win32/data/language_english.txt
View file @
3b1132f8
...
@@ -156,4 +156,3 @@ MainForm.mainMenu.menuitem_closeall Close All
...
@@ -156,4 +156,3 @@ MainForm.mainMenu.menuitem_closeall Close All
0x47 Read MSE-set
0x47 Read MSE-set
0x48 Read MSE-set is OK.
0x48 Read MSE-set is OK.
0x49 Please restart program to apply changes.
0x49 Please restart program to apply changes.
0x4c Also delete pics and scripts?
\ No newline at end of file
win32/data/mse_Chinese-Simplified.txt
View file @
3b1132f8
...
@@ -7,6 +7,9 @@ cn2tw = false
...
@@ -7,6 +7,9 @@ cn2tw = false
########################### 存档最大卡片数
########################### 存档最大卡片数
maxcount = 0
maxcount = 0
imagepath = ./Images
imagepath = ./Images
########################### 中间图
width = 345
height = 346
########################### Spell/Trap
########################### Spell/Trap
#jp setting
#jp setting
# spell = %%
# spell = %%
...
...
win32/data/mse_Chinese-Traditional.txt
View file @
3b1132f8
...
@@ -7,6 +7,9 @@ cn2tw = false
...
@@ -7,6 +7,9 @@ cn2tw = false
########################### Setting
########################### Setting
maxcount = 0
maxcount = 0
imagepath = ./Images
imagepath = ./Images
########################### 中间图
width = 345
height = 346
########################### Spell/Trap
########################### Spell/Trap
#jp setting
#jp setting
# spell = %%
# spell = %%
...
...
win32/data/mse_English.txt
View file @
3b1132f8
...
@@ -7,6 +7,9 @@ cn2tw = false
...
@@ -7,6 +7,9 @@ cn2tw = false
########################### Setting
########################### Setting
maxcount = 200
maxcount = 200
imagepath = ./Images
imagepath = ./Images
########################### 中间图
width = 345
height = 346
########################### Spell/Trap
########################### Spell/Trap
spell = [Sepll Card%%]
spell = [Sepll Card%%]
trap = [Trap Card%%]
trap = [Trap Card%%]
...
...
win32/data/mse_Japan.txt
View file @
3b1132f8
...
@@ -7,6 +7,9 @@ cn2tw = false
...
@@ -7,6 +7,9 @@ cn2tw = false
########################### Setting
########################### Setting
maxcount = 0
maxcount = 0
imagepath = ./Images
imagepath = ./Images
########################### 中间图
width = 345
height = 346
########################### Spell/Trap
########################### Spell/Trap
#jp setting
#jp setting
spell = %%
spell = %%
...
...
win32/readme.txt
View file @
3b1132f8
[DataEditorX]2.3.
1.4
[DataEditorX]
[DataEditorX]2.3.
2.0
[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 @
3b1132f8
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