* unimarc

a. 팩스전송 완료.
 b. 마크목록 폼 작성중
  1. 엑셀반출 기능 추가중 사용 작업중
  2. 마크편집 폼 수정 중 (마크 반출 test프로젝트 진행완료, 본 프로젝트에 적용중. / 저장기능활성화 작업완료)
   2-1. 기존의 칸채우기에서 예상되지 못한 버그가 발생하여 칸채우기 숨김.
   2-2. 008태크 재배치 => TextBox에 적용완료. 변경사항 메모장으로 넘기는 작업 진행해야함.
   2-3. 현재 TODO : 저장기능

TODOLIST
1. 팩스로 전송될 엑셀파일 밑작업마무리 (입력될 파라미터만 적용하면 실사용가능)
2. 알라딘API, 네이버 API연동중 자잘한 버그 수정작업 필요.
This commit is contained in:
SeungHo Yang
2021-03-29 18:56:10 +09:00
parent ed04bc56c3
commit 7e802070bf
20 changed files with 278 additions and 157 deletions

View File

@@ -31,9 +31,16 @@ namespace ISBN_Check_test
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.comboBox1 = new System.Windows.Forms.ComboBox(); this.cb_filter = new System.Windows.Forms.ComboBox();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView(); this.dataGridView1 = new System.Windows.Forms.DataGridView();
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.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.author = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -44,27 +51,21 @@ namespace ISBN_Check_test
this.category = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.category = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.sold_out = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.sold_out = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column1 = 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();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// comboBox1 // cb_filter
// //
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cb_filter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.FormattingEnabled = true; this.cb_filter.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(12, 9); this.cb_filter.Location = new System.Drawing.Point(154, 10);
this.comboBox1.Name = "comboBox1"; this.cb_filter.Name = "cb_filter";
this.comboBox1.Size = new System.Drawing.Size(121, 20); this.cb_filter.Size = new System.Drawing.Size(121, 20);
this.comboBox1.TabIndex = 0; this.cb_filter.TabIndex = 0;
// //
// button1 // button1
// //
this.button1.Location = new System.Drawing.Point(305, 8); this.button1.Location = new System.Drawing.Point(447, 9);
this.button1.Name = "button1"; this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23); this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2; this.button1.TabIndex = 2;
@@ -113,6 +114,69 @@ namespace ISBN_Check_test
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown); this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
// //
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(659, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 4;
this.label1.Text = "00:00:00.00";
//
// richTextBox1
//
this.richTextBox1.Location = new System.Drawing.Point(12, 510);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(892, 96);
this.richTextBox1.TabIndex = 5;
this.richTextBox1.Text = "";
//
// start_idx
//
this.start_idx.Location = new System.Drawing.Point(308, 10);
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(376, 10);
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(356, 14);
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(551, 9);
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(27, 9);
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);
//
// book_name // book_name
// //
this.book_name.HeaderText = "도서명"; this.book_name.HeaderText = "도서명";
@@ -160,7 +224,7 @@ namespace ISBN_Check_test
// //
// sold_out // sold_out
// //
this.sold_out.HeaderText = "품절여부"; this.sold_out.HeaderText = "품절/절판";
this.sold_out.Name = "sold_out"; this.sold_out.Name = "sold_out";
this.sold_out.Width = 70; this.sold_out.Width = 70;
// //
@@ -170,59 +234,6 @@ namespace ISBN_Check_test
this.Column1.Name = "Column1"; this.Column1.Name = "Column1";
this.Column1.Visible = false; this.Column1.Visible = false;
// //
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(659, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 4;
this.label1.Text = "00:00:00.00";
//
// richTextBox1
//
this.richTextBox1.Location = new System.Drawing.Point(12, 510);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(892, 96);
this.richTextBox1.TabIndex = 5;
this.richTextBox1.Text = "";
//
// start_idx
//
this.start_idx.Location = new System.Drawing.Point(166, 9);
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(234, 9);
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(214, 13);
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(409, 8);
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);
//
// Form1 // Form1
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -236,7 +247,8 @@ namespace ISBN_Check_test
this.Controls.Add(this.dataGridView1); this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.button2); this.Controls.Add(this.button2);
this.Controls.Add(this.button1); this.Controls.Add(this.button1);
this.Controls.Add(this.comboBox1); this.Controls.Add(this.cb_api);
this.Controls.Add(this.cb_filter);
this.Name = "Form1"; this.Name = "Form1";
this.Text = "Form1"; this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load); this.Load += new System.EventHandler(this.Form1_Load);
@@ -248,7 +260,7 @@ namespace ISBN_Check_test
#endregion #endregion
private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.ComboBox cb_filter;
private System.Windows.Forms.Button button1; private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label1;
private System.Windows.Forms.RichTextBox richTextBox1; private System.Windows.Forms.RichTextBox richTextBox1;
@@ -257,6 +269,7 @@ namespace ISBN_Check_test
private System.Windows.Forms.TextBox end_idx; private System.Windows.Forms.TextBox end_idx;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button button2; private System.Windows.Forms.Button button2;
private System.Windows.Forms.ComboBox cb_api;
private System.Windows.Forms.DataGridViewTextBoxColumn book_name; private System.Windows.Forms.DataGridViewTextBoxColumn book_name;
private System.Windows.Forms.DataGridViewTextBoxColumn author; private System.Windows.Forms.DataGridViewTextBoxColumn author;
private System.Windows.Forms.DataGridViewTextBoxColumn book_comp; private System.Windows.Forms.DataGridViewTextBoxColumn book_comp;

