Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
I
ImgGen
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
MyCard
ImgGen
Commits
fa0d2cc7
Commit
fa0d2cc7
authored
Apr 01, 2017
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
048c08ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
78 deletions
+16
-78
DataManager.cs
DataManager.cs
+16
-65
Program.cs
Program.cs
+0
-13
No files found.
DataManager.cs
View file @
fa0d2cc7
...
@@ -17,20 +17,16 @@ namespace ImgGen
...
@@ -17,20 +17,16 @@ namespace ImgGen
private
static
Bitmap
[]
bLinkMarkers2
=
new
Bitmap
[
9
];
private
static
Bitmap
[]
bLinkMarkers2
=
new
Bitmap
[
9
];
private
static
Dictionary
<
int
,
Data
>
cardDatas
=
new
Dictionary
<
int
,
Data
>();
private
static
Dictionary
<
int
,
Data
>
cardDatas
=
new
Dictionary
<
int
,
Data
>();
private
static
Dictionary
<
int
,
Bitmap
>
cardImages
=
new
Dictionary
<
int
,
Bitmap
>();
private
static
Dictionary
<
int
,
Bitmap
>
cardImages
=
new
Dictionary
<
int
,
Bitmap
>();
private
static
Dictionary
<
int
,
Text
>
cardTexts
=
new
Dictionary
<
int
,
Text
>();
private
static
SQLiteConnection
conn
;
private
static
SQLiteConnection
conn
;
private
static
Dictionary
<
int
,
string
>
ctStrings
=
new
Dictionary
<
int
,
string
>();
private
static
object
locker
=
new
object
();
private
static
object
locker
=
new
object
();
private
static
SolidBrush
nameBrush
=
new
SolidBrush
(
Color
.
FromArgb
(
64
,
64
,
0
));
private
static
SolidBrush
nameBrush
=
new
SolidBrush
(
Color
.
FromArgb
(
64
,
64
,
0
));
private
static
Font
nameFont
;
private
static
Font
nameFont
;
private
static
Font
numFont
;
private
static
Font
numFont
;
private
static
Font
linkFont
;
private
static
Font
linkFont
;
private
static
Dictionary
<
int
,
string
>
sysStrings
=
new
Dictionary
<
int
,
string
>();
private
static
SolidBrush
textBrush
=
new
SolidBrush
(
Color
.
FromArgb
(
64
,
64
,
64
));
private
static
SolidBrush
textBrush
=
new
SolidBrush
(
Color
.
FromArgb
(
64
,
64
,
64
));
private
static
Font
txtFont
;
private
static
Font
txtFont
;
private
static
SolidBrush
typeBrush
=
new
SolidBrush
(
Color
.
FromArgb
(
32
,
32
,
32
));
private
static
SolidBrush
typeBrush
=
new
SolidBrush
(
Color
.
FromArgb
(
32
,
32
,
32
));
private
static
Font
typeFont
;
private
static
Font
typeFont
;
private
static
Dictionary
<
int
,
string
>
winStrings
=
new
Dictionary
<
int
,
string
>();
private
static
string
regex_monster
=
@"[果|介|述|報]】\n([\S\s]*)"
;
private
static
string
regex_monster
=
@"[果|介|述|報]】\n([\S\s]*)"
;
private
static
string
regex_pendulum
=
@"】[\s\S]*?\n([\S\s]*?)\n【"
;
private
static
string
regex_pendulum
=
@"】[\s\S]*?\n([\S\s]*?)\n【"
;
...
@@ -75,67 +71,23 @@ namespace ImgGen
...
@@ -75,67 +71,23 @@ namespace ImgGen
case
Race
.
RACE_CREATORGOD
:
str
=
str
+
"创造神族"
;
break
;
case
Race
.
RACE_CREATORGOD
:
str
=
str
+
"创造神族"
;
break
;
case
Race
.
RACE_WYRM
:
str
=
str
+
"幻龙族"
;
break
;
case
Race
.
RACE_WYRM
:
str
=
str
+
"幻龙族"
;
break
;
case
Race
.
RACE_CYBERS
:
str
=
str
+
"电子界族"
;
break
;
case
Race
.
RACE_CYBERS
:
str
=
str
+
"电子界族"
;
break
;
default
:
str
=
str
+
"???"
;
break
;
}
}
if
(
data
.
isType
(
Type
.
TYPE_FUSION
))
if
(
data
.
isType
(
Type
.
TYPE_FUSION
))
str
=
str
+
"/融合"
;
{
if
(
data
.
isType
(
Type
.
TYPE_SYNCHRO
))
str
=
str
+
"/同调"
;
str
=
str
+
"/融合"
;
if
(
data
.
isType
(
Type
.
TYPE_LINK
))
str
=
str
+
"/连接"
;
}
if
(
data
.
isType
(
Type
.
TYPE_XYZ
))
str
=
str
+
"/"
+
xyzString
;
if
(
data
.
isType
(
Type
.
TYPE_SYNCHRO
))
if
(
data
.
isType
(
Type
.
TYPE_RITUAL
))
str
=
str
+
"/仪式"
;
{
if
(
data
.
isType
(
Type
.
TYPE_SPSUMMON
))
str
=
str
+
"/特殊召唤"
;
str
=
str
+
"/同调"
;
if
(
data
.
isType
(
Type
.
TYPE_PENDULUM
))
str
=
str
+
"/灵摆"
;
}
if
(
data
.
isType
(
Type
.
TYPE_SPIRIT
))
str
=
str
+
"/灵魂"
;
if
(
data
.
isType
(
Type
.
TYPE_LINK
))
if
(
data
.
isType
(
Type
.
TYPE_DUAL
))
str
=
str
+
"/二重"
;
{
if
(
data
.
isType
(
Type
.
TYPE_UNION
))
str
=
str
+
"/同盟"
;
str
=
str
+
"/连接"
;
if
(
data
.
isType
(
Type
.
TYPE_FLIP
))
str
=
str
+
"/反转"
;
}
if
(
data
.
isType
(
Type
.
TYPE_TOON
))
str
=
str
+
"/卡通"
;
else
if
(
data
.
isType
(
Type
.
TYPE_XYZ
))
if
(
data
.
isType
(
Type
.
TYPE_TUNER
))
str
=
str
+
"/调整"
;
{
if
(
data
.
isType
(
Type
.
TYPE_EFFECT
))
str
=
str
+
"/效果"
;
str
=
str
+
"/"
+
xyzString
;
if
(
data
.
isType
(
Type
.
TYPE_NORMAL
))
str
=
str
+
"/通常"
;
}
if
(
data
.
isType
(
Type
.
TYPE_RITUAL
))
{
str
=
str
+
"/仪式"
;
}
if
(
data
.
isType
(
Type
.
TYPE_SPSUMMON
))
{
str
=
str
+
"/特殊召唤"
;
}
if
(
data
.
isType
(
Type
.
TYPE_PENDULUM
))
{
str
=
str
+
"/灵摆"
;
}
if
(
data
.
isType
(
Type
.
TYPE_SPIRIT
))
{
str
=
str
+
"/灵魂"
;
}
else
if
(
data
.
isType
(
Type
.
TYPE_DUAL
))
{
str
=
str
+
"/二重"
;
}
else
if
(
data
.
isType
(
Type
.
TYPE_UNION
))
{
str
=
str
+
"/同盟"
;
}
else
if
(
data
.
isType
(
Type
.
TYPE_FLIP
))
{
str
=
str
+
"/反转"
;
}
else
if
(
data
.
isType
(
Type
.
TYPE_TOON
))
{
str
=
str
+
"/卡通"
;
}
if
(
data
.
isType
(
Type
.
TYPE_TUNER
))
{
str
=
str
+
"/调整"
;
}
if
(
data
.
isType
(
Type
.
TYPE_EFFECT
))
{
str
=
str
+
"/效果"
;
}
if
(
data
.
isType
(
Type
.
TYPE_NORMAL
))
{
str
=
str
+
"/通常"
;
}
return
(
str
+
"】"
);
return
(
str
+
"】"
);
}
}
...
@@ -281,7 +233,6 @@ namespace ImgGen
...
@@ -281,7 +233,6 @@ namespace ImgGen
conn
.
Close
();
conn
.
Close
();
}
}
cardDatas
.
Add
(
code
,
data
);
cardDatas
.
Add
(
code
,
data
);
cardTexts
.
Add
(
code
,
text
);
if
(!
cardImages
.
ContainsKey
(
code
))
if
(!
cardImages
.
ContainsKey
(
code
))
{
{
Bitmap
bitmap
;
Bitmap
bitmap
;
...
...
Program.cs
View file @
fa0d2cc7
...
@@ -48,20 +48,7 @@
...
@@ -48,20 +48,7 @@
Console
.
WriteLine
(
"Generating {0}"
,
fileName
);
Console
.
WriteLine
(
"Generating {0}"
,
fileName
);
Bitmap
image
=
DataManager
.
GetImage
(
code
);
Bitmap
image
=
DataManager
.
GetImage
(
code
);
image
.
Save
(
"./picn/"
+
fileName
,
encoderInfo
,
encoderParams
);
image
.
Save
(
"./picn/"
+
fileName
,
encoderInfo
,
encoderParams
);
DataManager
.
Zoom
(
image
,
44
,
64
).
Save
(
"./picn/thumbnail/"
+
fileName
,
encoderInfo
,
encoderParams
);
DataManager
.
Zoom
(
image
,
44
,
64
).
Save
(
"./picn/thumbnail/"
+
fileName
,
encoderInfo
,
encoderParams
);
/*
Bitmap thumbnail = new Bitmap(44, 64);
Graphics graph = Graphics.FromImage(thumbnail);
graph.DrawImage(image, 0, 0, 44, 64);
thumbnail.Save("./picn/thumbnail/" + fileName, encoderInfo, encoderParams);
thumbnail.Dispose();
*/
/*
Bitmap thumbnail = new Bitmap(image, 44, 64);
thumbnail.Save("./picn/thumbnail/" + fileName, encoderInfo, encoderParams);
thumbnail.Dispose();
*/
image
.
Dispose
();
image
.
Dispose
();
}
}
}
}
...
...
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