ISBN검색프로그램 null 오류 수정

ISBN검색프로그램 프로젝트 폴더 위치 정리
ISBN검색프로그램 설치 파일 업데이트
This commit is contained in:
SeungHo Yang
2025-08-14 18:23:22 +09:00
parent 9f892f7aec
commit c327030973
307 changed files with 8888 additions and 497403 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

281
ISBN_Check/Client/ISBN_Client.Designer.cs generated Normal file
View File

@@ -0,0 +1,281 @@

namespace ISBN_Client
{
partial class Client
{
/// <summary>
/// 필수 디자이너 변수입니다.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 사용 중인 모든 리소스를 정리합니다.
/// </summary>
/// <param name="disposing">관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form
/// <summary>
/// 디자이너 지원에 필요한 메서드입니다.
/// 이 메서드의 내용을 코드 편집기로 수정하지 마세요.
/// </summary>
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.rtb_Ip = new System.Windows.Forms.RichTextBox();
this.lbl_cnt = new System.Windows.Forms.Label();
this.lbl_filename = new System.Windows.Forms.Label();
this.lbl_ClientVer = new System.Windows.Forms.Label();
this.lbl_SerVer = new System.Windows.Forms.Label();
this.lbl_Files = new System.Windows.Forms.Label();
this.lbl_status = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btn_Close = new System.Windows.Forms.Button();
this.btn_ok = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.file_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.update_status = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.rtb_Ip);
this.panel1.Controls.Add(this.lbl_cnt);
this.panel1.Controls.Add(this.lbl_filename);
this.panel1.Controls.Add(this.lbl_ClientVer);
this.panel1.Controls.Add(this.lbl_SerVer);
this.panel1.Controls.Add(this.lbl_Files);
this.panel1.Controls.Add(this.lbl_status);
this.panel1.Controls.Add(this.label7);
this.panel1.Controls.Add(this.progressBar1);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label1);
this.panel1.Location = new System.Drawing.Point(12, 12);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(325, 268);
this.panel1.TabIndex = 5;
//
// rtb_Ip
//
this.rtb_Ip.BackColor = System.Drawing.SystemColors.Control;
this.rtb_Ip.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.rtb_Ip.Location = new System.Drawing.Point(124, 102);
this.rtb_Ip.Name = "rtb_Ip";
this.rtb_Ip.ReadOnly = true;
this.rtb_Ip.Size = new System.Drawing.Size(190, 61);
this.rtb_Ip.TabIndex = 5;
this.rtb_Ip.Text = "";
//
// lbl_cnt
//
this.lbl_cnt.AutoSize = true;
this.lbl_cnt.Location = new System.Drawing.Point(265, 217);
this.lbl_cnt.Name = "lbl_cnt";
this.lbl_cnt.Size = new System.Drawing.Size(45, 12);
this.lbl_cnt.TabIndex = 4;
this.lbl_cnt.Text = "(10/10)";
//
// lbl_filename
//
this.lbl_filename.Location = new System.Drawing.Point(20, 217);
this.lbl_filename.Name = "lbl_filename";
this.lbl_filename.Size = new System.Drawing.Size(211, 12);
this.lbl_filename.TabIndex = 3;
//
// lbl_ClientVer
//
this.lbl_ClientVer.AutoSize = true;
this.lbl_ClientVer.Location = new System.Drawing.Point(124, 52);
this.lbl_ClientVer.Name = "lbl_ClientVer";
this.lbl_ClientVer.Size = new System.Drawing.Size(0, 12);
this.lbl_ClientVer.TabIndex = 2;
//
// lbl_SerVer
//
this.lbl_SerVer.AutoSize = true;
this.lbl_SerVer.Location = new System.Drawing.Point(124, 26);
this.lbl_SerVer.Name = "lbl_SerVer";
this.lbl_SerVer.Size = new System.Drawing.Size(0, 12);
this.lbl_SerVer.TabIndex = 2;
//
// lbl_Files
//
this.lbl_Files.AutoSize = true;
this.lbl_Files.Location = new System.Drawing.Point(124, 79);
this.lbl_Files.Name = "lbl_Files";
this.lbl_Files.Size = new System.Drawing.Size(0, 12);
this.lbl_Files.TabIndex = 2;
//
// lbl_status
//
this.lbl_status.Font = new System.Drawing.Font("굴림", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.lbl_status.ForeColor = System.Drawing.Color.DeepPink;
this.lbl_status.Location = new System.Drawing.Point(-3, 166);
this.lbl_status.Name = "lbl_status";
this.lbl_status.Size = new System.Drawing.Size(317, 29);
this.lbl_status.TabIndex = 0;
this.lbl_status.Text = "최신파일입니다 !!";
this.lbl_status.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label7.Location = new System.Drawing.Point(12, 52);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(106, 12);
this.label7.TabIndex = 0;
this.label7.Text = "클라이언트버전 :";
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(22, 232);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(288, 16);
this.progressBar1.TabIndex = 1;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label3.Location = new System.Drawing.Point(51, 26);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(67, 12);
this.label3.TabIndex = 0;
this.label3.Text = "서버버전 :";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label2.Location = new System.Drawing.Point(2, 79);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(116, 12);
this.label2.TabIndex = 0;
this.label2.Text = "업데이트 파일 수 :";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label1.Location = new System.Drawing.Point(51, 105);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(67, 12);
this.label1.TabIndex = 0;
this.label1.Text = "설치경로 :";
//
// btn_Close
//
this.btn_Close.Font = new System.Drawing.Font("굴림", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.btn_Close.Location = new System.Drawing.Point(197, 294);
this.btn_Close.Name = "btn_Close";
this.btn_Close.Size = new System.Drawing.Size(123, 34);
this.btn_Close.TabIndex = 3;
this.btn_Close.Text = "취 소";
this.btn_Close.UseVisualStyleBackColor = true;
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
//
// btn_ok
//
this.btn_ok.Font = new System.Drawing.Font("굴림", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.btn_ok.Location = new System.Drawing.Point(30, 294);
this.btn_ok.Name = "btn_ok";
this.btn_ok.Size = new System.Drawing.Size(123, 34);
this.btn_ok.TabIndex = 4;
this.btn_ok.Text = "확 인";
this.btn_ok.UseVisualStyleBackColor = true;
this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.AllowUserToResizeRows = false;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.file_name,
this.update_status});
this.dataGridView1.Location = new System.Drawing.Point(397, 12);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(399, 269);
this.dataGridView1.TabIndex = 6;
//
// file_name
//
this.file_name.DataPropertyName = "file_name";
this.file_name.HeaderText = "파일명";
this.file_name.Name = "file_name";
this.file_name.ReadOnly = true;
this.file_name.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
this.file_name.Width = 200;
//
// update_status
//
this.update_status.DataPropertyName = "chk";
this.update_status.FalseValue = "F";
this.update_status.HeaderText = "업데이트완료";
this.update_status.IndeterminateValue = "F";
this.update_status.Name = "update_status";
this.update_status.ReadOnly = true;
this.update_status.TrueValue = "T";
//
// Client
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(351, 347);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.panel1);
this.Controls.Add(this.btn_Close);
this.Controls.Add(this.btn_ok);
this.Name = "Client";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "ISBN 조회 자동 업데이트";
this.Load += new System.EventHandler(this.Client_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.RichTextBox rtb_Ip;
private System.Windows.Forms.Label lbl_cnt;
private System.Windows.Forms.Label lbl_filename;
private System.Windows.Forms.Label lbl_ClientVer;
private System.Windows.Forms.Label lbl_SerVer;
private System.Windows.Forms.Label lbl_Files;
private System.Windows.Forms.Label lbl_status;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btn_Close;
private System.Windows.Forms.Button btn_ok;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn file_name;
private System.Windows.Forms.DataGridViewCheckBoxColumn update_status;
}
}

View File

@@ -0,0 +1,240 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
// 추가된 참조
using System.IO;
using System.Net;
using System.Diagnostics;
namespace ISBN_Client
{
public partial class Client : Form
{
// FTP ID / PW
private string Login_id = "ftpgloria";
private string Login_pw = "admin@!@#$";
// 서버 / 클라이언트 버전
private string Sr_Vers = "";
private string Cl_Vers = "";
// 서버 아이피
private string Server_Ip = "";
// 종료시 실행시킬 파일명
private string Start_Prg = "";
// 파일 개수
private int Files_Count = 0;
// 업데이트 진행 파일 수
private int down_Count = 0;
// 업데이트 여부
bool tf = false;
private string sLine = "";
private string[] str = new string[2];
int i = -1;
DataSet ds = new DataSet("files");
public Client()
{
InitializeComponent();
}
private void Client_Load(object sender, EventArgs e)
{
try
{
// 파일 목록 생성을 위한 데이터 셋
ds.Tables.Add("파일");
ds.Tables["파일"].Columns.Add("file_name");
ds.Tables["파일"].Columns.Add("chk");
File_info();
dataGridView1.DataSource = ds.Tables["파일"];
// 서버의 update_isbn.inf 파일에서 버전 추출
FtpWebRequest fwr = (FtpWebRequest)WebRequest.Create("ftp://" + Login_id + "@" + Server_Ip + "/ISBN/Update_isbn.inf");
fwr.Credentials = new NetworkCredential(Login_id, Login_pw);
fwr.Method = WebRequestMethods.Ftp.DownloadFile;
FtpWebResponse fr = (FtpWebResponse)fwr.GetResponse();
StreamReader sr = new StreamReader(fr.GetResponseStream());
while (!sr.EndOfStream)
{
sLine = sr.ReadLine();
i = sLine.IndexOf("count=", 0);
// 서버 버전 추출
if(sLine.IndexOf("count=", 0) != -1)
{
Sr_Vers = sLine.Replace("count=", "");
lbl_SerVer.Text = Sr_Vers;
break;
}
}
sr.Close();
// 버전이 같은 경우 버튼 변경
if (Convert.ToDecimal(Sr_Vers) == Convert.ToDecimal(Cl_Vers))
{
btn_ok.Text = "프로그램 실행";
lbl_status.Text = "최신 버전입니다!";
lbl_status.ForeColor = Color.Blue;
lbl_filename.Text = "";
lbl_cnt.Text = "";
for(int a = 0; a < dataGridView1.Rows.Count; a++)
{
dataGridView1.Rows[a].Cells["update_status"].Value = "T";
}
btn_ok_Click(null, null);
}
else if (Convert.ToDecimal(Sr_Vers) > Convert.ToDecimal(Cl_Vers))
{
btn_ok.Text = "업데이트";
tf = true;
lbl_cnt.Text = "(1/" + dataGridView1.Rows.Count.ToString() + ")";
lbl_status.Text = "업데이트가 존재합니다!";
lbl_status.ForeColor = Color.DeepPink;
}
}
catch(System.Exception ex)
{
}
}
private void btn_ok_Click(object sender, EventArgs e)
{
if (tf)
{
// 업데이트가 존재할 때
download(0);
}
else
{
// 업데이트가 없을 때
string start_program = Application.StartupPath + "\\" + Start_Prg;
Process prc = new Process();
prc.StartInfo = new System.Diagnostics.ProcessStartInfo(start_program);
prc.Start();
this.Close();
}
}
private void download(int cnt)
{
if (cnt < Convert.ToInt32(lbl_Files.Text))
{
WebClient clnt = new WebClient();
clnt.Credentials = new NetworkCredential(Login_id, Login_pw);
lbl_status.Text = "업데이트 진행중!";
progressBar1.Value = (progressBar1.Maximum / Convert.ToInt32(lbl_Files.Text)) * (down_Count + 1);
lbl_filename.Text = dataGridView1.Rows[cnt].Cells["file_name"].Value.ToString();
dataGridView1.Rows[cnt].Cells["update_status"].Value = "T";
lbl_cnt.Text = "(" + (cnt + 1).ToString() + "/" + (dataGridView1.Rows.Count).ToString() + ")";
File.Delete(Application.StartupPath + lbl_filename.Text);
clnt.DownloadFileAsync(new Uri("ftp://" + Login_id + "@" + Server_Ip + "/ISBN/" + lbl_filename.Text),
Application.StartupPath + "\\" + lbl_filename.Text);
clnt.DownloadFileCompleted += new AsyncCompletedEventHandler(clnt_DownloadFileCompleted);
}
else
{
File_info();
progressBar1.Value = progressBar1.Maximum;
btn_ok.Text = "프로그램 실행";
lbl_status.Text = "최신 파일입니다!";
lbl_status.ForeColor = Color.Blue;
lbl_filename.Text = "";
lbl_cnt.Text = "";
tf = false;
}
}
void clnt_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
{
down_Count += 1;
download(down_Count);
}
private void File_info()
{
// 클라이언트 파일 정보
// update.inf 파일에서 파일개수, 파일명, 버전 추출
StreamReader sr = new StreamReader(Application.StartupPath + "\\Update_isbn.inf");
int i = -1;
while(sr.EndOfStream != true)
{
sLine = sr.ReadLine();
i = sLine.IndexOf("count=", 0);
// 버전 추출
if (sLine.IndexOf("count=", 0) != -1)
{
Cl_Vers = sLine.Replace("count=", "");
lbl_ClientVer.Text = Cl_Vers;
}
// 설치 경로 추출
else if (sLine.IndexOf("server_url=", 0) != -1)
{
Server_Ip = sLine.Replace("server_url=", "");
rtb_Ip.Text = Server_Ip;
//rtb_Ip.Text = Application.StartupPath;
}
// 종료시 실행 파일
else if (sLine.IndexOf("exe=", 0) != -1)
{
Start_Prg = sLine.Replace("exe=", "");
}
// 파일 개수 추출
else if (sLine.IndexOf("Files=", 0) != -1)
{
Files_Count = Convert.ToInt32(sLine.Replace("Files=", ""));
lbl_Files.Text = Files_Count.ToString();
}
else if(sLine.IndexOf("\\", 0) != -1)
{
str[0] = sLine.Replace("\\", "");
str[1] = "F";
ds.Tables["파일"].Rows.Add(str);
}
i = -1;
}
sr.Close();
}
private void btn_Close_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

View File

@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{1A792D56-127B-446B-8B01-0A60902E0086}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>ISBN_Client</RootNamespace>
<AssemblyName>ISBN_Client</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<TargetZone>LocalIntranet</TargetZone>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>false</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ISBN_Client.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="ISBN_Client.Designer.cs">
<DependentUpon>ISBN_Client.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="ISBN_Client.resx">
<DependentUpon>ISBN_Client.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\app.manifest" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="file_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="update_status.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36401.2 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ISBN_Client", "ISBN_Client.csproj", "{1A792D56-127B-446B-8B01-0A60902E0086}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1A792D56-127B-446B-8B01-0A60902E0086}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A792D56-127B-446B-8B01-0A60902E0086}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A792D56-127B-446B-8B01-0A60902E0086}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A792D56-127B-446B-8B01-0A60902E0086}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0D22590A-641B-4FBF-A921-F4E1ED895DF8}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ISBN_Client
{
static class Program
{
/// <summary>
/// 해당 애플리케이션의 주 진입점입니다.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Client());
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
// 이러한 특성 값을 변경하세요.
[assembly: AssemblyTitle("ISBN_Client")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyProduct("ISBN_Client")]
[assembly: AssemblyCopyright("Copyright © Microsoft Corporation 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
[assembly: ComVisible(false)]
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
[assembly: Guid("1a792d56-127b-446b-8b01-0a60902e0086")]
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
//
// 주 버전
// 부 버전
// 빌드 번호
// 수정 버전
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,70 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 이 코드는 도구를 사용하여 생성되었습니다.
// 런타임 버전:4.0.30319.42000
//
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
// 이러한 변경 내용이 손실됩니다.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ISBN_Client.Properties
{
/// <summary>
/// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다.
/// </summary>
// 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
// 클래스에서 자동으로 생성되었습니다.
// 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여
// ResGen을 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ISBN_Client.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을
/// 재정의합니다.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ISBN_Client.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -0,0 +1,73 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app" />
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC 매니페스트 옵션
Windows 사용자 계정 컨트롤 수준을 변경하려면
requestedExecutionLevel 노드를 다음 중 하나로 바꿉니다.
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
requestedExecutionLevel 요소를 지정하면 파일 및 레지스트리 가상화를 사용하지 않습니다.
이전 버전과의 호환성을 위해 애플리케이션에 가상화가 필요한 경우
이 요소를 제거합니다.
-->
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
</requestedPrivileges>
<applicationRequestMinimum>
<defaultAssemblyRequest permissionSetReference="Custom" />
<PermissionSet class="System.Security.PermissionSet" version="1" ID="Custom" SameSite="site" Unrestricted="true" />
</applicationRequestMinimum>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- 이 애플리케이션이 테스트되고 함께 작동하도록 설계된 Windows 버전
목록입니다. 해당 요소의 주석 처리를 제거하면 Windows에서
호환 가능성이 가장 큰 환경을 자동으로 선택합니다. -->
<!-- Windows Vista -->
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
<!-- Windows 7 -->
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
<!-- Windows 8 -->
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
<!-- Windows 8.1 -->
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
<!-- Windows 10 -->
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
</application>
</compatibility>
<!-- 애플리케이션이 DPI를 인식하며 높은 DPI에서 Windows가 자동으로 스케일링하지
않음을 나타냅니다. WPF(Windows Presentation Foundation) 애플리케이션은 자동으로 DPI를 인식하며
옵트인할 필요가 없습니다. 이 설정에 옵트인한 .NET Framework 4.6을 대상으로 하는
Windows Forms 애플리케이션은 app.config에서 'EnableWindowsFormsHighDpiAutoResizing' 설정도 'true'로 설정해야 합니다.
애플리케이션이 긴 경로를 인식하도록 설정합니다. https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation을 참조하세요. -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
-->
<!-- Windows 공용 컨트롤 및 대화 상자의 테마 사용(Windows XP 이상) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>

View File

@@ -0,0 +1,37 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.31112.23
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ISBN_Check_test", "Main\ISBN_Check_test.csproj", "{A19E0C06-EA15-4E30-AE42-4DC0CC4C88DE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ISBN_Client", "Client\ISBN_Client.csproj", "{1A792D56-127B-446B-8B01-0A60902E0086}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "Setup_Main_With_Client", "Setup\ISBN.vdproj", "{2CF357BF-DD81-4613-8C9A-265BF8E27EA9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A19E0C06-EA15-4E30-AE42-4DC0CC4C88DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A19E0C06-EA15-4E30-AE42-4DC0CC4C88DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A19E0C06-EA15-4E30-AE42-4DC0CC4C88DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A19E0C06-EA15-4E30-AE42-4DC0CC4C88DE}.Release|Any CPU.Build.0 = Release|Any CPU
{1A792D56-127B-446B-8B01-0A60902E0086}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A792D56-127B-446B-8B01-0A60902E0086}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A792D56-127B-446B-8B01-0A60902E0086}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A792D56-127B-446B-8B01-0A60902E0086}.Release|Any CPU.Build.0 = Release|Any CPU
{2CF357BF-DD81-4613-8C9A-265BF8E27EA9}.Debug|Any CPU.ActiveCfg = Debug
{2CF357BF-DD81-4613-8C9A-265BF8E27EA9}.Debug|Any CPU.Build.0 = Debug
{2CF357BF-DD81-4613-8C9A-265BF8E27EA9}.Release|Any CPU.ActiveCfg = Release
{2CF357BF-DD81-4613-8C9A-265BF8E27EA9}.Release|Any CPU.Build.0 = Release
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {3ECF64FC-74FC-42AD-B268-CC86AFF968DA}
EndGlobalSection
EndGlobal

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>

365
ISBN_Check/Main/Form1.Designer.cs generated Normal file
View File

@@ -0,0 +1,365 @@

namespace ISBN_Check_test
{
partial class Form1
{
/// <summary>
/// 필수 디자이너 변수입니다.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 사용 중인 모든 리소스를 정리합니다.
/// </summary>
/// <param name="disposing">관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form
/// <summary>
/// 디자이너 지원에 필요한 메서드입니다.
/// 이 메서드의 내용을 코드 편집기로 수정하지 마세요.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
this.cb_filter = new System.Windows.Forms.ComboBox();
this.button1 = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.isbn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.price2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pubDate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.category = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.sold_out = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label1 = new System.Windows.Forms.Label();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.start_idx = new System.Windows.Forms.TextBox();
this.end_idx = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.button2 = new System.Windows.Forms.Button();
this.cb_api = new System.Windows.Forms.ComboBox();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.btn_Yes24 = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// cb_filter
//
this.cb_filter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_filter.FormattingEnabled = true;
this.cb_filter.Location = new System.Drawing.Point(139, 11);
this.cb_filter.Name = "cb_filter";
this.cb_filter.Size = new System.Drawing.Size(121, 20);
this.cb_filter.TabIndex = 0;
this.cb_filter.SelectedIndexChanged += new System.EventHandler(this.cb_filter_SelectedIndexChanged);
//
// button1
//
this.button1.Location = new System.Drawing.Point(416, 10);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "검 색";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// dataGridView1
//
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.book_name,
this.author,
this.book_comp,
this.isbn,
this.price,
this.price2,
this.pubDate,
this.category,
this.sold_out,
this.Column1,
this.count});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnF2;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Name = "dataGridView1";
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle6.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle6;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
this.dataGridView1.Size = new System.Drawing.Size(1001, 471);
this.dataGridView1.TabIndex = 3;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
//
// book_name
//
this.book_name.HeaderText = "도서명";
this.book_name.Name = "book_name";
this.book_name.Width = 200;
//
// author
//
this.author.HeaderText = "저자";
this.author.Name = "author";
//
// book_comp
//
this.book_comp.HeaderText = "출판사";
this.book_comp.Name = "book_comp";
//
// isbn
//
this.isbn.HeaderText = "ISBN";
this.isbn.Name = "isbn";
this.isbn.Width = 70;
//
// price
//
this.price.HeaderText = "정가";
this.price.Name = "price";
this.price.Width = 60;
//
// price2
//
this.price2.HeaderText = "판매가";
this.price2.Name = "price2";
this.price2.Width = 60;
//
// pubDate
//
this.pubDate.HeaderText = "출간일";
this.pubDate.Name = "pubDate";
this.pubDate.Width = 70;
//
// category
//
this.category.HeaderText = "카테고리";
this.category.Name = "category";
//
// sold_out
//
this.sold_out.HeaderText = "품절/절판";
this.sold_out.Name = "sold_out";
this.sold_out.Width = 70;
//
// Column1
//
this.Column1.HeaderText = "Column1";
this.Column1.Name = "Column1";
this.Column1.Visible = false;
//
// count
//
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.count.DefaultCellStyle = dataGridViewCellStyle5;
this.count.HeaderText = "검색갯수";
this.count.Name = "count";
this.count.Width = 80;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(719, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 4;
this.label1.Text = "00:00:00.00";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// richTextBox1
//
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(0, 0);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(1001, 100);
this.richTextBox1.TabIndex = 5;
this.richTextBox1.Text = "";
//
// start_idx
//
this.start_idx.Location = new System.Drawing.Point(272, 11);
this.start_idx.Name = "start_idx";
this.start_idx.Size = new System.Drawing.Size(42, 21);
this.start_idx.TabIndex = 6;
this.start_idx.Text = "1";
this.start_idx.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress);
//
// end_idx
//
this.end_idx.Location = new System.Drawing.Point(340, 11);
this.end_idx.Name = "end_idx";
this.end_idx.Size = new System.Drawing.Size(42, 21);
this.end_idx.TabIndex = 6;
this.end_idx.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(320, 15);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(14, 12);
this.label2.TabIndex = 4;
this.label2.Text = "~";
//
// button2
//
this.button2.Location = new System.Drawing.Point(503, 10);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 2;
this.button2.Text = "리 셋";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// cb_api
//
this.cb_api.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_api.FormattingEnabled = true;
this.cb_api.Location = new System.Drawing.Point(12, 10);
this.cb_api.Name = "cb_api";
this.cb_api.Size = new System.Drawing.Size(121, 20);
this.cb_api.TabIndex = 0;
this.cb_api.SelectedIndexChanged += new System.EventHandler(this.cb_api_SelectedIndexChanged);
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(786, 10);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(184, 23);
this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Continuous;
this.progressBar1.TabIndex = 7;
//
// btn_Yes24
//
this.btn_Yes24.Location = new System.Drawing.Point(590, 10);
this.btn_Yes24.Name = "btn_Yes24";
this.btn_Yes24.Size = new System.Drawing.Size(75, 23);
this.btn_Yes24.TabIndex = 8;
this.btn_Yes24.Text = "Yes반출";
this.btn_Yes24.UseVisualStyleBackColor = true;
this.btn_Yes24.Click += new System.EventHandler(this.btn_Yes24_Click);
//
// panel1
//
this.panel1.Controls.Add(this.cb_api);
this.panel1.Controls.Add(this.btn_Yes24);
this.panel1.Controls.Add(this.cb_filter);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.progressBar1);
this.panel1.Controls.Add(this.button2);
this.panel1.Controls.Add(this.end_idx);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.start_idx);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1001, 47);
this.panel1.TabIndex = 9;
//
// panel2
//
this.panel2.Controls.Add(this.richTextBox1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel2.Location = new System.Drawing.Point(0, 518);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1001, 100);
this.panel2.TabIndex = 10;
//
// panel3
//
this.panel3.Controls.Add(this.dataGridView1);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 47);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(1001, 471);
this.panel3.TabIndex = 11;
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1001, 618);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Name = "Form1";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.ComboBox cb_filter;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.RichTextBox richTextBox1;
public System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.TextBox start_idx;
private System.Windows.Forms.TextBox end_idx;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.ComboBox cb_api;
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Button btn_Yes24;
private System.Windows.Forms.DataGridViewTextBoxColumn book_name;
private System.Windows.Forms.DataGridViewTextBoxColumn author;
private System.Windows.Forms.DataGridViewTextBoxColumn book_comp;
private System.Windows.Forms.DataGridViewTextBoxColumn isbn;
private System.Windows.Forms.DataGridViewTextBoxColumn price;
private System.Windows.Forms.DataGridViewTextBoxColumn price2;
private System.Windows.Forms.DataGridViewTextBoxColumn pubDate;
private System.Windows.Forms.DataGridViewTextBoxColumn category;
private System.Windows.Forms.DataGridViewTextBoxColumn sold_out;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn count;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Panel panel3;
}
}