View File

@@ -19,8 +19,10 @@ namespace ISBN_Check_test
} }
private void Form1_Load(object sender, EventArgs e) private void Form1_Load(object sender, EventArgs e)
{ {
string[] com_list = { "제목+저자", "제목", "저자", "출판사" }; string[] api_list = { "알라딘", "네이버" };
comboBox1.Items.AddRange(com_list); string[] filter_list = { "제목+저자", "제목", "저자", "출판사" };
cb_api.Items.AddRange(api_list);
cb_filter.Items.AddRange(filter_list);
} }
private void button2_Click(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e)
{ {
@@ -34,19 +36,46 @@ namespace ISBN_Check_test
} }
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
{ {
if(comboBox1.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; } if(cb_api.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; }
int start = Convert.ToInt32(start_idx.Text) - 1;
int end = Convert.ToInt32(end_idx.Text) - 1;
if(start_idx.Text!="1" || end_idx.Text != dataGridView1.Rows.Count.ToString()) {
start = Convert.ToInt32(start_idx.Text) - 1;
end = Convert.ToInt32(end_idx.Text) - 1;
}
Stopwatch stopwatch = new Stopwatch(); Stopwatch stopwatch = new Stopwatch();
stopwatch.Start(); stopwatch.Start();
int start = Convert.ToInt32(start_idx.Text) - 1;
int end = Convert.ToInt32(end_idx.Text) - 1;
if (start_idx.Text != "1" || end_idx.Text != dataGridView1.Rows.Count.ToString()) {
start = Convert.ToInt32(start_idx.Text) - 1;
end = Convert.ToInt32(end_idx.Text) - 1;
}
switch (cb_api.SelectedIndex)
{
case 0:
if(cb_filter.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; }
Aladin_API(dataGridView1, start, end);
break;
case 1:
Naver_API(dataGridView1, start, end);
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;
// 총 검색 횟수, 일치, 중복
MessageBox.Show("검색이 완료되었습니다!");
}
/// <summary>
/// 알라딘 API
/// </summary>
/// <param name="gridview"></param>
private void Aladin_API(DataGridView gridview, int start, int end)
{
string temp = string.Empty; string temp = string.Empty;
string type = string.Empty; string type = string.Empty;
string query = string.Empty; string query = string.Empty;
@@ -55,7 +84,7 @@ namespace ISBN_Check_test
string[] param = { "title", "author", "publisher", "isbn13", "priceStandard", string[] param = { "title", "author", "publisher", "isbn13", "priceStandard",
"pubDate", "categoryName", "stockStatus" }; "pubDate", "categoryName", "stockStatus" };
API api = new API(); API api = new API();
switch (comboBox1.SelectedIndex) switch (cb_filter.SelectedIndex)
{ {
case 0: // 제목+저자 case 0: // 제목+저자
type = "Keyword"; type = "Keyword";
@@ -72,24 +101,31 @@ namespace ISBN_Check_test
} }
for (int a = start; a < end; a++) for (int a = start; a < end; a++)
{ {
if (dataGridView1.Rows[a].DefaultCellStyle.BackColor == Color.Yellow) if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.Yellow)
continue; continue;
else if (dataGridView1.Rows[a].DefaultCellStyle.BackColor == Color.LightGray){ else if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.LightGray)
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Empty; gridview.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
}
query = Set_query(type, a); query = Set_query(type, a);
insert_API(api.Aladin(query, type, param), a); insert_By_Aladin(api.Aladin(query, type, param), a);
} }
stopwatch.Stop(); }
private void Naver_API(DataGridView gridview, int start, int end)
{
API api = new API();
// 도서명 / 저자 / 출판사 / isbn / 정가
// 발행일 / 도서분류 / 재고
string[] param = { "title", "author", "publisher", "isbn", "price",
"pubdate", "discount" };
TimeSpan ts = stopwatch.Elapsed; for(int a = start; a < end; a++)
string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}", {
ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10); string[] ArrayValue = { gridview.Rows[a].Cells["book_name"].Value.ToString(),
label1.Text = elapsedTime; gridview.Rows[a].Cells["author"].Value.ToString(),
gridview.Rows[a].Cells["book_comp"].Value.ToString() };
// 총 검색 횟수, 일치, 중복 string result = api.Naver(ArrayValue, param);
MessageBox.Show("검색이 완료되었습니다!"); insert_By_Naver(result, a);
}
} }
string Set_query(string type, int idx) string Set_query(string type, int idx)
{ {
@@ -110,7 +146,7 @@ namespace ISBN_Check_test
return result; return result;
} }
void insert_API(string data, int row) void insert_By_Aladin(string data, int row)
{ {
if (row > 0) { dataGridView1.Rows[row - 1].Selected = false; } if (row > 0) { dataGridView1.Rows[row - 1].Selected = false; }
dataGridView1.Rows[row].Selected = true; dataGridView1.Rows[row].Selected = true;
@@ -158,6 +194,70 @@ namespace ISBN_Check_test
dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.Yellow; dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.Yellow;
} }
} }
void insert_By_Naver(string value, int row)
{
value = value.Replace("<b>", "");
value = value.Replace("</b>", "");
if (row > 0) { dataGridView1.Rows[row - 1].Selected = false; }
dataGridView1.Rows[row].Selected = true;
if (value.Length > 0) {
dataGridView1.Rows[row].Cells["Column1"].Value = value;
dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.LightGray;
}
if (value == "") return;
bool[] chk = { false, false, false };
string book_name = dataGridView1.Rows[row].Cells["book_name"].Value.ToString();
string author = dataGridView1.Rows[row].Cells["author"].Value.ToString();
string book_comp = dataGridView1.Rows[row].Cells["book_comp"].Value.ToString();
string[] sp_data = value.Split('\t');
if (sp_data.Length > 1) return;
/// TODO: 밑에 작업하세요
#region
// title author publisher isbn price pubdate / discount
// title author publisher isbn price pubdate discount
string[] grid = { "", "", "", "", "", "", "", "" };
for (int a = 0; a < sp_data.Length; 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[5] = data[idx - 2];
grid[6] = data[idx - 1];
if (data[idx] == "")
grid[8] = "절판";
else
grid[8] = "";
for(int b = 0; b < 9; b++) {
grid[9] += grid[b];
}
}
#endregion
}
private void dataGridView1_KeyDown(object sender, KeyEventArgs e) private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
{ {
Skill_Grid sg = new Skill_Grid(); Skill_Grid sg = new Skill_Grid();
@@ -189,6 +289,7 @@ namespace ISBN_Check_test
if(dataGridView1.Rows[e.RowIndex].Cells["Column1"].Value == null) { return; } if(dataGridView1.Rows[e.RowIndex].Cells["Column1"].Value == null) { return; }
Form2 f2 = new Form2(this); Form2 f2 = new Form2(this);
f2.row = e.RowIndex; f2.row = e.RowIndex;
f2.Call_API = cb_api.Text;
f2.Show(); f2.Show();
} }
@@ -199,5 +300,12 @@ namespace ISBN_Check_test
e.Handled = true; e.Handled = true;
} }
} }
private void cb_api_SelectedIndexChanged(object sender, EventArgs e)
{
if(cb_api.SelectedIndex == 1)
cb_filter.Enabled = false;
else cb_filter.Enabled = true;
}
} }
} }

