Commit 0294b860 authored by mercury233's avatar mercury233

code normalization by JoyJ

parent 41f9c231
......@@ -178,7 +178,7 @@ namespace ImgGen
SQLiteCommand command = new SQLiteCommand(conn);
SQLiteDataReader reader;
command.CommandText = string.Format("select * from datas where id={0}", code);
command.CommandText = $"SELECT * FROM datas WHERE id={code}";
reader = command.ExecuteReader();
if (reader.Read())
{
......@@ -194,7 +194,7 @@ namespace ImgGen
}
reader.Close();
command.CommandText = string.Format("select * from texts where id={0}", code);
command.CommandText = $"SELECT * FROM texts WHERE id={code}";
reader = command.ExecuteReader();
if (reader.Read())
{
......
namespace ImgGen
namespace ImgGen
{
using System;
using System.Collections.Generic;
......@@ -60,7 +60,7 @@
continue;
}
string fileName = code.ToString() + ".jpg";
Console.WriteLine("Generating {0}", fileName);
Console.WriteLine($"Generating {fileName}");
Bitmap image = DataManager.GetImage(code);
if (generateLarge)
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