661
ISBN_Check/Main/Form1.cs Normal file
View File

@@ -0,0 +1,661 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
using System.Windows.Forms;
using WindowsFormsApp1;
using System.Text.RegularExpressions;
namespace ISBN_Check_test
{
public partial class Form1 : Form
{
private int rowidx;
public Form1()
{
InitializeComponent();
this.Text = $"{Application.ProductName} ver {Application.ProductVersion}";
}
private void Form1_Load(object sender, EventArgs e)
{
string[] api_list = { "다음", "네이버", "알라딘" };
cb_api.Items.AddRange(api_list);
}
private void button2_Click(object sender, EventArgs e)
{
for (int a = 0; a < dataGridView1.Rows.Count - 1; a++)
{
if (dataGridView1.Rows[a].DefaultCellStyle.BackColor != Color.Yellow)
{
dataGridView1.Rows[a].Cells["Column1"].Value = "";
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
}
}
}
private void button1_Click(object sender, EventArgs e)
{
button2_Click(null, null);
if (cb_api.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; }
if (cb_filter.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; }
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
var sistr = start_idx.Text.Trim();
var eistr = end_idx.Text.Trim();
if (string.IsNullOrEmpty(sistr)) sistr = "1";
if (string.IsNullOrEmpty(eistr)) eistr = "1";
if (int.TryParse(sistr, out int si) == false)
{
MessageBox.Show("시작번호가 올바르지 않습니다");
start_idx.Focus();
return;
}
if (int.TryParse(eistr, out int ei) == false)
{
MessageBox.Show("종료번호가 올바르지 않습니다");
start_idx.Focus();
return;
}
ei = ei - 1;
si = si - 1;
if(si < 0 || ei <0)
{
MessageBox.Show("시작,종료번호를 확인하세요");
return;
}
if (ei < si)
{
MessageBox.Show("종료번호는 시작번호보다 같거나 커야 합니다");
return;
}
progressBar1.Style = ProgressBarStyle.Continuous;
progressBar1.Minimum = si;
progressBar1.Maximum = ei;
progressBar1.Step = 1;
progressBar1.Value = progressBar1.Minimum;
switch (cb_api.SelectedIndex)
{
case 0:
Daum_API(dataGridView1, si, ei);
break;
case 1:
Naver_API(dataGridView1, si, ei);
break;
case 2:
Aladin_API(dataGridView1, si, ei);
break;
}
stopwatch.Stop();
TimeSpan ts = stopwatch.Elapsed;
string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10);
label1.Text = elapsedTime;
rowidx = 0;
// 총 검색 횟수, 일치, 중복
MessageBox.Show("검색이 완료되었습니다!");
dataGridView1.CurrentCell = dataGridView1.Rows[0].Cells[0];
this.ActiveControl = dataGridView1;
}
/// <summary>
/// 알라딘 API
/// </summary>
/// <param name="gridview"></param>
private void Aladin_API(DataGridView gridview, int start, int end)
{
// 도서명 / 저자 / 출판사 / isbn / 정가
// 발행일 / 도서분류 / 재고
string[] param = { "title", "author", "publisher", "isbn13", "priceStandard",
"pubDate", "categoryName", "stockStatus", };
API api = new API();
for (int a = start; a <= end; a++)
{
process_Sub();
string type;
switch (cb_filter.SelectedIndex)
{
case 0:
type = "Keyword";
break;
case 1:
type = "Title";
break;
case 2:
type = "Author";
break;
case 3:
type = "Publisher";
break;
case 4:
type = "ISBN13";
break;
default:
type = "";
break;
}
// string query = dataGridView1.Rows[a].Cells["isbn"].Value?.ToString() ?? string.Empty;
string query = Set_query(type, a ); //a=는줄번호이고 idx는 -1 해야함
if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.Yellow)
continue;
else if (gridview.Rows[a ].DefaultCellStyle.BackColor == Color.LightGray)
gridview.Rows[a ].DefaultCellStyle.BackColor = Color.Empty;
// string aladin = api.Aladin(query, "ISBN13", param);
string aladin = api.Aladin(query, type, param);
insert_By_Aladin(aladin, a);
try
{
richTextBox1.Text = aladin;
}
catch { }
}
}
string Set_query(string type, int idx)
{
string result = string.Empty;
if (type == "Keyword")
result = (dataGridView1.Rows[idx].Cells["book_name"].Value?.ToString() ?? string.Empty) +
dataGridView1.Rows[idx].Cells["author"].Value?.ToString() ?? string.Empty;
if (type == "Title")
result = dataGridView1.Rows[idx].Cells["book_name"].Value?.ToString() ?? string.Empty;
if (type == "Author")
result = dataGridView1.Rows[idx].Cells["author"].Value?.ToString() ?? string.Empty;
if (type == "Publisher")
result = dataGridView1.Rows[idx].Cells["book_comp"].Value?.ToString() ?? string.Empty;
if (type == "ISBN13")
result = dataGridView1.Rows[idx].Cells["isbn"].Value?.ToString() ?? string.Empty;
return result;
}
private void Naver_API(DataGridView gridview, int start, int end)
{
// 도서명 / 저자 / 출판사 / isbn / 정가
// 발행일 / 도서분류 / 재고
string[] param = { "title", "author", "publisher", "isbn", "price",
"pubdate", "discount" };
API api = new API();
List<string> L_type = new List<string>();
List<string> L_Array = new List<string>();
for (int a = start; a <= end; a++)
{
L_type.Clear();
L_Array.Clear();
process_Sub();
if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.Yellow)
continue;
else if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.LightGray)
gridview.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
#region
switch (cb_filter.SelectedIndex)
{
case 0:
L_type.Add("d_titl");
L_Array.Add(gridview.Rows[a].Cells["book_name"].Value.ToString());
break;
case 1:
L_type.Add("d_auth");
L_Array.Add(gridview.Rows[a].Cells["author"].Value.ToString());
break;
case 2:
L_type.Add("d_publ");
L_Array.Add(gridview.Rows[a].Cells["book_comp"].Value.ToString());
break;
case 3:
L_type.Add("d_titl");
L_type.Add("d_auth");
L_Array.Add(gridview.Rows[a].Cells["book_name"].Value.ToString());
L_Array.Add(gridview.Rows[a].Cells["author"].Value.ToString());
break;
case 4:
L_type.Add("d_titl");
L_type.Add("d_publ");
L_Array.Add(gridview.Rows[a].Cells["book_name"].Value.ToString());
L_Array.Add(gridview.Rows[a].Cells["book_comp"].Value.ToString());
break;
case 5:
L_type.Add("d_auth");
L_type.Add("d_publ");
L_Array.Add(gridview.Rows[a].Cells["author"].Value.ToString());
L_Array.Add(gridview.Rows[a].Cells["book_comp"].Value.ToString());
break;
case 6:
L_type.Add("d_titl");
L_type.Add("d_auth");
L_type.Add("d_publ");
L_Array.Add(gridview.Rows[a].Cells["book_name"].Value.ToString());
L_Array.Add(gridview.Rows[a].Cells["author"].Value.ToString());
L_Array.Add(gridview.Rows[a].Cells["book_comp"].Value.ToString());
break;
}
#endregion
string[] arrayType = L_type.ToArray();
string[] arrayValue = L_Array.ToArray();
string result = api.Naver(arrayValue, arrayType, param);
insert_By_Naver(result, a);
Thread.Sleep(700);
}
}
private void Daum_API(DataGridView gridview, int start, int end)
{
string[] param = { "title", "authors", "publisher", "isbn", "price",
"datetime", "status" };
string type = string.Empty;
string query = string.Empty;
API api = new API();
for (int a = start; a <= end; a++)
{
process_Sub();
if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.Yellow)
continue;
else if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.LightGray)
gridview.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
switch (cb_filter.SelectedIndex)
{
case 0:
type = "title";
query = gridview.Rows[a].Cells["book_name"].Value?.ToString() ?? string.Empty;
break;
case 1:
type = "person";
query = gridview.Rows[a].Cells["author"].Value?.ToString() ?? string.Empty;
break;
case 2:
type = "publisher";
query = gridview.Rows[a].Cells["book_comp"].Value?.ToString() ?? string.Empty;
break;
}
if (query == "") { continue; }
string result = api.Daum(query, type, param);
richTextBox1.Text = result;
insert_By_Daum(result, a);
}
}
private void process_Sub()
{
progressBar1.PerformStep();
}
void insert_By_Aladin(string data, int row)
{
if (row >0)
{
dataGridView1.Rows[row - 1].Selected = false;
}
dataGridView1.Rows[row ].Selected = true;
string[] insert = data.Split('|');
if (data == "") { return; }
// pubDate형 보기편하게 DateTime형으로 재정리
string newstring = "";
try
{
newstring = String.Format("{0:yyyy/MM/dd}",
DateTime.Parse(insert[5].Remove(insert[5].IndexOf(" G"))));
}
catch (Exception ex) { MessageBox.Show(data); }
for (int a = 0; a < insert.Length; a++)
{
if (a % 8 == 6) { insert[a] = Aladin_CategorySort(insert[a]); }
}
dataGridView1.Rows[row].Cells["Column1"].Value += string.Join("|", insert) + "|";
dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.LightGray;
if (cb_filter.SelectedItem.ToString() == "별치조사")
input_api_aladin(insert, row, newstring);
input_api(insert, row, newstring);
}
string Aladin_CategorySort(string insert)
{
// 도서 분류 필요한 데이터로 재정리
int top = insert.IndexOf('>');
int mid = insert.IndexOf('>', top + 1);
int bot = insert.IndexOf('>', mid + 1);
if (bot < 0) { insert = insert.Substring(top + 1); }
else { insert = insert.Substring(top + 1, bot - top - 1); }
return insert;
}
void input_api_aladin(string[] data, int row, string date)
{
dataGridView1.Rows[row].Cells["book_name"].Value = data[0];
dataGridView1.Rows[row].Cells["author"].Value = data[1];
dataGridView1.Rows[row].Cells["book_comp"].Value = data[2];
dataGridView1.Rows[row].Cells["price2"].Value = data[4];
dataGridView1.Rows[row].Cells["pubDate"].Value = date;
dataGridView1.Rows[row].Cells["category"].Value = data[6];
}
void insert_By_Naver(string value, int row)
{
if (row > 0) { dataGridView1.Rows[row -1].Selected = false; }
dataGridView1.Rows[row].Selected = true;
if (value == "") return;
value = value.Replace("<b>", "");
value = value.Replace("</b>", "");
string[] sp_data = value.Split('\t');
string[] grid = { "", "", "", "", "", "", "", "" };
#region
/* 0 : 도서명
* 1 : 저자
* 2 : 출판사
* 3 : ISBN
* 4 : 판매가
* 5 : 출간일
* 6 : 카테고리
* 7 : 품절/절판 */
for (int a = 0; a < sp_data.Length - 1; a++)
{
string[] data = sp_data[a].Split('|');
int idx = data.Length - 2;
grid[0] = data[0];
grid[1] = data[1];
for (int b = 2; b < idx - 4; b++)
{
grid[1] += ", " + data[b];
}
grid[2] = data[idx - 4];
if (data[idx - 3].Contains(" ") == true)
{
string[] isbn = data[idx - 3].Split(' ');
grid[3] = isbn[1];
}
else
grid[3] = data[idx - 3];
grid[4] = data[idx - 2];
grid[5] = data[idx - 1];
if (data[idx] == "")
grid[7] = "절판";
else
grid[7] = "";
dataGridView1.Rows[row].Cells["Column1"].Value += string.Join("|", grid) + "|";
dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.LightGray;
}
#endregion
if (sp_data.Length > 10) return;
if (row > 0) { dataGridView1.Rows[row - 1].Selected = false; }
dataGridView1.Rows[row].Selected = true;
string newstring = "";
try
{
newstring = DateTime.ParseExact(grid[5], "yyyyMMdd", null).ToString("yyyy-MM-dd");
}
catch { }
input_api(grid, row, newstring);
}
void insert_By_Daum(string value, int row)
{
if (row > 0) { dataGridView1.Rows[row - 1].Selected = false; }
dataGridView1.Rows[row].Selected = true;
if (value == "") return;
string[] sp_data = value.Split('\n');
string[] grid = { "", "", "", "", "", "", "", "" };
for (int a = 0; a < sp_data.Length - 1; a++)
{
string[] data = sp_data[a].Split('|');
grid[0] = data[0];
grid[1] = data[1];
grid[2] = data[2];
string[] tmp_isbn = data[3].Split(' ');
if (tmp_isbn.Length < 2)
grid[3] = data[3].Replace(" ", "");
else
grid[3] = tmp_isbn[1];
grid[4] = data[4];
try
{
grid[5] = data[5].Substring(0, 10);
}
catch { }
grid[7] = data[6];
dataGridView1.Rows[row].Cells["Column1"].Value += string.Join("|", grid) + "|";
dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.LightGray;
}
if (sp_data.Length > 10) return;
if (row > 0) dataGridView1.Rows[row - 1].Selected = false;
dataGridView1.Rows[row].Selected = true;
bool[] chk = { false, false, false };
// string newstring = DateTime.ParseExact(grid[5], "yyyyMMdd", null).ToString("yyyy-MM-dd");
string newstring = grid[5];
input_api(grid, row, newstring);
}
/// <summary>
/// API에서 가져온 데이터가 요구한 데이터와 일치하는지 알아보는 함수
/// </summary>
/// <param name="value">데이터</param>
/// <param name="idx">Grid의 row인덱스번호</param>
/// <param name="date">날짜</param>
void input_api(string[] value, int idx, string date)
{
bool[] chk = { false, false, false };
string book_name = dataGridView1.Rows[idx].Cells["book_name"].Value?.ToString() ?? string.Empty;
string author = dataGridView1.Rows[idx].Cells["author"].Value?.ToString() ?? string.Empty;
string book_comp = dataGridView1.Rows[idx].Cells["book_comp"].Value?.ToString() ?? string.Empty;
if (value[0] == book_name) chk[0] = true;
if (value[1].Contains(author) == true) chk[1] = true;
else if (author.Contains(value[1]) == true) chk[1] = true;
else if (value[1] == author) chk[1] = true;
if (value[2].Contains(book_comp) == true) chk[2] = true;
else if (book_comp.Contains(value[2]) == true) chk[2] = true;
else if (value[2] == book_comp) chk[2] = true;
if (chk[0] == true && chk[1] == true && chk[2] == true)
{
dataGridView1.Rows[idx].Cells["isbn"].Value = value[3];
dataGridView1.Rows[idx].Cells["price2"].Value = value[4];
dataGridView1.Rows[idx].Cells["pubDate"].Value = date;
//if (cb_api.SelectedIndex == 2)
dataGridView1.Rows[idx].Cells["category"].Value = value[6];
dataGridView1.Rows[idx].Cells["sold_out"].Value = value[7];
dataGridView1.Rows[idx].DefaultCellStyle.BackColor = Color.Yellow;
}
count_res();
}
#region
private void count_res()
{
String_Text st = new String_Text();
int count = dataGridView1.Rows.Count;
for (int a = 0; a < count; a++)
{
string search_data = dataGridView1.Rows[a].Cells["Column1"].Value?.ToString() ?? string.Empty;
int tmp_count = st.Char_count(search_data, '|');
int lcount = tmp_count / 8;
dataGridView1.Rows[a].Cells["count"].Value = lcount.ToString();
}
}
#endregion
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
{
Skill_Grid sg = new Skill_Grid();
if ((e.Shift && e.KeyCode == Keys.Insert) || (e.Control && e.KeyCode == Keys.V))
{
sg.Excel_to_DataGridView(sender, e);
}
else if (e.KeyCode == Keys.Delete)
{
sg.DataGrid_to_Delete(sender, e);
}
if (e.KeyCode == Keys.Enter) { dataGridView1_CellDoubleClick(null, null); rowidx++; }
if (e.KeyCode == Keys.Up)
{
rowidx--;
if (rowidx < 0)
rowidx = 0;
}
if (e.KeyCode == Keys.Down)
{
rowidx++;
if (rowidx > dataGridView1.Rows.Count - 1)
rowidx = dataGridView1.Rows.Count - 1;
}
end_idx.Text = dataGridView1.Rows.Count.ToString();
}
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
Skill_Grid sg = new Skill_Grid();
sg.Print_Grid_Num(sender, e);
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
rowidx = e.RowIndex;
if (rowidx < 0) return;
if (dataGridView1.Rows[e.RowIndex].Cells["Column1"].Value == null)
dataGridView1.Rows[e.RowIndex].Cells["Column1"].Value = "";
richTextBox1.Text = dataGridView1.Rows[e.RowIndex].Cells["Column1"].Value?.ToString() ?? string.Empty;
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (dataGridView1.Rows[rowidx].Cells["Column1"].Value == null ||
dataGridView1.Rows[rowidx].Cells["Column1"].Value.ToString() == "") { return; }
Form2 f2 = new Form2(this);
f2.row = rowidx;
f2.Call_API = cb_api.Text;
f2.Show();
}
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (!(char.IsDigit(e.KeyChar) || e.KeyChar == Convert.ToChar(Keys.Back)))
e.Handled = true;
}
private void cb_api_SelectedIndexChanged(object sender, EventArgs e)
{
cb_filter.Items.Clear();
if (cb_api.SelectedIndex == 0)
{
string[] daum = { "도서명", "저자", "출판사" };
cb_filter.Items.AddRange(daum);
}
else if (cb_api.SelectedIndex == 1)
{
string[] naver = { "도서명", "저자", "출판사",
"도서명 + 저자", "도서명 + 출판사", "저자 + 출판사",
"도서명 + 저자 + 출판사" };
cb_filter.Items.AddRange(naver);
}
else if (cb_api.SelectedIndex == 2)
{
string[] aladin = { "도서명 + 저자", "도서명", "저자", "출판사", "별치조사" };
cb_filter.Items.AddRange(aladin);
}
Must_Col(cb_api.SelectedIndex);
}
private void Must_Col(int cb_idx)
{
if (cb_idx == 0 || cb_idx == 1 || cb_idx == 2)
{
dataGridView1.Columns["isbn"].DefaultCellStyle.BackColor = Color.Empty;
dataGridView1.Columns["book_name"].DefaultCellStyle.BackColor = Color.FromArgb(234, 226, 202);
dataGridView1.Columns["author"].DefaultCellStyle.BackColor = Color.FromArgb(234, 226, 202);
dataGridView1.Columns["book_comp"].DefaultCellStyle.BackColor = Color.FromArgb(234, 226, 202);
}
else
{
return;
}
}
private void btn_Yes24_Click(object sender, EventArgs e)
{
Yes24 yes24 = new Yes24(this);
yes24.Show();
}
private void cb_filter_SelectedIndexChanged(object sender, EventArgs e)
{
if (cb_filter.SelectedItem.ToString() == "별치조사")
{
dataGridView1.Columns["isbn"].DefaultCellStyle.BackColor = Color.FromArgb(234, 226, 202);
dataGridView1.Columns["book_name"].DefaultCellStyle.BackColor = Color.Empty;
dataGridView1.Columns["author"].DefaultCellStyle.BackColor = Color.Empty;
dataGridView1.Columns["book_comp"].DefaultCellStyle.BackColor = Color.Empty;
}
}
private void label1_Click(object sender, EventArgs e)
{
if (System.Diagnostics.Debugger.IsAttached)
{
string[] lst = { "9791193110584",
"9791168672260",
"9788993858396",
"9791171200351",
"9791199239043",
"9791194828112",
"9791196026523",
"9791194368359",
"9791191744439",
"9791198843067",
"9788999712883",
"9788999729188"};
foreach (var item in lst)
this.dataGridView1.Rows.Add(new string[] { "", "", "", item });
end_idx.Text = (this.dataGridView1.Rows.Count - 1).ToString();
}
}
}
}