View File

@@ -134,13 +134,7 @@ namespace ISBN_Check_test
MessageBox.Show(status, "Error"); MessageBox.Show(status, "Error");
return "Error"; return "Error";
} }
/*
// xml형식을 json형식으로 변환
XmlDocument doc = new XmlDocument();
//doc.LoadXml(xml);
doc.Load(xml);
var json = JsonConvert.SerializeXmlNode(doc);
*/
// json형식 분석을 위해 JavaScriptSerializer 개체 생성 // json형식 분석을 위해 JavaScriptSerializer 개체 생성
JavaScriptSerializer js = new JavaScriptSerializer(); JavaScriptSerializer js = new JavaScriptSerializer();

View File

@@ -14,6 +14,7 @@ namespace ISBN_Check_test
{ {
Form1 f1; Form1 f1;
public int row; public int row;
public string Call_API = string.Empty;
public Form2(Form1 _f1) public Form2(Form1 _f1)
{ {
InitializeComponent(); InitializeComponent();
@@ -21,7 +22,17 @@ namespace ISBN_Check_test
} }
private void Form2_Load(object sender, EventArgs e) private void Form2_Load(object sender, EventArgs e)
{ {
// 호출 API에 따라 다르게 함수호출
if (Call_API == "알라딘")
Aladin();
else if (Call_API == "네이버")
Naver();
// 비슷한거 색깔표시
same_chk();
}
private void Aladin()
{
tb_book_name.Text = f1.dataGridView1.Rows[row].Cells["book_name"].Value.ToString(); tb_book_name.Text = f1.dataGridView1.Rows[row].Cells["book_name"].Value.ToString();
tb_author.Text = f1.dataGridView1.Rows[row].Cells["author"].Value.ToString(); tb_author.Text = f1.dataGridView1.Rows[row].Cells["author"].Value.ToString();
tb_book_comp.Text = f1.dataGridView1.Rows[row].Cells["book_comp"].Value.ToString(); tb_book_comp.Text = f1.dataGridView1.Rows[row].Cells["book_comp"].Value.ToString();
@@ -48,9 +59,10 @@ namespace ISBN_Check_test
if (a % 8 == 6) { grid[6] = tmp[a]; } if (a % 8 == 6) { grid[6] = tmp[a]; }
if (a % 8 == 7) { grid[7] = tmp[a]; dataGridView1.Rows.Add(grid); } if (a % 8 == 7) { grid[7] = tmp[a]; dataGridView1.Rows.Add(grid); }
} }
}
// 비슷한거 색깔표시 private void Naver()
same_chk(); {
MessageBox.Show("네이버!");
} }
private void same_chk() private void same_chk()
{ {

View File

@@ -29,6 +29,7 @@ namespace ISBN_Check_test
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.button1 = new System.Windows.Forms.Button(); this.button1 = new System.Windows.Forms.Button();
this.tb_book_name = new System.Windows.Forms.TextBox(); this.tb_book_name = new System.Windows.Forms.TextBox();
this.tb_author = new System.Windows.Forms.TextBox(); this.tb_author = new System.Windows.Forms.TextBox();
@@ -92,6 +93,14 @@ namespace ISBN_Check_test
// //
// dataGridView1 // dataGridView1
// //
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9.75F, System.Drawing.FontStyle.Bold, 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.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1, this.Column1,

View File

@@ -43,57 +43,42 @@ namespace ISBN_Check_test
value = value.Replace("</b>", ""); value = value.Replace("</b>", "");
string[] sp_data = value.Split('\t'); string[] sp_data = value.Split('\t');
string[] grid = { "", "", "", "", "", "", "" }; string[] grid = { "", "", "", "", "", "", "" };
for(int a = 0; a < sp_data.Length; a++) for (int a = 0; a < sp_data.Length; a++)
{ {
string[] data = sp_data[a].Split('|'); string[] data = sp_data[a].Split('|');
if (data.Length > 7) { label3.Text = data.Length.ToString();
data[1] += ", " + data[2]; if (data.Length > 8) {
data[2] = data[3]; int idx = data.Length - 2;
if(data[4].Contains(" ") == true) { grid[0] = data[0];
string[] isbn = data[4].Split(' '); grid[1] = data[1];
data[3] = isbn[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 else
data[3] = data[4]; grid[3] = data[idx -3];
data[4] = data[5]; grid[4] = data[idx - 2];
data[5] = data[6]; grid[5] = data[idx - 1];
if(data[7] == "") if(data[idx] == "")
data[6] = "절판"; grid[6] = "절판";
else else
data[6] = data[7]; grid[6] = data[idx];
dataGridView1.Rows.Add(grid);
} }
dataGridView1.Rows.Add(data); else if (data.Length > 3) {
} dataGridView1.Rows.Add(data);
/*
string[] sp_data = value.Split('|');
string[] grid = { "", "", "", "", "", "", "" };
for(int a= 0; a < sp_data.Length - 1; 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) {
if (sp_data[a].Contains(" ") == true) {
string[] tmp_isbn = sp_data[a].Split(' ');
sp_data[a] = tmp_isbn[1];
}
grid[3] = sp_data[a];
} // isbn
if (a % 7 == 4) { grid[4] = sp_data[a]; } // 정가
if (a % 7 == 5) { grid[5] = sp_data[a]; } // 출간일
if (a % 7 == 6) {
if (sp_data[a] == "") { sp_data[a] = "절판"; }
grid[6] = sp_data[a]; // 재고?
dataGridView1.Rows.Add(grid);
} }
} }
*/
} }
private void tb_book_name_KeyDown(object sender, KeyEventArgs e) private void tb_book_name_KeyDown(object sender, KeyEventArgs e)
{ {

View File

@@ -16,7 +16,7 @@ namespace ISBN_Check_test
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form3()); Application.Run(new Form1());
} }
} }
} }

