Commit 0294b860 authored by mercury233's avatar mercury233

code normalization by JoyJ

parent 41f9c231
...@@ -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())
{ {
......
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment