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
0294b860
Commit
0294b860
authored
Apr 28, 2020
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code normalization by JoyJ
parent
41f9c231
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
DataManager.cs
DataManager.cs
+2
-2
Program.cs
Program.cs
+2
-2
No files found.
DataManager.cs
View file @
0294b860
...
@@ -178,7 +178,7 @@ namespace ImgGen
...
@@ -178,7 +178,7 @@ namespace ImgGen
SQLiteCommand
command
=
new
SQLiteCommand
(
conn
);
SQLiteCommand
command
=
new
SQLiteCommand
(
conn
);
SQLiteDataReader
reader
;
SQLiteDataReader
reader
;
command
.
CommandText
=
string
.
Format
(
"select * from datas where id={0}"
,
code
)
;
command
.
CommandText
=
$"SELECT * FROM datas WHERE id=
{
code
}
"
;
reader
=
command
.
ExecuteReader
();
reader
=
command
.
ExecuteReader
();
if
(
reader
.
Read
())
if
(
reader
.
Read
())
{
{
...
@@ -194,7 +194,7 @@ namespace ImgGen
...
@@ -194,7 +194,7 @@ namespace ImgGen
}
}
reader
.
Close
();
reader
.
Close
();
command
.
CommandText
=
string
.
Format
(
"select * from texts where id={0}"
,
code
)
;
command
.
CommandText
=
$"SELECT * FROM texts WHERE id=
{
code
}
"
;
reader
=
command
.
ExecuteReader
();
reader
=
command
.
ExecuteReader
();
if
(
reader
.
Read
())
if
(
reader
.
Read
())
{
{
...
...
Program.cs
View file @
0294b860
namespace
ImgGen
namespace
ImgGen
{
{
using
System
;
using
System
;
using
System.Collections.Generic
;
using
System.Collections.Generic
;
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
continue
;
continue
;
}
}
string
fileName
=
code
.
ToString
()
+
".jpg"
;
string
fileName
=
code
.
ToString
()
+
".jpg"
;
Console
.
WriteLine
(
"Generating {0}"
,
fileName
);
Console
.
WriteLine
(
$"Generating
{
fileName
}
"
);
Bitmap
image
=
DataManager
.
GetImage
(
code
);
Bitmap
image
=
DataManager
.
GetImage
(
code
);
if
(
generateLarge
)
if
(
generateLarge
)
image
.
Save
(
"./picn/"
+
fileName
,
encoderInfo
,
encoderParams
);
image
.
Save
(
"./picn/"
+
fileName
,
encoderInfo
,
encoderParams
);
...
...
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