153
ISBN_Check/Main/Form1.resx Normal file
View File

@@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="book_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="author.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="book_comp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="isbn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="price2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="pubDate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="category.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="sold_out.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -0,0 +1,402 @@
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
using System.Windows.Forms;
using System.Xml;
namespace ISBN_Check_test
{
class API
{
/// <summary>
/// https://blog.aladin.co.kr/openapi 참고
/// </summary>
/// <param name="Query"></param>
/// <param name="QueryType"></param>
/// <param name="Param"></param>
/// <returns></returns>
public string Aladin(string Query, string QueryType, string[] Param)
{
string result = string.Empty;
// 쿼리 생성
string key = "ttbgloriabook1512001";
string site = "http://www.aladin.co.kr/ttb/api/ItemSearch.aspx";
string query = string.Format("{0}?query={1}&TTBKey={2}&output=xml&querytype={3}&MaxResults={4}",
site, Query, key, QueryType, 30.ToString());
// 쿼리를 입력인자로 WebRequest 개채 생성
WebRequest request = WebRequest.Create(query);
// WebRequest개체의 헤더에 인증키 포함시키기.
// request.Headers.Add("Authorization", header);
// WebResponse개체를 통해 서비스 요청.
WebResponse response = request.GetResponse();
// 결과문자열 확인
Stream stream = response.GetResponseStream();
StreamReader reader = new StreamReader(stream, Encoding.UTF8);
String xml = reader.ReadToEnd();
stream.Close();
// xml형식을 json형식으로 변환
XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);
var json = JsonConvert.SerializeXmlNode(doc);
// json형식 분석을 위해 JavaScriptSerializer 개체 생성
JavaScriptSerializer js = new JavaScriptSerializer();
// 런타임에 개체를 확인하여 사용할수 있는 dynamic을 이용해 역직렬화
dynamic dob = js.Deserialize<dynamic>(json);
// "object"내에 있는것을 얻어오기 위해 다시 dynamic변수에 참조
dynamic docs = "";
try
{
docs = dob["object"]["item"];
}
catch
{
return "";
}
int length = 0;
int ID_length = Param.Length;
// 검색 결과가 1개 이하일 경우, 오류가 발생하여 try/catch문 사용.
try
{
// docs는 요소 컬렉션으로 object로 변환.
object[] buf = docs;
length = buf.Length;
}
catch
{
object buf = docs;
length = 1;
}
for (int a = 0; a < length; a++)
{
List<string> tmp_data = new List<string>();
for (int b = 0; b < ID_length; b++)
{
if (length == 1)
{
tmp_data.Add(docs[Param[b]]);
}
else
{
tmp_data.Add(docs[a][Param[b]]);
}
result += tmp_data[b] + "|";
}
result += "\n";
}
return result;
}
/// <summary>
/// https://blog.aladin.co.kr/openapi 참고
/// </summary>
/// <param name="Query">ISBN값</param>
/// <param name="QueryType">"ISBN"고정</param>
/// <param name="Param">가져올 데이터</param>
/// <returns></returns>
public string Aladin_lookup(string Query, string QueryType, string[] Param)
{
string result = string.Empty;
// 쿼리 생성
string key = "ttbgloriabook1512001";
string site = "http://www.aladin.co.kr/ttb/api/ItemLookUp.aspx";
string query = string.Format("{0}?TTBKey={1}&itemIdType={2}&ItemId={3}&OptResult=categoryIdList",
site, key, QueryType, Query);
// 쿼리를 입력인자로 WebRequest 개채 생성
WebRequest request = WebRequest.Create(query);
// WebRequest개체의 헤더에 인증키 포함시키기.
// request.Headers.Add("Authorization", header);
// WebResponse개체를 통해 서비스 요청.
WebResponse response = request.GetResponse();
// 결과문자열 확인
Stream stream = response.GetResponseStream();
StreamReader reader = new StreamReader(stream, Encoding.UTF8);
String xml = reader.ReadToEnd();
stream.Close();
// xml형식을 json형식으로 변환
XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);
var json = JsonConvert.SerializeXmlNode(doc);
// return json;
// json형식 분석을 위해 JavaScriptSerializer 개체 생성
JavaScriptSerializer js = new JavaScriptSerializer();
// 런타임에 개체를 확인하여 사용할수 있는 dynamic을 이용해 역직렬화
dynamic dob = js.Deserialize<dynamic>(json);
// "object"내에 있는것을 얻어오기 위해 다시 dynamic변수에 참조
dynamic docs = "";
try
{
docs = dob["object"]["item"];
}
catch
{
return "";
}
int length = 0;
int ID_length = Param.Length;
// 검색 결과가 1개 이하일 경우, 오류가 발생하여 try/catch문 사용.
try
{
// docs는 요소 컬렉션으로 object로 변환.
object[] buf = docs;
length = buf.Length;
}
catch
{
object buf = docs;
length = 1;
}
for (int a = 0; a < length; a++)
{
List<string> tmp_data = new List<string>();
for (int b = 0; b < ID_length; b++)
{
if (length == 1)
{
tmp_data.Add(docs[Param[b]]);
}
else
{
tmp_data.Add(docs[a][Param[b]]);
}
result += tmp_data[b] + "|";
}
result += "\n";
}
return result;
}
public string Naver(string[] Query, string[] QueryType, string[] Param)
{
string result = string.Empty;
string json = string.Empty;
// url 생성
string url = "https://openapi.naver.com/v1/search/book_adv?";
for(int a = 0; a < Query.Length; a++)
{
url += string.Format("{0}={1}&", QueryType[a], Query[a]);
}
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Headers.Add("X-Naver-Client-Id", "wYr0JczCBoDopq1NKTyQ"); // 클라이언트 아이디
request.Headers.Add("X-Naver-Client-Secret", "QHzeXadtO7"); // 클라이언트 시크릿
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
string status = response.StatusCode.ToString();
if (status == "OK")
{
Stream stream = response.GetResponseStream();
StreamReader reader = new StreamReader(stream, Encoding.UTF8);
json = reader.ReadToEnd();
}
else
{
MessageBox.Show(status, "Error");
return "Error";
}
// json형식 분석을 위해 JavaScriptSerializer 개체 생성
JavaScriptSerializer js = new JavaScriptSerializer();
// 런타임에 개체를 확인하여 사용할수 있는 dynamic을 이용해 역직렬화
dynamic dob = js.Deserialize<dynamic>(json);
// "object"내에 있는것을 얻어오기 위해 다시 dynamic변수에 참조
dynamic docs = "";
try
{
// docs = dob["object"]["item"];
docs = dob["items"];
}
catch
{
return "";
}
int length = 0;
int ID_length = Param.Length;
// 검색 결과가 1개 이하일 경우, 오류가 발생하여 try/catch문 사용.
try
{
// docs는 요소 컬렉션으로 object로 변환.
object[] buf = docs;
length = buf.Length;
}
catch
{
object buf = docs;
length = 1;
}
for (int a = 0; a < length; a++)
{
List<string> tmp_data = new List<string>();
for (int b = 0; b < ID_length; b++)
{
tmp_data.Add(docs[a][Param[b]]);
result += tmp_data[b] + "|";
}
result += "\n\t";
}
return result;
}
public string Daum(string Query, string Type, string[] Param)
{
string result = string.Empty;
// url생성
string url = "https://dapi.kakao.com/v3/search/book";
string query = string.Format("{0}?query={1}&target={2}&", url, Query, Type);
WebRequest request = WebRequest.Create(query);
string header = "KakaoAK e3935565b731a2a6f32880c90d76403a";
request.Headers.Add("Authorization", header);
WebResponse response = request.GetResponse();
Stream stream = response.GetResponseStream();
StreamReader reader = new StreamReader(stream, Encoding.UTF8);
string json = reader.ReadToEnd();
stream.Close();
JavaScriptSerializer js = new JavaScriptSerializer();
dynamic dob = js.Deserialize<dynamic>(json);
dynamic docs = dob["documents"];
object[] buf = docs;
int length = buf.Length;
int ID_length = Param.Length;
for(int a = 0; a < length; a++)
{
List<object> tmp_data = new List<object>();
for(int b = 0; b < ID_length; b++)
{
if (Param[b] == "authors") {
object[] tmp = docs[a][Param[b]];
string tmp_str = string.Empty;
for(int j = 0; j < tmp.Length; j++)
{
tmp_str += tmp[j];
if (j < tmp.Length - 1) {
tmp_str += ", ";
}
}
tmp_data.Add(tmp_str);
result += tmp_data[b] + "|";
tmp_str = "";
}
else {
tmp_data.Add(docs[a][Param[b]]);
result += tmp_data[b] + "|";
}
}
result += "\n";
}
return result;
}
}
class Skill_Grid
{
/// <summary>
/// 그리드 앞 머리말에 넘버를 표시
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void Print_Grid_Num(Object sender, DataGridViewRowPostPaintEventArgs e)
{
// RowPostPaint 이벤트 핸들러
// 행헤더 열영역에 행번호를 위해 장방형으로 처리
Rectangle rect = new Rectangle(e.RowBounds.Location.X,
e.RowBounds.Location.Y,
((DataGridView)sender).RowHeadersWidth - 4,
e.RowBounds.Height);
// 위에서 생성된 장방형내에 행번호를 보여주고 폰트색상 및 배경을 설정
TextRenderer.DrawText(e.Graphics,
(e.RowIndex + 1).ToString(),
((DataGridView)sender).RowHeadersDefaultCellStyle.Font,
rect,
((DataGridView)sender).RowHeadersDefaultCellStyle.ForeColor,
TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
}
/// <summary>
/// DataGirdView의 활성화된 셀값을 삭제하는 코드 (단, KeyDown에 넣어야함!!!!)
/// 사전에 if(e.KeyCode == Keys.Delete)안에 들어가야함.
/// </summary>
/// <param name="sender">KeyDown의 object "sender"</param>
/// <param name="e">KeyDown의 KeyEventArgs "e"</param>
public void DataGrid_to_Delete(object sender, KeyEventArgs e)
{
int rowIndex = ((DataGridView)sender).CurrentCell.RowIndex;
int columnIndex = ((DataGridView)sender).CurrentCell.ColumnIndex;
((DataGridView)sender).Rows[rowIndex].Cells[columnIndex].Value = "";
}
/// <summary>
/// 엑셀에서 복사한 데이터를 DataGirdView에 붙여넣어주는 코드 (단, KeyDown에 넣어야함!!!!)
/// 사전에 if ((e.Shift && e.KeyCode == Keys.Insert) || (e.Control && e.KeyCode == Keys.V))안에 들어가야함.
/// </summary>
/// <param name="sender">KeyDown의 object "sender"</param>
/// <param name="e">KeyDown의 KeyEventArgs "e"</param>
public void Excel_to_DataGridView(object sender, KeyEventArgs e)
{
//if user clicked Shift+Ins or Ctrl+V (paste from clipboard)
if ((e.Shift && e.KeyCode == Keys.Insert) || (e.Control && e.KeyCode == Keys.V))
{
char[] rowSplitter = { '\r', '\n' };
char[] columnSplitter = { '\t' };
//get the text from clipboard
IDataObject dataInClipboard = Clipboard.GetDataObject();
string stringInClipboard = (string)dataInClipboard.GetData(DataFormats.Text);
//split it into lines
string[] rowsInClipboard = stringInClipboard.Split(rowSplitter, StringSplitOptions.RemoveEmptyEntries);
//get the row and column of selected cell in dataGridView1
int r = ((DataGridView)sender).SelectedCells[0].RowIndex;
int c = ((DataGridView)sender).SelectedCells[0].ColumnIndex;
//add rows into dataGridView1 to fit clipboard lines
if (((DataGridView)sender).Rows.Count < (r + rowsInClipboard.Length))
{
((DataGridView)sender).Rows.Add(r + rowsInClipboard.Length - ((DataGridView)sender).Rows.Count);
}
// loop through the lines, split them into cells and place the values in the corresponding cell.
for (int iRow = 0; iRow < rowsInClipboard.Length; iRow++)
{
//split row into cell values
string[] valuesInRow = rowsInClipboard[iRow].Split(columnSplitter);
//cycle through cell values
for (int iCol = 0; iCol < valuesInRow.Length; iCol++)
{
//assign cell value, only if it within columns of the dataGridView1
if (((DataGridView)sender).ColumnCount - 1 >= c + iCol)
{
((DataGridView)sender).Rows[r + iRow].Cells[c + iCol].Value = valuesInRow[iCol];
}
}
}
}
}
}
}