View File

@@ -21,7 +21,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>EpqnJmtwhiOZuKRdDrM0DSvLzQz12spMGKuJACJu2Yg=</dsig:DigestValue> <dsig:DigestValue>efl4krx3CSCbKwwTCKRYgxkrRfUnUwa5WbV5js5WItI=</dsig:DigestValue>
</hash> </hash>
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>

View File

@@ -42,14 +42,14 @@
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>
<dependency> <dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ISBN_Check_test.exe" size="32768"> <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ISBN_Check_test.exe" size="34304">
<assemblyIdentity name="ISBN_Check_test" version="1.0.0.0" language="neutral" processorArchitecture="msil" /> <assemblyIdentity name="ISBN_Check_test" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash> <hash>
<dsig:Transforms> <dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>fsSd+LiztaAxTOAmbgfeVhaFlrxQ1cy58pUjhOM7KYk=</dsig:DigestValue> <dsig:DigestValue>FiFngrnlS6vXXZ/Znz0MXrYvz9z6tinSgMT0d0BUMF4=</dsig:DigestValue>
</hash> </hash>
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>
@@ -74,13 +74,13 @@
<dsig:DigestValue>R+Wg8QGvQVHX8T0ta/qbhH1bXkqY0fRnS3wBV3J0bN8=</dsig:DigestValue> <dsig:DigestValue>R+Wg8QGvQVHX8T0ta/qbhH1bXkqY0fRnS3wBV3J0bN8=</dsig:DigestValue>
</hash> </hash>
</file> </file>
<file name="ISBN_Check_test.pdb" size="69120"> <file name="ISBN_Check_test.pdb" size="71168">
<hash> <hash>
<dsig:Transforms> <dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>lTOd/OLXwh6JpIcu+C0Na9lEQu7w0grVKSl8AuVOJo4=</dsig:DigestValue> <dsig:DigestValue>KiY4qWIu6kYOuYKOOXOnTECz2v4N1Gk7Tb0K63FrE5U=</dsig:DigestValue>
</hash> </hash>
</file> </file>
</asmv1:assembly> </asmv1:assembly>