335
ISBN_Check/Main/Form2.Designer.cs generated Normal file
View File

@@ -0,0 +1,335 @@

namespace ISBN_Check_test
{
partial class Form2
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.isbn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pubDate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.category = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.sold_out = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tb_book_name = new System.Windows.Forms.TextBox();
this.tb_author = new System.Windows.Forms.TextBox();
this.tb_book_comp = new System.Windows.Forms.TextBox();
this.tb_isbn = new System.Windows.Forms.TextBox();
this.tb_price = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.btn_ReSearch = new System.Windows.Forms.Button();
this.panel3 = new System.Windows.Forms.Panel();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.book_name,
this.author,
this.book_comp,
this.isbn,
this.price,
this.pubDate,
this.category,
this.sold_out,
this.Column1});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Name = "dataGridView1";
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
this.dataGridView1.Size = new System.Drawing.Size(876, 444);
this.dataGridView1.TabIndex = 0;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
//
// book_name
//
this.book_name.HeaderText = "도서명";
this.book_name.Name = "book_name";
this.book_name.Width = 200;
//
// author
//
this.author.HeaderText = "저자";
this.author.Name = "author";
//
// book_comp
//
this.book_comp.HeaderText = "출판사";
this.book_comp.Name = "book_comp";
//
// isbn
//
this.isbn.HeaderText = "ISBN";
this.isbn.Name = "isbn";
this.isbn.Width = 70;
//
// price
//
this.price.HeaderText = "정가";
this.price.Name = "price";
this.price.Width = 60;
//
// pubDate
//
this.pubDate.HeaderText = "출간일";
this.pubDate.Name = "pubDate";
this.pubDate.Width = 70;
//
// category
//
this.category.HeaderText = "카테고리";
this.category.Name = "category";
//
// sold_out
//
this.sold_out.HeaderText = "품절여부";
this.sold_out.Name = "sold_out";
this.sold_out.Width = 70;
//
// Column1
//
this.Column1.HeaderText = "Column1";
this.Column1.Name = "Column1";
this.Column1.Visible = false;
//
// tb_book_name
//
this.tb_book_name.Location = new System.Drawing.Point(12, 23);
this.tb_book_name.Name = "tb_book_name";
this.tb_book_name.Size = new System.Drawing.Size(254, 21);
this.tb_book_name.TabIndex = 0;
//
// tb_author
//
this.tb_author.Location = new System.Drawing.Point(272, 23);
this.tb_author.Name = "tb_author";
this.tb_author.ReadOnly = true;
this.tb_author.Size = new System.Drawing.Size(101, 21);
this.tb_author.TabIndex = 1;
//
// tb_book_comp
//
this.tb_book_comp.Location = new System.Drawing.Point(379, 23);
this.tb_book_comp.Name = "tb_book_comp";
this.tb_book_comp.ReadOnly = true;
this.tb_book_comp.Size = new System.Drawing.Size(134, 21);
this.tb_book_comp.TabIndex = 2;
//
// tb_isbn
//
this.tb_isbn.Location = new System.Drawing.Point(519, 23);
this.tb_isbn.Name = "tb_isbn";
this.tb_isbn.ReadOnly = true;
this.tb_isbn.Size = new System.Drawing.Size(109, 21);
this.tb_isbn.TabIndex = 3;
//
// tb_price
//
this.tb_price.Location = new System.Drawing.Point(634, 23);
this.tb_price.Name = "tb_price";
this.tb_price.ReadOnly = true;
this.tb_price.Size = new System.Drawing.Size(55, 21);
this.tb_price.TabIndex = 4;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(119, 8);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 6;
this.label1.Text = "도서명";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(308, 8);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 6;
this.label2.Text = "저자";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(426, 8);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 6;
this.label3.Text = "출판사";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(557, 8);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(33, 12);
this.label4.TabIndex = 6;
this.label4.Text = "ISBN";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(647, 8);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(29, 12);
this.label5.TabIndex = 6;
this.label5.Text = "정가";
//
// button1
//
this.button1.Location = new System.Drawing.Point(776, 12);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 6;
this.button1.Text = "닫 기";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// panel1
//
this.panel1.Controls.Add(this.tb_book_name);
this.panel1.Controls.Add(this.btn_ReSearch);
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.tb_author);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.tb_book_comp);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.tb_isbn);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.tb_price);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label1);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(876, 55);
this.panel1.TabIndex = 2;
//
// btn_ReSearch
//
this.btn_ReSearch.Location = new System.Drawing.Point(695, 12);
this.btn_ReSearch.Name = "btn_ReSearch";
this.btn_ReSearch.Size = new System.Drawing.Size(75, 23);
this.btn_ReSearch.TabIndex = 5;
this.btn_ReSearch.Text = "검 색";
this.btn_ReSearch.UseVisualStyleBackColor = true;
this.btn_ReSearch.Click += new System.EventHandler(this.btn_ReSearch_Click);
//
// panel3
//
this.panel3.Controls.Add(this.dataGridView1);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 55);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(876, 444);
this.panel3.TabIndex = 1;
//
// Form2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(876, 499);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel1);
this.Name = "Form2";
this.Text = "`";
this.Load += new System.EventHandler(this.Form2_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel3.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn book_name;
private System.Windows.Forms.DataGridViewTextBoxColumn author;
private System.Windows.Forms.DataGridViewTextBoxColumn book_comp;
private System.Windows.Forms.DataGridViewTextBoxColumn isbn;
private System.Windows.Forms.DataGridViewTextBoxColumn price;
private System.Windows.Forms.DataGridViewTextBoxColumn pubDate;
private System.Windows.Forms.DataGridViewTextBoxColumn category;
private System.Windows.Forms.DataGridViewTextBoxColumn sold_out;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.TextBox tb_book_name;
private System.Windows.Forms.TextBox tb_author;
private System.Windows.Forms.TextBox tb_book_comp;
private System.Windows.Forms.TextBox tb_isbn;
private System.Windows.Forms.TextBox tb_price;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Button btn_ReSearch;
private System.Windows.Forms.Panel panel3;
}
}

219
ISBN_Check/Main/Form2.cs Normal file
View File

@@ -0,0 +1,219 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ISBN_Check_test
{
public partial class Form2 : Form
{
Form1 f1;
public int row;
public string Call_API = string.Empty;
int rowidx;
public Form2(Form1 _f1)
{
InitializeComponent();
f1 = _f1;
}
private void Form2_Load(object sender, EventArgs e)
{
dataGridView1.Focus();
Sort_data(f1.dataGridView1);
// 비슷한거 색깔표시
same_chk();
}
private void Sort_data(DataGridView f1GridView)
{
tb_book_name.Text = f1GridView.Rows[row].Cells["book_name"].Value.ToString();
tb_author.Text = f1GridView.Rows[row].Cells["author"].Value.ToString();
tb_book_comp.Text = f1GridView.Rows[row].Cells["book_comp"].Value.ToString();
if (f1GridView.Rows[row].Cells["price"].Value != null)
tb_price.Text = f1GridView.Rows[row].Cells["price"].Value.ToString();
else { tb_price.Text = ""; }
string data = f1GridView.Rows[row].Cells["Column1"].Value.ToString();
inputGrid(data);
}
private void inputGrid(string data)
{
dataGridView1.Rows.Clear();
// 도서명 / 저자 / 출판사 / isbn / 출간일 / 카테고리 / 품절여부
string[] tmp = data.Split('|');
string[] grid = { "", "", "", "", "", "", "", "" };
for (int a = 0; a < tmp.Length; a++)
{
if (a % 8 == 0) { grid[0] = tmp[a]; }
if (a % 8 == 1) { grid[1] = tmp[a]; }
if (a % 8 == 2) { grid[2] = tmp[a]; }
if (a % 8 == 3) { grid[3] = tmp[a]; }
if (a % 8 == 4) { grid[4] = tmp[a]; }
if (a % 8 == 5) { grid[5] = change_Date_type(tmp[a]); }
if (a % 8 == 6) { grid[6] = Aladin_CategorySort(tmp[a]); }
if (a % 8 == 7) { grid[7] = tmp[a]; dataGridView1.Rows.Add(grid); }
}
}
private string change_Date_type(string date)
{
if (Call_API == "알라딘")
{
try
{
return String.Format("{0:yyyy/MM/dd}",
DateTime.Parse(date.Remove(date.IndexOf(" G"))));
}
catch { return date; }
}
if (Call_API == "네이버")
try
{
return DateTime.ParseExact(date, "yyyyMMdd", null).ToString("yyyy-MM-dd");
}
catch { return ""; }
else
return date;
}
private void same_chk()
{
// 도서명, 저자, 출판사, ISBN, 정가
string[] ori_data = { tb_book_name.Text,
tb_author.Text,
tb_book_comp.Text,
tb_isbn.Text,
tb_price.Text.Replace(",","") };
for(int a= 0; a < dataGridView1.Rows.Count; a++)
{
int chk_idx = 0;
if(dataGridView1.Rows[a].Cells["book_name"].Value.ToString() == ori_data[0]) {
chk_idx++;
}
if(dataGridView1.Rows[a].Cells["author"].Value.ToString().Contains(ori_data[1]) == true) {
chk_idx++;
}
if(dataGridView1.Rows[a].Cells["book_comp"].Value.ToString() == ori_data[2]) {
chk_idx++;
}
if (chk_idx >= 2) {
int pay = Convert.ToInt32(dataGridView1.Rows[a].Cells["price"].Value.ToString());
int price = 0;
if (ori_data[4] != "")
price = Convert.ToInt32(ori_data[4]);
if (price - 5000 <= pay && pay <= price + 5000)
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Yellow;
else
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.LightGray;
}
}
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if(e != null) { rowidx = e.RowIndex; }
string book_name = dataGridView1.Rows[rowidx].Cells["book_name"].Value.ToString();
string author = dataGridView1.Rows[rowidx].Cells["author"].Value.ToString();
string book_comp = dataGridView1.Rows[rowidx].Cells["book_comp"].Value.ToString();
string isbn = dataGridView1.Rows[rowidx].Cells["isbn"].Value.ToString();
string price = dataGridView1.Rows[rowidx].Cells["price"].Value.ToString();
string Date = dataGridView1.Rows[rowidx].Cells["pubDate"].Value.ToString();
string category = dataGridView1.Rows[rowidx].Cells["category"].Value.ToString();
string sold = dataGridView1.Rows[rowidx].Cells["sold_out"].Value.ToString();
f1.dataGridView1.Rows[row].Cells["book_name"].Value = book_name;
f1.dataGridView1.Rows[row].Cells["author"].Value = author;
f1.dataGridView1.Rows[row].Cells["book_comp"].Value = book_comp;
f1.dataGridView1.Rows[row].Cells["isbn"].Value = isbn;
f1.dataGridView1.Rows[row].Cells["price2"].Value = price;
f1.dataGridView1.Rows[row].Cells["pubDate"].Value = Date;
f1.dataGridView1.Rows[row].Cells["category"].Value = category;
f1.dataGridView1.Rows[row].Cells["sold_out"].Value = sold;
f1.dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.Yellow;
this.Close();
}
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
{
if(e.KeyCode == Keys.Enter) { dataGridView1_CellDoubleClick(null, null); }
if (e.KeyCode == Keys.Up) {
rowidx--;
if (rowidx < 0)
rowidx = 0;
}
if (e.KeyCode == Keys.Down) {
rowidx++;
if (rowidx > dataGridView1.Rows.Count - 1)
rowidx = dataGridView1.Rows.Count - 1;
}
if (e.KeyCode == Keys.Escape) {
this.Close();
}
}
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
rowidx = e.RowIndex;
}
/// <summary>
/// 재검색
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btn_ReSearch_Click(object sender, EventArgs e)
{
string[] param = { "title", "author", "publisher", "isbn13", "priceStandard",
"pubDate", "categoryName", "stockStatus", };
API api = new API();
string type = "Title";
string query = tb_book_name.Text;
string aladin = api.Aladin(query, type, param);
if (aladin == "") return;
inputGrid(aladin);
}
string Aladin_CategorySort(string insert)
{
try
{
// 도서 분류 필요한 데이터로 재정리
int top = insert.IndexOf('>');
int mid = insert.IndexOf('>', top + 1);
int bot = insert.IndexOf('>', mid + 1);
if (bot < 0) { insert = insert.Substring(top + 1); }
else { insert = insert.Substring(top + 1, bot - top - 1); }
return insert;
}
catch
{
return insert;
}
}
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
Skill_Grid sg = new Skill_Grid();
sg.Print_Grid_Num(sender, e);
}
}
}

147
ISBN_Check/Main/Form2.resx Normal file
View File

@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="book_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="author.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="book_comp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="isbn.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="pubDate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="category.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="sold_out.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

226
ISBN_Check/Main/Form3.Designer.cs generated Normal file
View File

@@ -0,0 +1,226 @@

namespace ISBN_Check_test
{
partial class Form3
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.button1 = new System.Windows.Forms.Button();
this.tb_book_name = new System.Windows.Forms.TextBox();
this.tb_author = new System.Windows.Forms.TextBox();
this.tb_book_comp = new System.Windows.Forms.TextBox();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// button1
//
this.button1.Location = new System.Drawing.Point(221, 38);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 4;
this.button1.Text = "검 색";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// tb_book_name
//
this.tb_book_name.Location = new System.Drawing.Point(71, 12);
this.tb_book_name.Name = "tb_book_name";
this.tb_book_name.Size = new System.Drawing.Size(225, 21);
this.tb_book_name.TabIndex = 0;
this.tb_book_name.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_book_name_KeyDown);
//
// tb_author
//
this.tb_author.Location = new System.Drawing.Point(71, 39);
this.tb_author.Name = "tb_author";
this.tb_author.Size = new System.Drawing.Size(139, 21);
this.tb_author.TabIndex = 1;
this.tb_author.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_book_name_KeyDown);
//
// tb_book_comp
//
this.tb_book_comp.Location = new System.Drawing.Point(71, 66);
this.tb_book_comp.Name = "tb_book_comp";
this.tb_book_comp.Size = new System.Drawing.Size(225, 21);
this.tb_book_comp.TabIndex = 2;
this.tb_book_comp.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_book_name_KeyDown);
//
// richTextBox1
//
this.richTextBox1.Location = new System.Drawing.Point(12, 93);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(300, 161);
this.richTextBox1.TabIndex = 3;
this.richTextBox1.Text = "";
//
// dataGridView1
//
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column3,
this.Column4,
this.Column5,
this.Column6,
this.Column7});
this.dataGridView1.Location = new System.Drawing.Point(318, 12);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(763, 241);
this.dataGridView1.TabIndex = 5;
//
// Column1
//
this.Column1.HeaderText = "title";
this.Column1.Name = "Column1";
//
// Column2
//
this.Column2.HeaderText = "author";
this.Column2.Name = "Column2";
//
// Column3
//
this.Column3.HeaderText = "publisher";
this.Column3.Name = "Column3";
//
// Column4
//
this.Column4.HeaderText = "isbn";
this.Column4.Name = "Column4";
//
// Column5
//
this.Column5.HeaderText = "price";
this.Column5.Name = "Column5";
//
// Column6
//
this.Column6.HeaderText = "pubdate";
this.Column6.Name = "Column6";
//
// Column7
//
this.Column7.HeaderText = "discount";
this.Column7.Name = "Column7";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("굴림", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label1.Location = new System.Drawing.Point(20, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(46, 13);
this.label1.TabIndex = 6;
this.label1.Text = "도서명";
this.label1.Click += new System.EventHandler(this.label1_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("굴림", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label2.Location = new System.Drawing.Point(26, 43);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(33, 13);
this.label2.TabIndex = 6;
this.label2.Text = "저자";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("굴림", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.label3.Location = new System.Drawing.Point(20, 70);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(46, 13);
this.label3.TabIndex = 6;
this.label3.Text = "출판사";
//
// Form3
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1093, 265);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.richTextBox1);
this.Controls.Add(this.tb_book_comp);
this.Controls.Add(this.tb_author);
this.Controls.Add(this.tb_book_name);
this.Controls.Add(this.button1);
this.Name = "Form3";
this.Text = "Form3";
this.Load += new System.EventHandler(this.Form3_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox tb_book_name;
private System.Windows.Forms.TextBox tb_author;
private System.Windows.Forms.TextBox tb_book_comp;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
}
}

88
ISBN_Check/Main/Form3.cs Normal file
View File

@@ -0,0 +1,88 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ISBN_Check_test
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
private void Form3_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
dataGridView1.Rows.Clear();
API api = new API();
// 도서명, 저자, 출판사
string[] param = { "title", "author", "publisher", "isbn13", "priceStandard",
"pubDate", "categoryName" };
richTextBox1.Text = api.Aladin_lookup(tb_author.Text, "ISBN13", param);
string[] ArrayValue = { tb_book_name.Text, tb_author.Text, tb_book_comp.Text };
// 도서명 / 저자 / 출판사 / isbn / 정가
// 발행일 / 도서분류 / 재고
// string[] param = { "title", "authors", "publisher", "isbn", "price",
// "datetime", "status" };
// string result = api.Daum(ArrayValue, param);
// richTextBox1.Text = result;
// input_Grid(result);
}
private void input_Grid(string value)
{
string[] sp_data = value.Split('|');
string[] grid = { "", "", "", "", "", "", "" };
for (int a = 0; a < sp_data.Length; a++)
{
if (a % 7 == 0) { grid[0] = sp_data[a]; } // 도서명
if (a % 7 == 1) { grid[1] = sp_data[a]; } // 저자
if (a % 7 == 2) { grid[2] = sp_data[a]; } // 출판사
if (a % 7 == 3) {
string[] tmp_isbn = sp_data[a].Split('|');
if (tmp_isbn.Length < 2)
grid[3] = sp_data[a].Replace(" ", "");
else
grid[3] = tmp_isbn[1]; } // isbn
if (a % 7 == 4) { grid[4] = sp_data[a]; } // 가격
if (a % 7 == 5) {
sp_data[a] = sp_data[a].Substring(0, sp_data[a].IndexOf('T'));
grid[5] = sp_data[a]; } // 출간일
if (a % 7 == 6) { grid[6] = sp_data[a];
dataGridView1.Rows.Add(grid);
} // 판매여부
}
}
private void tb_book_name_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter) {
button1_Click(null, null);
}
}
private void label1_Click(object sender, EventArgs e)
{
// yyyyMMddhhmmss
string tmp = "yyyyMMddhhmmss";
string msg = string.Empty;
msg += tmp.Substring(0, 4) + "\n" + tmp.Substring(4, 2) + "\n" + tmp.Substring(6, 2) + "\n" + tmp.Substring(8,2) + "\n" + tmp.Substring(10,2) + "\n" + tmp.Substring(12,2);
MessageBox.Show(msg);
}
}
}

141
ISBN_Check/Main/Form3.resx Normal file
View File