View File

@@ -21,7 +21,7 @@
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>EpqnJmtwhiOZuKRdDrM0DSvLzQz12spMGKuJACJu2Yg=</dsig:DigestValue> <dsig:DigestValue>efl4krx3CSCbKwwTCKRYgxkrRfUnUwa5WbV5js5WItI=</dsig:DigestValue>
</hash> </hash>
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>

View File

@@ -42,14 +42,14 @@
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>
<dependency> <dependency>
<dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ISBN_Check_test.exe" size="32768"> <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="ISBN_Check_test.exe" size="34304">
<assemblyIdentity name="ISBN_Check_test" version="1.0.0.0" language="neutral" processorArchitecture="msil" /> <assemblyIdentity name="ISBN_Check_test" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
<hash> <hash>
<dsig:Transforms> <dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>fsSd+LiztaAxTOAmbgfeVhaFlrxQ1cy58pUjhOM7KYk=</dsig:DigestValue> <dsig:DigestValue>FiFngrnlS6vXXZ/Znz0MXrYvz9z6tinSgMT0d0BUMF4=</dsig:DigestValue>
</hash> </hash>
</dependentAssembly> </dependentAssembly>
</dependency> </dependency>
@@ -74,13 +74,13 @@
<dsig:DigestValue>R+Wg8QGvQVHX8T0ta/qbhH1bXkqY0fRnS3wBV3J0bN8=</dsig:DigestValue> <dsig:DigestValue>R+Wg8QGvQVHX8T0ta/qbhH1bXkqY0fRnS3wBV3J0bN8=</dsig:DigestValue>
</hash> </hash>
</file> </file>
<file name="ISBN_Check_test.pdb" size="69120"> <file name="ISBN_Check_test.pdb" size="71168">
<hash> <hash>
<dsig:Transforms> <dsig:Transforms>
<dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" /> <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
</dsig:Transforms> </dsig:Transforms>
<dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" /> <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
<dsig:DigestValue>lTOd/OLXwh6JpIcu+C0Na9lEQu7w0grVKSl8AuVOJo4=</dsig:DigestValue> <dsig:DigestValue>KiY4qWIu6kYOuYKOOXOnTECz2v4N1Gk7Tb0K63FrE5U=</dsig:DigestValue>
</hash> </hash>
</file> </file>
</asmv1:assembly> </asmv1:assembly>