@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -0,0 +1,576 @@
using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
using Renci.SshNet;
namespace WindowsFormsApp1
{
/// <summary>
/// DB접속을 도와주는 클래스
/// </summary>
class Helper_DB
{
// 접속
MySqlConnection conn;
// 쿼리
MySqlCommand sqlcmd = new MySqlCommand();
MySqlDataReader sd;
public string comp_idx { get; internal set; }
/// <summary>
/// DB를 사용하고 싶을 때 미리 저장된 DB의 기본 접속정보를 이용하여 DB에 접근한다.
/// </summary>
public void DBcon() // DB접속 함수
{
PasswordConnectionInfo connectionInfo = new PasswordConnectionInfo("1.215.250.130", 815, "gloriabook", "admin@!@#$");
connectionInfo.Timeout = TimeSpan.FromSeconds(30);
using (var client = new SshClient(connectionInfo))
{
client.Connect();
if (client.IsConnected)
{
string strConnection = "Server=1.215.250.130;"
+ "Port=3306;"
+ "Database=unimarc;"
+ "uid=root;"
+ "pwd=Admin21234;";
conn = new MySqlConnection(strConnection);
}
}
}
/// <summary>
/// 국중DB를 사용하고 싶을 때 미리 저장된 DB의 기본 접속정보를 이용하여 DB에 접근한다.
/// </summary>
public void DBcon_cl() // DB접속 함수
{
PasswordConnectionInfo connectionInfo = new PasswordConnectionInfo("1.215.250.130", 815, "gloriabook", "admin@!@#$");
connectionInfo.Timeout = TimeSpan.FromSeconds(30);
using (var client = new SshClient(connectionInfo))
{
client.Connect();
if (client.IsConnected)
{
string strConnection = "Server=1.215.250.130;"
+ "Port=3306;"
+ "Database=cl_marc;"
+ "uid=root;"
+ "pwd=Admin21234;";
conn = new MySqlConnection(strConnection);
}
}
}
/// <summary>
/// DBcon이 선진행되어야함.
/// SELECT * FROM [DB_Table_Name] WHERE [DB_Where_Table] LIKE \"%DB_Search_Data%\"
/// <summary>
/// <param name="compidx"/>이용자 회사의 idx번호 단.none일 경우 다른 DB를 가져옴</param>
/// <param name="DB_Table_Name">테이블명</param>
/// <param name="DB_Where_Table">검색할 테이블</param>
/// <param name="DB_Search_Data">검색할 텍스트</param>
/// <returns>검색된 결과값이 반환됨.</returns>
public string DB_Contains(string DB_Table_Name, string compidx,
string DB_Where_Table = "", string DB_Search_Data = "",
string Search_col = "",
string DB_Where_Table1 = "", string DB_Search_Data1 = "" )
{
string cmd = "SELECT ";
if (Search_col == "") { cmd += "*"; }
else { cmd += Search_col; }
cmd += " FROM ";
cmd += DB_Table_Name;
if (DB_Table_Name == "Obj_List") { cmd += " WHERE `comp_num` = \"" + compidx + "\""; }
else if (DB_Table_Name == "Client") { cmd += " WHERE `campanyidx` = \"" + compidx + "\""; }
else if (DB_Table_Name == "Purchase") { cmd += " WHERE `comparyidx` = \"" + compidx + "\""; }
else if(compidx == "none") { cmd += " WHERE `grade` = \"2\""; }
else { cmd += " WHERE `compidx` = \"" + compidx + "\""; }
if(DB_Search_Data != "")
{
cmd += " AND "+ DB_Where_Table + " LIKE\"%" + DB_Search_Data + "%\"";
}
if(DB_Search_Data1 != "")
{
cmd += " AND "+ DB_Where_Table1 + " LIKE\"%" + DB_Search_Data1 + "%\"";
}
cmd += ";";
string result = "";
// DB연결
conn.Open();
// 쿼리 맵핑
sqlcmd.CommandText = cmd;
// 쿼리 날릴 곳은 conn, 즉 아까 연결한 DB
sqlcmd.Connection = conn;
// 쿼리 날리기, sqlDataReader에 결과값 저장
sd = sqlcmd.ExecuteReader();
string change = "";
// 한줄씩 불러오기
while (sd.Read())
{
for(int cout = 0;cout < sd.FieldCount; cout++)
{
change = sd[cout].ToString().Replace("|","");
result += change + "|";
}
}
conn.Close();
return result;
}
/// <summary>
/// DBcon이 선진행되어야함. / SELECT * FROM DB_Table_Name WHERE DB_Where_Table = \"DB_Search_Data\";
/// <summary>
/// <param name="Search_Area">가져올 데이터의 위치</param>
/// <param name="DB_Table_Name">테이블명</param>
/// <param name="DB_Where_Table">검색할 테이블</param>
/// <param name="DB_Search_Data">검색할 텍스트</param>
/// <returns>검색된 결과값이 반환됨.</returns>
public string DB_Select_Search(string Search_Area, string DB_Table_Name,
string DB_Where_Table = "", string DB_Search_Data = "",
string DB_Where_Table1 = "", string DB_Search_Data1 = "")
{
string cmd = "SELECT "+Search_Area+" FROM ";
cmd += DB_Table_Name;
if(DB_Where_Table != "" && DB_Search_Data != "")
{
cmd += " WHERE `" + DB_Where_Table + "` = \"" + DB_Search_Data + "\"";
}
if(DB_Where_Table1 != "" && DB_Search_Data1 != "")
{
cmd += " AND `" + DB_Where_Table1 + "` = \"" + DB_Search_Data1 + "\"";
}
cmd += ";";
string result = "";
// DB연결
conn.Open();
// 쿼리 맵핑
sqlcmd.CommandText = cmd;
// 쿼리 날릴 곳은 conn, 즉 아까 연결한 DB
sqlcmd.Connection = conn;
// 쿼리 날리기, sqlDataReader에 결과값 저장
sd = sqlcmd.ExecuteReader();
// 한줄씩 불러오기
while (sd.Read())
{
for(int cout = 0;cout< sd.FieldCount; cout++)
{
result += sd[cout].ToString() + "|";
}
}
conn.Close();
return result;
}
/// <summary>
/// DBcon이 선진행되어야함. / SELECT * FROM DB_Table_Name WHERE DB_Where_Table = \"DB_Search_Data\";
/// <summary>
/// <param name="DB_Table_Name">테이블명</param>
/// <param name="DB_Where_Table">검색할 테이블</param>
/// <param name="DB_Search_Data">검색할 텍스트</param>
/// <returns>검색된 결과값이 반환됨.</returns>
public string DB_Search(string DB_Table_Name,
string DB_Where_Table = "", string DB_Search_Data = "",
string DB_Where_Table1 = "", string DB_Search_Data1 = "")
{
string cmd = "SELECT * FROM ";
cmd += DB_Table_Name;// + " where id=\"id\"";
if(DB_Search_Data != "")
{
cmd += " WHERE "+ DB_Where_Table + "=\"" + DB_Search_Data +"\"";
}
if (DB_Where_Table1 != "" && DB_Search_Data1 != "")
{
cmd += " AND `" + DB_Where_Table1 + "` =\"" + DB_Search_Data1 + "\"";
}
cmd += ";";
string result = "";
// DB연결
conn.Open();
// 쿼리 맵핑
sqlcmd.CommandText = cmd;
// 쿼리 날릴 곳은 conn, 즉 아까 연결한 DB
sqlcmd.Connection = conn;
// 쿼리 날리기, sqlDataReader에 결과값 저장
sd = sqlcmd.ExecuteReader();
// 한줄씩 불러오기
while (sd.Read())
{
for(int cout = 0;cout< sd.FieldCount; cout++)
{
result += sd[cout].ToString() + "|";
}
}
conn.Close();
return result;
}
/// <summary>
/// 여러 조건이 있을때 사용 (단, Where_Table과 Search_Date의 배열길이는 같아야함)
/// </summary>
/// <param name="DB_Table_Name"></param>
/// <param name="DB_Where_Table"></param>
/// <param name="DB_Search_Data"></param>
/// <param name="Search_Table">추출할 열의 이름."`num1`, `num2`" 이런식으로</param>
/// <returns></returns>
public string More_DB_Search(String DB_Table_Name, String[] DB_Where_Table,
String[] DB_Search_Data, String Search_Table = "")
{
if(DB_Where_Table.Length != DB_Search_Data.Length) { return "오류발생"; }
string result = "";
string cmd = "SELECT ";
if(Search_Table == "") { cmd += "*"; }
else { cmd += Search_Table; }
cmd += " FROM " + DB_Table_Name + " WHERE ";
for(int a = 0; a < DB_Where_Table.Length; a++)
{
cmd += "`" + DB_Where_Table[a] + "` = \"" + DB_Search_Data[a] + "\" ";
if(a == DB_Where_Table.Length - 1) { cmd += " LIMIT 1000;"; }
else { cmd += " AND "; }
}
// DB연결
conn.Open();
// 쿼리 맵핑
sqlcmd.CommandText = cmd;
// 쿼리 날릴 곳은 conn, 즉 아까 연결한 DB
sqlcmd.Connection = conn;
// 쿼리 날리기, sqlDataReader에 결과값 저장
sd = sqlcmd.ExecuteReader();
// 한줄씩 불러오기
while (sd.Read())
{
for(int cout = 0; cout < sd.FieldCount; cout++)
{
result += sd[cout].ToString() + "|";
}
}
conn.Close();
return result;
}
/// <summary>
/// DB상의 날짜의 사이값을 가져오기 위한 함수
/// </summary>
/// <param name="Table_name">가져올 테이블의 이름</param>
/// <param name="Search_Table">프로그램상으로 가져올 DB데이터</param>
/// <param name="Search_date">DB상의 날짜가 저장된 컬럼명</param>
/// <param name="start_date">시작할 날짜 0000-00-00</param>
/// <param name="end_date">끝낼 날짜 0000-00-00</param>
/// <param name="compidx">회사 인덱스 main.com_idx</param>
/// <returns></returns>
public string Search_Date(string Table_name, string Search_Table, string Search_date,
string start_date, string end_date, string compidx)
{
string result = "";
if (Search_Table == "") { Search_Table = "*"; }
// select * from `table_name` where `날짜 컬럼` between date('start_date') and date('end_date')+1;
string cmd = "SELECT " + Search_Table + " FROM `" + Table_name + "` " +
"WHERE `comp_num` = '" + compidx + "' AND `" +
Search_date + "` >= '" + start_date + "'";
if(Table_name != "Obj_List") { cmd = cmd.Replace("`comp_num`", "`compidx`"); }
if (end_date != "") { cmd += " AND `" + Search_date + "` <= '" + end_date + "';"; }
else { cmd += ";"; }
conn.Open();
sqlcmd.CommandText = cmd;
sqlcmd.Connection = conn;
sd = sqlcmd.ExecuteReader();
while (sd.Read()){
for(int cout = 0; cout < sd.FieldCount; cout++)
{
result += sd[cout].ToString() + "|";
}
}
conn.Close();
return result;
}
public void DB_INSERT(String DB_Table_name, String[] DB_col_name, String[] setData)
{
string cmd = "INSERT INTO " + DB_Table_name + "(";
for(int a = 0; a < DB_col_name.Length; a++)
{
if (a == DB_col_name.Length - 1) { cmd += "`" + DB_col_name[a] + "`) "; }
else { cmd += "`" + DB_col_name[a] + "`, "; }
}
cmd += "values(";
for(int a = 0; a < setData.Length; a++)
{
if (a == setData.Length - 1) { cmd += "\"" + setData[a] + "\")"; }
else { cmd += "\"" + setData[a] + "\", "; }
}
cmd += ";";
cmd = cmd.Replace("|", "");
using (conn)
{
conn.Open();
MySqlTransaction tran = conn.BeginTransaction();
sqlcmd.Connection = conn;
sqlcmd.Transaction = tran;
try
{
sqlcmd.CommandText = cmd;
sqlcmd.ExecuteNonQuery();
tran.Commit();
}
catch(Exception ex)
{
tran.Rollback();
MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
/// <summary>
/// 대상 컬럼 삭제 / DELETE FROM "DB_Table_Name" WHERE "target_idx"="comp_idx" AND "target_area"="target";
/// </summary>
/// <param name="DB_Table_Name">삭제할 대상이 있는 테이블명</param>
/// <param name="target_idx">인덱스 대상이 있는 열명</param>
/// <param name="comp_idx">삭제할 대상의 인덱스</param>
/// <param name="target_area">삭제할 대상이 있는 열명</param>
/// <param name="target">삭제할 대상</param>
public void DB_Delete(string DB_Table_Name,
string target_idx, string comp_idx,
string target_area, string target)
{
string cmd = "DELETE FROM " + DB_Table_Name + " WHERE " +
"`" + target_idx + "`=\"" + comp_idx + "\" AND" +
"`" + target_area + "`=\"" + target + "\" LIMIT 1;";
using (conn)
{
conn.Open();
MySqlTransaction tran = conn.BeginTransaction();
sqlcmd.Connection = conn;
sqlcmd.Transaction = tran;
try
{
sqlcmd.CommandText = cmd;
sqlcmd.ExecuteNonQuery();
tran.Commit();
}
catch(Exception ex)
{
tran.Rollback();
MessageBox.Show(ex.ToString());
}
}
}
/// <summary>
/// 대상 컬럼 삭제(리미트 없음) / DELETE FROM "DB_Table_Name" WHERE "target_idx"="comp_idx" AND "target_area"="target";
/// </summary>
/// <param name="DB_Table">대상 테이블명</param>
/// <param name="target_idx">회사 인덱스 컬럼명</param>
/// <param name="comp_idx">회사 인덱스</param>
/// <param name="target_area">삭제 대상의 컬럼명</param>
/// <param name="target">삭제 대상</param>
public void DB_Delete_No_Limit(string DB_Table,
string target_idx, string comp_idx,
string[] target_area, string[] target)
{
string cmd = string.Format("DELETE FROM {0} WHERE `{1}`= \"{2}\" AND", DB_Table, target_idx, comp_idx);
for(int a= 0; a < target_area.Length; a++)
{
cmd += string.Format("`{0}`=\"{1}\"", target_area[a], target[a]);
if (a != target_area.Length - 1) { cmd += " AND"; }
}
cmd += ";";
using (conn)
{
conn.Open();
MySqlTransaction tran = conn.BeginTransaction();
sqlcmd.Connection = conn;
sqlcmd.Transaction = tran;
try
{
sqlcmd.CommandText = cmd;
sqlcmd.ExecuteNonQuery();
tran.Commit();
}
catch(Exception e)
{
tran.Rollback();
MessageBox.Show(e.ToString(), "Error");
}
}
}
/// <summary>
/// 대상 컬럼 삭제 / DELETE FROM "DB_Table_Name" WHERE "target_idx"="comp_idx" AND "target_area"="target";
/// </summary>
public void DB_Delete_More_term(string DB_Table_Name,
string target_idx, string comp_idx,
string[] target_area, string[] target)
{
string cmd = "DELETE FROM " + DB_Table_Name + " WHERE " +
"`" + target_idx + "`=\"" + comp_idx + "\" AND";
for(int a = 0; a < target_area.Length; a++)
{
cmd += " `" + target_area[a] + "`=\"" + target[a] + "\" ";
if (a == target_area.Length - 1) { cmd += "LIMIT 1;"; }
else { cmd += "AND"; }
}
using (conn)
{
conn.Open();
MySqlTransaction tran = conn.BeginTransaction();
sqlcmd.Connection = conn;
sqlcmd.Transaction = tran;
try
{
sqlcmd.CommandText = cmd;
sqlcmd.ExecuteNonQuery();
tran.Commit();
}
catch(Exception ex)
{
tran.Rollback();
MessageBox.Show(ex.ToString(), "Error");
}
}
}
/// <summary>
/// "UPDATE \"" + DB_Tabel_Name + "\" SET \"" + Edit_colum + "\"=\"" + Edit_Name + "\" WHERE \""+Search_Name+"\"=\"" + Search_Data + "\";"
/// </summary>
/// <param name="DB_Tabel_Name">테이블명</param>
/// <param name="Edit_colum">수정할 컬럼명</param>
/// <param name="Edit_Name">수정하고 싶은 문구</param>
/// <param name="Search_Name">검색할 컬럼명</param>
/// <param name="Search_Data">검색할 데이터</param>
public string DB_Update(string DB_Tabel_Name, string Edit_colum, string Edit_Name, string Search_Name, string Search_Data)
{
string cmd = "UPDATE `" + DB_Tabel_Name + "` SET `" + Edit_colum + "`=\"" + Edit_Name + "\" WHERE `"+Search_Name+"`=\"" + Search_Data + "\";";
cmd = cmd.Replace("|", "");
using (conn)
{
conn.Open();
MySqlTransaction tran = conn.BeginTransaction();
sqlcmd.Connection = conn;
sqlcmd.Transaction = tran;
try
{
sqlcmd.CommandText = cmd;
sqlcmd.ExecuteNonQuery();
tran.Commit();
}
catch(Exception ex)
{
tran.Rollback();
MessageBox.Show(ex.ToString());
}
}
return cmd;
}
/// <summary>
/// 많은 곳의 데이터를 변화시키고 싶을때. 테이블명을 제외하곤 다 배열. Edit와 Search끼리의 배열 인덱스값이 각자 서로 같아야함.
/// </summary>
/// <param name="DB_Table_Name">바꿀 데이터가 있는 테이블명</param>
/// <param name="Edit_col">Edit_name인덱스와 같아야함</param>
/// <param name="Edit_name">Edit_col인덱스와 같아야함</param>
/// <param name="Search_col">Search_Name인덱스와 같아야함</param>
/// <param name="Search_Name">Search_col인덱스와 같아야함</param>
public void More_Update(String DB_Table_Name,
String[] Edit_col, String[] Edit_name,
String[] Search_col, String[] Search_Name)
{
string cmd = "UPDATE `" + DB_Table_Name + "` SET ";
for(int a = 0; a < Edit_col.Length; a++)
{
cmd += "`" + Edit_col[a] + "` = \"" + Edit_name[a] + "\"";
if (a != Edit_col.Length - 1) { cmd += ", "; }
else { cmd += " "; }
}
cmd += "WHERE ";
for(int a = 0; a < Search_col.Length; a++)
{
cmd += "`" + Search_col[a] + "` = \"" + Search_Name[a] + "\" ";
if (a != Search_col.Length - 1) { cmd += "AND "; }
}
cmd += ";";
cmd = cmd.Replace("|", "");
using (conn)
{
conn.Open();
MySqlTransaction tran = conn.BeginTransaction();
sqlcmd.Connection = conn;
sqlcmd.Transaction = tran;
try
{
sqlcmd.CommandText = cmd;
sqlcmd.ExecuteNonQuery();
tran.Commit();
}
catch(Exception ex)
{
tran.Rollback();
MessageBox.Show(ex.ToString());
}
}
}
/// <summary>
/// DB에 회사이름을 검색하여 만약 있는 회사일 경우 False 반환 / 없을경우 True반환
/// </summary>
/// <param name="Search_Data">검색할 회사 명</param>
/// <returns></returns>
public bool chk_comp(string Search_Data)
{
string cmd = "SELECT `comp_name` FROM `Comp`;";
// DB연결
conn.Open();
// 쿼리 맵핑
sqlcmd.CommandText = cmd;
// 쿼리 날릴 곳은 conn, 즉 아까 연결한 DB
sqlcmd.Connection = conn;
// 쿼리 날리기, sqlDataReader에 결과값 저장
sd = sqlcmd.ExecuteReader();
// 한줄씩 불러오기
while (sd.Read())
{
for (int cout = 0; cout < sd.FieldCount; cout++)
{
if(sd[cout].ToString() == Search_Data) { conn.Close(); return false; }
}
}
conn.Close();
return true;
}
/// <summary>
/// SQL문을 직접 만들어서 작성하여 사용해야함. (단, DELETE문/UPDATE문은 사용하지말 것!)
/// </summary>
/// <param name="cmd">등록할 SQL문</param>
/// <returns></returns>
public string self_Made_Cmd(string cmd)
{
cmd = cmd.Replace("|", "");
string result = "";
if(cmd.Contains("DELETE")==true || cmd.Contains("UPDATE") == true) { return ""; }
conn.Open();
try
{
sqlcmd.CommandText = cmd;
sqlcmd.Connection = conn;
sd = sqlcmd.ExecuteReader();
while (sd.Read())
{
for (int cout = 0; cout < sd.FieldCount; cout++)
{
result += sd[cout].ToString() + "|";
}
}
}
catch(Exception e)
{
MessageBox.Show("{0} Exception caught.\n"+ e.ToString());
MessageBox.Show(cmd);
}
conn.Close();
return result;
}
}
}

View File

@@ -0,0 +1,251 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A19E0C06-EA15-4E30-AE42-4DC0CC4C88DE}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>ISBN_Check_test</RootNamespace>
<AssemblyName>ISBN_Check_test</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>false</Deterministic>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>\\MSDN-SPECIAL\project_share\</PublishUrl>
<Install>true</Install>
<InstallFrom>Unc</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<MinimumRequiredVersion>1.0.0.0</MinimumRequiredVersion>
<ApplicationRevision>2</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
<PublishWizardCompleted>true</PublishWizardCompleted>
<BootstrapperEnabled>true</BootstrapperEnabled>
<BootstrapperComponentsLocation>Relative</BootstrapperComponentsLocation>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>AC3A3614CD78D358BE0B97C917CD5A11F807CD10</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<ManifestKeyFile>ISBN_Check_test_1_TemporaryKey.pfx</ManifestKeyFile>
</PropertyGroup>
<PropertyGroup>
<GenerateManifests>true</GenerateManifests>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
<HintPath>packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll</HintPath>
</Reference>
<Reference Include="Google.Protobuf, Version=3.14.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
<HintPath>packages\Google.Protobuf.3.14.0\lib\net45\Google.Protobuf.dll</HintPath>
</Reference>
<Reference Include="K4os.Compression.LZ4, Version=1.1.11.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
<HintPath>packages\K4os.Compression.LZ4.1.1.11\lib\net46\K4os.Compression.LZ4.dll</HintPath>
</Reference>
<Reference Include="K4os.Compression.LZ4.Streams, Version=1.1.11.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
<HintPath>packages\K4os.Compression.LZ4.Streams.1.1.11\lib\net46\K4os.Compression.LZ4.Streams.dll</HintPath>
</Reference>
<Reference Include="K4os.Hash.xxHash, Version=1.0.6.0, Culture=neutral, PublicKeyToken=32cd54395057cec3, processorArchitecture=MSIL">
<HintPath>packages\K4os.Hash.xxHash.1.0.6\lib\net46\K4os.Hash.xxHash.dll</HintPath>
</Reference>
<Reference Include="MySql.Data, Version=8.0.25.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>packages\MySql.Data.8.0.25\lib\net452\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="Renci.SshNet, Version=2020.0.1.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106, processorArchitecture=MSIL">
<HintPath>packages\SSH.NET.2020.0.1\lib\net40\Renci.SshNet.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Core" />
<Reference Include="System.Management" />
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
</Reference>
<Reference Include="System.Numerics" />
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
</Reference>
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
</Reference>
<Reference Include="System.Transactions" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="Ubiety.Dns.Core, Version=2.2.1.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>packages\MySql.Data.8.0.25\lib\net452\Ubiety.Dns.Core.dll</HintPath>
</Reference>
<Reference Include="Zstandard.Net, Version=1.1.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
<HintPath>packages\MySql.Data.8.0.25\lib\net452\Zstandard.Net.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Form2.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form2.Designer.cs">
<DependentUpon>Form2.cs</DependentUpon>
</Compile>
<Compile Include="Form1_Sub.cs" />
<Compile Include="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
</Compile>
<Compile Include="Form3.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form3.Designer.cs">
<DependentUpon>Form3.cs</DependentUpon>
</Compile>
<Compile Include="Helper_DB.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Skill.cs" />
<Compile Include="Yes24.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Yes24.Designer.cs">
<DependentUpon>Yes24.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form2.resx">
<DependentUpon>Form2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Form3.resx">
<DependentUpon>Form3.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<EmbeddedResource Include="Yes24.resx">
<DependentUpon>Yes24.cs</DependentUpon>
</EmbeddedResource>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2%28x86 및 x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<PublishFile Include="ISBN_Check_test.pdb">
<Visible>False</Visible>
<Group>
</Group>
<TargetPath>
</TargetPath>
<PublishState>Include</PublishState>
<IncludeHash>True</IncludeHash>
<FileType>File</FileType>
</PublishFile>
</ItemGroup>
<ItemGroup>
<COMReference Include="Microsoft.Office.Core">
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>4</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="Microsoft.Office.Interop.Excel">
<Guid>{00020813-0000-0000-C000-000000000046}</Guid>
<VersionMajor>1</VersionMajor>
<VersionMinor>6</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
<COMReference Include="VBIDE">
<Guid>{0002E157-0000-0000-C000-000000000046}</Guid>
<VersionMajor>5</VersionMajor>
<VersionMinor>3</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
<EmbedInteropTypes>True</EmbedInteropTypes>
</COMReference>
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrlHistory>\\MSDN-SPECIAL\project_share\|\\SDN-SPECIAL\project_share\|//MSDN-SPECIAL/project_share/|게시\</PublishUrlHistory>
<InstallUrlHistory>//MSDN-SPECIAL/project_share/</InstallUrlHistory>
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>ko-KR</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup>
<PropertyGroup>
<EnableSecurityDebugging>false</EnableSecurityDebugging>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ISBN_Check_test
{
static class Program
{
/// <summary>
/// 해당 애플리케이션의 주 진입점입니다.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}

View File

@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면
// 이러한 특성 값을 변경하세요.
[assembly: AssemblyTitle("ISBN_Check_test")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyProduct("ISBN_Check_test")]
[assembly: AssemblyCopyright("Copyright © Microsoft Corporation 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면
// 해당 형식에 대해 ComVisible 특성을 true로 설정하세요.
[assembly: ComVisible(false)]
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다.
[assembly: Guid("a19e0c06-ea15-4e30-ae42-4dc0cc4c88de")]
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.
//
// 주 버전
// 부 버전
// 빌드 번호
// 수정 버전
//
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
[assembly: AssemblyVersion("1.0.*")]
// [assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -0,0 +1,70 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 이 코드는 도구를 사용하여 생성되었습니다.
// 런타임 버전:4.0.30319.42000
//
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
// 이러한 변경 내용이 손실됩니다.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ISBN_Check_test.Properties
{
/// <summary>
/// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다.
/// </summary>
// 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
// 클래스에서 자동으로 생성되었습니다.
// 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여
// ResGen을 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ISBN_Check_test.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을
/// 재정의합니다.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,29 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace ISBN_Check_test.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

613
ISBN_Check/Main/Skill.cs Normal file
View File

@@ -0,0 +1,613 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Net;
using System.IO;
using System.Web;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;
using System.Xml;
using System.Windows.Forms;
using System.Reflection;
using Excel = Microsoft.Office.Interop.Excel;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
using System.Text.RegularExpressions;
namespace WindowsFormsApp1
{
/// <summary>
/// 여러 기능들이 추가될 예정.
/// Excel_to_DataGridView
/// </summary>
class Skill_Grid
{
/// <summary>
/// * Row헤더에 체크박스를 넣는 기능*
/// 사용불가. 복사해서 가져가고 사양에 맞춰 수정할 것.
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
/// <param name="colCount">체크박스를 넣을 컬럼 위치</param>
public void Add_Row_CheckBox(object sender, DataGridViewCellPaintingEventArgs e, int colCount)
{
if (e.ColumnIndex == colCount && e.RowIndex == -1)
{
string ori_name = ((DataGridView)sender).Name;
((DataGridView)sender).Name = "Add_chkBox";
e.PaintBackground(e.ClipBounds, false);
Point pt = e.CellBounds.Location;
int nChkBoxWidth = 15;
int nChkBoxHeight = 15;
int offsetX = (e.CellBounds.Width - nChkBoxWidth) / 2;
int offsetY = (e.CellBounds.Height - nChkBoxHeight) / 2;
pt.X += offsetX;
pt.Y += offsetY;
CheckBox cb = new CheckBox();
cb.Size = new Size(nChkBoxWidth, nChkBoxHeight);
cb.Location = pt;
cb.CheckedChanged += new EventHandler(datagridview_checkBox_Click);
((DataGridView)sender).Controls.Add(cb);
e.Handled = true;
}
}
private void datagridview_checkBox_Click(object sender, EventArgs e)
{
foreach(DataGridViewRow r in ((DataGridView)sender).Rows)
{
r.Cells["chkbox"].Value = ((CheckBox)sender).Checked;
}
}
/// <summary>
/// 엑셀에서 복사한 데이터를 DataGirdView에 붙여넣어주는 코드 (단, KeyDown에 넣어야함!!!!)
/// 사전에 if ((e.Shift && e.KeyCode == Keys.Insert) || (e.Control && e.KeyCode == Keys.V))안에 들어가야함.
/// </summary>
/// <param name="sender">KeyDown의 object "sender"</param>
/// <param name="e">KeyDown의 KeyEventArgs "e"</param>
public void Excel_to_DataGridView(object sender, KeyEventArgs e)
{
//if user clicked Shift+Ins or Ctrl+V (paste from clipboard)
if ((e.Shift && e.KeyCode == Keys.Insert) || (e.Control && e.KeyCode == Keys.V))
{
char[] rowSplitter = { '\r', '\n' };
char[] columnSplitter = { '\t' };
//get the text from clipboard
IDataObject dataInClipboard = Clipboard.GetDataObject();
string stringInClipboard = (string)dataInClipboard.GetData(DataFormats.Text);
//split it into lines
string[] rowsInClipboard = stringInClipboard.Split(rowSplitter, StringSplitOptions.RemoveEmptyEntries);
//get the row and column of selected cell in dataGridView1
int r = ((DataGridView)sender).SelectedCells[0].RowIndex;
int c = ((DataGridView)sender).SelectedCells[0].ColumnIndex;
//add rows into dataGridView1 to fit clipboard lines
if (((DataGridView)sender).Rows.Count < (r + rowsInClipboard.Length))
{
((DataGridView)sender).Rows.Add(r + rowsInClipboard.Length - ((DataGridView)sender).Rows.Count);
}
// loop through the lines, split them into cells and place the values in the corresponding cell.
for (int iRow = 0; iRow < rowsInClipboard.Length; iRow++)
{
//split row into cell values
string[] valuesInRow = rowsInClipboard[iRow].Split(columnSplitter);
//cycle through cell values
for (int iCol = 0; iCol < valuesInRow.Length; iCol++)
{
//assign cell value, only if it within columns of the dataGridView1
if (((DataGridView)sender).ColumnCount - 1 >= c + iCol)
{
((DataGridView)sender).Rows[r + iRow].Cells[c + iCol].Value = valuesInRow[iCol];
}
}
}
}
}
/// <summary>
/// DataGirdView의 활성화된 셀값을 삭제하는 코드 (단, KeyDown에 넣어야함!!!!)
/// 사전에 if(e.KeyCode == Keys.Delete)안에 들어가야함.
/// </summary>
/// <param name="sender">KeyDown의 object "sender"</param>
/// <param name="e">KeyDown의 KeyEventArgs "e"</param>
public void DataGrid_to_Delete(object sender, KeyEventArgs e)
{
int rowIndex = ((DataGridView)sender).CurrentCell.RowIndex;
int columnIndex = ((DataGridView)sender).CurrentCell.ColumnIndex;
((DataGridView)sender).Rows[rowIndex].Cells[columnIndex].Value = "";
}
/// <summary>
/// 그리드 앞 머리말에 넘버를 표시
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void Print_Grid_Num(Object sender, DataGridViewRowPostPaintEventArgs e)
{
// RowPostPaint 이벤트 핸들러
// 행헤더 열영역에 행번호를 위해 장방형으로 처리
Rectangle rect = new Rectangle(e.RowBounds.Location.X,
e.RowBounds.Location.Y,
((DataGridView)sender).RowHeadersWidth - 4,
e.RowBounds.Height);
// 위에서 생성된 장방형내에 행번호를 보여주고 폰트색상 및 배경을 설정
TextRenderer.DrawText(e.Graphics,
(e.RowIndex + 1).ToString(),
((DataGridView)sender).RowHeadersDefaultCellStyle.Font,
rect,
((DataGridView)sender).RowHeadersDefaultCellStyle.ForeColor,
TextFormatFlags.VerticalCenter | TextFormatFlags.Right);
}
/// <summary>
/// Grid에서 복사시 클립보드 글자깨짐방지
/// 현재 효과없음
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void clipboard_not_crack(object sender, KeyEventArgs e)
{
Clipboard.SetDataObject(((DataGridView)sender).GetClipboardContent().GetText());
}
/// <summary>
/// 엑셀 내보내기
/// </summary>
/// <param name="datagridview">사용할 데이터 그리드뷰</param>
public void ExportToExcel(DataGridView datagridview)
{
Excel.Application excelApplication;
Excel._Workbook workbook;
Excel._Worksheet worksheet;
excelApplication = new Excel.Application();
if (excelApplication == null) {
MessageBox.Show("엑셀이 설치되지 않았습니다");
return;
}
excelApplication.Visible = false;
workbook = excelApplication.Workbooks.Add(Missing.Value);
worksheet = workbook.ActiveSheet as Excel._Worksheet;
object[,] headerValueArray = new object[1, datagridview.ColumnCount];
int gap = 0; // 숨김처리된 컬럼 격차 줄이기 위한 변수
// 헤더 출력
for (int a = 0; a < datagridview.Columns.Count; a++)
{
if (datagridview.Columns[a].Visible == false) { gap++; continue; }
headerValueArray[0, a - gap] = datagridview.Columns[a].HeaderText;
}
Excel.Range startHeaderCell = worksheet.Cells[1, 1];
Excel.Range endHeaderCell = worksheet.Cells[1, datagridview.ColumnCount - gap];
worksheet.get_Range(
startHeaderCell as object, endHeaderCell as object).Font.Bold = true;
worksheet.get_Range(
startHeaderCell as object, endHeaderCell as object).VerticalAlignment=Excel.XlVAlign.xlVAlignCenter;
worksheet.get_Range(
startHeaderCell as object, endHeaderCell as object).Value2 = headerValueArray;
object[,] cellValueArray = new object[datagridview.RowCount, datagridview.ColumnCount];
gap = 0;
// 내용 출력
for(int a = 0; a < datagridview.RowCount; a++)
{
for(int b = 0; b < datagridview.ColumnCount; b++)
{
if (datagridview.Columns[b].Visible == false) { gap++; continue; }
if (datagridview.Rows[a].Cells[b].ValueType.Name == "String") {
cellValueArray[a, b-gap] = "'" + datagridview.Rows[a].Cells[b].Value.ToString();
}
else {
cellValueArray[a, b] = datagridview.Rows[a].Cells[b].Value;
}
}
}
Excel.Range startCell = worksheet.Cells[2, 1];
Excel.Range endCell = worksheet.Cells[datagridview.RowCount + 1, datagridview.ColumnCount-gap];
worksheet.get_Range(startCell as object, endCell as object).Value2 = cellValueArray;
excelApplication.Visible = true;
excelApplication.UserControl = true;
}
}
/// <summary>
/// 텍스트 관련 함수.
/// </summary>
class String_Text
{
/// <summary>
/// 텍스트박스 숫자만 입력받는 함수. KeyPress함수에 적용
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public void Only_Int(object sender, KeyPressEventArgs e)
{
if(!(char.IsDigit(e.KeyChar) || e.KeyChar == Convert.ToChar(Keys.Back)))
{
e.Handled = true;
}
}
/// <summary>
/// TextChanged이벤트 - 천단위 콤마찍어주기
/// </summary>
/// <param name="sender">object sender</param>
/// <param name="e">EventArgs</param>
public void Int_Comma(object sender, EventArgs e)
{
if (((TextBox)sender).Text != "") {
string text;
text = ((TextBox)sender).Text.Replace(",", "");
((TextBox)sender).Text = String.Format("{0:#,###}", Convert.ToInt32(text));
((TextBox)sender).SelectionStart = ((TextBox)sender).TextLength;
((TextBox)sender).SelectionLength = 0;
}
}
/// <summary>
/// 문자열 내에 한글이 들어가는지 체크
/// </summary>
/// <param name="value">대상 문자열</param>
/// <returns>한글 포함시 true</returns>
public bool isContainHangul(string value)
{
char[] charArr = value.ToCharArray();
foreach(char c in charArr)
{
if (char.GetUnicodeCategory(c) == System.Globalization.UnicodeCategory.OtherLetter)
return true;
}
return false;
}
/// <summary>
/// 대상 문자열안에 찾고 싶은 문자 찾기
/// </summary>
/// <param name="value">대상 문자열</param>
/// <param name="chkString">찾고 싶은 문자</param>
/// <returns>있을 경우 True반환</returns>
public bool CheckString(string value, string chkString)
{
int index = value.IndexOf(chkString);
if (index < 0)
return false;
return true;
}
public int Char_count(string value, char chkString)
{
string[] res = value.Split(chkString);
int count = res.Length;
return count - 1;
}
/// <summary>
/// 문자와 문자사이의 값 가져오기
/// </summary>
/// <param name="str">대상 문자열</param>
/// <param name="begin">시작 문자열</param>
/// <param name="end">마지막 문자열</param>
/// <returns>문자 사이값</returns>
public string GetMiddelString(string str, string begin, string end)
{
if (string.IsNullOrEmpty(str))
{
return null;
}
string result = null;
if (str.IndexOf(begin) > -1)
{
str = str.Substring(str.IndexOf(begin) + begin.Length);
if (str.IndexOf(end) > -1) result = str.Substring(0, str.IndexOf(end));
else result = str;
}
return result;
}
}
public class API
{
/// <summary>
/// https://blog.aladin.co.kr/openapi 참고
/// </summary>
/// <param name="Query"></param>
/// <param name="QueryType"></param>
/// <param name="Param"></param>
/// <returns></returns>
public string Aladin(string Query, string QueryType, string[] Param)
{
string result = string.Empty;
// 쿼리 생성
string key = "ttbgloriabook1512001";
string site = "http://www.aladin.co.kr/ttb/api/ItemSearch.aspx";
string query = string.Format("{0}?query={1}&TTBKey={2}&output=xml&querytype={3}&MaxResults={4}",
site, Query, key, QueryType, 30.ToString());
// 쿼리를 입력인자로 WebRequest 개채 생성
WebRequest request = WebRequest.Create(query);
// WebRequest개체의 헤더에 인증키 포함시키기.
// request.Headers.Add("Authorization", header);
// WebResponse개체를 통해 서비스 요청.
WebResponse response = request.GetResponse();
// 결과문자열 확인
Stream stream = response.GetResponseStream();
StreamReader reader = new StreamReader(stream, Encoding.UTF8);
String xml = reader.ReadToEnd();
stream.Close();
// xml형식을 json형식으로 변환
XmlDocument doc = new XmlDocument();
doc.LoadXml(xml);
var json = JsonConvert.SerializeXmlNode(doc);
// json형식 분석을 위해 JavaScriptSerializer 개체 생성
JavaScriptSerializer js = new JavaScriptSerializer();
// 런타임에 개체를 확인하여 사용할수 있는 dynamic을 이용해 역직렬화
dynamic dob = js.Deserialize<dynamic>(json);
// "object"내에 있는것을 얻어오기 위해 다시 dynamic변수에 참조
dynamic docs = "";
try
{
docs = dob["object"]["item"];
}
catch
{
return "";
}
int length = 0;
int ID_length = Param.Length;
// 검색 결과가 1개 이하일 경우, 오류가 발생하여 try/catch문 사용.
try
{
// docs는 요소 컬렉션으로 object로 변환.
object[] buf = docs;
length = buf.Length;
}
catch
{
object buf = docs;
length = 1;
}
for (int a = 0; a < length; a++)
{
List<string> tmp_data = new List<string>();
for (int b = 0; b < ID_length; b++)
{
if (length == 1)
{
tmp_data.Add(docs[Param[b]]);
}
else
{
tmp_data.Add(docs[a][Param[b]]);
}
result += tmp_data[b] + "|";
}
result += "\n";
}
return result;
}
public string Naver(string[] Query, string[] QueryType, string[] Param)
{
string result = string.Empty;
string json = string.Empty;
// url 생성
string url = "https://openapi.naver.com/v1/search/book_adv?";
for (int a = 0; a < Query.Length; a++)
{
url += string.Format("{0}={1}&", QueryType[a], Query[a]);
}
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Headers.Add("X-Naver-Client-Id", "wYr0JczCBoDopq1NKTyQ"); // 클라이언트 아이디
request.Headers.Add("X-Naver-Client-Secret", "QHzeXadtO7"); // 클라이언트 시크릿
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
string status = response.StatusCode.ToString();
if (status == "OK")
{
Stream stream = response.GetResponseStream();
StreamReader reader = new StreamReader(stream, Encoding.UTF8);
json = reader.ReadToEnd();
}
else
{
MessageBox.Show(status, "Error");
return "Error";
}
// json형식 분석을 위해 JavaScriptSerializer 개체 생성
JavaScriptSerializer js = new JavaScriptSerializer();
// 런타임에 개체를 확인하여 사용할수 있는 dynamic을 이용해 역직렬화
dynamic dob = js.Deserialize<dynamic>(json);
// "object"내에 있는것을 얻어오기 위해 다시 dynamic변수에 참조
dynamic docs = "";
try
{
// docs = dob["object"]["item"];
docs = dob["items"];
}
catch
{
return "";
}
int length = 0;
int ID_length = Param.Length;
// 검색 결과가 1개 이하일 경우, 오류가 발생하여 try/catch문 사용.
try
{
// docs는 요소 컬렉션으로 object로 변환.
object[] buf = docs;
length = buf.Length;
}
catch
{
object buf = docs;
length = 1;
}
for (int a = 0; a < length; a++)
{
List<string> tmp_data = new List<string>();
for (int b = 0; b < ID_length; b++)
{
tmp_data.Add(docs[a][Param[b]]);
result += tmp_data[b] + "|";
}
result += "\n\t";
}
return result;
}
public string Daum(string Query, string Type, string[] Param)
{
string result = string.Empty;
// url생성
string url = "https://dapi.kakao.com/v3/search/book";
string query = string.Format("{0}?query={1}&target={2}&", url, Query, Type);
WebRequest request = WebRequest.Create(query);
string rKey = "e3935565b731a2a6f32880c90d76403a";
string header = "KakaoAK " + rKey;
request.Headers.Add("Authorization", header);
WebResponse response = request.GetResponse();
Stream stream = response.GetResponseStream();
StreamReader reader = new StreamReader(stream, Encoding.UTF8);
string json = reader.ReadToEnd();
stream.Close();
JavaScriptSerializer js = new JavaScriptSerializer();
dynamic dob = js.Deserialize<dynamic>(json);
dynamic docs = dob["documents"];
object[] buf = docs;
int length = buf.Length;
int ID_length = Param.Length;
for (int a = 0; a < length; a++)
{
List<object> tmp_data = new List<object>();
for (int b = 0; b < ID_length; b++)
{
if (Param[b] == "authors")
{
object[] tmp = docs[a][Param[b]];
string tmp_str = string.Empty;
for (int j = 0; j < tmp.Length; j++)
{
tmp_str += tmp[j];
if (j < tmp.Length - 1)
{
tmp_str += ", ";
}
}
tmp_data.Add(tmp_str);
result += tmp_data[b] + "|";
tmp_str = "";
}
else
{
tmp_data.Add(docs[a][Param[b]]);
result += tmp_data[b] + "|";
}
}
result += "\n";
}
return result;
}
}
public class Skill_Search_Text
{
/// <summary>
/// 검색용 박스 제작
/// </summary>
/// <param name="title">제목</param>
/// <param name="promptText">내용</param>
/// <param name="value">검색할 문자열</param>
/// <returns></returns>
public DialogResult InputBox(string title, string promptText, ref string value)
{
Form form = new Form();
Label label = new Label();
TextBox textBox = new TextBox();
Button btnOk = new Button();
Button btnCancel = new Button();
form.Text = title;
label.Text = promptText;
textBox.Text = value;
btnOk.Text = "OK";
btnCancel.Text = "Cancel";
btnOk.DialogResult = DialogResult.OK;
btnCancel.DialogResult = DialogResult.Cancel;
label.SetBounds(9, 20, 372, 13);
textBox.SetBounds(12, 36, 372, 20);
btnOk.SetBounds(228, 72, 75, 23);
btnCancel.SetBounds(309, 72, 75, 23);
label.AutoSize = true;
textBox.Anchor = textBox.Anchor | AnchorStyles.Right;
btnOk.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
btnCancel.Anchor = AnchorStyles.Bottom | AnchorStyles.Right;
form.ClientSize = new Size(396, 107);
form.Controls.AddRange(new Control[] { label, textBox, btnOk, btnCancel });
form.ClientSize = new Size(Math.Max(300, label.Right + 10), form.ClientSize.Height);
form.FormBorderStyle = FormBorderStyle.FixedDialog;
form.StartPosition = FormStartPosition.CenterScreen;
form.MinimizeBox = false;
form.MaximizeBox = false;
form.AcceptButton = btnOk;
form.CancelButton = btnCancel;
DialogResult dialogResult = form.ShowDialog();
value = textBox.Text;
return dialogResult;
}
/// <summary>
/// 색상 변경함수(richTextBox에만 적용)
/// </summary>
/// <param name="strTarget"></param>
public void Color_change(string strTarget, RichTextBox richText)
{
Regex regex = new Regex(strTarget);
MatchCollection mc = regex.Matches(richText.Text);
richText.Select(0, richText.Text.Length);
richText.SelectionBackColor = Color.White;
int ICursorPosition = richText.SelectionStart;
foreach (Match m in mc)
{
int istartidx = m.Index;
int istopidx = m.Length + 1;
int istopidx1 = m.Length;
if (strTarget == "▼" || strTarget == "▲") { richText.Select(istartidx, istopidx); }
else { richText.Select(istartidx, istopidx1); }
if (strTarget == "▼") { richText.SelectionColor = Color.Blue; }
else if (strTarget == "▲") { richText.SelectionColor = Color.Red; }
else { richText.SelectionBackColor = Color.Orange; } // TODO: 색상 변경될수 있음.
richText.SelectionStart = ICursorPosition;
if (strTarget == "▼" || strTarget == "▲") { richText.SelectionColor = Color.Black; }
else { richText.SelectionBackColor = Color.Empty; }
}
}
}
}

194
ISBN_Check/Main/Yes24.Designer.cs generated Normal file
View File

@@ -0,0 +1,194 @@

namespace ISBN_Check_test
{
partial class Yes24
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.btn_Close = new System.Windows.Forms.Button();
this.btn_change = new System.Windows.Forms.Button();
this.before_book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.after_book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.before_author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.after_author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.before_book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.after_book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.cb_bracket = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle7.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.before_book_name,
this.after_book_name,
this.before_author,
this.after_author,
this.before_book_comp,
this.after_book_comp,
this.price});
this.dataGridView1.Location = new System.Drawing.Point(13, 41);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle8.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle8;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(1064, 661);
this.dataGridView1.TabIndex = 0;
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
//
// btn_Close
//
this.btn_Close.Location = new System.Drawing.Point(900, 9);
this.btn_Close.Name = "btn_Close";
this.btn_Close.Size = new System.Drawing.Size(75, 23);
this.btn_Close.TabIndex = 1;
this.btn_Close.Text = "닫 기";
this.btn_Close.UseVisualStyleBackColor = true;
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
//
// btn_change
//
this.btn_change.Location = new System.Drawing.Point(819, 9);
this.btn_change.Name = "btn_change";
this.btn_change.Size = new System.Drawing.Size(75, 23);
this.btn_change.TabIndex = 1;
this.btn_change.Text = "엑셀 변환";
this.btn_change.UseVisualStyleBackColor = true;
this.btn_change.Click += new System.EventHandler(this.btn_change_Click);
//
// before_book_name
//
this.before_book_name.HeaderText = "도서명 [전]";
this.before_book_name.Name = "before_book_name";
this.before_book_name.ReadOnly = true;
this.before_book_name.Width = 200;
//
// after_book_name
//
this.after_book_name.HeaderText = "도서명 [후]";
this.after_book_name.Name = "after_book_name";
this.after_book_name.ReadOnly = true;
this.after_book_name.Width = 200;
//
// before_author
//
this.before_author.HeaderText = "저자 [전]";
this.before_author.Name = "before_author";
this.before_author.ReadOnly = true;
//
// after_author
//
this.after_author.HeaderText = "저자 [후]";
this.after_author.Name = "after_author";
this.after_author.ReadOnly = true;
//
// before_book_comp
//
this.before_book_comp.HeaderText = "출판사 [전]";
this.before_book_comp.Name = "before_book_comp";
this.before_book_comp.ReadOnly = true;
this.before_book_comp.Width = 150;
//
// after_book_comp
//
this.after_book_comp.HeaderText = "출판사 [후]";
this.after_book_comp.Name = "after_book_comp";
this.after_book_comp.ReadOnly = true;
this.after_book_comp.Width = 150;
//
// price
//
this.price.HeaderText = "가격";
this.price.Name = "price";
this.price.ReadOnly = true;
//
// cb_bracket
//
this.cb_bracket.AutoSize = true;
this.cb_bracket.Location = new System.Drawing.Point(296, 13);
this.cb_bracket.Name = "cb_bracket";
this.cb_bracket.Size = new System.Drawing.Size(104, 16);
this.cb_bracket.TabIndex = 2;
this.cb_bracket.Text = "괄호 제거 여부";
this.cb_bracket.UseVisualStyleBackColor = true;
this.cb_bracket.CheckedChanged += new System.EventHandler(this.cb_bracket_CheckedChanged);
//
// Yes24
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1089, 714);
this.Controls.Add(this.cb_bracket);
this.Controls.Add(this.btn_change);
this.Controls.Add(this.btn_Close);
this.Controls.Add(this.dataGridView1);
this.Name = "Yes24";
this.Text = "Yes24";
this.Load += new System.EventHandler(this.Yes24_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
public System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Button btn_Close;
private System.Windows.Forms.Button btn_change;
private System.Windows.Forms.DataGridViewTextBoxColumn before_book_name;
private System.Windows.Forms.DataGridViewTextBoxColumn after_book_name;
private System.Windows.Forms.DataGridViewTextBoxColumn before_author;
private System.Windows.Forms.DataGridViewTextBoxColumn after_author;
private System.Windows.Forms.DataGridViewTextBoxColumn before_book_comp;
private System.Windows.Forms.DataGridViewTextBoxColumn after_book_comp;
private System.Windows.Forms.DataGridViewTextBoxColumn price;
private System.Windows.Forms.CheckBox cb_bracket;
}
}

211
ISBN_Check/Main/Yes24.cs Normal file
View File

@@ -0,0 +1,211 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;
using WindowsFormsApp1;
using System.Reflection;
using System.Text.RegularExpressions;
namespace ISBN_Check_test
{
public partial class Yes24 : Form
{
Helper_DB db = new Helper_DB();
Form1 f1;
List<string> l_target = new List<string>();
List<string> l_before = new List<string>();
List<string> l_after = new List<string>();
public Yes24(Form1 _f1)
{
InitializeComponent();
f1 = _f1;
}
private void Yes24_Load(object sender, EventArgs e)
{
db.DBcon();
Take_DataBase();
Base_Setting();
cb_bracket.Checked = true;
}
#region Yes24_Load_Sub
private void Take_DataBase()
{
string area = "`target`, `before`, `after`";
string tmp = db.DB_Select_Search(area, "yes24");
string[] ary_tmp = tmp.Split('|');
for (int a = 0; a < ary_tmp.Length; a++)
{
if (a % 3 == 0) { l_target.Add(ary_tmp[a]); }
if (a % 3 == 1) { l_before.Add(ary_tmp[a]); }
if (a % 3 == 2) { l_after.Add(ary_tmp[a]); }
}
}
private void Base_Setting()
{
int count = f1.dataGridView1.Rows.Count - 1;
string price = "";
for (int a = 0; a < count; a++)
{
if (f1.dataGridView1.Rows[a].Cells["price"].Value != null)
{
price = f1.dataGridView1.Rows[a].Cells["price"].Value.ToString();
}
var bookName = f1.dataGridView1.Rows[a].Cells["book_name"].Value?.ToString() ?? string.Empty;
var author = f1.dataGridView1.Rows[a].Cells["author"].Value?.ToString() ?? string.Empty;
var bookComp = f1.dataGridView1.Rows[a].Cells["book_comp"].Value?.ToString() ?? string.Empty;
List<string> grid = new List<string>();
grid.Add(bookName);
grid.Add(Replace_target(bookName, "book_name"));
grid.Add(author);
grid.Add(Replace_target(author, "author"));
grid.Add(bookComp);
grid.Add(Replace_target(bookComp, "book_comp"));
dataGridView1.Rows.Add(grid.ToArray());
}
dataGridView1.Columns[0].DefaultCellStyle.BackColor = Color.Bisque;
dataGridView1.Columns[2].DefaultCellStyle.BackColor = Color.Bisque;
dataGridView1.Columns[4].DefaultCellStyle.BackColor = Color.Bisque;
dataGridView1.Columns[1].DefaultCellStyle.BackColor = Color.FromArgb(234, 226, 202);
dataGridView1.Columns[3].DefaultCellStyle.BackColor = Color.FromArgb(234, 226, 202);
dataGridView1.Columns[5].DefaultCellStyle.BackColor = Color.FromArgb(234, 226, 202);
}
private string Replace_target(string value, string sort)
{
try
{
int start = value.IndexOf('(');
int end = value.IndexOf(')');
value = value.Remove(start, end - start);
start = value.IndexOf('[');
end = value.IndexOf(']');
value = value.Remove(start, end - start);
start = value.IndexOf('<');
end = value.IndexOf('>');
value = value.Remove(start, end - start);
}
catch { }
string[] target = l_target.ToArray();
string[] before = l_before.ToArray();
string[] after = l_after.ToArray();
for (int a = 0; a < before.Length; a++)
{
if (target[a] == sort)
{
value = value.Replace(before[a], after[a]);
}
}
return value;
}
#endregion
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
Skill_Grid sg = new Skill_Grid();
sg.Print_Grid_Num(sender, e);
}
private void btn_change_Click(object sender, EventArgs e)
{
string[,] grid = new string[dataGridView1.Rows.Count, 6];
for (int a = 0; a < dataGridView1.Rows.Count; a++)
{
string price = dataGridView1.Rows[a].Cells["price"].Value.ToString();
int count = a + 1;
grid[a, 0] = count.ToString();
grid[a, 1] = dataGridView1.Rows[a].Cells["after_book_name"].Value.ToString();
grid[a, 3] = dataGridView1.Rows[a].Cells["after_book_comp"].Value.ToString();
grid[a, 4] = Regex.Replace(price, @"[^0-9]", "");
grid[a, 5] = "1";
}
Excel_change(grid);
}
#region
void Excel_change(string[,] grid)
{
try
{
Excel.Application application = new Excel.Application(); // Excel Application Create
application.Visible = true; // true 일시 엑셀이 작업되는 내용이 보임
application.Interactive = false; // false일 경우 유저의 조작에 방해받지않음.
Excel._Workbook wb = (Excel._Workbook)(application.Workbooks.Add(Missing.Value)); // 워크북 생성
Excel._Worksheet ws = (Excel._Worksheet)application.ActiveSheet; // 시트 가져옴
Excel.Range rng = null; // 셀 처리 변수
#region ( , )
ws.Columns[1].ColumnWidth = 6.57; // A
ws.Columns[2].ColumnWidth = 43.86; // B
ws.Columns[3].ColumnWidth = 18.43; // C
ws.Columns[4].ColumnWidth = 22.57; // D
ws.Columns[5].ColumnWidth = 12.57; // E
#endregion
string[] title = { "번호", "도서명", "ISBN", "출판사", "정가", "수량" };
#region
rng = ws.Range["A1", "F1"];
rng.Value2 = title;
rng.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;
rng.Font.Bold = true;
#endregion
// 기본 정보 입력칸
int count = dataGridView1.Rows.Count + 1;
rng = ws.Range["A2", "F" + count.ToString()];
rng.Value2 = grid;
rng.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;
application.Interactive = true;
}
catch (Exception e)
{
MessageBox.Show(e.ToString());
}
}
#endregion
private void btn_Close_Click(object sender, EventArgs e)
{
this.Close();
}
private void cb_bracket_CheckedChanged(object sender, EventArgs e)
{
int count = dataGridView1.Rows.Count;
for (int a = 0; a < count; a++)
{
if (cb_bracket.Checked)
{
string book_name = dataGridView1.Rows[a].Cells["before_book_name"].Value.ToString();
string After = Replace_target(book_name, "book_name");
dataGridView1.Rows[a].Cells["after_book_name"].Value = After;
}
else
{
string book_name = dataGridView1.Rows[a].Cells["before_book_name"].Value.ToString();
dataGridView1.Rows[a].Cells["after_book_name"].Value = book_name;
}
}
}
}
}

141
ISBN_Check/Main/Yes24.resx Normal file
View File

@@ -0,0 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="before_book_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="after_book_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="before_author.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="after_author.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="before_book_comp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="after_book_comp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="BouncyCastle" version="1.8.5" targetFramework="net472" />
<package id="Google.Protobuf" version="3.14.0" targetFramework="net472" />
<package id="K4os.Compression.LZ4" version="1.1.11" targetFramework="net472" />
<package id="K4os.Compression.LZ4.Streams" version="1.1.11" targetFramework="net472" />
<package id="K4os.Hash.xxHash" version="1.0.6" targetFramework="net472" />
<package id="MySql.Data" version="8.0.25" targetFramework="net472" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net472" />
<package id="SSH.NET" version="2020.0.1" targetFramework="net472" />
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
<package id="System.Memory" version="4.5.3" targetFramework="net472" />
<package id="System.Numerics.Vectors" version="4.4.0" targetFramework="net472" />
<package id="System.Runtime.CompilerServices.Unsafe" version="4.5.2" targetFramework="net472" />
</packages>

6318
ISBN_Check/Setup/ISBN.vdproj Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,37 @@
[Version]
count=0.014
date=2021-12-02
[program_info]
server_url=1.215.250.130
exe=ISBN_Check_test.exe
[files]
Files=27
\ISBN_Check_test.exe
\Update_isbn.inf
\Newtonsoft.Json.xml
\Newtonsoft.Json.dll
\BouncyCastle.Crypto.dll
\Google.Protobuf.dll
\Google.Protobuf.xml
\K4os.Compression.LZ4.dll
\K4os.Compression.LZ4.xml
\K4os.Compression.LZ4.Streams.dll
\K4os.Compression.LZ4.Streams.xml
\K4os.Hash.xxHash.dll
\K4os.Hash.xxHash.xml
\MySql.Data.dll
\MySql.Data.xml
\Renci.SshNet.dll
\Renci.SshNet.xml
\System.Buffers.dll
\System.Buffers.xml
\System.Memory.dll
\System.Memory.xml
\System.Numerics.Vectors.dll
\System.Numerics.Vectors.xml
\System.Runtime.CompilerServices.Unsafe.dll
\System.Runtime.CompilerServices.Unsafe.xml
\Ubiety.Dns.Core.dll
\Zstandard.Net.dll

BIN
ISBN_Check/헿.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB