Compare commits
19 Commits
d3d4b977e6
...
chi202506
| Author | SHA1 | Date | |
|---|---|---|---|
| f516deaf69 | |||
| 77646f0e66 | |||
| 0a034954ff | |||
| e4b8ead056 | |||
| a36372b17c | |||
| 7d1286b7a7 | |||
| 2835f8d14e | |||
| bbc47c50db | |||
| 12f190a0b8 | |||
| 1ae2b93490 | |||
| 216311b558 | |||
|
|
c0e6c9039e | ||
|
|
65065442a1 | ||
| 8e7df6f68d | |||
| 8f74fb5557 | |||
|
|
0cc71611d0 | ||
| 405c1d9c46 | |||
|
|
e815c02feb | ||
|
|
e2ae5d2937 |
@@ -2,7 +2,16 @@
|
|||||||
"permissions": {
|
"permissions": {
|
||||||
"allow": [
|
"allow": [
|
||||||
"Bash(git add:*)",
|
"Bash(git add:*)",
|
||||||
"WebFetch(domain:jnelib.jne.go.kr)"
|
"WebFetch(domain:jnelib.jne.go.kr)",
|
||||||
|
"Bash(node:*)",
|
||||||
|
"Bash(npm --version)",
|
||||||
|
"Bash(echo $OS)",
|
||||||
|
"Bash(claude mcp:*)",
|
||||||
|
"WebSearch",
|
||||||
|
"WebSearch",
|
||||||
|
"Bash(git commit:*)",
|
||||||
|
"Bash(git config:*)",
|
||||||
|
"Bash(git push:*)"
|
||||||
],
|
],
|
||||||
"deny": [],
|
"deny": [],
|
||||||
"ask": []
|
"ask": []
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
3
ISBN_Check/.vscode/settings.json
vendored
Normal file
3
ISBN_Check/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"dotnet.preferCSharpExtension": true
|
||||||
|
}
|
||||||
3
ISBN_Check/Main/.vscode/settings.json
vendored
Normal file
3
ISBN_Check/Main/.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"dotnet.preferCSharpExtension": true
|
||||||
|
}
|
||||||
390
ISBN_Check/Main/Form1.Designer.cs
generated
390
ISBN_Check/Main/Form1.Designer.cs
generated
@@ -29,12 +29,29 @@ namespace ISBN_Check_test
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
this.cb_filter = 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.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||||
|
this.btn_Yes24 = new System.Windows.Forms.Button();
|
||||||
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
|
this.button3 = new System.Windows.Forms.Button();
|
||||||
|
this.panel2 = new System.Windows.Forms.Panel();
|
||||||
|
this.panel3 = new System.Windows.Forms.Panel();
|
||||||
|
this.button4 = new System.Windows.Forms.Button();
|
||||||
|
this.tbDelay = new System.Windows.Forms.TextBox();
|
||||||
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
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();
|
||||||
@@ -46,18 +63,8 @@ namespace ISBN_Check_test
|
|||||||
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.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.dvc_link = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
|
this.dvc_remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
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();
|
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||||
this.panel1.SuspendLayout();
|
this.panel1.SuspendLayout();
|
||||||
this.panel2.SuspendLayout();
|
this.panel2.SuspendLayout();
|
||||||
@@ -76,7 +83,7 @@ namespace ISBN_Check_test
|
|||||||
//
|
//
|
||||||
// button1
|
// button1
|
||||||
//
|
//
|
||||||
this.button1.Location = new System.Drawing.Point(416, 10);
|
this.button1.Location = new System.Drawing.Point(530, 11);
|
||||||
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;
|
||||||
@@ -86,14 +93,14 @@ namespace ISBN_Check_test
|
|||||||
//
|
//
|
||||||
// dataGridView1
|
// dataGridView1
|
||||||
//
|
//
|
||||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||||
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
|
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
|
||||||
dataGridViewCellStyle4.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||||
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
|
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||||
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||||
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
|
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||||
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
this.book_name,
|
this.book_name,
|
||||||
this.author,
|
this.author,
|
||||||
@@ -105,28 +112,203 @@ namespace ISBN_Check_test
|
|||||||
this.category,
|
this.category,
|
||||||
this.sold_out,
|
this.sold_out,
|
||||||
this.Column1,
|
this.Column1,
|
||||||
this.count});
|
this.count,
|
||||||
|
this.dvc_link,
|
||||||
|
this.dvc_remark});
|
||||||
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnF2;
|
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnF2;
|
||||||
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
|
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.dataGridView1.Name = "dataGridView1";
|
this.dataGridView1.Name = "dataGridView1";
|
||||||
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||||
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
|
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
|
||||||
dataGridViewCellStyle6.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
dataGridViewCellStyle3.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||||
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
|
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||||
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||||
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||||
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle6;
|
this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle3;
|
||||||
this.dataGridView1.RowTemplate.Height = 23;
|
this.dataGridView1.RowTemplate.Height = 23;
|
||||||
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
|
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
|
||||||
this.dataGridView1.Size = new System.Drawing.Size(1001, 471);
|
this.dataGridView1.Size = new System.Drawing.Size(1309, 471);
|
||||||
this.dataGridView1.TabIndex = 3;
|
this.dataGridView1.TabIndex = 3;
|
||||||
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
|
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
|
||||||
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
|
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
|
||||||
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.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(1046, 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(1309, 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(609, 11);
|
||||||
|
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.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.progressBar1.Location = new System.Drawing.Point(1113, 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(767, 11);
|
||||||
|
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.label4);
|
||||||
|
this.panel1.Controls.Add(this.tbDelay);
|
||||||
|
this.panel1.Controls.Add(this.label3);
|
||||||
|
this.panel1.Controls.Add(this.button4);
|
||||||
|
this.panel1.Controls.Add(this.button3);
|
||||||
|
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(1309, 47);
|
||||||
|
this.panel1.TabIndex = 9;
|
||||||
|
//
|
||||||
|
// button3
|
||||||
|
//
|
||||||
|
this.button3.Location = new System.Drawing.Point(688, 11);
|
||||||
|
this.button3.Name = "button3";
|
||||||
|
this.button3.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button3.TabIndex = 9;
|
||||||
|
this.button3.Text = "리셋(전체)";
|
||||||
|
this.button3.UseVisualStyleBackColor = true;
|
||||||
|
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||||
|
//
|
||||||
|
// 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(1309, 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(1309, 471);
|
||||||
|
this.panel3.TabIndex = 11;
|
||||||
|
//
|
||||||
|
// button4
|
||||||
|
//
|
||||||
|
this.button4.Location = new System.Drawing.Point(848, 11);
|
||||||
|
this.button4.Name = "button4";
|
||||||
|
this.button4.Size = new System.Drawing.Size(75, 23);
|
||||||
|
this.button4.TabIndex = 10;
|
||||||
|
this.button4.Text = "목록초기화";
|
||||||
|
this.button4.UseVisualStyleBackColor = true;
|
||||||
|
this.button4.Click += new System.EventHandler(this.button4_Click);
|
||||||
|
//
|
||||||
|
// tbDelay
|
||||||
|
//
|
||||||
|
this.tbDelay.Location = new System.Drawing.Point(454, 12);
|
||||||
|
this.tbDelay.Name = "tbDelay";
|
||||||
|
this.tbDelay.Size = new System.Drawing.Size(42, 21);
|
||||||
|
this.tbDelay.TabIndex = 12;
|
||||||
|
this.tbDelay.Text = "500";
|
||||||
|
this.tbDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// label3
|
||||||
|
//
|
||||||
|
this.label3.AutoSize = true;
|
||||||
|
this.label3.Location = new System.Drawing.Point(398, 17);
|
||||||
|
this.label3.Name = "label3";
|
||||||
|
this.label3.Size = new System.Drawing.Size(53, 12);
|
||||||
|
this.label3.TabIndex = 11;
|
||||||
|
this.label3.Text = "지연시간";
|
||||||
|
//
|
||||||
|
// label4
|
||||||
|
//
|
||||||
|
this.label4.AutoSize = true;
|
||||||
|
this.label4.Location = new System.Drawing.Point(502, 17);
|
||||||
|
this.label4.Name = "label4";
|
||||||
|
this.label4.Size = new System.Drawing.Size(23, 12);
|
||||||
|
this.label4.TabIndex = 13;
|
||||||
|
this.label4.Text = "ms";
|
||||||
|
//
|
||||||
// book_name
|
// book_name
|
||||||
//
|
//
|
||||||
this.book_name.HeaderText = "도서명";
|
this.book_name.HeaderText = "도서명";
|
||||||
@@ -186,136 +368,27 @@ namespace ISBN_Check_test
|
|||||||
//
|
//
|
||||||
// count
|
// count
|
||||||
//
|
//
|
||||||
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||||
this.count.DefaultCellStyle = dataGridViewCellStyle5;
|
this.count.DefaultCellStyle = dataGridViewCellStyle2;
|
||||||
this.count.HeaderText = "검색갯수";
|
this.count.HeaderText = "검색갯수";
|
||||||
this.count.Name = "count";
|
this.count.Name = "count";
|
||||||
this.count.Width = 80;
|
this.count.Width = 80;
|
||||||
//
|
//
|
||||||
// label1
|
// dvc_link
|
||||||
//
|
//
|
||||||
this.label1.AutoSize = true;
|
this.dvc_link.HeaderText = "URL";
|
||||||
this.label1.Location = new System.Drawing.Point(719, 16);
|
this.dvc_link.Name = "dvc_link";
|
||||||
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
|
// dvc_remark
|
||||||
//
|
//
|
||||||
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.dvc_remark.HeaderText = "비고";
|
||||||
this.richTextBox1.Location = new System.Drawing.Point(0, 0);
|
this.dvc_remark.Name = "dvc_remark";
|
||||||
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
|
// Form1
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(1001, 618);
|
this.ClientSize = new System.Drawing.Size(1309, 618);
|
||||||
this.Controls.Add(this.panel3);
|
this.Controls.Add(this.panel3);
|
||||||
this.Controls.Add(this.panel2);
|
this.Controls.Add(this.panel2);
|
||||||
this.Controls.Add(this.panel1);
|
this.Controls.Add(this.panel1);
|
||||||
@@ -346,6 +419,14 @@ namespace ISBN_Check_test
|
|||||||
private System.Windows.Forms.ComboBox cb_api;
|
private System.Windows.Forms.ComboBox cb_api;
|
||||||
private System.Windows.Forms.ProgressBar progressBar1;
|
private System.Windows.Forms.ProgressBar progressBar1;
|
||||||
private System.Windows.Forms.Button btn_Yes24;
|
private System.Windows.Forms.Button btn_Yes24;
|
||||||
|
private System.Windows.Forms.Panel panel1;
|
||||||
|
private System.Windows.Forms.Panel panel2;
|
||||||
|
private System.Windows.Forms.Panel panel3;
|
||||||
|
private System.Windows.Forms.Button button3;
|
||||||
|
private System.Windows.Forms.Button button4;
|
||||||
|
private System.Windows.Forms.Label label4;
|
||||||
|
private System.Windows.Forms.TextBox tbDelay;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
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;
|
||||||
@@ -357,9 +438,8 @@ namespace ISBN_Check_test
|
|||||||
private System.Windows.Forms.DataGridViewTextBoxColumn sold_out;
|
private System.Windows.Forms.DataGridViewTextBoxColumn sold_out;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
|
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn count;
|
private System.Windows.Forms.DataGridViewTextBoxColumn count;
|
||||||
private System.Windows.Forms.Panel panel1;
|
private System.Windows.Forms.DataGridViewTextBoxColumn dvc_link;
|
||||||
private System.Windows.Forms.Panel panel2;
|
private System.Windows.Forms.DataGridViewTextBoxColumn dvc_remark;
|
||||||
private System.Windows.Forms.Panel panel3;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ using System.Threading;
|
|||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using WindowsFormsApp1;
|
using WindowsFormsApp1;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Diagnostics.Eventing.Reader;
|
||||||
|
using Org.BouncyCastle.Pkcs;
|
||||||
|
|
||||||
namespace ISBN_Check_test
|
namespace ISBN_Check_test
|
||||||
{
|
{
|
||||||
@@ -20,12 +22,20 @@ namespace ISBN_Check_test
|
|||||||
public Form1()
|
public Form1()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
this.dataGridView1.EditMode = DataGridViewEditMode.EditOnKeystrokeOrF2;
|
||||||
this.Text = $"{Application.ProductName} ver {Application.ProductVersion}";
|
this.Text = $"{Application.ProductName} ver {Application.ProductVersion}";
|
||||||
}
|
}
|
||||||
private void Form1_Load(object sender, EventArgs e)
|
private void Form1_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
this.Show();
|
||||||
|
Application.DoEvents();
|
||||||
string[] api_list = { "다음", "네이버", "알라딘" };
|
string[] api_list = { "다음", "네이버", "알라딘" };
|
||||||
cb_api.Items.AddRange(api_list);
|
cb_api.Items.AddRange(api_list);
|
||||||
|
cb_api.SelectedIndex = 2;
|
||||||
|
Application.DoEvents();
|
||||||
|
cb_filter_SelectedIndexChanged(null, null);
|
||||||
|
Application.DoEvents();
|
||||||
|
|
||||||
}
|
}
|
||||||
private void button2_Click(object sender, EventArgs e)
|
private void button2_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -44,8 +54,16 @@ namespace ISBN_Check_test
|
|||||||
if (cb_api.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; }
|
if (cb_api.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; }
|
||||||
if (cb_filter.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; }
|
if (cb_filter.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; }
|
||||||
|
|
||||||
|
this.dataGridView1.AutoResizeColumn(3);
|
||||||
|
this.Refresh();
|
||||||
|
|
||||||
Stopwatch stopwatch = new Stopwatch();
|
Stopwatch stopwatch = new Stopwatch();
|
||||||
stopwatch.Start();
|
stopwatch.Start();
|
||||||
|
if (int.TryParse(tbDelay.Text, out int delayms) == false)
|
||||||
|
{
|
||||||
|
MessageBox.Show("지연시간 입력 오류");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var sistr = start_idx.Text.Trim();
|
var sistr = start_idx.Text.Trim();
|
||||||
var eistr = end_idx.Text.Trim();
|
var eistr = end_idx.Text.Trim();
|
||||||
@@ -68,7 +86,7 @@ namespace ISBN_Check_test
|
|||||||
|
|
||||||
ei = ei - 1;
|
ei = ei - 1;
|
||||||
si = si - 1;
|
si = si - 1;
|
||||||
if(si < 0 || ei <0)
|
if (si < 0 || ei < 0)
|
||||||
{
|
{
|
||||||
MessageBox.Show("시작,종료번호를 확인하세요");
|
MessageBox.Show("시작,종료번호를 확인하세요");
|
||||||
return;
|
return;
|
||||||
@@ -96,7 +114,7 @@ namespace ISBN_Check_test
|
|||||||
Naver_API(dataGridView1, si, ei);
|
Naver_API(dataGridView1, si, ei);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Aladin_API(dataGridView1, si, ei);
|
Aladin_API(dataGridView1, si, ei, delayms);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -118,7 +136,7 @@ namespace ISBN_Check_test
|
|||||||
/// 알라딘 API
|
/// 알라딘 API
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="gridview"></param>
|
/// <param name="gridview"></param>
|
||||||
private void Aladin_API(DataGridView gridview, int start, int end)
|
private void Aladin_API(DataGridView gridview, int start, int end, int delayms)
|
||||||
{
|
{
|
||||||
// 도서명 / 저자 / 출판사 / isbn / 정가
|
// 도서명 / 저자 / 출판사 / isbn / 정가
|
||||||
// 발행일 / 도서분류 / 재고
|
// 발행일 / 도서분류 / 재고
|
||||||
@@ -151,20 +169,32 @@ namespace ISBN_Check_test
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// string query = dataGridView1.Rows[a].Cells["isbn"].Value?.ToString() ?? string.Empty;
|
// string query = dataGridView1.Rows[a].Cells["isbn"].Value?.ToString() ?? string.Empty;
|
||||||
string query = Set_query(type, a ); //a=는줄번호이고 idx는 -1 해야함
|
string query = Set_query(type, a); //a=는줄번호이고 idx는 -1 해야함
|
||||||
if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.Yellow)
|
if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.Yellow)
|
||||||
continue;
|
continue;
|
||||||
else if (gridview.Rows[a ].DefaultCellStyle.BackColor == Color.LightGray)
|
else if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.LightGray)
|
||||||
gridview.Rows[a ].DefaultCellStyle.BackColor = Color.Empty;
|
gridview.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
|
||||||
|
|
||||||
// string aladin = api.Aladin(query, "ISBN13", param);
|
// string aladin = api.Aladin(query, "ISBN13", param);
|
||||||
string aladin = api.Aladin(query, type, param);
|
//var aladin = api.Aladin(query, type, param);
|
||||||
insert_By_Aladin(aladin, a);
|
var aladin_struct = api.Aladin_struct(query, type, out string xmlString);
|
||||||
try
|
insert_By_Aladin(aladin_struct, a, xmlString);
|
||||||
{
|
if (aladin_struct.Any())
|
||||||
richTextBox1.Text = aladin;
|
richTextBox1.Text = aladin_struct.First().ToString();
|
||||||
}
|
else
|
||||||
catch { }
|
richTextBox1.Text = "No Data";
|
||||||
|
|
||||||
|
System.Threading.Thread.Sleep(delayms);
|
||||||
|
//try
|
||||||
|
//{
|
||||||
|
// var sb = new StringBuilder();
|
||||||
|
// foreach (var item in aladin)
|
||||||
|
// {
|
||||||
|
// sb.AppendLine(string.Join("|", item));
|
||||||
|
// }
|
||||||
|
// richTextBox1.Text = aladin_struct.ToString();// sb.ToString();
|
||||||
|
//}
|
||||||
|
//catch { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
string Set_query(string type, int idx)
|
string Set_query(string type, int idx)
|
||||||
@@ -308,17 +338,63 @@ namespace ISBN_Check_test
|
|||||||
{
|
{
|
||||||
progressBar1.PerformStep();
|
progressBar1.PerformStep();
|
||||||
}
|
}
|
||||||
void insert_By_Aladin(string data, int row)
|
|
||||||
|
void insert_By_Aladin(List<AladinBookData> insert, int row, string xmlString)
|
||||||
{
|
{
|
||||||
if (row >0)
|
if (row > 0)
|
||||||
{
|
{
|
||||||
dataGridView1.Rows[row - 1].Selected = false;
|
dataGridView1.Rows[row - 1].Selected = false;
|
||||||
}
|
}
|
||||||
dataGridView1.Rows[row ].Selected = true;
|
dataGridView1.Rows[row].Selected = true;
|
||||||
|
|
||||||
string[] insert = data.Split('|');
|
//데이터가 없다면 처리하지 않는다.
|
||||||
|
if (insert.Any() == false)
|
||||||
|
{
|
||||||
|
dataGridView1.Rows[row].Cells["count"].Value = "0";
|
||||||
|
dataGridView1.Rows[row].Cells["dvc_remark"].Value = $"No Data\n{xmlString}";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (data == "") { return; }
|
var item = insert.First();
|
||||||
|
|
||||||
|
// pubDate형 보기편하게 DateTime형으로 재정리
|
||||||
|
string pubdate = item.PubDate;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//pubdate = item.PubDate;
|
||||||
|
pubdate = String.Format("{0:yyyy/MM/dd}",
|
||||||
|
DateTime.Parse(pubdate.Remove(pubdate.IndexOf(" G"))));
|
||||||
|
}
|
||||||
|
catch (Exception ex) { MessageBox.Show(item.ToString()); }
|
||||||
|
|
||||||
|
//카테고리명 정리
|
||||||
|
item.CategoryName = Aladin_CategorySort(item.CategoryName);
|
||||||
|
//for (int a = 0; a < insert.Length; a++)
|
||||||
|
//{
|
||||||
|
// if (a % 8 == 6) { insert[a] = Aladin_CategorySort(insert[a]); }
|
||||||
|
//}
|
||||||
|
|
||||||
|
dataGridView1.Rows[row].Cells["Column1"].Value += item.ToString();// string.Join("|", insert) + "|";
|
||||||
|
if (item.Description.StartsWith("<")) item.Description = item.Description.Substring(item.Description.IndexOf(">")+1);
|
||||||
|
dataGridView1.Rows[row].Cells["dvc_remark"].Value = item.Description;// $"{insert.Count}건";
|
||||||
|
dataGridView1.Rows[row].Cells["dvc_link"].Value = $"{item.Link}";
|
||||||
|
dataGridView1.Rows[row].Cells["count"].Value = $"{insert.Count}";
|
||||||
|
dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.LightGray;
|
||||||
|
if (cb_filter.SelectedItem.ToString() == "별치조사")
|
||||||
|
input_api_aladin(item, row, pubdate);
|
||||||
|
|
||||||
|
input_api(item, row, pubdate);
|
||||||
|
}
|
||||||
|
void insert_By_Aladin(string[] insert, int row)
|
||||||
|
{
|
||||||
|
if (row > 0)
|
||||||
|
{
|
||||||
|
dataGridView1.Rows[row - 1].Selected = false;
|
||||||
|
}
|
||||||
|
dataGridView1.Rows[row].Selected = true;
|
||||||
|
|
||||||
|
|
||||||
|
if (insert.Any() == false) { return; }
|
||||||
|
|
||||||
// pubDate형 보기편하게 DateTime형으로 재정리
|
// pubDate형 보기편하게 DateTime형으로 재정리
|
||||||
string newstring = "";
|
string newstring = "";
|
||||||
@@ -327,7 +403,7 @@ namespace ISBN_Check_test
|
|||||||
newstring = String.Format("{0:yyyy/MM/dd}",
|
newstring = String.Format("{0:yyyy/MM/dd}",
|
||||||
DateTime.Parse(insert[5].Remove(insert[5].IndexOf(" G"))));
|
DateTime.Parse(insert[5].Remove(insert[5].IndexOf(" G"))));
|
||||||
}
|
}
|
||||||
catch (Exception ex) { MessageBox.Show(data); }
|
catch (Exception ex) { MessageBox.Show(string.Join("|", insert)); }
|
||||||
|
|
||||||
for (int a = 0; a < insert.Length; a++)
|
for (int a = 0; a < insert.Length; a++)
|
||||||
{
|
{
|
||||||
@@ -352,6 +428,17 @@ namespace ISBN_Check_test
|
|||||||
|
|
||||||
return insert;
|
return insert;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void input_api_aladin(AladinBookData data, int row, string date)
|
||||||
|
{
|
||||||
|
dataGridView1.Rows[row].Cells["book_name"].Value = data.Title;
|
||||||
|
dataGridView1.Rows[row].Cells["author"].Value = data.Author;
|
||||||
|
dataGridView1.Rows[row].Cells["book_comp"].Value = data.Publisher;
|
||||||
|
dataGridView1.Rows[row].Cells["price2"].Value = data.PriceStandard;
|
||||||
|
dataGridView1.Rows[row].Cells["pubDate"].Value = date;
|
||||||
|
dataGridView1.Rows[row].Cells["category"].Value = data.CategoryName;
|
||||||
|
}
|
||||||
|
|
||||||
void input_api_aladin(string[] data, int row, string date)
|
void input_api_aladin(string[] data, int row, string date)
|
||||||
{
|
{
|
||||||
dataGridView1.Rows[row].Cells["book_name"].Value = data[0];
|
dataGridView1.Rows[row].Cells["book_name"].Value = data[0];
|
||||||
@@ -363,7 +450,7 @@ namespace ISBN_Check_test
|
|||||||
}
|
}
|
||||||
void insert_By_Naver(string value, int row)
|
void insert_By_Naver(string value, 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;
|
||||||
|
|
||||||
if (value == "") return;
|
if (value == "") return;
|
||||||
@@ -474,6 +561,46 @@ namespace ISBN_Check_test
|
|||||||
|
|
||||||
input_api(grid, row, newstring);
|
input_api(grid, row, newstring);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void input_api(AladinBookData value, int idx, string date)
|
||||||
|
{
|
||||||
|
|
||||||
|
//string[] param = { "title", "authors", "publisher", "isbn", "price",
|
||||||
|
// "datetime", "status" };
|
||||||
|
//string[] param = { "title", "author", "publisher", "isbn13", "priceStandard",
|
||||||
|
// "pubDate", "categoryName", "stockStatus", };
|
||||||
|
|
||||||
|
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.Title == book_name) chk[0] = true;
|
||||||
|
|
||||||
|
if (value.Author.Contains(author) == true) chk[1] = true;
|
||||||
|
else if (author.Contains(value.Author) == true) chk[1] = true;
|
||||||
|
else if (value.Author == author) chk[1] = true;
|
||||||
|
|
||||||
|
if (value.Publisher.Contains(book_comp) == true) chk[2] = true;
|
||||||
|
else if (book_comp.Contains(value.Publisher) == true) chk[2] = true;
|
||||||
|
else if (value.Publisher == book_comp) chk[2] = true;
|
||||||
|
|
||||||
|
if (chk[0] == true && chk[1] == true && chk[2] == true)
|
||||||
|
{
|
||||||
|
|
||||||
|
dataGridView1.Rows[idx].Cells["isbn"].Value = value.Isbn13;
|
||||||
|
dataGridView1.Rows[idx].Cells["price2"].Value = value.PriceStandard;
|
||||||
|
dataGridView1.Rows[idx].Cells["pubDate"].Value = date;
|
||||||
|
//if (cb_api.SelectedIndex == 2)
|
||||||
|
dataGridView1.Rows[idx].Cells["category"].Value = value.CategoryName;
|
||||||
|
dataGridView1.Rows[idx].Cells["sold_out"].Value = value.StockStatus;
|
||||||
|
dataGridView1.Rows[idx].DefaultCellStyle.BackColor = Color.Yellow;
|
||||||
|
}
|
||||||
|
count_res();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// API에서 가져온 데이터가 요구한 데이터와 일치하는지 알아보는 함수
|
/// API에서 가져온 데이터가 요구한 데이터와 일치하는지 알아보는 함수
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -514,15 +641,15 @@ namespace ISBN_Check_test
|
|||||||
#region 검색갯수 계산
|
#region 검색갯수 계산
|
||||||
private void count_res()
|
private void count_res()
|
||||||
{
|
{
|
||||||
String_Text st = new String_Text();
|
//String_Text st = new String_Text();
|
||||||
int count = dataGridView1.Rows.Count;
|
//int count = dataGridView1.Rows.Count;
|
||||||
for (int a = 0; a < count; a++)
|
//for (int a = 0; a < count; a++)
|
||||||
{
|
//{
|
||||||
string search_data = dataGridView1.Rows[a].Cells["Column1"].Value?.ToString() ?? string.Empty;
|
// string search_data = dataGridView1.Rows[a].Cells["Column1"].Value?.ToString() ?? string.Empty;
|
||||||
int tmp_count = st.Char_count(search_data, '|');
|
// int tmp_count = st.Char_count(search_data, '|');
|
||||||
int lcount = tmp_count / 8;
|
// int lcount = tmp_count / 8;
|
||||||
dataGridView1.Rows[a].Cells["count"].Value = lcount.ToString();
|
// dataGridView1.Rows[a].Cells["count"].Value = lcount.ToString();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
|
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
|
||||||
@@ -569,12 +696,49 @@ namespace ISBN_Check_test
|
|||||||
}
|
}
|
||||||
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||||
{
|
{
|
||||||
if (dataGridView1.Rows[rowidx].Cells["Column1"].Value == null ||
|
if (e.RowIndex < 0 || e.ColumnIndex < 0) return;
|
||||||
dataGridView1.Rows[rowidx].Cells["Column1"].Value.ToString() == "") { return; }
|
var column = this.dataGridView1.Columns[e.ColumnIndex];
|
||||||
Form2 f2 = new Form2(this);
|
|
||||||
f2.row = rowidx;
|
if (column.Name.Equals("dvc_remark"))
|
||||||
f2.Call_API = cb_api.Text;
|
{
|
||||||
f2.Show();
|
var value = this.dataGridView1.Rows[e.RowIndex].Cells[column.Name].Value?.ToString() ?? string.Empty;
|
||||||
|
if(value.StartsWith("<"))
|
||||||
|
{
|
||||||
|
value = value.Substring(value.IndexOf(">") + 1);
|
||||||
|
}
|
||||||
|
else this.richTextBox1.Text = value;
|
||||||
|
}
|
||||||
|
else if (column.Name.Equals("Column"))
|
||||||
|
{
|
||||||
|
var value = this.dataGridView1.Rows[e.RowIndex].Cells[column.Name].Value?.ToString() ?? string.Empty;
|
||||||
|
if (value == string.Empty) return;
|
||||||
|
|
||||||
|
Form2 f2 = new Form2(this);
|
||||||
|
f2.row = rowidx;
|
||||||
|
f2.Call_API = cb_api.Text;
|
||||||
|
f2.Show();
|
||||||
|
}
|
||||||
|
else if (column.Name.Equals("dvc_link"))
|
||||||
|
{
|
||||||
|
var value = this.dataGridView1.Rows[e.RowIndex].Cells[column.Name].Value?.ToString() ?? string.Empty;
|
||||||
|
if (value == string.Empty) return;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var prc = new System.Diagnostics.Process();
|
||||||
|
prc.StartInfo = new System.Diagnostics.ProcessStartInfo()
|
||||||
|
{
|
||||||
|
FileName = value,
|
||||||
|
UseShellExecute = true
|
||||||
|
};
|
||||||
|
prc.Start();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
|
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
|
||||||
@@ -601,6 +765,7 @@ namespace ISBN_Check_test
|
|||||||
{
|
{
|
||||||
string[] aladin = { "도서명 + 저자", "도서명", "저자", "출판사", "별치조사" };
|
string[] aladin = { "도서명 + 저자", "도서명", "저자", "출판사", "별치조사" };
|
||||||
cb_filter.Items.AddRange(aladin);
|
cb_filter.Items.AddRange(aladin);
|
||||||
|
cb_filter.SelectedIndex = cb_filter.Items.Count - 1;
|
||||||
}
|
}
|
||||||
Must_Col(cb_api.SelectedIndex);
|
Must_Col(cb_api.SelectedIndex);
|
||||||
}
|
}
|
||||||
@@ -640,7 +805,8 @@ namespace ISBN_Check_test
|
|||||||
{
|
{
|
||||||
if (System.Diagnostics.Debugger.IsAttached)
|
if (System.Diagnostics.Debugger.IsAttached)
|
||||||
{
|
{
|
||||||
string[] lst = { "9791193110584",
|
string[] lst = { "9788965427520",
|
||||||
|
"9791193110584",
|
||||||
"9791168672260",
|
"9791168672260",
|
||||||
"9788993858396",
|
"9788993858396",
|
||||||
"9791171200351",
|
"9791171200351",
|
||||||
@@ -657,5 +823,22 @@ namespace ISBN_Check_test
|
|||||||
end_idx.Text = (this.dataGridView1.Rows.Count - 1).ToString();
|
end_idx.Text = (this.dataGridView1.Rows.Count - 1).ToString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void button3_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 button4_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
dataGridView1.Rows.Clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,4 +150,10 @@
|
|||||||
<metadata name="count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="dvc_link.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="dvc_remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
</root>
|
</root>
|
||||||
@@ -10,9 +10,45 @@ using System.Threading.Tasks;
|
|||||||
using System.Web.Script.Serialization;
|
using System.Web.Script.Serialization;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
using System.Xml.Linq;
|
||||||
|
|
||||||
namespace ISBN_Check_test
|
namespace ISBN_Check_test
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 알라딘 API 응답 데이터 구조체
|
||||||
|
/// </summary>
|
||||||
|
public class AladinBookData
|
||||||
|
{
|
||||||
|
public string Title { get; set; }
|
||||||
|
public string Link { get; set; }
|
||||||
|
public string Author { get; set; }
|
||||||
|
public string PubDate { get; set; }
|
||||||
|
public string Description { get; set; }
|
||||||
|
public string Isbn { get; set; }
|
||||||
|
public string Isbn13 { get; set; }
|
||||||
|
public string PriceSales { get; set; }
|
||||||
|
public string PriceStandard { get; set; }
|
||||||
|
public string StockStatus { get; set; }
|
||||||
|
public string Mileage { get; set; }
|
||||||
|
public string Cover { get; set; }
|
||||||
|
public string CategoryId { get; set; }
|
||||||
|
public string CategoryName { get; set; }
|
||||||
|
public string Publisher { get; set; }
|
||||||
|
public string CustomerReviewRank { get; set; }
|
||||||
|
public string FullDescription { get; set; }
|
||||||
|
public string FullDescription2 { get; set; }
|
||||||
|
public string ItemId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 지정된 필드들을 "|" 구분자로 출력
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public override string ToString()
|
||||||
|
{
|
||||||
|
return $"{Title}|{Author}|{Publisher}|{Isbn13}|{PriceStandard}|{PubDate}|{CategoryName}|{StockStatus}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class API
|
class API
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -22,7 +58,7 @@ namespace ISBN_Check_test
|
|||||||
/// <param name="QueryType"></param>
|
/// <param name="QueryType"></param>
|
||||||
/// <param name="Param"></param>
|
/// <param name="Param"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string Aladin(string Query, string QueryType, string[] Param)
|
public string[] Aladin(string Query, string QueryType, string[] Param)
|
||||||
{
|
{
|
||||||
string result = string.Empty;
|
string result = string.Empty;
|
||||||
// 쿼리 생성
|
// 쿼리 생성
|
||||||
@@ -49,58 +85,127 @@ namespace ISBN_Check_test
|
|||||||
// xml형식을 json형식으로 변환
|
// xml형식을 json형식으로 변환
|
||||||
XmlDocument doc = new XmlDocument();
|
XmlDocument doc = new XmlDocument();
|
||||||
doc.LoadXml(xml);
|
doc.LoadXml(xml);
|
||||||
var json = JsonConvert.SerializeXmlNode(doc);
|
|
||||||
|
|
||||||
// json형식 분석을 위해 JavaScriptSerializer 개체 생성
|
var xdoc = XDocument.Parse(xml);
|
||||||
JavaScriptSerializer js = new JavaScriptSerializer();
|
var xroot = xdoc.Root;
|
||||||
|
|
||||||
// 런타임에 개체를 확인하여 사용할수 있는 dynamic을 이용해 역직렬화
|
// XML에서 직접 totalResults와 item 추출 (XDocument 사용)
|
||||||
dynamic dob = js.Deserialize<dynamic>(json);
|
XNamespace ns = "http://www.aladin.co.kr/ttb/apiguide.aspx";
|
||||||
|
|
||||||
// "object"내에 있는것을 얻어오기 위해 다시 dynamic변수에 참조
|
// totalResults 추출
|
||||||
dynamic docs = "";
|
string totalResults = xdoc.Descendants(ns + "totalResults").FirstOrDefault()?.Value ?? "0";
|
||||||
try
|
|
||||||
|
// item들 추출
|
||||||
|
var itemElements = xdoc.Descendants(ns + "item");
|
||||||
|
|
||||||
|
if (!itemElements.Any())
|
||||||
{
|
{
|
||||||
docs = dob["object"]["item"];
|
return new string[] { };
|
||||||
}
|
}
|
||||||
catch
|
|
||||||
{
|
int length = itemElements.Count();
|
||||||
return "";
|
|
||||||
}
|
|
||||||
int length = 0;
|
|
||||||
int ID_length = Param.Length;
|
int ID_length = Param.Length;
|
||||||
|
|
||||||
// 검색 결과가 1개 이하일 경우, 오류가 발생하여 try/catch문 사용.
|
// XML item들을 순회하면서 필요한 데이터 추출 (XDocument 사용)
|
||||||
try
|
List<string[]> retval = new List<string[]>();
|
||||||
|
foreach (var itemElement in itemElements)
|
||||||
{
|
{
|
||||||
// docs는 요소 컬렉션으로 object로 변환.
|
string[] buffer = new string[ID_length];
|
||||||
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++)
|
for (int b = 0; b < ID_length; b++)
|
||||||
{
|
{
|
||||||
if (length == 1)
|
buffer[b] = itemElement.Element(ns + Param[b])?.Value ?? "";
|
||||||
{
|
|
||||||
tmp_data.Add(docs[Param[b]]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tmp_data.Add(docs[a][Param[b]]);
|
|
||||||
}
|
|
||||||
result += tmp_data[b] + "|";
|
|
||||||
}
|
}
|
||||||
result += "\n";
|
//retval.Add(buffer);
|
||||||
|
return buffer;
|
||||||
}
|
}
|
||||||
return result;
|
return new string[] { };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// https://blog.aladin.co.kr/openapi 참고 (구조체 반환 버전)
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Query"></param>
|
||||||
|
/// <param name="QueryType"></param>
|
||||||
|
/// <returns>AladinBookData 리스트</returns>
|
||||||
|
public List<AladinBookData> Aladin_struct(string Query, string QueryType,out string xml)
|
||||||
|
{
|
||||||
|
// 쿼리 생성
|
||||||
|
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());
|
||||||
|
xml = string.Empty;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 쿼리를 입력인자로 WebRequest 개채 생성
|
||||||
|
WebRequest request = WebRequest.Create(query);
|
||||||
|
|
||||||
|
// WebResponse개체를 통해 서비스 요청.
|
||||||
|
WebResponse response = request.GetResponse();
|
||||||
|
|
||||||
|
// 결과문자열 확인
|
||||||
|
Stream stream = response.GetResponseStream();
|
||||||
|
StreamReader reader = new StreamReader(stream, Encoding.UTF8);
|
||||||
|
xml = reader.ReadToEnd();
|
||||||
|
stream.Close();
|
||||||
|
|
||||||
|
var xdoc = XDocument.Parse(xml);
|
||||||
|
|
||||||
|
// XML에서 직접 totalResults와 item 추출 (XDocument 사용)
|
||||||
|
XNamespace ns = "http://www.aladin.co.kr/ttb/apiguide.aspx";
|
||||||
|
|
||||||
|
// totalResults 추출
|
||||||
|
string totalResults = xdoc.Descendants(ns + "totalResults").FirstOrDefault()?.Value ?? "0";
|
||||||
|
|
||||||
|
// item들 추출
|
||||||
|
var itemElements = xdoc.Descendants(ns + "item");
|
||||||
|
|
||||||
|
List<AladinBookData> resultList = new List<AladinBookData>();
|
||||||
|
|
||||||
|
if (!itemElements.Any())
|
||||||
|
{
|
||||||
|
Console.WriteLine(Query);
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 모든 item을 순회하며 리스트에 추가
|
||||||
|
foreach (var itemElement in itemElements)
|
||||||
|
{
|
||||||
|
AladinBookData bookData = new AladinBookData
|
||||||
|
{
|
||||||
|
ItemId = itemElement.Attribute("itemId")?.Value ?? "",
|
||||||
|
Title = itemElement.Element(ns + "title")?.Value ?? "",
|
||||||
|
Link = itemElement.Element(ns + "link")?.Value ?? "",
|
||||||
|
Author = itemElement.Element(ns + "author")?.Value ?? "",
|
||||||
|
PubDate = itemElement.Element(ns + "pubDate")?.Value ?? "",
|
||||||
|
Description = itemElement.Element(ns + "description")?.Value ?? "",
|
||||||
|
Isbn = itemElement.Element(ns + "isbn")?.Value ?? "",
|
||||||
|
Isbn13 = itemElement.Element(ns + "isbn13")?.Value ?? "",
|
||||||
|
PriceSales = itemElement.Element(ns + "priceSales")?.Value ?? "",
|
||||||
|
PriceStandard = itemElement.Element(ns + "priceStandard")?.Value ?? "",
|
||||||
|
StockStatus = itemElement.Element(ns + "stockStatus")?.Value ?? "",
|
||||||
|
Mileage = itemElement.Element(ns + "mileage")?.Value ?? "",
|
||||||
|
Cover = itemElement.Element(ns + "cover")?.Value ?? "",
|
||||||
|
CategoryId = itemElement.Element(ns + "categoryId")?.Value ?? "",
|
||||||
|
CategoryName = itemElement.Element(ns + "categoryName")?.Value ?? "",
|
||||||
|
Publisher = itemElement.Element(ns + "publisher")?.Value ?? "",
|
||||||
|
CustomerReviewRank = itemElement.Element(ns + "customerReviewRank")?.Value ?? "",
|
||||||
|
FullDescription = itemElement.Element(ns + "fulldescription")?.Value ?? "",
|
||||||
|
FullDescription2 = itemElement.Element(ns + "fulldescription2")?.Value ?? ""
|
||||||
|
};
|
||||||
|
|
||||||
|
resultList.Add(bookData);
|
||||||
|
}
|
||||||
|
|
||||||
|
return resultList;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
// 에러 발생 시 빈 리스트 반환
|
||||||
|
return new List<AladinBookData>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://blog.aladin.co.kr/openapi 참고
|
/// https://blog.aladin.co.kr/openapi 참고
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -194,7 +299,7 @@ namespace ISBN_Check_test
|
|||||||
// url 생성
|
// url 생성
|
||||||
string url = "https://openapi.naver.com/v1/search/book_adv?";
|
string url = "https://openapi.naver.com/v1/search/book_adv?";
|
||||||
|
|
||||||
for(int a = 0; a < Query.Length; a++)
|
for (int a = 0; a < Query.Length; a++)
|
||||||
{
|
{
|
||||||
url += string.Format("{0}={1}&", QueryType[a], Query[a]);
|
url += string.Format("{0}={1}&", QueryType[a], Query[a]);
|
||||||
}
|
}
|
||||||
@@ -287,18 +392,20 @@ namespace ISBN_Check_test
|
|||||||
int length = buf.Length;
|
int length = buf.Length;
|
||||||
int ID_length = Param.Length;
|
int ID_length = Param.Length;
|
||||||
|
|
||||||
for(int a = 0; a < length; a++)
|
for (int a = 0; a < length; a++)
|
||||||
{
|
{
|
||||||
List<object> tmp_data = new List<object>();
|
List<object> tmp_data = new List<object>();
|
||||||
for(int b = 0; b < ID_length; b++)
|
for (int b = 0; b < ID_length; b++)
|
||||||
{
|
{
|
||||||
if (Param[b] == "authors") {
|
if (Param[b] == "authors")
|
||||||
|
{
|
||||||
object[] tmp = docs[a][Param[b]];
|
object[] tmp = docs[a][Param[b]];
|
||||||
string tmp_str = string.Empty;
|
string tmp_str = string.Empty;
|
||||||
for(int j = 0; j < tmp.Length; j++)
|
for (int j = 0; j < tmp.Length; j++)
|
||||||
{
|
{
|
||||||
tmp_str += tmp[j];
|
tmp_str += tmp[j];
|
||||||
if (j < tmp.Length - 1) {
|
if (j < tmp.Length - 1)
|
||||||
|
{
|
||||||
tmp_str += ", ";
|
tmp_str += ", ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -306,7 +413,8 @@ namespace ISBN_Check_test
|
|||||||
result += tmp_data[b] + "|";
|
result += tmp_data[b] + "|";
|
||||||
tmp_str = "";
|
tmp_str = "";
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
tmp_data.Add(docs[a][Param[b]]);
|
tmp_data.Add(docs[a][Param[b]]);
|
||||||
result += tmp_data[b] + "|";
|
result += tmp_data[b] + "|";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,15 +41,15 @@ namespace ISBN_Check_test
|
|||||||
|
|
||||||
else { tb_price.Text = ""; }
|
else { tb_price.Text = ""; }
|
||||||
|
|
||||||
string data = f1GridView.Rows[row].Cells["Column1"].Value.ToString();
|
var data = (string[])f1GridView.Rows[row].Cells["Column1"].Value;
|
||||||
inputGrid(data);
|
inputGrid(data);
|
||||||
}
|
}
|
||||||
private void inputGrid(string data)
|
private void inputGrid(string[] tmp)
|
||||||
{
|
{
|
||||||
dataGridView1.Rows.Clear();
|
dataGridView1.Rows.Clear();
|
||||||
|
|
||||||
// 도서명 / 저자 / 출판사 / isbn / 출간일 / 카테고리 / 품절여부
|
// 도서명 / 저자 / 출판사 / isbn / 출간일 / 카테고리 / 품절여부
|
||||||
string[] tmp = data.Split('|');
|
//string[] tmp = data.Split('|');
|
||||||
string[] grid = { "", "", "", "", "", "", "", "" };
|
string[] grid = { "", "", "", "", "", "", "", "" };
|
||||||
|
|
||||||
for (int a = 0; a < tmp.Length; a++)
|
for (int a = 0; a < tmp.Length; a++)
|
||||||
@@ -186,8 +186,8 @@ namespace ISBN_Check_test
|
|||||||
string type = "Title";
|
string type = "Title";
|
||||||
string query = tb_book_name.Text;
|
string query = tb_book_name.Text;
|
||||||
|
|
||||||
string aladin = api.Aladin(query, type, param);
|
var aladin = api.Aladin(query, type, param);
|
||||||
if (aladin == "") return;
|
if (aladin.Any()==false) return;
|
||||||
|
|
||||||
inputGrid(aladin);
|
inputGrid(aladin);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,32 +65,32 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
|
<Reference Include="BouncyCastle.Crypto, Version=1.8.5.0, Culture=neutral, PublicKeyToken=0e99375e54769942">
|
||||||
<HintPath>packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll</HintPath>
|
<HintPath>..\packages\BouncyCastle.1.8.5\lib\BouncyCastle.Crypto.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Google.Protobuf, Version=3.14.0.0, Culture=neutral, PublicKeyToken=a7d26565bac4d604, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\Google.Protobuf.3.14.0\lib\net45\Google.Protobuf.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="K4os.Compression.LZ4, Version=1.1.11.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\K4os.Compression.LZ4.1.1.11\lib\net46\K4os.Compression.LZ4.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="K4os.Compression.LZ4.Streams, Version=1.1.11.0, Culture=neutral, PublicKeyToken=2186fa9121ef231d, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\K4os.Compression.LZ4.Streams.1.1.11\lib\net46\K4os.Compression.LZ4.Streams.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="K4os.Hash.xxHash, Version=1.0.6.0, Culture=neutral, PublicKeyToken=32cd54395057cec3, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\K4os.Hash.xxHash.1.0.6\lib\net46\K4os.Hash.xxHash.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="MySql.Data, Version=8.0.25.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\MySql.Data.8.0.25\lib\net452\MySql.Data.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Renci.SshNet, Version=2020.0.1.0, Culture=neutral, PublicKeyToken=1cee9f8bde3db106, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\SSH.NET.2020.0.1\lib\net40\Renci.SshNet.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.ComponentModel" />
|
<Reference Include="System.ComponentModel" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
@@ -99,14 +99,14 @@
|
|||||||
<Reference Include="System.Core" />
|
<Reference Include="System.Core" />
|
||||||
<Reference Include="System.Management" />
|
<Reference Include="System.Management" />
|
||||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Numerics" />
|
<Reference Include="System.Numerics" />
|
||||||
<Reference Include="System.Numerics.Vectors, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.4.1, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Transactions" />
|
<Reference Include="System.Transactions" />
|
||||||
<Reference Include="System.Web.Extensions" />
|
<Reference Include="System.Web.Extensions" />
|
||||||
@@ -120,10 +120,10 @@
|
|||||||
<Reference Include="System.Windows.Forms" />
|
<Reference Include="System.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
<Reference Include="Ubiety.Dns.Core, Version=2.2.1.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\MySql.Data.8.0.25\lib\net452\Ubiety.Dns.Core.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Zstandard.Net, Version=1.1.7.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL">
|
<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>
|
<HintPath>..\packages\MySql.Data.8.0.25\lib\net452\Zstandard.Net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
24
ISBN_Check/Main/Main.sln
Normal file
24
ISBN_Check/Main/Main.sln
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.5.2.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ISBN_Check_test", "ISBN_Check_test.csproj", "{B1FE7D47-6EFF-E4AE-FF42-BADB7C89CEEE}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{B1FE7D47-6EFF-E4AE-FF42-BADB7C89CEEE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B1FE7D47-6EFF-E4AE-FF42-BADB7C89CEEE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B1FE7D47-6EFF-E4AE-FF42-BADB7C89CEEE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B1FE7D47-6EFF-E4AE-FF42-BADB7C89CEEE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {E8EB61EB-992B-4C29-AC57-A0B63137A787}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -31,6 +31,6 @@ using System.Runtime.InteropServices;
|
|||||||
//
|
//
|
||||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||||
// 기본값으로 할 수 있습니다.
|
// 기본값으로 할 수 있습니다.
|
||||||
[assembly: AssemblyVersion("1.0.*")]
|
[assembly: AssemblyVersion("25.10.29.2300")]
|
||||||
// [assembly: AssemblyVersion("1.0.0.0")]
|
// [assembly: AssemblyVersion("1.0.0.0")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
[assembly: AssemblyFileVersion("25.10.29.2300")]
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ using WindowsFormsApp1;
|
|||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
|
|
||||||
namespace ISBN_Check_test
|
namespace ISBN_Check_test
|
||||||
{
|
{
|
||||||
public partial class Yes24 : Form
|
public partial class Yes24 : Form
|
||||||
@@ -55,16 +56,17 @@ namespace ISBN_Check_test
|
|||||||
int count = f1.dataGridView1.Rows.Count - 1;
|
int count = f1.dataGridView1.Rows.Count - 1;
|
||||||
string price = "";
|
string price = "";
|
||||||
|
|
||||||
for (int a = 0; a < count; a++)
|
foreach(DataGridViewRow drowview in f1.dataGridView1.Rows)
|
||||||
{
|
{
|
||||||
if (f1.dataGridView1.Rows[a].Cells["price"].Value != null)
|
if (drowview.Cells["price"].Value != null)
|
||||||
{
|
{
|
||||||
price = f1.dataGridView1.Rows[a].Cells["price"].Value.ToString();
|
price = drowview.Cells["price"].Value.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
var bookName = f1.dataGridView1.Rows[a].Cells["book_name"].Value?.ToString() ?? string.Empty;
|
var bookName = drowview.Cells["book_name"].Value?.ToString() ?? string.Empty;
|
||||||
var author = f1.dataGridView1.Rows[a].Cells["author"].Value?.ToString() ?? string.Empty;
|
var author = drowview.Cells["author"].Value?.ToString() ?? string.Empty;
|
||||||
var bookComp = f1.dataGridView1.Rows[a].Cells["book_comp"].Value?.ToString() ?? string.Empty;
|
var bookComp = drowview.Cells["book_comp"].Value?.ToString() ?? string.Empty;
|
||||||
|
if (string.IsNullOrEmpty(bookName) && string.IsNullOrEmpty(author) && string.IsNullOrEmpty(bookComp)) continue;
|
||||||
|
|
||||||
List<string> grid = new List<string>();
|
List<string> grid = new List<string>();
|
||||||
grid.Add(bookName);
|
grid.Add(bookName);
|
||||||
@@ -73,7 +75,7 @@ namespace ISBN_Check_test
|
|||||||
grid.Add(Replace_target(author, "author"));
|
grid.Add(Replace_target(author, "author"));
|
||||||
grid.Add(bookComp);
|
grid.Add(bookComp);
|
||||||
grid.Add(Replace_target(bookComp, "book_comp"));
|
grid.Add(Replace_target(bookComp, "book_comp"));
|
||||||
|
grid.Add(price);
|
||||||
dataGridView1.Rows.Add(grid.ToArray());
|
dataGridView1.Rows.Add(grid.ToArray());
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -124,15 +126,17 @@ namespace ISBN_Check_test
|
|||||||
private void btn_change_Click(object sender, EventArgs e)
|
private void btn_change_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string[,] grid = new string[dataGridView1.Rows.Count, 6];
|
string[,] grid = new string[dataGridView1.Rows.Count, 6];
|
||||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
var idx = 0;
|
||||||
|
foreach (DataGridViewRow drv in dataGridView1.Rows)// int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||||
{
|
{
|
||||||
string price = dataGridView1.Rows[a].Cells["price"].Value.ToString();
|
string price = drv.Cells["price"].Value?.ToString() ?? string.Empty;
|
||||||
int count = a + 1;
|
int count = idx + 1;
|
||||||
grid[a, 0] = count.ToString();
|
grid[idx, 0] = count.ToString();
|
||||||
grid[a, 1] = dataGridView1.Rows[a].Cells["after_book_name"].Value.ToString();
|
grid[idx, 1] = drv.Cells["after_book_name"].Value.ToString();
|
||||||
grid[a, 3] = dataGridView1.Rows[a].Cells["after_book_comp"].Value.ToString();
|
grid[idx, 3] = drv.Cells["after_book_comp"].Value.ToString();
|
||||||
grid[a, 4] = Regex.Replace(price, @"[^0-9]", "");
|
grid[idx, 4] = Regex.Replace(price, @"[^0-9]", "");
|
||||||
grid[a, 5] = "1";
|
grid[idx, 5] = "1";
|
||||||
|
idx += 1;
|
||||||
}
|
}
|
||||||
Excel_change(grid);
|
Excel_change(grid);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<configuration>
|
|
||||||
<startup>
|
|
||||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
|
||||||
</startup>
|
|
||||||
</configuration>
|
|
||||||
280
ISBN_Client/ISBN_Client.Designer.cs
generated
280
ISBN_Client/ISBN_Client.Designer.cs
generated
@@ -1,280 +0,0 @@
|
|||||||
|
|
||||||
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 = "button1";
|
|
||||||
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.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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,240 +0,0 @@
|
|||||||
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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
<?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>
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
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());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
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")]
|
|
||||||
70
ISBN_Client/Properties/Resources.Designer.cs
generated
70
ISBN_Client/Properties/Resources.Designer.cs
generated
@@ -1,70 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
<?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>
|
|
||||||
29
ISBN_Client/Properties/Settings.Designer.cs
generated
29
ISBN_Client/Properties/Settings.Designer.cs
generated
@@ -1,29 +0,0 @@
|
|||||||
//------------------------------------------------------------------------------
|
|
||||||
// <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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?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>
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
<?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>
|
|
||||||
@@ -14,7 +14,7 @@ using System.Reflection;
|
|||||||
[assembly: System.Reflection.AssemblyCompanyAttribute("pofalApi_tmp")]
|
[assembly: System.Reflection.AssemblyCompanyAttribute("pofalApi_tmp")]
|
||||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
|
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8e7df6f68d424e8b9f20e24f017b877849125171")]
|
||||||
[assembly: System.Reflection.AssemblyProductAttribute("pofalApi_tmp")]
|
[assembly: System.Reflection.AssemblyProductAttribute("pofalApi_tmp")]
|
||||||
[assembly: System.Reflection.AssemblyTitleAttribute("pofalApi_tmp")]
|
[assembly: System.Reflection.AssemblyTitleAttribute("pofalApi_tmp")]
|
||||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
c13c9c2f2e12bc007cbcab6ccdb94397f9d2465a
|
1e22963f41eb10ec8b7d5cf0f11446afcd4c7c64669758c39d9d6d7a2dc5abbf
|
||||||
|
|||||||
Binary file not shown.
@@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
"permissions": {
|
"permissions": {
|
||||||
"allow": [
|
"allow": [
|
||||||
"Bash(git add:*)"
|
"Bash(git push:*)"
|
||||||
],
|
],
|
||||||
"deny": [],
|
"deny": [],
|
||||||
"ask": []
|
"ask": []
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"hooks": {
|
|
||||||
"conversation-start": "새로운 대화를 시작할 때 항상 CLAUDE.md 파일을 자동으로 읽고 프로젝트 컨텍스트를 파악하세요",
|
|
||||||
"user-prompt-submit": "작업을 시작하기 전에 항상 CLAUDE.md 파일을 읽고 참조하세요"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -10,6 +10,9 @@
|
|||||||
- **데이터베이스**: MySQL
|
- **데이터베이스**: MySQL
|
||||||
- **주요기능**: 마크 작성, 복본조사, DLS 연동, 도서 정보 관리
|
- **주요기능**: 마크 작성, 복본조사, DLS 연동, 도서 정보 관리
|
||||||
|
|
||||||
|
## 데이터베이스 정보
|
||||||
|
- Server=1.215.250.130;Port=3306;Database=unimarc;uid=root;pwd=Admin21234;
|
||||||
|
|
||||||
## 코딩 컨벤션
|
## 코딩 컨벤션
|
||||||
- 파일명: PascalCase (예: DLS_Copy.cs)
|
- 파일명: PascalCase (예: DLS_Copy.cs)
|
||||||
- 클래스명: PascalCase
|
- 클래스명: PascalCase
|
||||||
|
|||||||
19
unimarc/NuGet.Config
Normal file
19
unimarc/NuGet.Config
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<configuration>
|
||||||
|
<packageSources>
|
||||||
|
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||||
|
<add key="grapecity" value="https://nuget.grapecity.com/nuget" />
|
||||||
|
</packageSources>
|
||||||
|
<packageSourceCredentials />
|
||||||
|
<packageRestore>
|
||||||
|
<add key="enabled" value="True" />
|
||||||
|
<add key="automatic" value="True" />
|
||||||
|
</packageRestore>
|
||||||
|
<bindingRedirects>
|
||||||
|
<add key="skip" value="False" />
|
||||||
|
</bindingRedirects>
|
||||||
|
<packageManagement>
|
||||||
|
<add key="format" value="0" />
|
||||||
|
<add key="disabled" value="False" />
|
||||||
|
</packageManagement>
|
||||||
|
</configuration>
|
||||||
@@ -9,6 +9,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Factory_Client", "Factory_C
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "UniMarcSetup", "UniMarcSetup\UniMarcSetup.vdproj", "{B0A88F76-DC68-44F9-90B4-CD94625CC1F4}"
|
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "UniMarcSetup", "UniMarcSetup\UniMarcSetup.vdproj", "{B0A88F76-DC68-44F9-90B4-CD94625CC1F4}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "솔루션 항목", "솔루션 항목", "{2A3A057F-5D22-31FD-628C-DF5EF75AEF1E}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
CLAUDE.md = CLAUDE.md
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
|||||||
@@ -222,6 +222,8 @@ namespace WindowsFormsApp1
|
|||||||
}
|
}
|
||||||
public void DB_Send_CMD_reVoid(string cmd)
|
public void DB_Send_CMD_reVoid(string cmd)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
//using (conn)
|
//using (conn)
|
||||||
{
|
{
|
||||||
conn.Open();
|
conn.Open();
|
||||||
|
|||||||
48
unimarc/unimarc/Helper_DB2.cs
Normal file
48
unimarc/unimarc/Helper_DB2.cs
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
using AR;
|
||||||
|
using Microsoft.Vbe.Interop;
|
||||||
|
using MySql.Data.MySqlClient;
|
||||||
|
using OpenQA.Selenium.BiDi.Input;
|
||||||
|
using Renci.SshNet;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.IO.Ports;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using UniMarc;
|
||||||
|
using UniMarc.Properties;
|
||||||
|
|
||||||
|
namespace WindowsFormsApp1
|
||||||
|
{
|
||||||
|
public static class DB2
|
||||||
|
{
|
||||||
|
public static DataTable GetDT(string tableName, string columns="*" , string wheres="", string orders="")
|
||||||
|
{
|
||||||
|
var sql = $"select {columns} from {tableName}";
|
||||||
|
if (wheres.isEmpty() == false) sql += " where " + wheres;
|
||||||
|
if (orders.isEmpty() == false) sql += " order by " + orders;
|
||||||
|
Helper_DB db = new Helper_DB();
|
||||||
|
var cn = db.CreateConnection();
|
||||||
|
var da = new MySql.Data.MySqlClient.MySqlDataAdapter(sql, cn);
|
||||||
|
var dt = new DataTable();
|
||||||
|
da.Fill(dt);
|
||||||
|
dt.AcceptChanges();
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int ExcuteNonQuery(string query)
|
||||||
|
{
|
||||||
|
Helper_DB db = new Helper_DB();
|
||||||
|
var cn = db.CreateConnection();
|
||||||
|
var cmd = new MySqlCommand(query, cn);
|
||||||
|
cn.Open();
|
||||||
|
var cnt = cmd.ExecuteNonQuery();
|
||||||
|
cmd.Dispose();
|
||||||
|
cn.Dispose();
|
||||||
|
return cnt;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
170
unimarc/unimarc/Helper_LibraryDelaySettings.cs
Normal file
170
unimarc/unimarc/Helper_LibraryDelaySettings.cs
Normal file
@@ -0,0 +1,170 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Xml;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
namespace UniMarc
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 도서관별 지연시간 설정을 관리하는 클래스
|
||||||
|
/// </summary>
|
||||||
|
public class Helper_LibraryDelaySettings
|
||||||
|
{
|
||||||
|
private static readonly string SettingsFileName = "LibraryDelaySettings.xml";
|
||||||
|
private static readonly string SettingsFilePath = Path.Combine(
|
||||||
|
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||||
|
"UniMarc",
|
||||||
|
SettingsFileName
|
||||||
|
);
|
||||||
|
|
||||||
|
private Dictionary<string, int> _libraryDelaySettings;
|
||||||
|
|
||||||
|
public Helper_LibraryDelaySettings()
|
||||||
|
{
|
||||||
|
_libraryDelaySettings = new Dictionary<string, int>();
|
||||||
|
LoadSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 도서관별 지연시간 설정을 로드
|
||||||
|
/// </summary>
|
||||||
|
private void LoadSettings()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (File.Exists(SettingsFilePath))
|
||||||
|
{
|
||||||
|
var xmlDoc = new XmlDocument();
|
||||||
|
xmlDoc.Load(SettingsFilePath);
|
||||||
|
|
||||||
|
var libraryNodes = xmlDoc.SelectNodes("//LibraryDelaySettings/Library");
|
||||||
|
if (libraryNodes != null)
|
||||||
|
{
|
||||||
|
foreach (XmlNode node in libraryNodes)
|
||||||
|
{
|
||||||
|
var name = node.Attributes?["Name"]?.Value;
|
||||||
|
var delayStr = node.Attributes?["Delay"]?.Value;
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(name) && int.TryParse(delayStr, out int delay))
|
||||||
|
{
|
||||||
|
_libraryDelaySettings[name] = delay;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"도서관 지연시간 설정 로드 오류: {ex.Message}");
|
||||||
|
_libraryDelaySettings = new Dictionary<string, int>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 도서관별 지연시간 설정을 저장
|
||||||
|
/// </summary>
|
||||||
|
private void SaveSettings()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 디렉토리 생성
|
||||||
|
var directory = Path.GetDirectoryName(SettingsFilePath);
|
||||||
|
if (!Directory.Exists(directory))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(directory);
|
||||||
|
}
|
||||||
|
|
||||||
|
// XML 파일로 저장
|
||||||
|
var xmlDoc = new XmlDocument();
|
||||||
|
var declaration = xmlDoc.CreateXmlDeclaration("1.0", "UTF-8", null);
|
||||||
|
xmlDoc.AppendChild(declaration);
|
||||||
|
|
||||||
|
var root = xmlDoc.CreateElement("LibraryDelaySettings");
|
||||||
|
xmlDoc.AppendChild(root);
|
||||||
|
|
||||||
|
foreach (var kvp in _libraryDelaySettings)
|
||||||
|
{
|
||||||
|
var libraryElement = xmlDoc.CreateElement("Library");
|
||||||
|
libraryElement.SetAttribute("Name", kvp.Key);
|
||||||
|
libraryElement.SetAttribute("Delay", kvp.Value.ToString());
|
||||||
|
root.AppendChild(libraryElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
xmlDoc.Save(SettingsFilePath);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"도서관 지연시간 설정 저장 오류: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 특정 도서관의 지연시간 설정을 가져옴
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="libraryName">도서관 이름</param>
|
||||||
|
/// <returns>지연시간(초), 설정이 없으면 0</returns>
|
||||||
|
public int GetDelay(string libraryName)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(libraryName))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return _libraryDelaySettings.TryGetValue(libraryName, out int delay) ? delay : 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 특정 도서관의 지연시간 설정을 저장
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="libraryName">도서관 이름</param>
|
||||||
|
/// <param name="delaySeconds">지연시간(초)</param>
|
||||||
|
public void SetDelay(string libraryName, int delaySeconds)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(libraryName))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (delaySeconds < 0)
|
||||||
|
delaySeconds = 0;
|
||||||
|
|
||||||
|
_libraryDelaySettings[libraryName] = delaySeconds;
|
||||||
|
SaveSettings();
|
||||||
|
|
||||||
|
Console.WriteLine($"도서관 지연시간 설정 저장: {libraryName} = {delaySeconds}초");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 모든 도서관 지연시간 설정을 가져옴
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>도서관명-지연시간 딕셔너리</returns>
|
||||||
|
public Dictionary<string, int> GetAllSettings()
|
||||||
|
{
|
||||||
|
return new Dictionary<string, int>(_libraryDelaySettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 특정 도서관의 지연시간 설정을 제거
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="libraryName">도서관 이름</param>
|
||||||
|
public void RemoveDelay(string libraryName)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(libraryName))
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (_libraryDelaySettings.ContainsKey(libraryName))
|
||||||
|
{
|
||||||
|
_libraryDelaySettings.Remove(libraryName);
|
||||||
|
SaveSettings();
|
||||||
|
Console.WriteLine($"도서관 지연시간 설정 제거: {libraryName}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 모든 지연시간 설정을 초기화
|
||||||
|
/// </summary>
|
||||||
|
public void ClearAllSettings()
|
||||||
|
{
|
||||||
|
_libraryDelaySettings.Clear();
|
||||||
|
SaveSettings();
|
||||||
|
Console.WriteLine("모든 도서관 지연시간 설정 초기화");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
258
unimarc/unimarc/ListOfValue/fSelectDT.Designer.cs
generated
Normal file
258
unimarc/unimarc/ListOfValue/fSelectDT.Designer.cs
generated
Normal file
@@ -0,0 +1,258 @@
|
|||||||
|
namespace UniMarc.ListOfValue
|
||||||
|
{
|
||||||
|
partial class fSelectDT
|
||||||
|
{
|
||||||
|
/// <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()
|
||||||
|
{
|
||||||
|
this.components = new System.ComponentModel.Container();
|
||||||
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fSelectDT));
|
||||||
|
this.dv1 = new System.Windows.Forms.DataGridView();
|
||||||
|
this.bn = new System.Windows.Forms.BindingNavigator(this.components);
|
||||||
|
this.bs = new System.Windows.Forms.BindingSource(this.components);
|
||||||
|
this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
|
||||||
|
this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox();
|
||||||
|
this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
|
||||||
|
this.tbFind = new System.Windows.Forms.ToolStripTextBox();
|
||||||
|
this.btfind = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.btSelect = new System.Windows.Forms.ToolStripButton();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit();
|
||||||
|
this.bn.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// dv1
|
||||||
|
//
|
||||||
|
this.dv1.AllowUserToAddRows = false;
|
||||||
|
this.dv1.AllowUserToDeleteRows = false;
|
||||||
|
this.dv1.AllowUserToResizeRows = false;
|
||||||
|
this.dv1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
|
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||||
|
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||||
|
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
|
dataGridViewCellStyle1.Padding = new System.Windows.Forms.Padding(0, 3, 0, 3);
|
||||||
|
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||||
|
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||||
|
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||||
|
this.dv1.DefaultCellStyle = dataGridViewCellStyle1;
|
||||||
|
this.dv1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.dv1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.dv1.MultiSelect = false;
|
||||||
|
this.dv1.Name = "dv1";
|
||||||
|
this.dv1.ReadOnly = true;
|
||||||
|
this.dv1.RowTemplate.Height = 23;
|
||||||
|
this.dv1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
this.dv1.Size = new System.Drawing.Size(768, 423);
|
||||||
|
this.dv1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// bn
|
||||||
|
//
|
||||||
|
this.bn.AddNewItem = null;
|
||||||
|
this.bn.BindingSource = this.bs;
|
||||||
|
this.bn.CountItem = this.bindingNavigatorCountItem;
|
||||||
|
this.bn.DeleteItem = null;
|
||||||
|
this.bn.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
|
this.bn.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.bindingNavigatorMoveFirstItem,
|
||||||
|
this.bindingNavigatorMovePreviousItem,
|
||||||
|
this.bindingNavigatorSeparator,
|
||||||
|
this.bindingNavigatorPositionItem,
|
||||||
|
this.bindingNavigatorCountItem,
|
||||||
|
this.bindingNavigatorSeparator1,
|
||||||
|
this.bindingNavigatorMoveNextItem,
|
||||||
|
this.bindingNavigatorMoveLastItem,
|
||||||
|
this.bindingNavigatorSeparator2,
|
||||||
|
this.toolStripLabel1,
|
||||||
|
this.tbFind,
|
||||||
|
this.btfind,
|
||||||
|
this.btSelect});
|
||||||
|
this.bn.Location = new System.Drawing.Point(0, 423);
|
||||||
|
this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
|
||||||
|
this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem;
|
||||||
|
this.bn.MoveNextItem = this.bindingNavigatorMoveNextItem;
|
||||||
|
this.bn.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
|
||||||
|
this.bn.Name = "bn";
|
||||||
|
this.bn.PositionItem = this.bindingNavigatorPositionItem;
|
||||||
|
this.bn.Size = new System.Drawing.Size(768, 25);
|
||||||
|
this.bn.TabIndex = 1;
|
||||||
|
this.bn.Text = "bindingNavigator1";
|
||||||
|
//
|
||||||
|
// bindingNavigatorCountItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
|
||||||
|
this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22);
|
||||||
|
this.bindingNavigatorCountItem.Text = "/{0}";
|
||||||
|
this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수";
|
||||||
|
//
|
||||||
|
// bindingNavigatorMoveFirstItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image")));
|
||||||
|
this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
|
||||||
|
this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
|
||||||
|
this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(23, 22);
|
||||||
|
this.bindingNavigatorMoveFirstItem.Text = "처음으로 이동";
|
||||||
|
//
|
||||||
|
// bindingNavigatorMovePreviousItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image")));
|
||||||
|
this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
|
||||||
|
this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
|
||||||
|
this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 22);
|
||||||
|
this.bindingNavigatorMovePreviousItem.Text = "이전으로 이동";
|
||||||
|
//
|
||||||
|
// bindingNavigatorSeparator
|
||||||
|
//
|
||||||
|
this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
|
||||||
|
this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 25);
|
||||||
|
//
|
||||||
|
// bindingNavigatorPositionItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorPositionItem.AccessibleName = "위치";
|
||||||
|
this.bindingNavigatorPositionItem.AutoSize = false;
|
||||||
|
this.bindingNavigatorPositionItem.Font = new System.Drawing.Font("맑은 고딕", 9F);
|
||||||
|
this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
|
||||||
|
this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23);
|
||||||
|
this.bindingNavigatorPositionItem.Text = "0";
|
||||||
|
this.bindingNavigatorPositionItem.ToolTipText = "현재 위치";
|
||||||
|
//
|
||||||
|
// bindingNavigatorSeparator1
|
||||||
|
//
|
||||||
|
this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1";
|
||||||
|
this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25);
|
||||||
|
//
|
||||||
|
// bindingNavigatorMoveNextItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image")));
|
||||||
|
this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
|
||||||
|
this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
|
||||||
|
this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(23, 22);
|
||||||
|
this.bindingNavigatorMoveNextItem.Text = "다음으로 이동";
|
||||||
|
//
|
||||||
|
// bindingNavigatorMoveLastItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image")));
|
||||||
|
this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
|
||||||
|
this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
|
||||||
|
this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 22);
|
||||||
|
this.bindingNavigatorMoveLastItem.Text = "마지막으로 이동";
|
||||||
|
//
|
||||||
|
// bindingNavigatorSeparator2
|
||||||
|
//
|
||||||
|
this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
|
||||||
|
this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25);
|
||||||
|
//
|
||||||
|
// toolStripLabel1
|
||||||
|
//
|
||||||
|
this.toolStripLabel1.Name = "toolStripLabel1";
|
||||||
|
this.toolStripLabel1.Size = new System.Drawing.Size(31, 22);
|
||||||
|
this.toolStripLabel1.Text = "검색";
|
||||||
|
//
|
||||||
|
// tbFind
|
||||||
|
//
|
||||||
|
this.tbFind.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.tbFind.Font = new System.Drawing.Font("맑은 고딕", 9F);
|
||||||
|
this.tbFind.Name = "tbFind";
|
||||||
|
this.tbFind.Size = new System.Drawing.Size(200, 25);
|
||||||
|
this.tbFind.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
this.tbFind.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbFind_KeyDown);
|
||||||
|
//
|
||||||
|
// btfind
|
||||||
|
//
|
||||||
|
this.btfind.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.btfind.Image = ((System.Drawing.Image)(resources.GetObject("btfind.Image")));
|
||||||
|
this.btfind.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
|
this.btfind.Name = "btfind";
|
||||||
|
this.btfind.Size = new System.Drawing.Size(23, 22);
|
||||||
|
this.btfind.Text = "toolStripButton1";
|
||||||
|
this.btfind.Click += new System.EventHandler(this.btfind_Click);
|
||||||
|
//
|
||||||
|
// btSelect
|
||||||
|
//
|
||||||
|
this.btSelect.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||||
|
this.btSelect.Image = ((System.Drawing.Image)(resources.GetObject("btSelect.Image")));
|
||||||
|
this.btSelect.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
|
this.btSelect.Name = "btSelect";
|
||||||
|
this.btSelect.Size = new System.Drawing.Size(51, 22);
|
||||||
|
this.btSelect.Text = "선택";
|
||||||
|
this.btSelect.TextAlign = System.Drawing.ContentAlignment.TopLeft;
|
||||||
|
this.btSelect.Click += new System.EventHandler(this.btSelect_Click);
|
||||||
|
//
|
||||||
|
// fSelectDT
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(768, 448);
|
||||||
|
this.Controls.Add(this.dv1);
|
||||||
|
this.Controls.Add(this.bn);
|
||||||
|
this.KeyPreview = true;
|
||||||
|
this.Name = "fSelectDT";
|
||||||
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
|
this.Text = "fSelectDT";
|
||||||
|
this.Load += new System.EventHandler(this.fSelectDT_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dv1)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.bn)).EndInit();
|
||||||
|
this.bn.ResumeLayout(false);
|
||||||
|
this.bn.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
this.PerformLayout();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.DataGridView dv1;
|
||||||
|
private System.Windows.Forms.BindingNavigator bn;
|
||||||
|
private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
|
||||||
|
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem;
|
||||||
|
private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator;
|
||||||
|
private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1;
|
||||||
|
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem;
|
||||||
|
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2;
|
||||||
|
private System.Windows.Forms.BindingSource bs;
|
||||||
|
private System.Windows.Forms.ToolStripLabel toolStripLabel1;
|
||||||
|
private System.Windows.Forms.ToolStripTextBox tbFind;
|
||||||
|
private System.Windows.Forms.ToolStripButton btfind;
|
||||||
|
private System.Windows.Forms.ToolStripButton btSelect;
|
||||||
|
}
|
||||||
|
}
|
||||||
143
unimarc/unimarc/ListOfValue/fSelectDT.cs
Normal file
143
unimarc/unimarc/ListOfValue/fSelectDT.cs
Normal file
@@ -0,0 +1,143 @@
|
|||||||
|
using AR;
|
||||||
|
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 UniMarc.ListOfValue
|
||||||
|
{
|
||||||
|
public partial class fSelectDT : Form
|
||||||
|
{
|
||||||
|
public DataRow SelectedRow = null;
|
||||||
|
public fSelectDT(DataTable dt)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.KeyDown += (s1, e1) =>
|
||||||
|
{
|
||||||
|
if (e1.KeyCode == Keys.Escape) Close();
|
||||||
|
};
|
||||||
|
this.bs.DataSource = dt;
|
||||||
|
this.bn.BindingSource = this.bs;
|
||||||
|
this.dv1.DataSource = this.bs;
|
||||||
|
this.dv1.MultiSelect = false;
|
||||||
|
this.dv1.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
|
||||||
|
this.dv1.EditMode = DataGridViewEditMode.EditProgrammatically;
|
||||||
|
this.dv1.CellDoubleClick += Dv1_CellDoubleClick;
|
||||||
|
this.dv1.KeyDown += Dv1_KeyDown;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Dv1_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.KeyCode == Keys.Enter)
|
||||||
|
{
|
||||||
|
e.Handled = true;
|
||||||
|
e.SuppressKeyPress = true;
|
||||||
|
btSelect_Click(sender, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Dv1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.RowIndex >= 0)
|
||||||
|
{
|
||||||
|
var row = this.dv1.Rows[e.RowIndex];
|
||||||
|
if (row.DataBoundItem is DataRowView drv)
|
||||||
|
{
|
||||||
|
SelectedRow = drv.Row;
|
||||||
|
this.DialogResult = DialogResult.OK;
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fSelectDT_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Show();
|
||||||
|
Application.DoEvents();
|
||||||
|
this.dv1.AutoResizeColumns();
|
||||||
|
this.dv1.Focus();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btfind_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
find();
|
||||||
|
}
|
||||||
|
void find()
|
||||||
|
{
|
||||||
|
var search = tbFind.Text.Trim();
|
||||||
|
var filter = "";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!search.isEmpty())
|
||||||
|
{
|
||||||
|
// 검색어에서 작은따옴표 이스케이프 처리
|
||||||
|
var escapedSearch = search.Replace("'", "''");
|
||||||
|
|
||||||
|
// DataTable의 모든 컬럼에 대해 검색 필터 생성
|
||||||
|
var dt = this.bs.DataSource as DataTable;
|
||||||
|
if (dt != null && dt.Columns.Count > 0)
|
||||||
|
{
|
||||||
|
var filters = new List<string>();
|
||||||
|
foreach (DataColumn column in dt.Columns)
|
||||||
|
{
|
||||||
|
// 문자열 컬럼만 검색 (숫자나 날짜 컬럼은 Convert 사용)
|
||||||
|
if (column.DataType == typeof(string))
|
||||||
|
{
|
||||||
|
filters.Add($"ISNULL(CONVERT([{column.ColumnName}], 'System.String'), '') LIKE '%{escapedSearch}%'");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
filters.Add($"CONVERT([{column.ColumnName}], 'System.String') LIKE '%{escapedSearch}%'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// OR 조건으로 연결
|
||||||
|
filter = string.Join(" OR ", filters);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.bs.Filter = filter;
|
||||||
|
if (search.isEmpty()) tbFind.BackColor = Color.White;
|
||||||
|
else tbFind.BackColor = Color.Lime;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
this.bs.Filter = "";
|
||||||
|
tbFind.BackColor = Color.HotPink;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
tbFind.SelectAll();
|
||||||
|
tbFind.Focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btSelect_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
if (this.bs.Current == null)
|
||||||
|
{
|
||||||
|
MessageBox.Show("선택된 데이터가 없습니다.", "알림", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.bs.Current is DataRowView drv)
|
||||||
|
{
|
||||||
|
SelectedRow = drv.Row;
|
||||||
|
this.DialogResult = DialogResult.OK;
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tbFind_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.KeyCode == Keys.Enter) find();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
196
unimarc/unimarc/ListOfValue/fSelectDT.resx
Normal file
196
unimarc/unimarc/ListOfValue/fSelectDT.resx
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
<?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="bn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="bs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>171, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||||
|
wAAADsABataJCQAAATFJREFUOE9jYBg0oHDW8/9NC57/z5z4+D+6HAyEtz/AKceQO/PZ/1VH3v/HpSi+
|
||||||
|
+8H/4IZrWOXAIGPK0/8L933Aqii+5+H/pfv///evvoAhBwcJPU/+T9vyHkNRRPt9sObMWf//e5WewG1A
|
||||||
|
ZNej/72rP6AoCm29B9bcuu7/f//Ov/9d8g/gNiCw+eH/uvnv4IqCW+7+X7T3//+Odf//Z8z5+d+u7ud/
|
||||||
|
+4ztuA3wqLr/P3/aGxRFdsW3/6fP+f3fv+vbf53Cd/8tEtbjNsC+9O7/7MmvMRTpp5z/b1L04r9K1qf/
|
||||||
|
xpHLcBtgkXfnf2r/a6yKDJJO/JdN+/pfN3gehhwcGGbd/h/W8hKnIv3Uy/81fKdhlQMDnbQb//2qH+JV
|
||||||
|
pOIxAaccg1Pulf8gBXgVDUoAAPB2wKtYlLYeAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="bindingNavigatorMovePreviousItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||||
|
wAAADsABataJCQAAALtJREFUOE9jYBgyILz9wX90MaJBfPeD/8EN18gzIL7n4f+l+///96++QLoBEe33
|
||||||
|
wZozZ/3/71V6gjQDQlvvgTW3rvv/37/z73+X/APEGxDccvf/or3//3es+/8/Y87P/3Z1P//bZ2wn3gAQ
|
||||||
|
sCu+/T99zu///l3f/usUvvtvkbCeNANAQD/l/H+Tohf/VbI+/TeOXEa6ASBgkHTiv2za1/+6wfPIMwAE
|
||||||
|
9FMv/9fwnUa+ASCg4jGBMgMGLwAA0BRgmCws/7cAAAAASUVORK5CYII=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="bindingNavigatorMoveNextItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||||
|
wAAADsABataJCQAAAKRJREFUOE9jYBh0oHDW8//oYiSB3JnP/id03yPfkIwpT//P2//7f0LXHfIMSeh5
|
||||||
|
8n/2vl//O7f+/e9Wepl0QyK7Hv2fsu3X/5Klf/8nTP/73yb3LGmGBDY//N+69j1Ys3HJl//S0df+G0cu
|
||||||
|
I94Qj6r7/0vmvoNrVnTpIV4zCNiX3v0f2PKMPM0gYJF3579NwRXyNIOAYdZt8jWDgE7aDfI1D00AAKB+
|
||||||
|
X6Bjq5qXAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="bindingNavigatorMoveLastItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||||
|
wAAADsABataJCQAAAStJREFUOE9jYBhUoHDW8//oYjAAkmta8Px/5sTHONUw5M589j+h+x5WBSC5VUfe
|
||||||
|
/w9vf4BVHgwypjz9P2//7/8JXXcwFIHkFu778D+44RqGHBwk9Dz5P3vfr/+dW//+dyu9jKIQJDdty/v/
|
||||||
|
/tUXcBsQ2fXo/5Rtv/6XLP37P2H63/82uWfhikFyvas//PcqPYHbgMDmh/9b174HazYu+fJfOvraf+PI
|
||||||
|
ZWANILm6+e/+u+QfwG2AR9X9/yVz38E1K7r0wBWD5PKnvflvn7EdtwH2pXf/B7Y8w9AMk8ue/Pq/RcJ6
|
||||||
|
3AZY5N35b1NwBUMzTC61/zXcS1iBYdZtrJpBACQX1vLyv27wPKzyYKCTdgOnJEjOr/rhfw3faTjV4AVO
|
||||||
|
uVf+q3hMAGN0uYEFAL7Rv7NmXVYYAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="btfind.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIqSURBVDhPY2AYdKCxf9ajJRv2/G+dOPc/iD95wTowOzQ2
|
||||||
|
+Ra6WqygrLHv0bodh/+HxqaCDcgoqvnfN3vF/8b+2U/Q1aKApOyS/13Tl/yv7Zz6v23S/P8mlnZgAxzc
|
||||||
|
fP5nldT9L6hqBYtZ2bks19LS4mFgYGACa5w/fz9HYXWbR1PfbLBTC6vb/nv4h/138Qr4n1PW8D82Le9/
|
||||||
|
RE7T/9qJy/6XtEwBy3Fx8VQxMDAwgg2or9/PMmX+uoeL1u36n1veBMbVE1f9n7J81/+eJVt/NU7f8L+2
|
||||||
|
d/7/6Nzm/+HJhWAXMrOwPGBgYGAGGzBz5kxWkM3TFm/8n11a/x/k55Tc8v/RyTn/1bT0wDaCXAITj0sv
|
||||||
|
AHntHwMDAyvYgLS0NFaf4JifFrZO/70CI/4bW9j+19Y3/i+toPRUVFTUQFJGdquYhNR/BSXV/6Likv95
|
||||||
|
+fj/MzIyvoOHAQh4BUUdBgXcrsNn/q/acuB/94xl/40t7VaA5FTUdVZUtkz4v3bHIbAcKEb4+PgPwzWD
|
||||||
|
gItX4J/8imawAWkFlf/jMwr/6xqbXwXJKSiqXgXFAMiA1PyK/+mF1f85OLn+oBjg6O77H2YATJGatv5P
|
||||||
|
UEiLSUq/AwUczABQWLCysoGjGA6sHd3A8QxKQCAFoMDUNTL7L6ikxK+gqnYFZAAolmByjIyMqAaAEoiB
|
||||||
|
iSU48FQ1df4rqqj/l5ZV+C8sLCzFwy94m5OL+z8bOzso+kAaYXiQAABSzSGsYv7dkQAAAABJRU5ErkJg
|
||||||
|
gg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="btSelect.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGTSURBVDhP1c/bL4JxHMfx5w79E27c2zwZ5RCzsZRDeYaS
|
||||||
|
iiLimdksPTr8OqiGOTyXrCXn2XJYdIHZXMoh428w/wT6WLbaCi3uvC5/v+/7d6Cof6d7o41XBltJ7npB
|
||||||
|
UjF7YsDokQ5SvpHL3c+LCcv48egglh898F3PQL/bg/rZKlvu3LeYkIw3H+ux+ODGwgPBwF4vGnwiSIik
|
||||||
|
ODNkPtc1mWLqoaySoihlSMannjyfIJhLOD9vrnFVvmXHF/21xlPNC3fFQhthJjJxUMqPHGoxd+9A4N4O
|
||||||
|
3U43xESYHY+eaZuNMdWzP85hMeGCervjjQm3T3SuSRdMBxr47+zw3XLo32YgInR2nDK5z5QYjlWwXI5h
|
||||||
|
5WkWvvgMzFE92FMDvHErPLdWaLa6IHYI37/EacNRuUC9qwAbM3z+M3Bng/vGAnfcAvWmEmKnMPljnCZf
|
||||||
|
lQsUa1IYI33w3EzDeT0FVVgBkYNOSkhp/jgtdUjLUgM0Wwx61jtQba8oPE6TE1pQ561CJVf+WsaWFeXu
|
||||||
|
F4QmtODP8W99AIUYxS+0cG7HAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
@@ -1531,7 +1531,7 @@ namespace WindowsFormsApp1
|
|||||||
{
|
{
|
||||||
master_batch_Processing = new Batch_processing(this);
|
master_batch_Processing = new Batch_processing(this);
|
||||||
master_batch_Processing.MdiParent = this;
|
master_batch_Processing.MdiParent = this;
|
||||||
master_batch_Processing.WindowState = FormWindowState.Maximized;
|
//master_batch_Processing.WindowState = FormWindowState.Maximized;
|
||||||
master_batch_Processing.FormClosed += (o, ea) => master_batch_Processing = null;
|
master_batch_Processing.FormClosed += (o, ea) => master_batch_Processing = null;
|
||||||
master_batch_Processing.Show();
|
master_batch_Processing.Show();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,14 +30,9 @@ namespace WindowsFormsApp1
|
|||||||
Application.Run(new Main());
|
Application.Run(new Main());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void DB_InitSetting()
|
static void DB_InitSetting()
|
||||||
{
|
{
|
||||||
UniMarc.Properties.Settings.Default.IP = ConvertIP(UniMarc.Properties.Settings.Default.IP);
|
UniMarc.Properties.Settings.Default.IP = ConvertIP(UniMarc.Properties.Settings.Default.IP);
|
||||||
UniMarc.Properties.Settings.Default.Port = Convert2to10(UniMarc.Properties.Settings.Default.Port);
|
UniMarc.Properties.Settings.Default.Port = Convert2to10(UniMarc.Properties.Settings.Default.Port);
|
||||||
UniMarc.Properties.Settings.Default.Uid = ConvertAscii(UniMarc.Properties.Settings.Default.Uid);
|
UniMarc.Properties.Settings.Default.Uid = ConvertAscii(UniMarc.Properties.Settings.Default.Uid);
|
||||||
UniMarc.Properties.Settings.Default.pwd = ConvertAscii(UniMarc.Properties.Settings.Default.pwd);
|
UniMarc.Properties.Settings.Default.pwd = ConvertAscii(UniMarc.Properties.Settings.Default.pwd);
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||||
// 기본값으로 할 수 있습니다.
|
// 기본값으로 할 수 있습니다.
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2025.08.14.1630")]
|
[assembly: AssemblyVersion("2025.11.07.0000")]
|
||||||
[assembly: AssemblyFileVersion("2025.08.14.1630")]
|
[assembly: AssemblyFileVersion("2025.11.07.0000")]
|
||||||
|
|||||||
@@ -397,8 +397,10 @@ namespace BokBonCheck
|
|||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// SearchAsync에서 PageSource 가져오기
|
||||||
var resultCount = ExtractBookCount(_driver, searchTerm, out string ermsg);
|
var htmlContent = _driver.PageSource;
|
||||||
|
var resultCount = ExtractBookCount(htmlContent, out string ermsg, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
result.BookCount = 0;
|
result.BookCount = 0;
|
||||||
@@ -423,128 +425,40 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(IWebDriver driver, string searchTerm, out string errmessage)
|
private int ExtractBookCount(string htmlContent, out string errmessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errmessage = string.Empty;
|
errmessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
if (driver.Url.EndsWith("DetailSearchResult") == false)
|
|
||||||
{
|
|
||||||
errmessage = "결과페이지가아님";
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 1. 검색결과가 없는 경우 확인
|
// 검색 결과가 없다는 메시지 확인
|
||||||
try
|
var noResultPatterns = new[]
|
||||||
{
|
{
|
||||||
var noResultElements = driver.FindElements(By.XPath("//*[contains(text(), '검색결과가 없습니다') or contains(text(), '검색된 자료가 없습니다')]"));
|
@"검색결과가 없습니다",
|
||||||
if (noResultElements.Count > 0)
|
@"검색된 자료가 없습니다",
|
||||||
|
@"자료가 없습니다",
|
||||||
|
@"총 0 건",
|
||||||
|
@"총 0건"
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var pattern in noResultPatterns)
|
||||||
|
{
|
||||||
|
if (htmlContent.Contains(pattern))
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
return 0;
|
var match = System.Text.RegularExpressions.Regex.Match(htmlContent, pattern);
|
||||||
}
|
if (match.Success)
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// 검색결과가 있는 경우로 진행
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
RetryPoint:
|
|
||||||
bool retry = false;
|
|
||||||
// 2. 안산시 도서관 특화: span.count.gothic em 요소에서 직접 추출
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
var countElement = driver.FindElement(By.CssSelector("span.count.gothic em"));
|
|
||||||
if (countElement != null)
|
|
||||||
{
|
|
||||||
// Text 대신 InnerHtml이나 GetAttribute 사용해보기
|
|
||||||
var countText = countElement.Text.Trim();
|
|
||||||
var innerHTML = countElement.GetAttribute("innerHTML");
|
|
||||||
var outerHTML = countElement.GetAttribute("outerHTML");
|
|
||||||
|
|
||||||
Console.WriteLine($"count 요소 .Text: '{countText}'");
|
|
||||||
Console.WriteLine($"count 요소 innerHTML: '{innerHTML}'");
|
|
||||||
Console.WriteLine($"count 요소 outerHTML: '{outerHTML}'");
|
|
||||||
|
|
||||||
// innerHTML이나 outerHTML에서 텍스트 추출 시도
|
|
||||||
string textToUse = !string.IsNullOrEmpty(countText) ? countText : innerHTML;
|
|
||||||
if (string.IsNullOrEmpty(textToUse))
|
|
||||||
{
|
{
|
||||||
textToUse = outerHTML;
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
}
|
|
||||||
|
|
||||||
Console.WriteLine($"추출할 텍스트: '{textToUse}'");
|
|
||||||
|
|
||||||
// "총 0 건 " 형태에서 숫자 추출
|
|
||||||
var match = Regex.Match(textToUse, @"총\s*(\d+)\s*건", RegexOptions.IgnoreCase);
|
|
||||||
if (match.Success && int.TryParse(match.Groups[1].Value, out int count))
|
|
||||||
{
|
|
||||||
if (count == 0)
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
Console.WriteLine("검색 결과: 0건");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
errmessage = $"검색성공({count}권)";
|
|
||||||
Console.WriteLine($"검색 결과: {count}건");
|
|
||||||
return count;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.WriteLine($"정규식 매칭 실패: '{textToUse}'");
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex1)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"span.count.gothic em 요소 추출 실패: {ex1.Message}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. span.count 전체에서 추출 시도
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var countSpan = driver.FindElement(By.CssSelector("span.count"));
|
|
||||||
if (countSpan != null)
|
|
||||||
{
|
|
||||||
var fullText = countSpan.Text.Trim();
|
|
||||||
Console.WriteLine($"count span 전체 텍스트: '{fullText}'");
|
|
||||||
|
|
||||||
var match = Regex.Match(fullText, @"총\s*(\d+)\s*건", RegexOptions.IgnoreCase);
|
|
||||||
if (match.Success && int.TryParse(match.Groups[1].Value, out int count))
|
|
||||||
{
|
|
||||||
if (count == 0)
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
errmessage = $"검색성공({count}권)";
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex2)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"span.count 요소 추출 실패: {ex2.Message}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. 페이지 소스에서 정규식으로 추출 시도
|
|
||||||
var pageSource = driver.PageSource;
|
|
||||||
|
|
||||||
// 검색 결과가 없다는 메시지 확인
|
|
||||||
if (pageSource.Contains("검색결과가 없습니다") ||
|
|
||||||
pageSource.Contains("검색된 자료가 없습니다") ||
|
|
||||||
pageSource.Contains("자료가 없습니다") ||
|
|
||||||
pageSource.Contains("총 0 건") ||
|
|
||||||
pageSource.Contains("총 0건"))
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// HTML에서 다양한 패턴 찾기 (안산시 도서관 특화)
|
// HTML에서 다양한 패턴 찾기 (안산시 도서관 특화)
|
||||||
var htmlPatterns = new[]
|
var htmlPatterns = new[]
|
||||||
@@ -560,11 +474,14 @@ namespace BokBonCheck
|
|||||||
|
|
||||||
foreach (var pattern in htmlPatterns)
|
foreach (var pattern in htmlPatterns)
|
||||||
{
|
{
|
||||||
var match = Regex.Match(pageSource, pattern, RegexOptions.IgnoreCase);
|
var match = Regex.Match(htmlContent, pattern, RegexOptions.IgnoreCase);
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
if (int.TryParse(match.Groups[1].Value, out int count))
|
||||||
{
|
{
|
||||||
|
// 매칭된 부분과 상위 태그 추출하여 resulthtml에 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
@@ -576,28 +493,81 @@ namespace BokBonCheck
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (retry == false)
|
errmessage = "결과수량을찾을수없음";
|
||||||
{
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
Console.WriteLine( "결과를 찾을 수 없어 재시도");
|
return -1;
|
||||||
retry = true;
|
|
||||||
Task.Delay(1000);
|
|
||||||
goto RetryPoint;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
errmessage = "결과수량을찾을수없음";
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errmessage = ex.Message;
|
errmessage = ex.Message;
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
public async Task WaitForPageChange(WebDriverWait wait)
|
public async Task WaitForPageChange(WebDriverWait wait)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ namespace BokBonCheck
|
|||||||
public DateTime SearchTime { get; set; }
|
public DateTime SearchTime { get; set; }
|
||||||
public string ErrorMessage { get; set; }
|
public string ErrorMessage { get; set; }
|
||||||
public bool IsSuccess { get; set; }
|
public bool IsSuccess { get; set; }
|
||||||
|
|
||||||
|
public string Resulthtml { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class BookSearchService
|
public class BookSearchService
|
||||||
|
|||||||
@@ -244,8 +244,9 @@ namespace BokBonCheck
|
|||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
var htmlContent = _driver.PageSource;
|
||||||
var resultCount = ExtractBookCount(_driver, searchTerm, out string ermsg);
|
var resultCount = ExtractBookCount(htmlContent, out string ermsg, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
result.BookCount = 0;
|
result.BookCount = 0;
|
||||||
@@ -270,73 +271,39 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(IWebDriver driver, string searchTerm, out string errmessage)
|
private int ExtractBookCount(string htmlContent, out string errmessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errmessage = string.Empty;
|
errmessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 1. totalCount 요소에서 직접 추출 시도
|
// 검색 결과가 없다는 메시지 확인
|
||||||
try
|
var noResultPatterns = new[]
|
||||||
{
|
{
|
||||||
var totalCountElement = driver.FindElement(By.CssSelector("p.totalCount"));
|
@"검색결과가 없습니다",
|
||||||
if (totalCountElement != null)
|
@"검색된 자료가 없습니다",
|
||||||
{
|
@"자료가 없습니다",
|
||||||
// strong 태그에서 직접 숫자 추출 시도
|
@"전체 0 건"
|
||||||
try
|
};
|
||||||
{
|
|
||||||
var strongElement = totalCountElement.FindElement(By.TagName("strong"));
|
|
||||||
if (strongElement != null)
|
|
||||||
{
|
|
||||||
var countText = strongElement.Text.Trim();
|
|
||||||
if (int.TryParse(countText, out int strongCount))
|
|
||||||
{
|
|
||||||
if (strongCount == 0)
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
errmessage = $"검색성공({strongCount}권)";
|
|
||||||
return strongCount;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
|
|
||||||
// 전체 텍스트에서 정규식으로 추출
|
foreach (var pattern in noResultPatterns)
|
||||||
var totalCountText = totalCountElement.Text;
|
{
|
||||||
var match = Regex.Match(totalCountText, @"전체\s*(\d+)\s*건", RegexOptions.IgnoreCase);
|
if (htmlContent.Contains(pattern))
|
||||||
|
{
|
||||||
|
errmessage = "검색결과없음";
|
||||||
|
var match = System.Text.RegularExpressions.Regex.Match(htmlContent, pattern);
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
{
|
|
||||||
if (count == 0)
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
errmessage = $"검색성공({count}권)";
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"totalCount 요소 검색 중 오류: {ex.Message}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. 페이지 소스에서 정규식으로 추출 시도
|
|
||||||
var pageSource = driver.PageSource;
|
|
||||||
|
|
||||||
// 검색 결과가 없다는 메시지 확인
|
|
||||||
if (pageSource.Contains("검색결과가 없습니다") ||
|
|
||||||
pageSource.Contains("검색된 자료가 없습니다") ||
|
|
||||||
pageSource.Contains("자료가 없습니다") ||
|
|
||||||
pageSource.Contains("전체 0 건"))
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// HTML에서 다양한 패턴 찾기
|
// HTML에서 다양한 패턴 찾기
|
||||||
var htmlPatterns = new[]
|
var htmlPatterns = new[]
|
||||||
@@ -350,11 +317,14 @@ namespace BokBonCheck
|
|||||||
|
|
||||||
foreach (var pattern in htmlPatterns)
|
foreach (var pattern in htmlPatterns)
|
||||||
{
|
{
|
||||||
var match = Regex.Match(pageSource, pattern, RegexOptions.IgnoreCase);
|
var match = Regex.Match(htmlContent, pattern, RegexOptions.IgnoreCase);
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
if (int.TryParse(match.Groups[1].Value, out int count))
|
||||||
{
|
{
|
||||||
|
// 매칭된 부분과 상위 태그 추출하여 resulthtml에 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
@@ -367,16 +337,80 @@ namespace BokBonCheck
|
|||||||
}
|
}
|
||||||
|
|
||||||
errmessage = "결과수량을찾을수없음";
|
errmessage = "결과수량을찾을수없음";
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errmessage = ex.Message;
|
errmessage = ex.Message;
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
public async Task WaitForPageChange(WebDriverWait wait)
|
public async Task WaitForPageChange(WebDriverWait wait)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace BokBonCheck
|
|||||||
// 브라우저와 유사한 헤더 추가
|
// 브라우저와 유사한 헤더 추가
|
||||||
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
||||||
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
||||||
request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
//request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
||||||
request.Headers.Add("Connection", "keep-alive");
|
request.Headers.Add("Connection", "keep-alive");
|
||||||
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
||||||
|
|
||||||
@@ -84,7 +84,8 @@ namespace BokBonCheck
|
|||||||
var htmlContent = await response.Content.ReadAsStringAsync();
|
var htmlContent = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(htmlContent, out string errorMessage);
|
var resultCount = ExtractBookCount(htmlContent, out string errorMessage, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
|
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
@@ -112,19 +113,21 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(string htmlContent, out string errorMessage)
|
private int ExtractBookCount(string htmlContent, out string errorMessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errorMessage = string.Empty;
|
errorMessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 1. 검색 결과가 없는 경우 확인
|
// 1. 검색 결과가 없는 경우 확인
|
||||||
if (htmlContent.Contains("검색결과가 없습니다") ||
|
if (htmlContent.Contains("검색결과가 없습니다") ||
|
||||||
htmlContent.Contains("검색된 자료가 없습니다") ||
|
htmlContent.Contains("검색된 자료가 없습니다") ||
|
||||||
htmlContent.Contains("자료가 없습니다") ||
|
htmlContent.Contains("자룼가 없습니다") ||
|
||||||
htmlContent.Contains("<strong>0</strong> Results:"))
|
htmlContent.Contains("<strong>0</strong> Results:"))
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = "검색결과없음";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,8 +150,11 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
Console.WriteLine($"조선이공대학교도서관 검색 결과: {count}건");
|
Console.WriteLine($"조선이공대학교도서관 검색 결과: {count}건");
|
||||||
return count;
|
return count;
|
||||||
@@ -173,8 +179,10 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
Console.WriteLine($"조선이공대학교도서관 검색 결과: {count}건");
|
Console.WriteLine($"조선이공대학교도서관 검색 결과: {count}건");
|
||||||
return count;
|
return count;
|
||||||
@@ -182,13 +190,16 @@ namespace BokBonCheck
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 패턴을 찾지 못한 경우
|
||||||
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
Console.WriteLine("조선이공대학교도서관 검색결과 패턴을 찾을 수 없음");
|
Console.WriteLine("조선이공대학교도서관 검색결과 패턴을 찾을 수 없음");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errorMessage = $"결과 분석 오류: {ex.Message}";
|
errorMessage = $"결과 분석 오류: {ex.Message}";
|
||||||
|
resulthtml = "결과 분석 오류: " + ex.Message;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -197,5 +208,67 @@ namespace BokBonCheck
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -69,7 +69,7 @@ namespace BokBonCheck
|
|||||||
// 브라우저와 유사한 헤더 추가
|
// 브라우저와 유사한 헤더 추가
|
||||||
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
||||||
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
||||||
request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
//request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
||||||
request.Headers.Add("Connection", "keep-alive");
|
request.Headers.Add("Connection", "keep-alive");
|
||||||
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
||||||
|
|
||||||
@@ -84,7 +84,8 @@ namespace BokBonCheck
|
|||||||
var htmlContent = await response.Content.ReadAsStringAsync();
|
var htmlContent = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(htmlContent, out string errorMessage);
|
var resultCount = ExtractBookCount(htmlContent, out string errorMessage, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
|
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
@@ -112,9 +113,10 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(string htmlContent, out string errorMessage)
|
private int ExtractBookCount(string htmlContent, out string errorMessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errorMessage = string.Empty;
|
errorMessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -125,6 +127,7 @@ namespace BokBonCheck
|
|||||||
htmlContent.Contains("총 <strong>0</strong>건"))
|
htmlContent.Contains("총 <strong>0</strong>건"))
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = "검색결과없음";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -147,8 +150,11 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
Console.WriteLine($"조선대학교중앙도서관 검색 결과: {count}건");
|
Console.WriteLine($"조선대학교중앙도서관 검색 결과: {count}건");
|
||||||
return count;
|
return count;
|
||||||
@@ -173,8 +179,11 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
Console.WriteLine($"조선대학교중앙도서관 검색 결과: {count}건");
|
Console.WriteLine($"조선대학교중앙도서관 검색 결과: {count}건");
|
||||||
return count;
|
return count;
|
||||||
@@ -182,13 +191,16 @@ namespace BokBonCheck
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 패턴을 찾지 못한 경우
|
||||||
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
Console.WriteLine("조선대학교중앙도서관 검색결과 패턴을 찾을 수 없음");
|
Console.WriteLine("조선대학교중앙도서관 검색결과 패턴을 찾을 수 없음");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errorMessage = $"결과 분석 오류: {ex.Message}";
|
errorMessage = $"결과 분석 오류: {ex.Message}";
|
||||||
|
resulthtml = "결과 분석 오류: " + ex.Message;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -197,5 +209,67 @@ namespace BokBonCheck
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,6 +13,7 @@ using UniMarc.마크;
|
|||||||
using OpenQA.Selenium.Chromium;
|
using OpenQA.Selenium.Chromium;
|
||||||
using UniMarc.SearchModel;
|
using UniMarc.SearchModel;
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
using AR;
|
||||||
|
|
||||||
namespace BokBonCheck
|
namespace BokBonCheck
|
||||||
{
|
{
|
||||||
@@ -169,6 +170,11 @@ namespace BokBonCheck
|
|||||||
if (_driver.Url.EndsWith("/bookMain") == false)
|
if (_driver.Url.EndsWith("/bookMain") == false)
|
||||||
{
|
{
|
||||||
retrycnt += 1;
|
retrycnt += 1;
|
||||||
|
if (retrycnt > 3)
|
||||||
|
{
|
||||||
|
UTIL.MsgE("3회 연속 로그인 시도로 인해 자동 로그인을 중단합니다\n사용자가 직접 로그인을 하세요");
|
||||||
|
break;
|
||||||
|
}
|
||||||
Console.WriteLine($"도서검색화면으로 이동({retrycnt})");
|
Console.WriteLine($"도서검색화면으로 이동({retrycnt})");
|
||||||
_driver.Navigate().GoToUrl(this.SiteUrl);
|
_driver.Navigate().GoToUrl(this.SiteUrl);
|
||||||
wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(15));
|
wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(15));
|
||||||
@@ -190,6 +196,8 @@ namespace BokBonCheck
|
|||||||
this.SCHOOL = schoolname;
|
this.SCHOOL = schoolname;
|
||||||
this.STYPE = searchtype;
|
this.STYPE = searchtype;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string BookMainURL = string.Empty;
|
||||||
public async Task<BookSearchResult> SearchAsync(string searchTerm)
|
public async Task<BookSearchResult> SearchAsync(string searchTerm)
|
||||||
{
|
{
|
||||||
var result = new BookSearchResult
|
var result = new BookSearchResult
|
||||||
@@ -247,6 +255,19 @@ namespace BokBonCheck
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(BookMainURL))
|
||||||
|
{
|
||||||
|
BookMainURL = _driver.Url;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//확실하게 하기위해 메인페이지로 다시 이동한다.
|
||||||
|
_driver.Navigate().GoToUrl(this.SiteUrl);
|
||||||
|
new WebDriverWait(_driver, TimeSpan.FromSeconds(15));
|
||||||
|
await Task.Delay(500);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 페이지 로딩 대기
|
// 페이지 로딩 대기
|
||||||
var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(15));
|
var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(15));
|
||||||
|
|
||||||
@@ -378,23 +399,24 @@ namespace BokBonCheck
|
|||||||
{
|
{
|
||||||
SafeClick(buttomelm);
|
SafeClick(buttomelm);
|
||||||
var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(15));
|
var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(15));
|
||||||
Thread.Sleep(200);
|
Thread.Sleep(500);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine(ex.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine(ex.Message);
|
||||||
}
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -422,7 +444,7 @@ namespace BokBonCheck
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Console.WriteLine(ex.Message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
367
unimarc/unimarc/SearchModel/GochangLibSearcher.cs
Normal file
367
unimarc/unimarc/SearchModel/GochangLibSearcher.cs
Normal file
@@ -0,0 +1,367 @@
|
|||||||
|
using System;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using OpenQA.Selenium;
|
||||||
|
using OpenQA.Selenium.Chrome;
|
||||||
|
using OpenQA.Selenium.Support.UI;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using WebDriverManager;
|
||||||
|
using WebDriverManager.DriverConfigs.Impl;
|
||||||
|
using System.IO;
|
||||||
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Threading;
|
||||||
|
using UniMarc.마크;
|
||||||
|
using OpenQA.Selenium.Chromium;
|
||||||
|
using UniMarc.SearchModel;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using AR;
|
||||||
|
|
||||||
|
namespace BokBonCheck
|
||||||
|
{
|
||||||
|
public class GochangLibSearcher : ILibrarySearcher
|
||||||
|
{
|
||||||
|
public string AreaCode { get; set; } = string.Empty;
|
||||||
|
public string SiteName { get; protected set; }
|
||||||
|
public string SiteUrl => "https://libsearch.gochang.go.kr:8443/book/bookAdvancedSearch";
|
||||||
|
public bool HttpApiMode { get; set; } = false;
|
||||||
|
|
||||||
|
public int No { get; set; }
|
||||||
|
|
||||||
|
private ChromiumDriver _driver;
|
||||||
|
|
||||||
|
public GochangLibSearcher(int no, string areaCode, string areaName)
|
||||||
|
{
|
||||||
|
this.No = no;
|
||||||
|
this.AreaCode = areaCode;
|
||||||
|
this.SiteName = $"고창군립({areaName})";
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StopDriver()
|
||||||
|
{
|
||||||
|
if (_driver != null)
|
||||||
|
{
|
||||||
|
_driver.Quit();
|
||||||
|
_driver.Dispose();
|
||||||
|
_driver = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task StartDriver(bool showdriver = false)
|
||||||
|
{
|
||||||
|
if (_driver == null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (SeleniumHelper.IsReady == false) await SeleniumHelper.Download();
|
||||||
|
_driver = await SeleniumHelper.CreateDriver(ShowBrowser: showdriver);
|
||||||
|
Console.WriteLine("GochangLibSearcher Driver 초기화 완료");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"GochangLibSearcher Driver 초기화 실패: {ex.Message}");
|
||||||
|
throw new InvalidOperationException($"GochangLibSearcher Driver 초기화에 실패했습니다: {ex.Message}", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual protected bool SelectLibrary(WebDriverWait wait)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(AreaCode))
|
||||||
|
{
|
||||||
|
var libSelect = wait.Until(d => d.FindElement(By.Id("MANAGE_CODE")));
|
||||||
|
var selectElement = new SelectElement(libSelect);
|
||||||
|
selectElement.SelectByValue(AreaCode);
|
||||||
|
Thread.Sleep(300);
|
||||||
|
Console.WriteLine($"{AreaCode} 도서관으로 선택됨");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Console.WriteLine("전체 도서관으로 검색");
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"도서관 선택 실패: {ex.Message}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<BookSearchResult> SearchAsync(string searchTerm)
|
||||||
|
{
|
||||||
|
var result = new BookSearchResult
|
||||||
|
{
|
||||||
|
SiteName = SiteName,
|
||||||
|
SearchTerm = searchTerm,
|
||||||
|
SearchTime = DateTime.Now
|
||||||
|
};
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (_driver == null)
|
||||||
|
{
|
||||||
|
await StartDriver();
|
||||||
|
}
|
||||||
|
|
||||||
|
var cururl = _driver.Url;
|
||||||
|
if (cururl.Equals(SiteUrl) == false)
|
||||||
|
_driver.Navigate().GoToUrl(SiteUrl);
|
||||||
|
|
||||||
|
var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(15));
|
||||||
|
|
||||||
|
if (SelectLibrary(wait) == false)
|
||||||
|
{
|
||||||
|
result.ErrorMessage = "도서관선택실패";
|
||||||
|
result.BookCount = -1;
|
||||||
|
result.IsSuccess = false;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var titleInput = wait.Until(d => d.FindElement(By.Id("title")));
|
||||||
|
titleInput.Clear();
|
||||||
|
titleInput.SendKeys(searchTerm);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
result.ErrorMessage = $"검색어입력실패({ex.Message})";
|
||||||
|
result.BookCount = -1;
|
||||||
|
result.IsSuccess = false;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var jsExecutor = (IJavaScriptExecutor)_driver;
|
||||||
|
jsExecutor.ExecuteScript("fn_openBookAdvancedSearch();");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
result.ErrorMessage = $"검색실행실패({ex.Message})";
|
||||||
|
result.BookCount = -1;
|
||||||
|
result.IsSuccess = false;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
||||||
|
|
||||||
|
// SearchAsync에서 PageSource 가져오기
|
||||||
|
var htmlContent = _driver.PageSource;
|
||||||
|
var resultCount = ExtractBookCount(htmlContent, out string ermsg, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
|
if (resultCount == -1)
|
||||||
|
{
|
||||||
|
result.BookCount = 0;
|
||||||
|
result.IsSuccess = false;
|
||||||
|
result.ErrorMessage = ermsg;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.BookCount = resultCount;
|
||||||
|
result.IsSuccess = true;
|
||||||
|
result.ErrorMessage = ermsg;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
result.IsSuccess = false;
|
||||||
|
result.ErrorMessage = ex.Message;
|
||||||
|
result.BookCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int ExtractBookCount(string htmlContent, out string errmessage, out string resulthtml)
|
||||||
|
{
|
||||||
|
errmessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var noResultPatterns = new[]
|
||||||
|
{
|
||||||
|
@"검색된 도서가 없습니다",
|
||||||
|
@"검색결과가 없습니다",
|
||||||
|
@"검색된 자료가 없습니다"
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var pattern in noResultPatterns)
|
||||||
|
{
|
||||||
|
if (htmlContent.Contains(pattern))
|
||||||
|
{
|
||||||
|
errmessage = "검색결과없음";
|
||||||
|
// 검색결과 없음 메시지를 포함한 HTML 조각 추출
|
||||||
|
var index = htmlContent.IndexOf(pattern);
|
||||||
|
if (index >= 0)
|
||||||
|
{
|
||||||
|
var startIndex = Math.Max(0, index - 100);
|
||||||
|
var endIndex = Math.Min(htmlContent.Length, index + pattern.Length + 100);
|
||||||
|
resulthtml = htmlContent.Substring(startIndex, endIndex - startIndex);
|
||||||
|
|
||||||
|
// 상위 태그 찾기 시도
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var match = System.Text.RegularExpressions.Regex.Match(htmlContent, pattern);
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// 실패시 기본 추출 결과 사용
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
resulthtml = pattern;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var htmlPatterns = new[]
|
||||||
|
{
|
||||||
|
@"<span[^>]*class=""bluecolor""[^>]*>총\s*(\d+)건</span>",
|
||||||
|
@"총\s*<span[^>]*class=""bluecolor""[^>]*>(\d+)</span>건",
|
||||||
|
@"총\s*(\d+)건"
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var pattern in htmlPatterns)
|
||||||
|
{
|
||||||
|
var match = Regex.Match(htmlContent, pattern, RegexOptions.IgnoreCase);
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
if (int.TryParse(match.Groups[1].Value, out int count))
|
||||||
|
{
|
||||||
|
// 매칭된 부분과 상위 태그 추출하여 resulthtml에 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
|
errmessage = "검색결과없음";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
errmessage = $"검색성공({count}권)";
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
errmessage = "결과수량을찾을수없음";
|
||||||
|
resulthtml = "결과수량을찾을수없음";
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
errmessage = ex.Message;
|
||||||
|
resulthtml = "ExtractBookCount 오류: " + ex.Message;
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task WaitForPageChange(WebDriverWait wait)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
await Task.Delay(500);
|
||||||
|
|
||||||
|
wait.Until(d =>
|
||||||
|
{
|
||||||
|
var readyState = ((IJavaScriptExecutor)d).ExecuteScript("return document.readyState");
|
||||||
|
return readyState.Equals("complete");
|
||||||
|
});
|
||||||
|
|
||||||
|
wait.Until(d =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var pageSource = d.PageSource;
|
||||||
|
return pageSource.Contains("검색결과입니다") ||
|
||||||
|
pageSource.Contains("총") ||
|
||||||
|
pageSource.Contains("건") ||
|
||||||
|
pageSource.Contains("검색된 도서가 없습니다");
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
await Task.Delay(3000);
|
||||||
|
Console.WriteLine($"페이지 변경 감지 실패: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -218,8 +218,9 @@ namespace BokBonCheck
|
|||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
var htmlContent = _driver.PageSource;
|
||||||
var resultCount = ExtractBookCount(_driver, searchTerm, out string ermsg);
|
var resultCount = ExtractBookCount(htmlContent, out string ermsg, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
result.BookCount = 0;
|
result.BookCount = 0;
|
||||||
@@ -244,67 +245,21 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(IWebDriver driver, string searchTerm, out string errmessage)
|
private int ExtractBookCount(string htmlContent, out string errmessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errmessage = string.Empty;
|
errmessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 1. 먼저 totalCount 요소에서 직접 추출 시도
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var totalCountElement = driver.FindElement(By.CssSelector("p.totalCount"));
|
|
||||||
if (totalCountElement != null)
|
|
||||||
{
|
|
||||||
var totalCountText = totalCountElement.Text; // 예: "전체 1 건"
|
|
||||||
var match = Regex.Match(totalCountText, @"전체\s+(\d+)\s+건", RegexOptions.IgnoreCase);
|
|
||||||
if (match.Success)
|
|
||||||
{
|
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
|
||||||
{
|
|
||||||
if (count == 0)
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
errmessage = $"검색성공({count}권)";
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// strong 태그에서 직접 숫자 추출 시도
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var strongElement = totalCountElement.FindElement(By.TagName("strong"));
|
|
||||||
if (strongElement != null && int.TryParse(strongElement.Text, out int strongCount))
|
|
||||||
{
|
|
||||||
if(strongCount == 0)
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
errmessage = $"검색성공({strongCount}권)";
|
|
||||||
return strongCount;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"totalCount 요소 검색 중 오류: {ex.Message}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. 페이지 소스에서 정규식으로 추출 시도
|
|
||||||
var pageSource = driver.PageSource;
|
|
||||||
|
|
||||||
// 검색 결과가 없다는 메시지 확인
|
// 검색 결과가 없다는 메시지 확인
|
||||||
if (pageSource.Contains("검색결과가 없습니다") ||
|
if (htmlContent.Contains("검색결과가 없습니다") ||
|
||||||
pageSource.Contains("검색된 자료가 없습니다") ||
|
htmlContent.Contains("검색된 자료가 없습니다") ||
|
||||||
pageSource.Contains("자료가 없습니다") ||
|
htmlContent.Contains("자료가 없습니다") ||
|
||||||
pageSource.Contains("전체 0 건"))
|
htmlContent.Contains("전체 0 건"))
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
|
resulthtml = "검색결과가 없습니다";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -319,11 +274,14 @@ namespace BokBonCheck
|
|||||||
|
|
||||||
foreach (var pattern in htmlPatterns)
|
foreach (var pattern in htmlPatterns)
|
||||||
{
|
{
|
||||||
var match = Regex.Match(pageSource, pattern, RegexOptions.IgnoreCase);
|
var match = Regex.Match(htmlContent, pattern, RegexOptions.IgnoreCase);
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
if (int.TryParse(match.Groups[1].Value, out int count))
|
||||||
{
|
{
|
||||||
|
// 매칭된 부분과 상위 태그 추출하여 resulthtml에 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
@@ -335,49 +293,81 @@ namespace BokBonCheck
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. 결과 테이블이나 리스트가 있는지 확인
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var resultElements = driver.FindElements(By.CssSelector(".bookList, .searchResult, .result-list, table tbody tr"));
|
|
||||||
if (resultElements.Count > 0)
|
|
||||||
{
|
|
||||||
// 테이블 헤더나 빈 행을 제외한 실제 결과 개수 계산
|
|
||||||
var actualCount = 0;
|
|
||||||
foreach (var element in resultElements)
|
|
||||||
{
|
|
||||||
var text = element.Text?.Trim();
|
|
||||||
if (!string.IsNullOrEmpty(text) &&
|
|
||||||
!text.Contains("도서명") &&
|
|
||||||
!text.Contains("저자") &&
|
|
||||||
!text.Contains("출판사"))
|
|
||||||
{
|
|
||||||
actualCount++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (actualCount > 0)
|
|
||||||
{
|
|
||||||
errmessage = $"검색성공({actualCount}권)";
|
|
||||||
return actualCount;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"결과 요소 검색 중 오류: {ex.Message}");
|
|
||||||
}
|
|
||||||
|
|
||||||
errmessage = "결과수량을찾을수없음";
|
errmessage = "결과수량을찾을수없음";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errmessage = ex.Message;
|
errmessage = ex.Message;
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
public async Task WaitForPageChange(WebDriverWait wait)
|
public async Task WaitForPageChange(WebDriverWait wait)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -155,8 +155,9 @@ namespace BokBonCheck
|
|||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
var htmlContent = _driver.PageSource;
|
||||||
var resultCount = ExtractBookCount(_driver, searchTerm, out string ermsg);
|
var resultCount = ExtractBookCount(htmlContent, out string ermsg, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
result.BookCount = 0;
|
result.BookCount = 0;
|
||||||
@@ -181,87 +182,38 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(IWebDriver driver, string searchTerm, out string errmessage)
|
private int ExtractBookCount(string htmlContent, out string errmessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errmessage = string.Empty;
|
errmessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 1. 검색결과가 없는 경우 확인
|
// 검색 결과가 없다는 메시지 확인
|
||||||
try
|
var noResultPatterns = new[]
|
||||||
{
|
{
|
||||||
var noResultElement = driver.FindElement(By.XPath("//p[contains(text(), '조회된 도서가 없습니다')]"));
|
@"조회된 도서가 없습니다",
|
||||||
if (noResultElement != null)
|
@"검색결과가 없습니다",
|
||||||
|
@"검색된 자료가 없습니다"
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var pattern in noResultPatterns)
|
||||||
|
{
|
||||||
|
if (htmlContent.Contains(pattern))
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
return 0;
|
var match = System.Text.RegularExpressions.Regex.Match(htmlContent, pattern);
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// 검색결과가 있는 경우로 진행
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. srch_info div에서 직접 추출 시도
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var srchInfoElement = driver.FindElement(By.CssSelector("div.srch_info"));
|
|
||||||
if (srchInfoElement != null)
|
|
||||||
{
|
|
||||||
// span.heighlight에서 숫자 추출 시도
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var highlightElement = srchInfoElement.FindElement(By.CssSelector("span.heighlight"));
|
|
||||||
if (highlightElement != null)
|
|
||||||
{
|
|
||||||
var countText = highlightElement.Text.Trim();
|
|
||||||
if (int.TryParse(countText, out int count))
|
|
||||||
{
|
|
||||||
if (count == 0)
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
errmessage = $"검색성공({count}권)";
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
|
|
||||||
// 전체 텍스트에서 정규식으로 추출
|
|
||||||
var srchInfoText = srchInfoElement.Text;
|
|
||||||
var match = Regex.Match(srchInfoText, @"검색결과\s*총\s*(\d+)\s*건", RegexOptions.IgnoreCase);
|
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
{
|
|
||||||
if (count == 0)
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
errmessage = $"검색성공({count}권)";
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"srch_info 요소 검색 중 오류: {ex.Message}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. 페이지 소스에서 정규식으로 추출 시도
|
|
||||||
var pageSource = driver.PageSource;
|
|
||||||
|
|
||||||
// 검색 결과가 없다는 메시지 확인
|
|
||||||
if (pageSource.Contains("조회된 도서가 없습니다") ||
|
|
||||||
pageSource.Contains("검색결과가 없습니다") ||
|
|
||||||
pageSource.Contains("검색된 자료가 없습니다"))
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// HTML에서 다양한 패턴 찾기
|
// HTML에서 다양한 패턴 찾기
|
||||||
var htmlPatterns = new[]
|
var htmlPatterns = new[]
|
||||||
@@ -274,11 +226,14 @@ namespace BokBonCheck
|
|||||||
|
|
||||||
foreach (var pattern in htmlPatterns)
|
foreach (var pattern in htmlPatterns)
|
||||||
{
|
{
|
||||||
var match = Regex.Match(pageSource, pattern, RegexOptions.IgnoreCase);
|
var match = Regex.Match(htmlContent, pattern, RegexOptions.IgnoreCase);
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
if (int.TryParse(match.Groups[1].Value, out int count))
|
||||||
{
|
{
|
||||||
|
// 매칭된 부분과 상위 태그 추출하여 resulthtml에 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
@@ -291,16 +246,80 @@ namespace BokBonCheck
|
|||||||
}
|
}
|
||||||
|
|
||||||
errmessage = "결과수량을찾을수없음";
|
errmessage = "결과수량을찾을수없음";
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errmessage = ex.Message;
|
errmessage = ex.Message;
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
public async Task WaitForPageChange(WebDriverWait wait)
|
public async Task WaitForPageChange(WebDriverWait wait)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -81,10 +81,11 @@ namespace BokBonCheck
|
|||||||
// HTTP GET 요청 실행 (추가 헤더 포함)
|
// HTTP GET 요청 실행 (추가 헤더 포함)
|
||||||
using (var request = new HttpRequestMessage(HttpMethod.Get, searchUrl))
|
using (var request = new HttpRequestMessage(HttpMethod.Get, searchUrl))
|
||||||
{
|
{
|
||||||
// 브라우저와 유사한 헤더 추가
|
// 브라우저와 유사한 헤더 추가 (인코딩 문제 방지를 위해 압축 해제)
|
||||||
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
|
||||||
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.9,en;q=0.1");
|
||||||
request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
request.Headers.Add("Accept-Charset", "UTF-8,*;q=0.1");
|
||||||
|
// Accept-Encoding 제거 - 압축으로 인한 인코딩 문제 방지
|
||||||
request.Headers.Add("Connection", "keep-alive");
|
request.Headers.Add("Connection", "keep-alive");
|
||||||
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
||||||
|
|
||||||
@@ -96,10 +97,50 @@ namespace BokBonCheck
|
|||||||
throw new HttpRequestException($"HTTP {(int)response.StatusCode} {response.StatusCode}: {errorContent}");
|
throw new HttpRequestException($"HTTP {(int)response.StatusCode} {response.StatusCode}: {errorContent}");
|
||||||
}
|
}
|
||||||
|
|
||||||
var htmlContent = await response.Content.ReadAsStringAsync();
|
// 인코딩 문제 해결: 서버 응답의 Content-Type 확인 후 적절한 인코딩 사용
|
||||||
|
string htmlContent;
|
||||||
|
var contentType = response.Content.Headers.ContentType?.ToString() ?? "";
|
||||||
|
Console.WriteLine($"광주동구 Content-Type: {contentType}");
|
||||||
|
|
||||||
|
if (contentType.Contains("charset="))
|
||||||
|
{
|
||||||
|
// 서버에서 지정한 charset 사용
|
||||||
|
htmlContent = await response.Content.ReadAsStringAsync();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// charset이 명시되지 않은 경우 수동 처리
|
||||||
|
var responseBytes = await response.Content.ReadAsByteArrayAsync();
|
||||||
|
|
||||||
|
// UTF-8 먼저 시도
|
||||||
|
htmlContent = Encoding.UTF8.GetString(responseBytes);
|
||||||
|
|
||||||
|
// 한글이 없거나 깨진 경우 EUC-KR 시도
|
||||||
|
if (!ContainsKorean(htmlContent) || htmlContent.Contains("<22>"))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
|
||||||
|
var euckrEncoding = Encoding.GetEncoding("EUC-KR");
|
||||||
|
var euckrContent = euckrEncoding.GetString(responseBytes);
|
||||||
|
if (ContainsKorean(euckrContent))
|
||||||
|
{
|
||||||
|
htmlContent = euckrContent;
|
||||||
|
Console.WriteLine("광주동구: EUC-KR 인코딩 사용");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception encEx)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"광주동구 EUC-KR 변환 오류: {encEx.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(htmlContent, out string errorMessage);
|
var resultCount = ExtractBookCount(htmlContent, out string errorMessage, out string resultHtml);
|
||||||
|
|
||||||
|
// ResultHtml에 분석용 HTML 저장 (디버깅용으로 일부만)
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
|
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
@@ -126,9 +167,10 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(string htmlContent, out string errorMessage)
|
private int ExtractBookCount(string htmlContent, out string errorMessage,out string resulthtml)
|
||||||
{
|
{
|
||||||
errorMessage = string.Empty;
|
errorMessage = string.Empty;
|
||||||
|
resulthtml=string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -141,18 +183,23 @@ namespace BokBonCheck
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2. 검색 결과 수량 추출: <p class="totalCount">전체 <strong>2</strong> 건</p>
|
// 2. 검색 결과 수량 추출 - 더 포괄적인 패턴 사용
|
||||||
var patterns = new[]
|
var patterns = new[]
|
||||||
{
|
{
|
||||||
@"<p[^>]*class=""totalCount""[^>]*>전체\s*<strong>\s*(\d+)\s*</strong>\s*건</p>",
|
// 기본 패턴들
|
||||||
@"전체\s*<strong>\s*(\d+)\s*</strong>\s*건",
|
@"전체\s*(?:\*\*)?(\d+)(?:\*\*)?\s*건", // 전체 **N** 건 또는 전체 N 건
|
||||||
@"<strong>\s*(\d+)\s*</strong>\s*건",
|
@"<h[1-6][^>]*>.*?전체\s*(?:\*\*)?(\d+)(?:\*\*)?\s*건.*?</h[1-6]>", // h태그 안의 전체 N 건
|
||||||
@"총\s*(\d+)\s*건"
|
@"<p[^>]*class=""totalCount""[^>]*>전체\s*<strong>\s*(\d+)\s*</strong>\s*건</p>", // 원래 패턴
|
||||||
|
@"전체\s*<strong>\s*(\d+)\s*</strong>\s*건", // strong 태그
|
||||||
|
@"<strong>\s*(\d+)\s*</strong>\s*건", // strong만
|
||||||
|
@"총\s*(\d+)\s*건", // 총 N 건
|
||||||
|
@"검색결과\s*:\s*(\d+)\s*건", // 검색결과: N 건
|
||||||
|
@"(\d+)\s*건의\s*검색결과", // N 건의 검색결과
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var pattern in patterns)
|
foreach (var pattern in patterns)
|
||||||
{
|
{
|
||||||
var match = Regex.Match(htmlContent, pattern, RegexOptions.IgnoreCase);
|
var match = Regex.Match(htmlContent, pattern, RegexOptions.IgnoreCase | RegexOptions.Singleline);
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
if (int.TryParse(match.Groups[1].Value, out int count))
|
||||||
@@ -160,25 +207,31 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value; // 매칭된 부분만 저장
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
Console.WriteLine($"광주동구 검색 결과: {count}건");
|
Console.WriteLine($"광주동구 검색 결과: {count}건 (패턴: {pattern})");
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. 더 자세한 패턴으로 시도 (줄바꿈 포함)
|
// 3. 멀티라인 패턴으로 재시도
|
||||||
var multilinePatterns = new[]
|
var multilinePatterns = new[]
|
||||||
{
|
{
|
||||||
@"전체\s*<strong>\s*\r?\n?\s*(\d+)\s*\r?\n?\s*</strong>\s*건",
|
@"전체\s*(?:\*\*)?[\r\n\s]*(\d+)[\r\n\s]*(?:\*\*)?\s*건",
|
||||||
@"<strong>\s*\r?\n?\s*(\d+)\s*\r?\n?\s*</strong>\s*건"
|
@"전체\s*<strong>\s*[\r\n]*\s*(\d+)\s*[\r\n]*\s*</strong>\s*건",
|
||||||
|
@"<strong>\s*[\r\n]*\s*(\d+)\s*[\r\n]*\s*</strong>\s*건"
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var pattern in multilinePatterns)
|
foreach (var pattern in multilinePatterns)
|
||||||
{
|
{
|
||||||
var match = Regex.Match(htmlContent, pattern, RegexOptions.IgnoreCase | RegexOptions.Multiline);
|
var match = Regex.Match(htmlContent, pattern, RegexOptions.IgnoreCase | RegexOptions.Multiline | RegexOptions.Singleline);
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
if (int.TryParse(match.Groups[1].Value, out int count))
|
||||||
@@ -186,15 +239,24 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value; // 매칭된 부분만 저장
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
Console.WriteLine($"광주동구 검색 결과: {count}건");
|
Console.WriteLine($"광주동구 검색 결과: {count}건 (멀티라인 패턴)");
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 4. 패턴을 찾지 못한 경우 - 디버깅을 위한 HTML 내용 일부 출력
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
|
Console.WriteLine($"광주동구 HTML 샘플: {resulthtml}");
|
||||||
|
|
||||||
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
||||||
Console.WriteLine("광주동구 검색결과 패턴을 찾을 수 없음");
|
Console.WriteLine("광주동구 검색결과 패턴을 찾을 수 없음");
|
||||||
return -1;
|
return -1;
|
||||||
@@ -202,6 +264,8 @@ namespace BokBonCheck
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errorMessage = $"결과 분석 오류: {ex.Message}";
|
errorMessage = $"결과 분석 오류: {ex.Message}";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음"; // 오류 시 HTML 일부 저장
|
||||||
|
Console.WriteLine($"광주동구 결과 분석 오류: {ex.Message}");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -210,5 +274,83 @@ namespace BokBonCheck
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 문자열에 한글이 포함되어 있는지 확인
|
||||||
|
/// </summary>
|
||||||
|
private bool ContainsKorean(string text)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(text))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
foreach (char c in text)
|
||||||
|
{
|
||||||
|
if (c >= 0xAC00 && c <= 0xD7A3) // 한글 유니코드 범위
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -337,7 +337,8 @@ namespace BokBonCheck
|
|||||||
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
||||||
|
|
||||||
// 검색 결과 수 추출 (페이징 포함)
|
// 검색 결과 수 추출 (페이징 포함)
|
||||||
var (resultCount, ermsg) = await ExtractBookCountWithPaging(_driver, searchTerm);
|
var (resultCount, ermsg, resultHtml) = await ExtractBookCountWithPaging(_driver, searchTerm);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
result.BookCount = 0;
|
result.BookCount = 0;
|
||||||
@@ -362,13 +363,15 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task<(int count, string message)> ExtractBookCountWithPaging(IWebDriver driver, string searchTerm)
|
private async Task<(int count, string message, string resultHtml)> ExtractBookCountWithPaging(IWebDriver driver, string searchTerm)
|
||||||
{
|
{
|
||||||
string errmessage = string.Empty;
|
string errmessage = string.Empty;
|
||||||
int totalCount = 0;
|
int totalCount = 0;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var htmlContent = driver.PageSource;
|
||||||
|
string resultHtml = string.Empty;
|
||||||
// 첫 번째 페이지에서 테이블 row 수 확인
|
// 첫 번째 페이지에서 테이블 row 수 확인
|
||||||
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
|
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
|
||||||
|
|
||||||
@@ -381,7 +384,28 @@ namespace BokBonCheck
|
|||||||
if (firstPageRows.Count == 0)
|
if (firstPageRows.Count == 0)
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
return (0, errmessage);
|
// "검색결과가 없습니다"와 같은 메시지를 찾아 context 추출 시도
|
||||||
|
var noResultPatterns = new[]
|
||||||
|
{
|
||||||
|
@"검색결과가 없습니다",
|
||||||
|
@"검색된 자료가 없습니다",
|
||||||
|
@"자료가 없습니다"
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var pattern in noResultPatterns)
|
||||||
|
{
|
||||||
|
if (htmlContent.Contains(pattern))
|
||||||
|
{
|
||||||
|
var match = System.Text.RegularExpressions.Regex.Match(htmlContent, pattern);
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
resultHtml = ExtractResultContext(htmlContent, match);
|
||||||
|
return (0, errmessage, resultHtml);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resultHtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
|
return (0, errmessage, resultHtml);
|
||||||
}
|
}
|
||||||
|
|
||||||
totalCount += firstPageRows.Count;
|
totalCount += firstPageRows.Count;
|
||||||
@@ -390,7 +414,28 @@ namespace BokBonCheck
|
|||||||
catch
|
catch
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
return (0, errmessage);
|
// "검색결과가 없습니다"와 같은 메시지를 찾아 context 추출 시도
|
||||||
|
var noResultPatterns = new[]
|
||||||
|
{
|
||||||
|
@"검색결과가 없습니다",
|
||||||
|
@"검색된 자료가 없습니다",
|
||||||
|
@"자료가 없습니다"
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var pattern in noResultPatterns)
|
||||||
|
{
|
||||||
|
if (htmlContent.Contains(pattern))
|
||||||
|
{
|
||||||
|
var match = System.Text.RegularExpressions.Regex.Match(htmlContent, pattern);
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
resultHtml = ExtractResultContext(htmlContent, match);
|
||||||
|
return (0, errmessage, resultHtml);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resultHtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
|
return (0, errmessage, resultHtml);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 페이징이 있는지 확인하고 각 페이지 방문
|
// 페이징이 있는지 확인하고 각 페이지 방문
|
||||||
@@ -436,18 +481,42 @@ namespace BokBonCheck
|
|||||||
if (totalCount == 0)
|
if (totalCount == 0)
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
return (0, errmessage);
|
// "검색결과가 없습니다"와 같은 메시지를 찾아 context 추출 시도
|
||||||
|
var noResultPatterns = new[]
|
||||||
|
{
|
||||||
|
@"검색결과가 없습니다",
|
||||||
|
@"검색된 자료가 없습니다",
|
||||||
|
@"자료가 없습니다",
|
||||||
|
@"전체\s*0\s*건"
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var pattern in noResultPatterns)
|
||||||
|
{
|
||||||
|
if (htmlContent.Contains(pattern))
|
||||||
|
{
|
||||||
|
var match = System.Text.RegularExpressions.Regex.Match(htmlContent, pattern);
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
resultHtml = ExtractResultContext(htmlContent, match);
|
||||||
|
return (0, errmessage, resultHtml);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resultHtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
|
return (0, errmessage, resultHtml);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resultHtml = $"검색성공 - 총 {totalCount}건";
|
||||||
errmessage = $"검색성공({totalCount}권)";
|
errmessage = $"검색성공({totalCount}권)";
|
||||||
Console.WriteLine($"전체 검색 결과: {totalCount}건");
|
Console.WriteLine($"전체 검색 결과: {totalCount}건");
|
||||||
return (totalCount, errmessage);
|
return (totalCount, errmessage, resultHtml);
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errmessage = ex.Message;
|
errmessage = ex.Message;
|
||||||
return (-1, errmessage);
|
string resultHtml = "오류 발생";
|
||||||
|
return (-1, errmessage, resultHtml);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,5 +561,67 @@ namespace BokBonCheck
|
|||||||
Console.WriteLine($"페이지 변경 감지 실패: {ex.Message}");
|
Console.WriteLine($"페이지 변경 감지 실패: {ex.Message}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, System.Text.RegularExpressions.Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = System.Text.RegularExpressions.Regex.Matches(searchText, tagPattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = System.Text.RegularExpressions.Regex.Match(tagMatch.Value, @"<(\w+)", System.Text.RegularExpressions.RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = System.Text.RegularExpressions.Regex.Match(searchText, closeTagPattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,7 @@ namespace BokBonCheck
|
|||||||
// 브라우저와 유사한 헤더 추가
|
// 브라우저와 유사한 헤더 추가
|
||||||
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
||||||
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
||||||
request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
//request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
||||||
request.Headers.Add("Connection", "keep-alive");
|
request.Headers.Add("Connection", "keep-alive");
|
||||||
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
||||||
|
|
||||||
@@ -84,7 +84,8 @@ namespace BokBonCheck
|
|||||||
var htmlContent = await response.Content.ReadAsStringAsync();
|
var htmlContent = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(htmlContent, out string errorMessage);
|
var resultCount = ExtractBookCount(htmlContent, out string errorMessage, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
|
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
@@ -112,9 +113,10 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(string htmlContent, out string errorMessage)
|
private int ExtractBookCount(string htmlContent, out string errorMessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errorMessage = string.Empty;
|
errorMessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -124,6 +126,7 @@ namespace BokBonCheck
|
|||||||
htmlContent.Contains("자료가 없습니다"))
|
htmlContent.Contains("자료가 없습니다"))
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = "검색결과없음";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -146,8 +149,11 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
@@ -171,20 +177,25 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 패턴을 찾지 못한 경우
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errorMessage = $"결과 분석 오류: {ex.Message}";
|
errorMessage = $"결과 분석 오류: {ex.Message}";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -193,5 +204,67 @@ namespace BokBonCheck
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -107,8 +107,9 @@ namespace BokBonCheck
|
|||||||
// JavaScript 렌더링 대기
|
// JavaScript 렌더링 대기
|
||||||
await Task.Delay(3000);
|
await Task.Delay(3000);
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
var htmlContent = _driver.PageSource;
|
||||||
var resultCount = ExtractBookCount(_driver, searchTerm, out string ermsg);
|
var resultCount = ExtractBookCount(htmlContent, out string ermsg, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
result.BookCount = 0;
|
result.BookCount = 0;
|
||||||
@@ -133,71 +134,21 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(IWebDriver driver, string searchTerm, out string errmessage)
|
private int ExtractBookCount(string htmlContent, out string errmessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errmessage = string.Empty;
|
errmessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// JavaScript 실행 후 실제 렌더링된 DOM에서 결과 추출
|
|
||||||
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
|
|
||||||
|
|
||||||
// 1. 검색결과가 없는 경우 확인
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var noResultElements = driver.FindElements(By.XPath("//*[contains(text(), '검색결과가 없습니다') or contains(text(), '검색된 자료가 없습니다')]"));
|
|
||||||
if (noResultElements.Count > 0)
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// 검색결과가 있는 경우로 진행
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. total_area에서 결과 수량 추출 (JavaScript 렌더링 후)
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var totalAreaElement = wait.Until(d => d.FindElement(By.CssSelector("div.total_area p.total span")));
|
|
||||||
if (totalAreaElement != null)
|
|
||||||
{
|
|
||||||
var countText = totalAreaElement.Text.Trim();
|
|
||||||
Console.WriteLine($"total_area 텍스트: '{countText}'");
|
|
||||||
|
|
||||||
// "총 3건" 형태에서 숫자 추출
|
|
||||||
var match = Regex.Match(countText, @"총\s*(\d+)\s*건", RegexOptions.IgnoreCase);
|
|
||||||
if (match.Success && int.TryParse(match.Groups[1].Value, out int count))
|
|
||||||
{
|
|
||||||
if (count == 0)
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
Console.WriteLine("검색 결과: 0건");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
errmessage = $"검색성공({count}권)";
|
|
||||||
Console.WriteLine($"검색 결과: {count}건");
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex1)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"total_area 요소 추출 실패: {ex1.Message}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. 페이지 소스에서 렌더링된 결과 추출
|
|
||||||
var pageSource = driver.PageSource;
|
|
||||||
Console.WriteLine("페이지 소스에서 결과 추출 시도");
|
|
||||||
|
|
||||||
// 검색 결과가 없다는 메시지 확인
|
// 검색 결과가 없다는 메시지 확인
|
||||||
if (pageSource.Contains("검색결과가 없습니다") ||
|
if (htmlContent.Contains("검색결과가 없습니다") ||
|
||||||
pageSource.Contains("검색된 자료가 없습니다") ||
|
htmlContent.Contains("검색된 자료가 없습니다") ||
|
||||||
pageSource.Contains("자료가 없습니다") ||
|
htmlContent.Contains("자료가 없습니다") ||
|
||||||
pageSource.Contains("총 0건"))
|
htmlContent.Contains("총 0건"))
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -212,11 +163,14 @@ namespace BokBonCheck
|
|||||||
|
|
||||||
foreach (var pattern in htmlPatterns)
|
foreach (var pattern in htmlPatterns)
|
||||||
{
|
{
|
||||||
var match = Regex.Match(pageSource, pattern, RegexOptions.IgnoreCase);
|
var match = Regex.Match(htmlContent, pattern, RegexOptions.IgnoreCase);
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
if (int.TryParse(match.Groups[1].Value, out int count))
|
||||||
{
|
{
|
||||||
|
// 매칭된 부분과 상위 태그 추출하여 resulthtml에 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
@@ -229,16 +183,80 @@ namespace BokBonCheck
|
|||||||
}
|
}
|
||||||
|
|
||||||
errmessage = "결과수량을찾을수없음";
|
errmessage = "결과수량을찾을수없음";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errmessage = ex.Message;
|
errmessage = ex.Message;
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 완전한 페이지 로딩 대기 메서드
|
// 완전한 페이지 로딩 대기 메서드
|
||||||
private async Task WaitForCompletePageLoad(WebDriverWait wait)
|
private async Task WaitForCompletePageLoad(WebDriverWait wait)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ namespace BokBonCheck
|
|||||||
// 브라우저와 유사한 헤더 추가
|
// 브라우저와 유사한 헤더 추가
|
||||||
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
||||||
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
||||||
request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
//request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
||||||
request.Headers.Add("Connection", "keep-alive");
|
request.Headers.Add("Connection", "keep-alive");
|
||||||
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
||||||
|
|
||||||
@@ -84,7 +84,8 @@ namespace BokBonCheck
|
|||||||
var htmlContent = await response.Content.ReadAsStringAsync();
|
var htmlContent = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(htmlContent, out string errorMessage);
|
var resultCount = ExtractBookCount(htmlContent, out string errorMessage, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
|
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
@@ -110,9 +111,10 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(string htmlContent, out string errmessage)
|
private int ExtractBookCount(string htmlContent, out string errmessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errmessage = string.Empty;
|
errmessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 실제 HTML 구조에 맞는 패턴으로 수정
|
// 실제 HTML 구조에 맞는 패턴으로 수정
|
||||||
@@ -139,6 +141,7 @@ namespace BokBonCheck
|
|||||||
if (pattern.Contains(@"\s*0\s*"))
|
if (pattern.Contains(@"\s*0\s*"))
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,15 +151,19 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errmessage = $"검색성공({count}권)";
|
errmessage = $"검색성공({count}권)";
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 디버깅을 위해 HTML 내용 일부 출력
|
// 패턴을 찾지 못한 경우
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
Console.WriteLine($"HTML 내용 일부: {htmlContent.Substring(0, Math.Min(1000, htmlContent.Length))}");
|
Console.WriteLine($"HTML 내용 일부: {htmlContent.Substring(0, Math.Min(1000, htmlContent.Length))}");
|
||||||
|
|
||||||
errmessage = "결과수량을찾을수없음";
|
errmessage = "결과수량을찾을수없음";
|
||||||
@@ -166,6 +173,7 @@ namespace BokBonCheck
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errmessage = ex.Message;
|
errmessage = ex.Message;
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -177,5 +185,66 @@ namespace BokBonCheck
|
|||||||
await Task.CompletedTask;
|
await Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -227,8 +227,9 @@ namespace BokBonCheck
|
|||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
var htmlContent = _driver.PageSource;
|
||||||
var resultCount = ExtractBookCount(_driver, searchTerm, out string ermsg);
|
var resultCount = ExtractBookCount(htmlContent, out string ermsg, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
result.BookCount = 0;
|
result.BookCount = 0;
|
||||||
@@ -253,71 +254,20 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(IWebDriver driver, string searchTerm, out string errmessage)
|
private int ExtractBookCount(string htmlContent, out string errmessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errmessage = string.Empty;
|
errmessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 1. search-info div에서 직접 추출 시도
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var searchInfoElement = driver.FindElement(By.CssSelector("div.search-info"));
|
|
||||||
if (searchInfoElement != null)
|
|
||||||
{
|
|
||||||
var searchInfoText = searchInfoElement.Text;
|
|
||||||
|
|
||||||
// "총 N건이 검색되었습니다" 패턴 찾기
|
|
||||||
var match = Regex.Match(searchInfoText, @"총\s*(\d+)\s*건이\s*검색되었습니다", RegexOptions.IgnoreCase);
|
|
||||||
if (match.Success)
|
|
||||||
{
|
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
|
||||||
{
|
|
||||||
if (count == 0)
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
errmessage = $"검색성공({count}권)";
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// <b> 태그에서 직접 숫자 추출 시도
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var boldElements = searchInfoElement.FindElements(By.TagName("b"));
|
|
||||||
foreach (var boldElement in boldElements)
|
|
||||||
{
|
|
||||||
var boldText = boldElement.Text.Trim();
|
|
||||||
if (int.TryParse(boldText, out int boldCount))
|
|
||||||
{
|
|
||||||
if (boldCount == 0)
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
errmessage = $"검색성공({boldCount}권)";
|
|
||||||
return boldCount;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"search-info 요소 검색 중 오류: {ex.Message}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. 페이지 소스에서 정규식으로 추출 시도
|
|
||||||
var pageSource = driver.PageSource;
|
|
||||||
|
|
||||||
// 검색 결과가 없다는 메시지 확인
|
// 검색 결과가 없다는 메시지 확인
|
||||||
if (pageSource.Contains("0건이 검색되었습니다") ||
|
if (htmlContent.Contains("0건이 검색되었습니다") ||
|
||||||
pageSource.Contains("검색결과가 없습니다") ||
|
htmlContent.Contains("검색결과가 없습니다") ||
|
||||||
pageSource.Contains("검색된 자료가 없습니다"))
|
htmlContent.Contains("검색된 자료가 없습니다"))
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -332,11 +282,14 @@ namespace BokBonCheck
|
|||||||
|
|
||||||
foreach (var pattern in htmlPatterns)
|
foreach (var pattern in htmlPatterns)
|
||||||
{
|
{
|
||||||
var match = Regex.Match(pageSource, pattern, RegexOptions.IgnoreCase);
|
var match = Regex.Match(htmlContent, pattern, RegexOptions.IgnoreCase);
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
if (int.TryParse(match.Groups[1].Value, out int count))
|
||||||
{
|
{
|
||||||
|
// 매칭된 부분과 상위 태그 추출하여 resulthtml에 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
@@ -349,16 +302,80 @@ namespace BokBonCheck
|
|||||||
}
|
}
|
||||||
|
|
||||||
errmessage = "결과수량을찾을수없음";
|
errmessage = "결과수량을찾을수없음";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errmessage = ex.Message;
|
errmessage = ex.Message;
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
public async Task WaitForPageChange(WebDriverWait wait)
|
public async Task WaitForPageChange(WebDriverWait wait)
|
||||||
{
|
{
|
||||||
|
|||||||
263
unimarc/unimarc/SearchModel/JeonnamProvLibSearcher.cs
Normal file
263
unimarc/unimarc/SearchModel/JeonnamProvLibSearcher.cs
Normal file
@@ -0,0 +1,263 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Text.RegularExpressions;
|
||||||
|
using System.Web;
|
||||||
|
using UniMarc.SearchModel;
|
||||||
|
using System.Text;
|
||||||
|
using OpenQA.Selenium.Support.UI;
|
||||||
|
|
||||||
|
namespace BokBonCheck
|
||||||
|
{
|
||||||
|
public class JeonnamProvLibSearcher : ILibrarySearcher
|
||||||
|
{
|
||||||
|
public string AreaCode { get; set; } = string.Empty;
|
||||||
|
public string SiteName { get; protected set; }
|
||||||
|
public string SiteUrl => "https://lib.jeonnam.go.kr/plus/search_list.php";
|
||||||
|
public bool HttpApiMode { get; set; } = true;
|
||||||
|
|
||||||
|
public int No { get; set; }
|
||||||
|
|
||||||
|
private static readonly HttpClient _httpClient = new HttpClient()
|
||||||
|
{
|
||||||
|
DefaultRequestHeaders =
|
||||||
|
{
|
||||||
|
{ "User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" }
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public JeonnamProvLibSearcher(int no, string areaCode, string areaName)
|
||||||
|
{
|
||||||
|
this.No = no;
|
||||||
|
this.AreaCode = areaCode;
|
||||||
|
this.SiteName = $"전라남도립({areaName})";
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task StartDriver(bool showdriver = false)
|
||||||
|
{
|
||||||
|
// HTTP 클라이언트 사용으로 별도 드라이버 불필요
|
||||||
|
await Task.CompletedTask;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void StopDriver()
|
||||||
|
{
|
||||||
|
// HTTP 클라이언트 사용으로 별도 정리 불필요
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<BookSearchResult> SearchAsync(string searchTerm)
|
||||||
|
{
|
||||||
|
var result = new BookSearchResult
|
||||||
|
{
|
||||||
|
SiteName = SiteName,
|
||||||
|
SearchTerm = searchTerm,
|
||||||
|
SearchTime = DateTime.Now
|
||||||
|
};
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 검색어 URL 인코딩
|
||||||
|
var encodedSearchTerm = HttpUtility.UrlEncode(searchTerm, Encoding.UTF8);
|
||||||
|
|
||||||
|
// 실제 검색 URL 구성 (사용자가 확인한 정확한 파라미터 사용)
|
||||||
|
var searchUrl = $"{SiteUrl}?act=1&aon1=AND&msa=M&jongbook=1&value1={encodedSearchTerm}&field1=IAL&formclass=&local=&sort=";
|
||||||
|
|
||||||
|
Console.WriteLine($"전라남도립도서관 검색 URL: {searchUrl}");
|
||||||
|
|
||||||
|
// HTTP GET 요청 실행 (추가 헤더 포함)
|
||||||
|
using (var request = new HttpRequestMessage(HttpMethod.Get, searchUrl))
|
||||||
|
{
|
||||||
|
// 브라우저와 유사한 헤더 추가
|
||||||
|
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
||||||
|
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
||||||
|
request.Headers.Add("Connection", "keep-alive");
|
||||||
|
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
||||||
|
request.Headers.Add("Referer", "https://lib.jeonnam.go.kr/plus/search_simple.php");
|
||||||
|
|
||||||
|
var response = await _httpClient.SendAsync(request);
|
||||||
|
|
||||||
|
if (!response.IsSuccessStatusCode)
|
||||||
|
{
|
||||||
|
var errorContent = await response.Content.ReadAsStringAsync();
|
||||||
|
throw new HttpRequestException($"HTTP {(int)response.StatusCode} {response.StatusCode}: {errorContent}");
|
||||||
|
}
|
||||||
|
|
||||||
|
var htmlContent = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
// 검색 결과 수 추출
|
||||||
|
var resultCount = ExtractBookCount(htmlContent, out string errorMessage, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
|
|
||||||
|
if (resultCount == -1)
|
||||||
|
{
|
||||||
|
result.BookCount = 0;
|
||||||
|
result.IsSuccess = false;
|
||||||
|
result.ErrorMessage = errorMessage;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.BookCount = resultCount;
|
||||||
|
result.IsSuccess = true;
|
||||||
|
result.ErrorMessage = $"검색성공({resultCount}권)";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
result.IsSuccess = false;
|
||||||
|
result.ErrorMessage = $"검색 오류: {ex.Message}";
|
||||||
|
result.BookCount = 0;
|
||||||
|
Console.WriteLine($"전라남도립도서관 검색 오류: {ex.Message}");
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
private int ExtractBookCount(string htmlContent, out string errorMessage, out string resulthtml)
|
||||||
|
{
|
||||||
|
errorMessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 전라남도립도서관 실제 HTML 패턴: <font>전체 1</font>개가 검색되었습니다
|
||||||
|
var patterns = new[]
|
||||||
|
{
|
||||||
|
@"<font[^>]*>전체\s*(\d+)</font>\s*개가\s*검색되었습니다",
|
||||||
|
@"'[^']*'\s*에\s*대하여\s*<font[^>]*>전체\s*(\d+)</font>\s*개가\s*검색되었습니다",
|
||||||
|
@"전체\s*(\d+)\s*개가\s*검색되었습니다"
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var pattern in patterns)
|
||||||
|
{
|
||||||
|
var match = Regex.Match(htmlContent, pattern, RegexOptions.IgnoreCase);
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
if (int.TryParse(match.Groups[1].Value, out int count))
|
||||||
|
{
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
errorMessage = $"검색성공({count}권)";
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Page X / Y 패턴으로도 확인 (총 페이지 수에서 결과 유무 판단)
|
||||||
|
var pagePattern = @"Page\s*\d+\s*/\s*(\d+)";
|
||||||
|
var pageMatch = Regex.Match(htmlContent, pagePattern, RegexOptions.IgnoreCase);
|
||||||
|
if (pageMatch.Success)
|
||||||
|
{
|
||||||
|
if (int.TryParse(pageMatch.Groups[1].Value, out int totalPages))
|
||||||
|
{
|
||||||
|
if (totalPages == 0)
|
||||||
|
{
|
||||||
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = pageMatch.Value;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// 페이지가 있지만 정확한 개수를 알 수 없는 경우 -1 반환
|
||||||
|
resulthtml = pageMatch.Value;
|
||||||
|
errorMessage = "결과수량을찾을수없음";
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 검색 결과가 없다는 메시지 확인
|
||||||
|
if (htmlContent.Contains("검색결과가 없습니다") ||
|
||||||
|
htmlContent.Contains("검색된 자료가 없습니다") ||
|
||||||
|
htmlContent.Contains("자료가 없습니다") ||
|
||||||
|
htmlContent.Contains("개가 검색되었습니다") && !Regex.IsMatch(htmlContent, @"\d+\s*개가"))
|
||||||
|
{
|
||||||
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = "검색결과없음";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 패턴을 찾지 못한 경우
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
|
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
errorMessage = $"결과 분석 오류: {ex.Message}";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Task WaitForPageChange(WebDriverWait wait)
|
||||||
|
{
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -260,7 +260,8 @@ namespace BokBonCheck
|
|||||||
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(_driver, searchTerm, out string ermsg);
|
var resultCount = ExtractBookCount(_driver, searchTerm, out string ermsg, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
result.BookCount = 0;
|
result.BookCount = 0;
|
||||||
@@ -285,11 +286,13 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(IWebDriver driver, string searchTerm, out string errmessage)
|
private int ExtractBookCount(IWebDriver driver, string searchTerm, out string errmessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errmessage = string.Empty;
|
errmessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var htmlContent = driver.PageSource;
|
||||||
// 먼저 검색결과가 없는 경우 확인
|
// 먼저 검색결과가 없는 경우 확인
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -298,6 +301,7 @@ namespace BokBonCheck
|
|||||||
if (noResultText.Contains("검색결과가 없습니다"))
|
if (noResultText.Contains("검색결과가 없습니다"))
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
|
resulthtml = noResultText;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,17 +322,36 @@ namespace BokBonCheck
|
|||||||
if (int.TryParse(match.Groups[1].Value, out int vqty))
|
if (int.TryParse(match.Groups[1].Value, out int vqty))
|
||||||
{
|
{
|
||||||
errmessage = $"검색성공({vqty}건)";
|
errmessage = $"검색성공({vqty}건)";
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
return vqty;
|
return vqty;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errmessage = $"수량값오류({match.Groups[1].Value})";
|
errmessage = $"수량값오류({match.Groups[1].Value})";
|
||||||
|
resulthtml = match.Value;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errmessage = "수량항목없음";
|
errmessage = "수량항목없음";
|
||||||
|
// 매칭된 부분이 없는 경우, 기본적으로 pageInfoText 부분 추출 시도
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var dummyMatch = System.Text.RegularExpressions.Regex.Match(pageInfoText, @"전체.*");
|
||||||
|
if (dummyMatch.Success)
|
||||||
|
{
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, dummyMatch);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -336,6 +359,7 @@ namespace BokBonCheck
|
|||||||
{
|
{
|
||||||
// page_info가 없는 경우 검색결과가 없는 것으로 판단
|
// page_info가 없는 경우 검색결과가 없는 것으로 판단
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
|
resulthtml = "검색결과 없음: " + ex.Message;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,11 +367,72 @@ namespace BokBonCheck
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errmessage = ex.Message;
|
errmessage = ex.Message;
|
||||||
|
resulthtml = "ExtractBookCount 오류: " + ex.Message;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
public async Task WaitForPageChange(WebDriverWait wait)
|
public async Task WaitForPageChange(WebDriverWait wait)
|
||||||
|
|||||||
@@ -272,7 +272,8 @@ namespace BokBonCheck
|
|||||||
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(_driver, searchTerm, out string ermsg);
|
var resultCount = ExtractBookCount(_driver, searchTerm, out string ermsg, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
result.BookCount = 0;
|
result.BookCount = 0;
|
||||||
@@ -297,11 +298,13 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(IWebDriver driver, string searchTerm, out string errmessage)
|
private int ExtractBookCount(IWebDriver driver, string searchTerm, out string errmessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errmessage = string.Empty;
|
errmessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var htmlContent = driver.PageSource;
|
||||||
// 먼저 검색결과가 없는 경우 확인
|
// 먼저 검색결과가 없는 경우 확인
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -310,6 +313,7 @@ namespace BokBonCheck
|
|||||||
if (noResultText.Contains("검색결과가 없습니다"))
|
if (noResultText.Contains("검색결과가 없습니다"))
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
|
resulthtml = noResultText;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -330,17 +334,36 @@ namespace BokBonCheck
|
|||||||
if (int.TryParse(match.Groups[1].Value, out int vqty))
|
if (int.TryParse(match.Groups[1].Value, out int vqty))
|
||||||
{
|
{
|
||||||
errmessage = $"검색성공({vqty}건)";
|
errmessage = $"검색성공({vqty}건)";
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
return vqty;
|
return vqty;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errmessage = $"수량값오류({match.Groups[1].Value})";
|
errmessage = $"수량값오류({match.Groups[1].Value})";
|
||||||
|
resulthtml = match.Value;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errmessage = "수량항목없음";
|
errmessage = "수량항목없음";
|
||||||
|
// 매칭된 부분이 없는 경우, 기본적으로 pageInfoText 부분 추출 시도
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var dummyMatch = System.Text.RegularExpressions.Regex.Match(pageInfoText, @"전체.*");
|
||||||
|
if (dummyMatch.Success)
|
||||||
|
{
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, dummyMatch);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -348,6 +371,27 @@ namespace BokBonCheck
|
|||||||
{
|
{
|
||||||
// page_info가 없는 경우 검색결과가 없는 것으로 판단
|
// page_info가 없는 경우 검색결과가 없는 것으로 판단
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
|
// "검색결과가 없습니다"와 같은 메시지를 찾아 context 추출 시도
|
||||||
|
var noResultPatterns = new[]
|
||||||
|
{
|
||||||
|
@"검색결과가 없습니다",
|
||||||
|
@"검색된 자료가 없습니다",
|
||||||
|
@"자료가 없습니다"
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var pattern in noResultPatterns)
|
||||||
|
{
|
||||||
|
if (htmlContent.Contains(pattern))
|
||||||
|
{
|
||||||
|
var match = System.Text.RegularExpressions.Regex.Match(htmlContent, pattern);
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -355,11 +399,72 @@ namespace BokBonCheck
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errmessage = ex.Message;
|
errmessage = ex.Message;
|
||||||
|
resulthtml = "ExtractBookCount 오류: " + ex.Message;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
public async Task WaitForPageChange(WebDriverWait wait)
|
public async Task WaitForPageChange(WebDriverWait wait)
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ namespace BokBonCheck
|
|||||||
// 브라우저와 유사한 헤더 추가
|
// 브라우저와 유사한 헤더 추가
|
||||||
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
||||||
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
||||||
request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
//request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
||||||
request.Headers.Add("Connection", "keep-alive");
|
request.Headers.Add("Connection", "keep-alive");
|
||||||
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
||||||
|
|
||||||
@@ -100,7 +100,8 @@ namespace BokBonCheck
|
|||||||
var htmlContent = await response.Content.ReadAsStringAsync();
|
var htmlContent = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(htmlContent, out string errorMessage);
|
var resultCount = ExtractBookCount(htmlContent, out string errorMessage, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
|
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
@@ -128,9 +129,10 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(string htmlContent, out string errorMessage)
|
private int ExtractBookCount(string htmlContent, out string errorMessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errorMessage = string.Empty;
|
errorMessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -141,6 +143,7 @@ namespace BokBonCheck
|
|||||||
htmlContent.Contains("총 0 건이 검색되었습니다"))
|
htmlContent.Contains("총 0 건이 검색되었습니다"))
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = "검색결과없음";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,8 +166,11 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
Console.WriteLine($"KCM자료검색시스템 검색 결과: {count}건");
|
Console.WriteLine($"KCM자료검색시스템 검색 결과: {count}건");
|
||||||
return count;
|
return count;
|
||||||
@@ -189,8 +195,10 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
Console.WriteLine($"KCM자료검색시스템 검색 결과: {count}건");
|
Console.WriteLine($"KCM자료검색시스템 검색 결과: {count}건");
|
||||||
return count;
|
return count;
|
||||||
@@ -198,6 +206,8 @@ namespace BokBonCheck
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 패턴을 찾지 못한 경우
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
||||||
Console.WriteLine("KCM자료검색시스템 검색결과 패턴을 찾을 수 없음");
|
Console.WriteLine("KCM자료검색시스템 검색결과 패턴을 찾을 수 없음");
|
||||||
return -1;
|
return -1;
|
||||||
@@ -205,6 +215,7 @@ namespace BokBonCheck
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errorMessage = $"결과 분석 오류: {ex.Message}";
|
errorMessage = $"결과 분석 오류: {ex.Message}";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -213,5 +224,67 @@ namespace BokBonCheck
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -13,7 +13,7 @@ using OpenQA.Selenium.Chromium;
|
|||||||
|
|
||||||
namespace BokBonCheck
|
namespace BokBonCheck
|
||||||
{
|
{
|
||||||
public class KwangjuCityEduLibrarySearcher : ILibrarySearcher
|
public class KwangjuCityEduLibrarySearcher : ILibrarySearcher
|
||||||
{
|
{
|
||||||
public int No { get; set; }
|
public int No { get; set; }
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ namespace BokBonCheck
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (SeleniumHelper.IsReady == false) await SeleniumHelper.Download();
|
if (SeleniumHelper.IsReady == false) await SeleniumHelper.Download();
|
||||||
_driver = await SeleniumHelper.CreateDriver(ShowBrowser:showBrowser);
|
_driver = await SeleniumHelper.CreateDriver(ShowBrowser: showBrowser);
|
||||||
Console.WriteLine("KwangjuCityLibrarySearcher Driver 초기화 완료");
|
Console.WriteLine("KwangjuCityLibrarySearcher Driver 초기화 완료");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -94,7 +94,7 @@ namespace BokBonCheck
|
|||||||
_driver.Navigate().GoToUrl(SiteUrl);
|
_driver.Navigate().GoToUrl(SiteUrl);
|
||||||
|
|
||||||
// 페이지 로딩 대기
|
// 페이지 로딩 대기
|
||||||
var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(15));
|
var wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(30));
|
||||||
|
|
||||||
// 모든 감지 방법이 끝나면 크롬창 최소화
|
// 모든 감지 방법이 끝나면 크롬창 최소화
|
||||||
// whale 브라우저가 최소화되어 우선해제
|
// whale 브라우저가 최소화되어 우선해제
|
||||||
@@ -190,13 +190,24 @@ namespace BokBonCheck
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(30)));
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(_driver);
|
var resultCount = ExtractBookCount(_driver, out string errorMessage, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
|
|
||||||
result.BookCount = resultCount;
|
if (resultCount == -1)
|
||||||
result.IsSuccess = true;
|
{
|
||||||
|
result.BookCount = 0;
|
||||||
|
result.IsSuccess = false;
|
||||||
|
result.ErrorMessage = errorMessage;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
result.BookCount = resultCount;
|
||||||
|
result.IsSuccess = true;
|
||||||
|
result.ErrorMessage = errorMessage;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@@ -204,14 +215,21 @@ namespace BokBonCheck
|
|||||||
result.ErrorMessage = ex.Message;
|
result.ErrorMessage = ex.Message;
|
||||||
result.BookCount = 0;
|
result.BookCount = 0;
|
||||||
}
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
await Task.Delay(1000);//.Threading.Thread.Sleep(500);
|
||||||
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(IWebDriver driver)
|
private int ExtractBookCount(IWebDriver driver, out string errorMessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
|
errorMessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var htmlContent = driver.PageSource;
|
||||||
|
|
||||||
// div.search-result 내부의 span에서 '전체 N' 텍스트 추출
|
// div.search-result 내부의 span에서 '전체 N' 텍스트 추출
|
||||||
var resultDiv = driver.FindElement(By.CssSelector("div.ndls_result"));
|
var resultDiv = driver.FindElement(By.CssSelector("div.ndls_result"));
|
||||||
var span = resultDiv.FindElement(By.XPath(".//span[contains(text(),'전체')]"));
|
var span = resultDiv.FindElement(By.XPath(".//span[contains(text(),'전체')]"));
|
||||||
@@ -219,13 +237,106 @@ namespace BokBonCheck
|
|||||||
var match = System.Text.RegularExpressions.Regex.Match(text, @"전체\s*(\d+)");
|
var match = System.Text.RegularExpressions.Regex.Match(text, @"전체\s*(\d+)");
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
return int.Parse(match.Groups[1].Value);
|
if (int.TryParse(match.Groups[1].Value, out int count))
|
||||||
|
{
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = text;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
errorMessage = $"검색성공({count}건)";
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
return count;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
errorMessage = "수량항목없음";
|
||||||
|
// 매칭된 부분이 없는 경우, 기본적으로 text 부분 추출 시도
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var dummyMatch = System.Text.RegularExpressions.Regex.Match(text, @"전체.*");
|
||||||
|
if (dummyMatch.Success)
|
||||||
|
{
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, dummyMatch);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
catch
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
return 0;
|
errorMessage = ex.Message;
|
||||||
|
resulthtml = "오류발생";
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ namespace BokBonCheck
|
|||||||
// 브라우저와 유사한 헤더 추가
|
// 브라우저와 유사한 헤더 추가
|
||||||
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
||||||
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
||||||
request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
//request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
||||||
request.Headers.Add("Connection", "keep-alive");
|
request.Headers.Add("Connection", "keep-alive");
|
||||||
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
||||||
|
|
||||||
@@ -92,7 +92,8 @@ namespace BokBonCheck
|
|||||||
var htmlContent = await response.Content.ReadAsStringAsync();
|
var htmlContent = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(htmlContent, out string errorMessage);
|
var resultCount = ExtractBookCount(htmlContent, out string errorMessage, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
|
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
@@ -120,9 +121,10 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(string htmlContent, out string errorMessage)
|
private int ExtractBookCount(string htmlContent, out string errorMessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errorMessage = string.Empty;
|
errorMessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -146,8 +148,11 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
@@ -161,6 +166,7 @@ namespace BokBonCheck
|
|||||||
htmlContent.Contains("총 0권(개)"))
|
htmlContent.Contains("총 0권(개)"))
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = "검색결과없음";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -183,20 +189,25 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 패턴을 찾지 못한 경우
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errorMessage = $"결과 분석 오류: {ex.Message}";
|
errorMessage = $"결과 분석 오류: {ex.Message}";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -205,5 +216,67 @@ namespace BokBonCheck
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -196,9 +196,9 @@ namespace BokBonCheck
|
|||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
||||||
|
|
||||||
|
var htmlContent = _driver.PageSource;
|
||||||
// 검색 결과 수 추출
|
var resultCount = ExtractBookCount(htmlContent, out string ermsg, out string resultHtml);
|
||||||
var resultCount = ExtractBookCount(_driver, searchTerm, out string ermsg);
|
result.Resulthtml = resultHtml;
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
result.BookCount = 0;
|
result.BookCount = 0;
|
||||||
@@ -223,71 +223,56 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(IWebDriver driver, string searchTerm, out string errmessage)
|
private int ExtractBookCount(string htmlContent, out string errmessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errmessage = string.Empty;
|
errmessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 검색결과 페이지 대기
|
// 검색 결과가 없다는 메시지 확인
|
||||||
var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
|
var noResultPatterns = new[]
|
||||||
|
|
||||||
// 1. 검색결과가 없는 경우 확인
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
var noResultElements = driver.FindElements(By.XPath("//*[contains(text(), '검색결과가 없습니다') or contains(text(), '검색된 자료가 없습니다')]"));
|
@"검색결과가 없습니다",
|
||||||
if (noResultElements.Count > 0)
|
@"검색된 자료가 없습니다",
|
||||||
|
@"자료가 없습니다",
|
||||||
|
@"전체 <strong>0</strong> 건"
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (var pattern in noResultPatterns)
|
||||||
|
{
|
||||||
|
if (htmlContent.Contains(pattern))
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
|
// 검색결과 없음 메시지를 포함한 HTML 조각 추출
|
||||||
|
var index = htmlContent.IndexOf(pattern);
|
||||||
|
if (index >= 0)
|
||||||
|
{
|
||||||
|
var startIndex = Math.Max(0, index - 100);
|
||||||
|
var endIndex = Math.Min(htmlContent.Length, index + pattern.Length + 100);
|
||||||
|
resulthtml = htmlContent.Substring(startIndex, endIndex - startIndex);
|
||||||
|
|
||||||
|
// 상위 태그 찾기 시도
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var match = System.Text.RegularExpressions.Regex.Match(htmlContent, pattern);
|
||||||
|
if (match.Success)
|
||||||
|
{
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// 실패시 기본 추출 결과 사용
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
resulthtml = pattern;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
|
||||||
{
|
|
||||||
// 검색결과가 있는 경우로 진행
|
|
||||||
}
|
|
||||||
|
|
||||||
// 2. totalCount에서 결과 수량 추출
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var totalCountElement = wait.Until(d => d.FindElement(By.CssSelector("p.totalCount strong")));
|
|
||||||
if (totalCountElement != null)
|
|
||||||
{
|
|
||||||
var countText = totalCountElement.Text.Trim();
|
|
||||||
Console.WriteLine($"totalCount 텍스트: '{countText}'");
|
|
||||||
|
|
||||||
if (int.TryParse(countText, out int count))
|
|
||||||
{
|
|
||||||
if (count == 0)
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
Console.WriteLine("검색 결과: 0건");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
errmessage = $"검색성공({count}권)";
|
|
||||||
Console.WriteLine($"검색 결과: {count}건");
|
|
||||||
return count;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex1)
|
|
||||||
{
|
|
||||||
Console.WriteLine($"totalCount 요소 추출 실패: {ex1.Message}");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 3. 페이지 소스에서 결과 추출
|
|
||||||
var pageSource = driver.PageSource;
|
|
||||||
Console.WriteLine("페이지 소스에서 결과 추출 시도");
|
|
||||||
|
|
||||||
// 검색 결과가 없다는 메시지 확인
|
|
||||||
if (pageSource.Contains("검색결과가 없습니다") ||
|
|
||||||
pageSource.Contains("검색된 자료가 없습니다") ||
|
|
||||||
pageSource.Contains("자료가 없습니다") ||
|
|
||||||
pageSource.Contains("전체 <strong>0</strong> 건"))
|
|
||||||
{
|
|
||||||
errmessage = "검색결과없음";
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
// HTML에서 다양한 패턴 찾기
|
// HTML에서 다양한 패턴 찾기
|
||||||
var htmlPatterns = new[]
|
var htmlPatterns = new[]
|
||||||
@@ -299,11 +284,14 @@ namespace BokBonCheck
|
|||||||
|
|
||||||
foreach (var pattern in htmlPatterns)
|
foreach (var pattern in htmlPatterns)
|
||||||
{
|
{
|
||||||
var match = Regex.Match(pageSource, pattern, RegexOptions.IgnoreCase);
|
var match = Regex.Match(htmlContent, pattern, RegexOptions.IgnoreCase);
|
||||||
if (match.Success)
|
if (match.Success)
|
||||||
{
|
{
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
if (int.TryParse(match.Groups[1].Value, out int count))
|
||||||
{
|
{
|
||||||
|
// 매칭된 부분과 상위 태그 추출하여 resulthtml에 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
|
|
||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
@@ -316,16 +304,80 @@ namespace BokBonCheck
|
|||||||
}
|
}
|
||||||
|
|
||||||
errmessage = "결과수량을찾을수없음";
|
errmessage = "결과수량을찾을수없음";
|
||||||
|
resulthtml = "결과수량을찾을수없음";
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errmessage = ex.Message;
|
errmessage = ex.Message;
|
||||||
|
resulthtml = "ExtractBookCount 오류: " + ex.Message;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 완전한 페이지 로딩 대기 메서드
|
// 완전한 페이지 로딩 대기 메서드
|
||||||
private async Task WaitForCompletePageLoad(WebDriverWait wait)
|
private async Task WaitForCompletePageLoad(WebDriverWait wait)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -269,7 +269,8 @@ namespace BokBonCheck
|
|||||||
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
await WaitForPageChange(new WebDriverWait(_driver, TimeSpan.FromSeconds(15)));
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(_driver, searchTerm, out string ermsg);
|
var resultCount = ExtractBookCount(_driver, searchTerm, out string ermsg, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
result.BookCount = 0;
|
result.BookCount = 0;
|
||||||
@@ -294,11 +295,14 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(IWebDriver driver, string searchTerm, out string errmessage)
|
private int ExtractBookCount(IWebDriver driver, string searchTerm, out string errmessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errmessage = string.Empty;
|
errmessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
var htmlContent = driver.PageSource;
|
||||||
|
|
||||||
// div.search-result 내부의 span에서 '전체 N' 텍스트 추출
|
// div.search-result 내부의 span에서 '전체 N' 텍스트 추출
|
||||||
var resultDiv = driver.FindElement(By.CssSelector("div.search-result"));
|
var resultDiv = driver.FindElement(By.CssSelector("div.search-result"));
|
||||||
|
|
||||||
@@ -306,6 +310,7 @@ namespace BokBonCheck
|
|||||||
if (bodytext.Contains("검색결과가 없습니다"))
|
if (bodytext.Contains("검색결과가 없습니다"))
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
|
resulthtml = bodytext;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -315,6 +320,7 @@ namespace BokBonCheck
|
|||||||
if (searchTerm.Contains(searchtitle) == false)
|
if (searchTerm.Contains(searchtitle) == false)
|
||||||
{
|
{
|
||||||
errmessage = $"검색어불일치({searchtitle}/{searchTerm})";
|
errmessage = $"검색어불일치({searchtitle}/{searchTerm})";
|
||||||
|
resulthtml = searchtitle;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
var span = resultDiv.FindElement(By.XPath(".//span[contains(text(),'전체')]"));
|
var span = resultDiv.FindElement(By.XPath(".//span[contains(text(),'전체')]"));
|
||||||
@@ -325,10 +331,13 @@ namespace BokBonCheck
|
|||||||
if (int.TryParse(match.Groups[1].Value, out int vqty) == false)
|
if (int.TryParse(match.Groups[1].Value, out int vqty) == false)
|
||||||
{
|
{
|
||||||
errmessage = $"수량값오류({match.Groups[1].Value})";
|
errmessage = $"수량값오류({match.Groups[1].Value})";
|
||||||
|
resulthtml = match.Value;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
errmessage = $"검색성공({vqty}건)";
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
searchTerm = string.Empty;
|
searchTerm = string.Empty;
|
||||||
return vqty;
|
return vqty;
|
||||||
}
|
}
|
||||||
@@ -336,6 +345,23 @@ namespace BokBonCheck
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
errmessage = "수량항목없음";
|
errmessage = "수량항목없음";
|
||||||
|
// 매칭된 부분이 없는 경우, 기본적으로 text 부분 추출 시도
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var dummyMatch = System.Text.RegularExpressions.Regex.Match(text, @"전체.*");
|
||||||
|
if (dummyMatch.Success)
|
||||||
|
{
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, dummyMatch);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
resulthtml = htmlContent.Length > 500 ? htmlContent.Substring(0, 500) : htmlContent;
|
||||||
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -343,11 +369,72 @@ namespace BokBonCheck
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errmessage = ex.Message;
|
errmessage = ex.Message;
|
||||||
|
resulthtml = "ExtractBookCount 오류: " + ex.Message;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 페이지 변경을 감지하는 메서드
|
// 페이지 변경을 감지하는 메서드
|
||||||
public async Task WaitForPageChange(WebDriverWait wait)
|
public async Task WaitForPageChange(WebDriverWait wait)
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace BokBonCheck
|
|||||||
// 브라우저와 유사한 헤더 추가
|
// 브라우저와 유사한 헤더 추가
|
||||||
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
||||||
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
||||||
request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
//request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
||||||
request.Headers.Add("Connection", "keep-alive");
|
request.Headers.Add("Connection", "keep-alive");
|
||||||
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
||||||
|
|
||||||
@@ -97,7 +97,8 @@ namespace BokBonCheck
|
|||||||
var htmlContent = await response.Content.ReadAsStringAsync();
|
var htmlContent = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(htmlContent, out string errorMessage);
|
var resultCount = ExtractBookCount(htmlContent, out string errorMessage, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
|
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
@@ -125,9 +126,10 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(string htmlContent, out string errorMessage)
|
private int ExtractBookCount(string htmlContent, out string errorMessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errorMessage = string.Empty;
|
errorMessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -150,8 +152,11 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
@@ -165,6 +170,7 @@ namespace BokBonCheck
|
|||||||
htmlContent.Contains("총 0건"))
|
htmlContent.Contains("총 0건"))
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = "검색결과없음";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -178,8 +184,10 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = resultConMatch.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, resultConMatch);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
@@ -203,20 +211,25 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errorMessage = "검색결과없음";
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 패턴을 찾지 못한 경우
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errorMessage = $"결과 분석 오류: {ex.Message}";
|
errorMessage = $"결과 분석 오류: {ex.Message}";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -225,5 +238,67 @@ namespace BokBonCheck
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -86,7 +86,7 @@ namespace BokBonCheck
|
|||||||
// 브라우저와 유사한 헤더 추가
|
// 브라우저와 유사한 헤더 추가
|
||||||
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
||||||
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
||||||
request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
//request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
||||||
request.Headers.Add("Connection", "keep-alive");
|
request.Headers.Add("Connection", "keep-alive");
|
||||||
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
||||||
|
|
||||||
@@ -96,7 +96,8 @@ namespace BokBonCheck
|
|||||||
var htmlContent = await response.Content.ReadAsStringAsync();
|
var htmlContent = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(htmlContent, out string errorMessage);
|
var resultCount = ExtractBookCount(htmlContent, out string errorMessage, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
|
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
@@ -122,15 +123,17 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(string htmlContent, out string errmessage)
|
private int ExtractBookCount(string htmlContent, out string errmessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errmessage = string.Empty;
|
errmessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// 검색 결과가 없다는 메시지 확인
|
// 검색 결과가 없다는 메시지 확인
|
||||||
if (htmlContent.Contains("0권(개)") || htmlContent.Contains("검색결과가 없습니다"))
|
if (htmlContent.Contains("0권(개)") || htmlContent.Contains("검색결과가 없습니다"))
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
|
resulthtml = "검색결과없음";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -153,14 +156,19 @@ namespace BokBonCheck
|
|||||||
if (count == 0)
|
if (count == 0)
|
||||||
{
|
{
|
||||||
errmessage = "검색결과없음";
|
errmessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errmessage = $"검색성공({count}권)";
|
errmessage = $"검색성공({count}권)";
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 패턴을 찾지 못한 경우
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
errmessage = "결과수량을찾을수없음";
|
errmessage = "결과수량을찾을수없음";
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@@ -168,6 +176,7 @@ namespace BokBonCheck
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errmessage = ex.Message;
|
errmessage = ex.Message;
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -178,5 +187,67 @@ namespace BokBonCheck
|
|||||||
// HTTP 방식에서는 즉시 응답이 오므로 대기 불필요
|
// HTTP 방식에서는 즉시 응답이 오므로 대기 불필요
|
||||||
await Task.CompletedTask;
|
await Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ namespace BokBonCheck
|
|||||||
// 브라우저와 유사한 헤더 추가
|
// 브라우저와 유사한 헤더 추가
|
||||||
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
request.Headers.Add("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8");
|
||||||
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
request.Headers.Add("Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3");
|
||||||
request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
//request.Headers.Add("Accept-Encoding", "gzip, deflate, br");
|
||||||
request.Headers.Add("Connection", "keep-alive");
|
request.Headers.Add("Connection", "keep-alive");
|
||||||
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
request.Headers.Add("Upgrade-Insecure-Requests", "1");
|
||||||
|
|
||||||
@@ -92,7 +92,8 @@ namespace BokBonCheck
|
|||||||
var htmlContent = await response.Content.ReadAsStringAsync();
|
var htmlContent = await response.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
// 검색 결과 수 추출
|
// 검색 결과 수 추출
|
||||||
var resultCount = ExtractBookCount(htmlContent, out string errorMessage);
|
var resultCount = ExtractBookCount(htmlContent, out string errorMessage, out string resultHtml);
|
||||||
|
result.Resulthtml = resultHtml;
|
||||||
|
|
||||||
if (resultCount == -1)
|
if (resultCount == -1)
|
||||||
{
|
{
|
||||||
@@ -120,9 +121,10 @@ namespace BokBonCheck
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int ExtractBookCount(string htmlContent, out string errorMessage)
|
private int ExtractBookCount(string htmlContent, out string errorMessage, out string resulthtml)
|
||||||
{
|
{
|
||||||
errorMessage = string.Empty;
|
errorMessage = string.Empty;
|
||||||
|
resulthtml = string.Empty;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -134,12 +136,21 @@ namespace BokBonCheck
|
|||||||
{
|
{
|
||||||
if (int.TryParse(match.Groups[1].Value, out int count))
|
if (int.TryParse(match.Groups[1].Value, out int count))
|
||||||
{
|
{
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = match.Value;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, match);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
errorMessage = $"수량값오류({match.Groups[1].Value})";
|
errorMessage = $"수량값오류({match.Groups[1].Value})";
|
||||||
|
resulthtml = match.Value;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -153,11 +164,21 @@ namespace BokBonCheck
|
|||||||
{
|
{
|
||||||
if (int.TryParse(alternateMatch.Groups[1].Value, out int count))
|
if (int.TryParse(alternateMatch.Groups[1].Value, out int count))
|
||||||
{
|
{
|
||||||
|
if (count == 0)
|
||||||
|
{
|
||||||
|
errorMessage = "검색결과없음";
|
||||||
|
resulthtml = alternateMatch.Value;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
// 매칭된 부분과 그 상위 태그를 찾아서 저장
|
||||||
|
resulthtml = ExtractResultContext(htmlContent, alternateMatch);
|
||||||
errorMessage = $"검색성공({count}권)";
|
errorMessage = $"검색성공({count}권)";
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 패턴을 찾지 못한 경우
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
errorMessage = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -165,6 +186,7 @@ namespace BokBonCheck
|
|||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
errorMessage = $"결과 분석 오류: {ex.Message}";
|
errorMessage = $"결과 분석 오류: {ex.Message}";
|
||||||
|
resulthtml = "검색결과 패턴을 찾을 수 없음";
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -173,5 +195,67 @@ namespace BokBonCheck
|
|||||||
{
|
{
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 매칭된 결과와 그 상위 태그를 추출
|
||||||
|
/// </summary>
|
||||||
|
private string ExtractResultContext(string htmlContent, Match match)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var matchIndex = match.Index;
|
||||||
|
var matchLength = match.Length;
|
||||||
|
|
||||||
|
// 매칭된 위치 앞쪽에서 상위 태그 시작 찾기
|
||||||
|
var startSearchIndex = Math.Max(0, matchIndex - 200); // 매칭 위치 200자 전부터 검색
|
||||||
|
var searchText = htmlContent.Substring(startSearchIndex, matchIndex - startSearchIndex + matchLength + Math.Min(200, htmlContent.Length - matchIndex - matchLength));
|
||||||
|
|
||||||
|
// 상위 태그 패턴들 (div, p, h1-h6, span 등)
|
||||||
|
var tagPatterns = new[] { @"<(div|p|h[1-6]|span|section|article)[^>]*>", @"<[^>]+>" };
|
||||||
|
|
||||||
|
string resultContext = match.Value; // 기본값은 매칭된 부분만
|
||||||
|
|
||||||
|
foreach (var tagPattern in tagPatterns)
|
||||||
|
{
|
||||||
|
// 매칭된 부분 앞에서 가장 가까운 태그 시작 찾기
|
||||||
|
var tagMatches = Regex.Matches(searchText, tagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
for (int i = tagMatches.Count - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
var tagMatch = tagMatches[i];
|
||||||
|
if (tagMatch.Index < (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 태그 이름 추출
|
||||||
|
var tagName = Regex.Match(tagMatch.Value, @"<(\w+)", RegexOptions.IgnoreCase).Groups[1].Value;
|
||||||
|
|
||||||
|
// 닫는 태그 찾기
|
||||||
|
var closeTagPattern = $@"</{tagName}[^>]*>";
|
||||||
|
var closeMatch = Regex.Match(searchText, closeTagPattern, RegexOptions.IgnoreCase);
|
||||||
|
|
||||||
|
if (closeMatch.Success && closeMatch.Index > (matchIndex - startSearchIndex))
|
||||||
|
{
|
||||||
|
// 상위 태그와 그 내용을 포함하여 반환
|
||||||
|
var startIdx = tagMatch.Index;
|
||||||
|
var endIdx = closeMatch.Index + closeMatch.Length;
|
||||||
|
resultContext = searchText.Substring(startIdx, Math.Min(endIdx - startIdx, 500)); // 최대 500자
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 상위 태그를 찾지 못한 경우, 매칭 전후 50자씩 포함
|
||||||
|
var contextStart = Math.Max(0, matchIndex - 50);
|
||||||
|
var contextEnd = Math.Min(htmlContent.Length, matchIndex + matchLength + 50);
|
||||||
|
resultContext = htmlContent.Substring(contextStart, contextEnd - contextStart);
|
||||||
|
|
||||||
|
return resultContext;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"ExtractResultContext 오류: {ex.Message}");
|
||||||
|
return match.Value; // 오류 시 매칭된 부분만 반환
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -23,6 +23,7 @@ using System.Drawing.Text;
|
|||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Data.SqlTypes;
|
using System.Data.SqlTypes;
|
||||||
|
using AR;
|
||||||
|
|
||||||
namespace WindowsFormsApp1
|
namespace WindowsFormsApp1
|
||||||
{
|
{
|
||||||
@@ -99,7 +100,7 @@ namespace WindowsFormsApp1
|
|||||||
}
|
}
|
||||||
private void datagridview_checkBox_Click(object sender, EventArgs e)
|
private void datagridview_checkBox_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
foreach(DataGridViewRow r in ((DataGridView)sender).Rows)
|
foreach (DataGridViewRow r in ((DataGridView)sender).Rows)
|
||||||
{
|
{
|
||||||
r.Cells["colCheck"].Value = ((CheckBox)sender).Checked;
|
r.Cells["colCheck"].Value = ((CheckBox)sender).Checked;
|
||||||
}
|
}
|
||||||
@@ -119,23 +120,32 @@ namespace WindowsFormsApp1
|
|||||||
char[] columnSplitter = { '\t' };
|
char[] columnSplitter = { '\t' };
|
||||||
|
|
||||||
//get the text from clipboard
|
//get the text from clipboard
|
||||||
IDataObject dataInClipboard = Clipboard.GetDataObject();
|
|
||||||
|
|
||||||
string stringInClipboard = (string)dataInClipboard.GetData(DataFormats.Text);
|
if (Clipboard.ContainsText() == false) return;
|
||||||
|
|
||||||
|
string stringInClipboard = null;
|
||||||
|
|
||||||
|
if (e.Alt)
|
||||||
|
stringInClipboard = Clipboard.GetText(TextDataFormat.UnicodeText);
|
||||||
|
else
|
||||||
|
stringInClipboard = Clipboard.GetText();// (string)objdata;
|
||||||
|
|
||||||
//split it into lines
|
//split it into lines
|
||||||
//20230209 \r텝 기능과 \n 줄넘김 기능을 같이 공백 제거 처리해버려 공백칸을 활용해야 함에도 제거하는 현상 발생.
|
//20230209 \r텝 기능과 \n 줄넘김 기능을 같이 공백 제거 처리해버려 공백칸을 활용해야 함에도 제거하는 현상 발생.
|
||||||
//텝 공백 문자열 동시에 사용하여 분류
|
//텝 공백 문자열 동시에 사용하여 분류
|
||||||
// stringInClipboard= stringInClipboard.Replace("\r", "");
|
// stringInClipboard= stringInClipboard.Replace("\r", "");
|
||||||
if (stringInClipboard == null) return;
|
if (stringInClipboard == null) return;
|
||||||
List<string>rowsInClipboard = stringInClipboard.Split(rowSpliteter, StringSplitOptions.None).ToList();
|
List<string> rowsInClipboard = stringInClipboard.Split(rowSpliteter, StringSplitOptions.None).ToList();
|
||||||
rowsInClipboard.RemoveAt(rowsInClipboard.Count-1);
|
if (rowsInClipboard.Last().isEmpty()) rowsInClipboard.RemoveAt(rowsInClipboard.Count - 1);
|
||||||
//get the row and column of selected cell in dataGridView1
|
|
||||||
int r = ((DataGridView)sender).SelectedCells[0].RowIndex;
|
var dv = sender as DataGridView;
|
||||||
int c = ((DataGridView)sender).SelectedCells[0].ColumnIndex;
|
|
||||||
|
int r = dv.SelectedCells[0].RowIndex;
|
||||||
|
int c = dv.SelectedCells[0].ColumnIndex;
|
||||||
//add rows into dataGridView1 to fit clipboard lines
|
//add rows into dataGridView1 to fit clipboard lines
|
||||||
if (((DataGridView)sender).Rows.Count < (r + rowsInClipboard.Count))
|
if (dv.Rows.Count < (r + rowsInClipboard.Count))
|
||||||
{
|
{
|
||||||
((DataGridView)sender).Rows.Add(r + rowsInClipboard.Count - ((DataGridView)sender).Rows.Count);
|
dv.Rows.Add(r + rowsInClipboard.Count - dv.Rows.Count);
|
||||||
}
|
}
|
||||||
// loop through the lines, split them into cells and place the values in the corresponding cell.
|
// loop through the lines, split them into cells and place the values in the corresponding cell.
|
||||||
for (int iRow = 0; iRow < rowsInClipboard.Count; iRow++)
|
for (int iRow = 0; iRow < rowsInClipboard.Count; iRow++)
|
||||||
@@ -146,10 +156,10 @@ namespace WindowsFormsApp1
|
|||||||
for (int iCol = 0; iCol < valuesInRow.Length; iCol++)
|
for (int iCol = 0; iCol < valuesInRow.Length; iCol++)
|
||||||
{
|
{
|
||||||
//assign cell value, only if it within columns of the dataGridView1
|
//assign cell value, only if it within columns of the dataGridView1
|
||||||
if (((DataGridView)sender).ColumnCount - 1 >= c + iCol)
|
if (dv.ColumnCount - 1 >= c + iCol)
|
||||||
{
|
{
|
||||||
if (((DataGridView)sender).Rows.Count <= r + iRow) continue;
|
if (dv.Rows.Count <= r + iRow) continue;
|
||||||
((DataGridView)sender).Rows[r + iRow].Cells[c + iCol].Value = valuesInRow[iCol];
|
dv.Rows[r + iRow].Cells[c + iCol].Value = valuesInRow[iCol];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -292,7 +302,8 @@ namespace WindowsFormsApp1
|
|||||||
string[] db_data = db_res1.Split('|');
|
string[] db_data = db_res1.Split('|');
|
||||||
string[] db_pur = db_res2.Split('|');
|
string[] db_pur = db_res2.Split('|');
|
||||||
|
|
||||||
if (db_res1.Length < 3) {
|
if (db_res1.Length < 3)
|
||||||
|
{
|
||||||
MessageBox.Show("DB호출 에러!", "Error");
|
MessageBox.Show("DB호출 에러!", "Error");
|
||||||
return "False";
|
return "False";
|
||||||
}
|
}
|
||||||
@@ -300,20 +311,26 @@ namespace WindowsFormsApp1
|
|||||||
string fax = string.Empty;
|
string fax = string.Empty;
|
||||||
string emchk = string.Empty;
|
string emchk = string.Empty;
|
||||||
|
|
||||||
if (db_pur.Length > 3) {
|
if (db_pur.Length > 3)
|
||||||
for(int a= 0; a < db_pur.Length; a++)
|
{
|
||||||
|
for (int a = 0; a < db_pur.Length; a++)
|
||||||
{
|
{
|
||||||
if (a % 3 == 0) { // 전화번호
|
if (a % 3 == 0)
|
||||||
if (db_pur[a] != "") {
|
{ // 전화번호
|
||||||
|
if (db_pur[a] != "")
|
||||||
|
{
|
||||||
tel = db_pur[a];
|
tel = db_pur[a];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (a % 3 == 1) { // 팩스
|
if (a % 3 == 1)
|
||||||
if (db_pur[a] != "") {
|
{ // 팩스
|
||||||
|
if (db_pur[a] != "")
|
||||||
|
{
|
||||||
fax = db_pur[a];
|
fax = db_pur[a];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (a % 3 == 2) { // 팩스 이메일 체크
|
if (a % 3 == 2)
|
||||||
|
{ // 팩스 이메일 체크
|
||||||
emchk = db_pur[a];
|
emchk = db_pur[a];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -401,7 +418,7 @@ namespace WindowsFormsApp1
|
|||||||
#region 주문일자 / 보낸곳 (4행)
|
#region 주문일자 / 보낸곳 (4행)
|
||||||
rng = ws.Range["A4", "C4"];
|
rng = ws.Range["A4", "C4"];
|
||||||
rng.MergeCells = true;
|
rng.MergeCells = true;
|
||||||
rng.Value2 = "주문일자 : "+DateTime.Now.ToString("yyyy-MM-dd H:m:ss");
|
rng.Value2 = "주문일자 : " + DateTime.Now.ToString("yyyy-MM-dd H:m:ss");
|
||||||
rng.HorizontalAlignment = Excel.XlHAlign.xlHAlignLeft;
|
rng.HorizontalAlignment = Excel.XlHAlign.xlHAlignLeft;
|
||||||
rng.Font.Bold = true;
|
rng.Font.Bold = true;
|
||||||
|
|
||||||
@@ -495,7 +512,7 @@ namespace WindowsFormsApp1
|
|||||||
|
|
||||||
#region 추신
|
#region 추신
|
||||||
endcount++;
|
endcount++;
|
||||||
string 발송처 = "D"+endcount.ToString();
|
string 발송처 = "D" + endcount.ToString();
|
||||||
|
|
||||||
rng = ws.Range["A" + endcount, "C" + endcount];
|
rng = ws.Range["A" + endcount, "C" + endcount];
|
||||||
rng.MergeCells = true;
|
rng.MergeCells = true;
|
||||||
@@ -551,7 +568,7 @@ namespace WindowsFormsApp1
|
|||||||
rng2.Font.Bold = true;
|
rng2.Font.Bold = true;
|
||||||
|
|
||||||
////////
|
////////
|
||||||
rng = ws.Range[발송처, "D"+endcount];
|
rng = ws.Range[발송처, "D" + endcount];
|
||||||
rng.MergeCells = true;
|
rng.MergeCells = true;
|
||||||
rng.Value2 = "발 송 처";
|
rng.Value2 = "발 송 처";
|
||||||
rng.Font.Bold = true;
|
rng.Font.Bold = true;
|
||||||
@@ -583,7 +600,7 @@ namespace WindowsFormsApp1
|
|||||||
|
|
||||||
return FileName;
|
return FileName;
|
||||||
}
|
}
|
||||||
catch(Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
MessageBox.Show(e.ToString());
|
MessageBox.Show(e.ToString());
|
||||||
return "False";
|
return "False";
|
||||||
@@ -647,7 +664,7 @@ namespace WindowsFormsApp1
|
|||||||
string count = data.Length.ToString();
|
string count = data.Length.ToString();
|
||||||
string res = string.Empty;
|
string res = string.Empty;
|
||||||
|
|
||||||
for(int a = 0; a < length.Length; a++)
|
for (int a = 0; a < length.Length; a++)
|
||||||
{
|
{
|
||||||
if (length[a] == count)
|
if (length[a] == count)
|
||||||
{
|
{
|
||||||
@@ -788,7 +805,7 @@ namespace WindowsFormsApp1
|
|||||||
/// <param name="file_name"></param>
|
/// <param name="file_name"></param>
|
||||||
/// <param name="fax_param">[0] 발신번호 / [1] 수신번호
|
/// <param name="fax_param">[0] 발신번호 / [1] 수신번호
|
||||||
/// / [2] 수신자 회사명 / [3 ]수신자명 </param>
|
/// / [2] 수신자 회사명 / [3 ]수신자명 </param>
|
||||||
public string Send_BaroFax(string file_name, string[] fax_param )
|
public string Send_BaroFax(string file_name, string[] fax_param)
|
||||||
{
|
{
|
||||||
BaroService_FAXSoapClient fAXSoapClient = new BaroService_FAXSoapClient();
|
BaroService_FAXSoapClient fAXSoapClient = new BaroService_FAXSoapClient();
|
||||||
|
|
||||||
@@ -1190,9 +1207,9 @@ namespace WindowsFormsApp1
|
|||||||
public bool IsConnected { get; set; }
|
public bool IsConnected { get; set; }
|
||||||
|
|
||||||
private string ipAddr = string.Empty;
|
private string ipAddr = string.Empty;
|
||||||
private string Port = string.Empty;
|
private string Port = string.Empty;
|
||||||
private string userId = string.Empty;
|
private string userId = string.Empty;
|
||||||
private string Pwd = string.Empty;
|
private string Pwd = string.Empty;
|
||||||
|
|
||||||
public FTP() { }
|
public FTP() { }
|
||||||
|
|
||||||
@@ -1219,7 +1236,7 @@ namespace WindowsFormsApp1
|
|||||||
using (ftpRequest.GetResponse()) { }
|
using (ftpRequest.GetResponse()) { }
|
||||||
this.IsConnected = true;
|
this.IsConnected = true;
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
this.LastException = ex;
|
this.LastException = ex;
|
||||||
System.Reflection.MemberInfo info = System.Reflection.MethodInfo.GetCurrentMethod();
|
System.Reflection.MemberInfo info = System.Reflection.MethodInfo.GetCurrentMethod();
|
||||||
@@ -1288,7 +1305,7 @@ namespace WindowsFormsApp1
|
|||||||
buff = null;
|
buff = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
MessageBox.Show(ex.ToString());
|
MessageBox.Show(ex.ToString());
|
||||||
this.LastException = ex;
|
this.LastException = ex;
|
||||||
@@ -1392,14 +1409,14 @@ namespace WindowsFormsApp1
|
|||||||
|
|
||||||
if (reader != null) reader.Close();
|
if (reader != null) reader.Close();
|
||||||
|
|
||||||
foreach(string file in result.ToString().Split('\n'))
|
foreach (string file in result.ToString().Split('\n'))
|
||||||
{
|
{
|
||||||
resultList.Add(file);
|
resultList.Add(file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return resultList;
|
return resultList;
|
||||||
}
|
}
|
||||||
catch(Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
this.LastException = ex;
|
this.LastException = ex;
|
||||||
|
|
||||||
@@ -1420,7 +1437,7 @@ namespace WindowsFormsApp1
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
foreach(string tmpFolder in arrDir)
|
foreach (string tmpFolder in arrDir)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
@@ -1453,9 +1470,11 @@ namespace WindowsFormsApp1
|
|||||||
private void checkDir(string localFullPathFile)
|
private void checkDir(string localFullPathFile)
|
||||||
{
|
{
|
||||||
FileInfo finfo = new FileInfo(localFullPathFile);
|
FileInfo finfo = new FileInfo(localFullPathFile);
|
||||||
if (!finfo.Exists) {
|
if (!finfo.Exists)
|
||||||
|
{
|
||||||
DirectoryInfo dInfo = new DirectoryInfo(finfo.DirectoryName);
|
DirectoryInfo dInfo = new DirectoryInfo(finfo.DirectoryName);
|
||||||
if (!dInfo.Exists) {
|
if (!dInfo.Exists)
|
||||||
|
{
|
||||||
dInfo.Create();
|
dInfo.Create();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1552,30 +1571,35 @@ namespace WindowsFormsApp1
|
|||||||
int tDown = 0;
|
int tDown = 0;
|
||||||
for (int a = 0; a < array_text.Count; a++)
|
for (int a = 0; a < array_text.Count; a++)
|
||||||
{
|
{
|
||||||
// if (array_text[a] == "") continue;
|
// if (array_text[a] == "") continue;
|
||||||
|
|
||||||
num.Add(array_text[a].Substring(0, 3));
|
num.Add(array_text[a].Substring(0, 3));
|
||||||
|
|
||||||
if (array_text[a][5] == '▼') {
|
if (array_text[a][5] == '▼')
|
||||||
|
{
|
||||||
array_text[a] = array_text[a].Remove(0, 3);
|
array_text[a] = array_text[a].Remove(0, 3);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
array_text[a] = array_text[a].Remove(0, 5);
|
array_text[a] = array_text[a].Remove(0, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
가변길이 += array_text[a] + "\n";
|
가변길이 += array_text[a] + "\n";
|
||||||
int textLength = 0;
|
int textLength = 0;
|
||||||
if (EncodingType == "UTF-8") {
|
if (EncodingType == "UTF-8")
|
||||||
|
{
|
||||||
textLength = Encoding.UTF8.GetBytes(array_text[a]).Length
|
textLength = Encoding.UTF8.GetBytes(array_text[a]).Length
|
||||||
- WordCheck(array_text[a], "▲")
|
- WordCheck(array_text[a], "▲")
|
||||||
- WordCheck(array_text[a], "▼");
|
- WordCheck(array_text[a], "▼");
|
||||||
}
|
}
|
||||||
else if (EncodingType == "UniCode") {
|
else if (EncodingType == "UniCode")
|
||||||
|
{
|
||||||
textLength = Encoding.Unicode.GetBytes(array_text[a]).Length
|
textLength = Encoding.Unicode.GetBytes(array_text[a]).Length
|
||||||
- WordCheck(array_text[a], "▲")
|
- WordCheck(array_text[a], "▲")
|
||||||
- WordCheck(array_text[a], "▼");
|
- WordCheck(array_text[a], "▼");
|
||||||
}
|
}
|
||||||
else { // ANSI
|
else
|
||||||
|
{ // ANSI
|
||||||
textLength = Encoding.Default.GetBytes(array_text[a]).Length
|
textLength = Encoding.Default.GetBytes(array_text[a]).Length
|
||||||
- WordCheck(array_text[a], "▲")
|
- WordCheck(array_text[a], "▲")
|
||||||
- WordCheck(array_text[a], "▼");
|
- WordCheck(array_text[a], "▼");
|
||||||
@@ -1587,12 +1611,13 @@ namespace WindowsFormsApp1
|
|||||||
|
|
||||||
for (int a = 0; a < array_text.Count; a++)
|
for (int a = 0; a < array_text.Count; a++)
|
||||||
{
|
{
|
||||||
if (a == 0) { //total.Add("0");
|
if (a == 0)
|
||||||
|
{ //total.Add("0");
|
||||||
tTotal.Add(0);
|
tTotal.Add(0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// total.Add(total[a - 1] + count[a - 1]);
|
// total.Add(total[a - 1] + count[a - 1]);
|
||||||
tTotal.Add(tTotal[a - 1] + tCount[a - 1]);
|
tTotal.Add(tTotal[a - 1] + tCount[a - 1]);
|
||||||
}
|
}
|
||||||
//else if (a == 1)
|
//else if (a == 1)
|
||||||
@@ -1626,7 +1651,7 @@ namespace WindowsFormsApp1
|
|||||||
// else if (total[a].Length == 2) { total[a] = total[a].Insert(0, "000"); }
|
// else if (total[a].Length == 2) { total[a] = total[a].Insert(0, "000"); }
|
||||||
// else if (total[a].Length == 1) { total[a] = total[a].Insert(0, "0000"); }
|
// else if (total[a].Length == 1) { total[a] = total[a].Insert(0, "0000"); }
|
||||||
// 디렉토리 += str_num[a] + count[a] + total[a] + "\n";
|
// 디렉토리 += str_num[a] + count[a] + total[a] + "\n";
|
||||||
디렉토리 += str_num[a] + tCount[a].ToString().PadLeft(4, '0') + tTotal[a].ToString().PadLeft(5, '0');
|
디렉토리 += str_num[a] + tCount[a].ToString().PadLeft(4, '0') + tTotal[a].ToString().PadLeft(5, '0');
|
||||||
}
|
}
|
||||||
|
|
||||||
string[] 리더부 = { "00000","n", "a", "m", " ",
|
string[] 리더부 = { "00000","n", "a", "m", " ",
|
||||||
@@ -1642,9 +1667,9 @@ namespace WindowsFormsApp1
|
|||||||
|
|
||||||
string dp = 가변길이 + 디렉토리;
|
string dp = 가변길이 + 디렉토리;
|
||||||
int recode = 0;
|
int recode = 0;
|
||||||
if (EncodingType == "UTF-8") recode = Encoding.UTF8.GetBytes(dp).Length- WordCheck(dp, "▲") - WordCheck(dp, "▼") - WordCheck(dp, "↔");
|
if (EncodingType == "UTF-8") recode = Encoding.UTF8.GetBytes(dp).Length - WordCheck(dp, "▲") - WordCheck(dp, "▼") - WordCheck(dp, "↔");
|
||||||
else if (EncodingType == "UniCode") recode = Encoding.Unicode.GetBytes(dp).Length - WordCheck(dp, "▲") - WordCheck(dp, "▼") - WordCheck(dp, "↔");
|
else if (EncodingType == "UniCode") recode = Encoding.Unicode.GetBytes(dp).Length - WordCheck(dp, "▲") - WordCheck(dp, "▼") - WordCheck(dp, "↔");
|
||||||
else recode = Encoding.Default.GetBytes(dp).Length- WordCheck(dp, "▲") - WordCheck(dp, "▼") - WordCheck(dp, "↔");
|
else recode = Encoding.Default.GetBytes(dp).Length - WordCheck(dp, "▲") - WordCheck(dp, "▼") - WordCheck(dp, "↔");
|
||||||
|
|
||||||
|
|
||||||
리더부[0] = insert_Zero(recode + 24, 5);
|
리더부[0] = insert_Zero(recode + 24, 5);
|
||||||
@@ -1731,7 +1756,7 @@ namespace WindowsFormsApp1
|
|||||||
/// <param name="pAddTag">추가할 태그 (태그명\t지시기호\t태그내용)</param>
|
/// <param name="pAddTag">추가할 태그 (태그명\t지시기호\t태그내용)</param>
|
||||||
/// <param name="pTargetData">뷰형태의 마크</param>
|
/// <param name="pTargetData">뷰형태의 마크</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string AddTagInMarc(int pTargetTagNum,string pAddTag, string pTargetData)//TagTarget Num 을 찾아서 있을경우는 해당 Tag 데이터를 전송, 없을경우는 신규로 해야함.
|
public string AddTagInMarc(int pTargetTagNum, string pAddTag, string pTargetData)//TagTarget Num 을 찾아서 있을경우는 해당 Tag 데이터를 전송, 없을경우는 신규로 해야함.
|
||||||
{
|
{
|
||||||
|
|
||||||
if (pAddTag.Length < 3) return "";
|
if (pAddTag.Length < 3) return "";
|
||||||
@@ -1906,7 +1931,7 @@ namespace WindowsFormsApp1
|
|||||||
/// <param name="marc">마크 데이터</param>
|
/// <param name="marc">마크 데이터</param>
|
||||||
/// <param name="search">추출할 함수(배열)</param>
|
/// <param name="search">추출할 함수(배열)</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string[] Take_Tag(string marc, string[] search,bool pSearchTag = false)
|
public string[] Take_Tag(string marc, string[] search, bool pSearchTag = false)
|
||||||
{
|
{
|
||||||
string[] ary = marc.Split('');
|
string[] ary = marc.Split('');
|
||||||
string[] tag = res_dir(ary[0].Substring(24));
|
string[] tag = res_dir(ary[0].Substring(24));
|
||||||
@@ -1958,7 +1983,7 @@ namespace WindowsFormsApp1
|
|||||||
//memo = result[b];
|
//memo = result[b];
|
||||||
start += 2;
|
start += 2;
|
||||||
int end = -1;
|
int end = -1;
|
||||||
if (tmp.Length > 1) end=tmp.IndexOf("", start);
|
if (tmp.Length > 1) end = tmp.IndexOf("", start);
|
||||||
if (memo == result[b])
|
if (memo == result[b])
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -2130,9 +2155,14 @@ namespace WindowsFormsApp1
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Marc">한줄짜리 마크</param>
|
/// <param name="Marc">한줄짜리 마크</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string ConvertMarcType(string Marc)
|
public string ConvertMarcType(string Marc, out string errmessage)
|
||||||
{
|
{
|
||||||
if (Marc.Length < 3) return "";
|
errmessage = string.Empty;
|
||||||
|
if (Marc.Length < 3)
|
||||||
|
{
|
||||||
|
errmessage = "MARC 데이터길이가 너무 짧습니다.";
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
string result = "";
|
string result = "";
|
||||||
|
|
||||||
@@ -2140,12 +2170,15 @@ namespace WindowsFormsApp1
|
|||||||
List<string> Field = new List<string>(); // 가변길이필드 저장용
|
List<string> Field = new List<string>(); // 가변길이필드 저장용
|
||||||
|
|
||||||
Marc = Marc.Replace("", "▼").Replace("", "▲");
|
Marc = Marc.Replace("", "▼").Replace("", "▲");
|
||||||
|
Marc = Marc.Replace(((char)0x1D).ToString(), "");
|
||||||
|
Marc = Marc.Replace(((char)0x1E).ToString(), "");
|
||||||
|
Marc = Marc.Replace(((char)0x1F).ToString(), "");
|
||||||
|
|
||||||
int StartIdx = 0;
|
int StartIdx = 0;
|
||||||
|
|
||||||
// 리더부를 제외한 디렉토리, 가변길이필드 저장
|
// 리더부를 제외한 디렉토리, 가변길이필드 저장
|
||||||
string[] data = Marc.Substring(24).Split('▲');
|
string[] data = Marc.Substring(24).Split(new char[] { '▲' }, StringSplitOptions.RemoveEmptyEntries);
|
||||||
for (int a = 1; a < data.Length - 1; a++)
|
for (int a = 1; a < data.Length; a++)
|
||||||
{
|
{
|
||||||
TagNum.Add(data[0].Substring(StartIdx, 3));
|
TagNum.Add(data[0].Substring(StartIdx, 3));
|
||||||
StartIdx += 12;
|
StartIdx += 12;
|
||||||
@@ -2161,10 +2194,32 @@ namespace WindowsFormsApp1
|
|||||||
else if (res.StartsWith("00")) { res += "\t \t" + Field[a]; }
|
else if (res.StartsWith("00")) { res += "\t \t" + Field[a]; }
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
string temp = Field[a].Insert(2, "\t");
|
var fieldValue = Field[a].Trim();
|
||||||
res += "\t" + temp;
|
bool isEmpty = false;
|
||||||
|
if (fieldValue.IndexOf("▼") != -1)
|
||||||
|
{
|
||||||
|
var dataArea = fieldValue.Substring(fieldValue.IndexOf("▼") + 1);
|
||||||
|
isEmpty = dataArea.ToString().isEmpty();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
isEmpty = fieldValue.Replace("▲", "").Trim().isEmpty();
|
||||||
|
}
|
||||||
|
if (isEmpty) //no data
|
||||||
|
{
|
||||||
|
errmessage = (errmessage.isEmpty() == false ? "\n" : "") + "태그 " + TagNum[a] + " 에 데이터가 없습니다.";
|
||||||
|
Console.WriteLine("field length error");
|
||||||
|
res = string.Empty;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
string temp = Field[a].Insert(2, "\t");
|
||||||
|
res += "\t" + temp;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
result += res + "\n";
|
if (res.isEmpty() == false)
|
||||||
|
result += res + "\n";
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -2188,7 +2243,8 @@ namespace WindowsFormsApp1
|
|||||||
/// <param name="e">EventArgs</param>
|
/// <param name="e">EventArgs</param>
|
||||||
public void Int_Comma(object sender, EventArgs e)
|
public void Int_Comma(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (((TextBox)sender).Text != "") {
|
if (((TextBox)sender).Text != "")
|
||||||
|
{
|
||||||
string text;
|
string text;
|
||||||
text = ((TextBox)sender).Text.Replace(",", "");
|
text = ((TextBox)sender).Text.Replace(",", "");
|
||||||
((TextBox)sender).Text = String.Format("{0:#,###}", Convert.ToInt32(text));
|
((TextBox)sender).Text = String.Format("{0:#,###}", Convert.ToInt32(text));
|
||||||
@@ -2204,7 +2260,7 @@ namespace WindowsFormsApp1
|
|||||||
public bool isContainHangul(string value)
|
public bool isContainHangul(string value)
|
||||||
{
|
{
|
||||||
char[] charArr = value.ToCharArray();
|
char[] charArr = value.ToCharArray();
|
||||||
foreach(char c in charArr)
|
foreach (char c in charArr)
|
||||||
{
|
{
|
||||||
if (char.GetUnicodeCategory(c) == System.Globalization.UnicodeCategory.OtherLetter)
|
if (char.GetUnicodeCategory(c) == System.Globalization.UnicodeCategory.OtherLetter)
|
||||||
return true;
|
return true;
|
||||||
@@ -2264,10 +2320,10 @@ namespace WindowsFormsApp1
|
|||||||
public class API
|
public class API
|
||||||
{
|
{
|
||||||
|
|
||||||
public string CheckString(string pText,string pStr)
|
public string CheckString(string pText, string pStr)
|
||||||
{
|
{
|
||||||
string tRet = pText;
|
string tRet = pText;
|
||||||
Regex reg = new Regex(@"([\"+pStr+"]+)" + @"[가-힣]+");//+ @"([\>]+)");//new Regex(@"([\<]+)"+ @"[ㄱ-ㅎ가-힣]+"+@"([\>]+)");
|
Regex reg = new Regex(@"([\" + pStr + "]+)" + @"[가-힣]+");//+ @"([\>]+)");//new Regex(@"([\<]+)"+ @"[ㄱ-ㅎ가-힣]+"+@"([\>]+)");
|
||||||
MatchCollection tMatch = reg.Matches(tRet);
|
MatchCollection tMatch = reg.Matches(tRet);
|
||||||
for (int i = 0; i < tMatch.Count; i++)
|
for (int i = 0; i < tMatch.Count; i++)
|
||||||
{
|
{
|
||||||
@@ -2326,7 +2382,8 @@ namespace WindowsFormsApp1
|
|||||||
xml = CheckString(xml, "〈");
|
xml = CheckString(xml, "〈");
|
||||||
doc.LoadXml(xml);
|
doc.LoadXml(xml);
|
||||||
}
|
}
|
||||||
catch (Exception ex){
|
catch (Exception ex)
|
||||||
|
{
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
var json = JsonConvert.SerializeXmlNode(doc);
|
var json = JsonConvert.SerializeXmlNode(doc);
|
||||||
@@ -2520,19 +2577,23 @@ namespace WindowsFormsApp1
|
|||||||
{
|
{
|
||||||
if (length == 1)
|
if (length == 1)
|
||||||
{
|
{
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
tmp_data.Add(docs[Param[b]]["#text"]);
|
tmp_data.Add(docs[Param[b]]["#text"]);
|
||||||
}
|
}
|
||||||
catch (KeyNotFoundException e) {
|
catch (KeyNotFoundException e)
|
||||||
|
{
|
||||||
tmp_data.Add("");
|
tmp_data.Add("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
try {
|
try
|
||||||
|
{
|
||||||
tmp_data.Add(docs[a][Param[b]]["#text"]);
|
tmp_data.Add(docs[a][Param[b]]["#text"]);
|
||||||
}
|
}
|
||||||
catch (KeyNotFoundException e) {
|
catch (KeyNotFoundException e)
|
||||||
|
{
|
||||||
tmp_data.Add("");
|
tmp_data.Add("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2963,7 +3024,7 @@ namespace WindowsFormsApp1
|
|||||||
{
|
{
|
||||||
string version = "0";
|
string version = "0";
|
||||||
var fn = Application.StartupPath + "\\update.inf";
|
var fn = Application.StartupPath + "\\update.inf";
|
||||||
if(System.IO.File.Exists(fn))
|
if (System.IO.File.Exists(fn))
|
||||||
{
|
{
|
||||||
StreamReader sr = new StreamReader(fn);
|
StreamReader sr = new StreamReader(fn);
|
||||||
while (!sr.EndOfStream)
|
while (!sr.EndOfStream)
|
||||||
|
|||||||
@@ -224,6 +224,14 @@
|
|||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Helper_DB2.cs" />
|
||||||
|
<Compile Include="Helper_LibraryDelaySettings.cs" />
|
||||||
|
<Compile Include="ListOfValue\fSelectDT.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="ListOfValue\fSelectDT.Designer.cs">
|
||||||
|
<DependentUpon>fSelectDT.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="PUB.cs" />
|
<Compile Include="PUB.cs" />
|
||||||
<Compile Include="SearchModel\AnsanLibSearcher.cs" />
|
<Compile Include="SearchModel\AnsanLibSearcher.cs" />
|
||||||
<Compile Include="SearchModel\BookSearchService.cs" />
|
<Compile Include="SearchModel\BookSearchService.cs" />
|
||||||
@@ -236,6 +244,7 @@
|
|||||||
<Compile Include="SearchModel\DownloadProgressForm.cs">
|
<Compile Include="SearchModel\DownloadProgressForm.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="SearchModel\GochangLibSearcher.cs" />
|
||||||
<Compile Include="SearchModel\GoheungLibSearcher.cs" />
|
<Compile Include="SearchModel\GoheungLibSearcher.cs" />
|
||||||
<Compile Include="SearchModel\GwangjuCityLibSearcher.cs" />
|
<Compile Include="SearchModel\GwangjuCityLibSearcher.cs" />
|
||||||
<Compile Include="SearchModel\GwangjuDongguLibSearcher.cs" />
|
<Compile Include="SearchModel\GwangjuDongguLibSearcher.cs" />
|
||||||
@@ -247,6 +256,7 @@
|
|||||||
<Compile Include="SearchModel\IksanLibSearcher.cs" />
|
<Compile Include="SearchModel\IksanLibSearcher.cs" />
|
||||||
<Compile Include="SearchModel\ILibrarySearcher.cs" />
|
<Compile Include="SearchModel\ILibrarySearcher.cs" />
|
||||||
<Compile Include="SearchModel\JeonbukEduLibSearcher.cs" />
|
<Compile Include="SearchModel\JeonbukEduLibSearcher.cs" />
|
||||||
|
<Compile Include="SearchModel\JeonnamProvLibSearcher.cs" />
|
||||||
<Compile Include="SearchModel\KcmLibSearcher.cs" />
|
<Compile Include="SearchModel\KcmLibSearcher.cs" />
|
||||||
<Compile Include="SearchModel\MokpoLibSearcher.cs" />
|
<Compile Include="SearchModel\MokpoLibSearcher.cs" />
|
||||||
<Compile Include="SearchModel\MuanLibSearcher.cs" />
|
<Compile Include="SearchModel\MuanLibSearcher.cs" />
|
||||||
@@ -324,6 +334,12 @@
|
|||||||
<Compile Include="마크\Check_Copy_Login.Designer.cs">
|
<Compile Include="마크\Check_Copy_Login.Designer.cs">
|
||||||
<DependentUpon>Check_Copy_Login.cs</DependentUpon>
|
<DependentUpon>Check_Copy_Login.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="마크\Check_Copy_Sub_Selector.cs">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="마크\Check_Copy_Sub_Selector.Designer.cs">
|
||||||
|
<DependentUpon>Check_Copy_Sub_Selector.cs</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="마크\Help_007.cs">
|
<Compile Include="마크\Help_007.cs">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -988,6 +1004,9 @@
|
|||||||
<Compile Include="작업일지\Work_Log.Designer.cs">
|
<Compile Include="작업일지\Work_Log.Designer.cs">
|
||||||
<DependentUpon>Work_Log.cs</DependentUpon>
|
<DependentUpon>Work_Log.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<EmbeddedResource Include="ListOfValue\fSelectDT.resx">
|
||||||
|
<DependentUpon>fSelectDT.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="개발자용\fDevDB.resx">
|
<EmbeddedResource Include="개발자용\fDevDB.resx">
|
||||||
<DependentUpon>fDevDB.cs</DependentUpon>
|
<DependentUpon>fDevDB.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
@@ -1021,6 +1040,9 @@
|
|||||||
<EmbeddedResource Include="마크\Check_Copy_Login.resx">
|
<EmbeddedResource Include="마크\Check_Copy_Login.resx">
|
||||||
<DependentUpon>Check_Copy_Login.cs</DependentUpon>
|
<DependentUpon>Check_Copy_Login.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
<EmbeddedResource Include="마크\Check_Copy_Sub_Selector.resx">
|
||||||
|
<DependentUpon>Check_Copy_Sub_Selector.cs</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="마크\Help_007.resx">
|
<EmbeddedResource Include="마크\Help_007.resx">
|
||||||
<DependentUpon>Help_007.cs</DependentUpon>
|
<DependentUpon>Help_007.cs</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<ErrorReportUrlHistory />
|
<ErrorReportUrlHistory />
|
||||||
<FallbackCulture>ko-KR</FallbackCulture>
|
<FallbackCulture>ko-KR</FallbackCulture>
|
||||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||||
<ProjectView>ShowAllFiles</ProjectView>
|
<ProjectView>ProjectFiles</ProjectView>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<EnableSecurityDebugging>false</EnableSecurityDebugging>
|
<EnableSecurityDebugging>false</EnableSecurityDebugging>
|
||||||
|
|||||||
24
unimarc/unimarc/UniMarc.sln
Normal file
24
unimarc/unimarc/UniMarc.sln
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.5.2.0
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UniMarc", "UniMarc.csproj", "{4FCAFD58-3A8E-4E08-85E2-05329866193A}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{4FCAFD58-3A8E-4E08-85E2-05329866193A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{4FCAFD58-3A8E-4E08-85E2-05329866193A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{4FCAFD58-3A8E-4E08-85E2-05329866193A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{4FCAFD58-3A8E-4E08-85E2-05329866193A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {FA0A3E60-8B04-4285-947B-DE3CCCCDEB3B}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
@@ -33,6 +33,10 @@ namespace UniMarc.개발자용
|
|||||||
var sql = $"select * from {cmbTables.Text}";
|
var sql = $"select * from {cmbTables.Text}";
|
||||||
var cn = db.CreateConnection();
|
var cn = db.CreateConnection();
|
||||||
var da = new MySql.Data.MySqlClient.MySqlDataAdapter(sql, cn);
|
var da = new MySql.Data.MySqlClient.MySqlDataAdapter(sql, cn);
|
||||||
|
var cb = new MySql.Data.MySqlClient.MySqlCommandBuilder(da);
|
||||||
|
da.UpdateCommand = cb.GetUpdateCommand();
|
||||||
|
da.InsertCommand = cb.GetInsertCommand();
|
||||||
|
da.DeleteCommand = cb.GetDeleteCommand();
|
||||||
var cnt = da.Update(dt);
|
var cnt = da.Update(dt);
|
||||||
UTIL.MsgI($"P{cnt}");
|
UTIL.MsgI($"P{cnt}");
|
||||||
cn.Dispose();
|
cn.Dispose();
|
||||||
|
|||||||
201
unimarc/unimarc/마스터/Batch_processing.Designer.cs
generated
201
unimarc/unimarc/마스터/Batch_processing.Designer.cs
generated
@@ -28,26 +28,190 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.components = new System.ComponentModel.Container();
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Batch_processing));
|
||||||
|
this.dv1 = new System.Windows.Forms.DataGridView();
|
||||||
|
this.bs = new System.Windows.Forms.BindingSource(this.components);
|
||||||
|
this.bn = new System.Windows.Forms.BindingNavigator(this.components);
|
||||||
|
this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox();
|
||||||
|
this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
|
||||||
|
this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
|
||||||
|
this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.btSave = new System.Windows.Forms.ToolStripButton();
|
||||||
|
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit();
|
||||||
|
this.bn.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// label1
|
// dv1
|
||||||
//
|
//
|
||||||
this.label1.AutoSize = true;
|
this.dv1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.label1.Location = new System.Drawing.Point(311, 121);
|
this.dv1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.label1.Name = "label1";
|
this.dv1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.label1.Size = new System.Drawing.Size(119, 12);
|
this.dv1.Name = "dv1";
|
||||||
this.label1.TabIndex = 0;
|
this.dv1.RowTemplate.Height = 23;
|
||||||
this.label1.Text = "마스터_일괄처리관리";
|
this.dv1.Size = new System.Drawing.Size(866, 559);
|
||||||
|
this.dv1.TabIndex = 0;
|
||||||
|
//
|
||||||
|
// bn
|
||||||
|
//
|
||||||
|
this.bn.AddNewItem = this.bindingNavigatorAddNewItem;
|
||||||
|
this.bn.CountItem = this.bindingNavigatorCountItem;
|
||||||
|
this.bn.DeleteItem = this.bindingNavigatorDeleteItem;
|
||||||
|
this.bn.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
|
this.bn.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.bindingNavigatorMoveFirstItem,
|
||||||
|
this.bindingNavigatorMovePreviousItem,
|
||||||
|
this.bindingNavigatorSeparator,
|
||||||
|
this.bindingNavigatorPositionItem,
|
||||||
|
this.bindingNavigatorCountItem,
|
||||||
|
this.bindingNavigatorSeparator1,
|
||||||
|
this.bindingNavigatorMoveNextItem,
|
||||||
|
this.bindingNavigatorMoveLastItem,
|
||||||
|
this.bindingNavigatorSeparator2,
|
||||||
|
this.bindingNavigatorAddNewItem,
|
||||||
|
this.bindingNavigatorDeleteItem,
|
||||||
|
this.btSave,
|
||||||
|
this.toolStripButton1});
|
||||||
|
this.bn.Location = new System.Drawing.Point(0, 559);
|
||||||
|
this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
|
||||||
|
this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem;
|
||||||
|
this.bn.MoveNextItem = this.bindingNavigatorMoveNextItem;
|
||||||
|
this.bn.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
|
||||||
|
this.bn.Name = "bn";
|
||||||
|
this.bn.PositionItem = this.bindingNavigatorPositionItem;
|
||||||
|
this.bn.Size = new System.Drawing.Size(866, 25);
|
||||||
|
this.bn.TabIndex = 1;
|
||||||
|
this.bn.Text = "bindingNavigator1";
|
||||||
|
//
|
||||||
|
// bindingNavigatorMoveFirstItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image")));
|
||||||
|
this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
|
||||||
|
this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
|
||||||
|
this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(23, 22);
|
||||||
|
this.bindingNavigatorMoveFirstItem.Text = "처음으로 이동";
|
||||||
|
//
|
||||||
|
// bindingNavigatorMovePreviousItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image")));
|
||||||
|
this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
|
||||||
|
this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
|
||||||
|
this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 22);
|
||||||
|
this.bindingNavigatorMovePreviousItem.Text = "이전으로 이동";
|
||||||
|
//
|
||||||
|
// bindingNavigatorSeparator
|
||||||
|
//
|
||||||
|
this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
|
||||||
|
this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 25);
|
||||||
|
//
|
||||||
|
// bindingNavigatorPositionItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorPositionItem.AccessibleName = "위치";
|
||||||
|
this.bindingNavigatorPositionItem.AutoSize = false;
|
||||||
|
this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
|
||||||
|
this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23);
|
||||||
|
this.bindingNavigatorPositionItem.Text = "0";
|
||||||
|
this.bindingNavigatorPositionItem.ToolTipText = "현재 위치";
|
||||||
|
//
|
||||||
|
// bindingNavigatorCountItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
|
||||||
|
this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22);
|
||||||
|
this.bindingNavigatorCountItem.Text = "/{0}";
|
||||||
|
this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수";
|
||||||
|
//
|
||||||
|
// bindingNavigatorSeparator1
|
||||||
|
//
|
||||||
|
this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator";
|
||||||
|
this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25);
|
||||||
|
//
|
||||||
|
// bindingNavigatorMoveNextItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image")));
|
||||||
|
this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
|
||||||
|
this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
|
||||||
|
this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(23, 22);
|
||||||
|
this.bindingNavigatorMoveNextItem.Text = "다음으로 이동";
|
||||||
|
//
|
||||||
|
// bindingNavigatorMoveLastItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image")));
|
||||||
|
this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
|
||||||
|
this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
|
||||||
|
this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 22);
|
||||||
|
this.bindingNavigatorMoveLastItem.Text = "마지막으로 이동";
|
||||||
|
//
|
||||||
|
// bindingNavigatorSeparator2
|
||||||
|
//
|
||||||
|
this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator";
|
||||||
|
this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25);
|
||||||
|
//
|
||||||
|
// bindingNavigatorAddNewItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image")));
|
||||||
|
this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem";
|
||||||
|
this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true;
|
||||||
|
this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(23, 22);
|
||||||
|
this.bindingNavigatorAddNewItem.Text = "새로 추가";
|
||||||
|
//
|
||||||
|
// bindingNavigatorDeleteItem
|
||||||
|
//
|
||||||
|
this.bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||||
|
this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image")));
|
||||||
|
this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem";
|
||||||
|
this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true;
|
||||||
|
this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(23, 22);
|
||||||
|
this.bindingNavigatorDeleteItem.Text = "삭제";
|
||||||
|
//
|
||||||
|
// btSave
|
||||||
|
//
|
||||||
|
this.btSave.Image = ((System.Drawing.Image)(resources.GetObject("btSave.Image")));
|
||||||
|
this.btSave.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
|
this.btSave.Name = "btSave";
|
||||||
|
this.btSave.Size = new System.Drawing.Size(52, 22);
|
||||||
|
this.btSave.Text = "Save";
|
||||||
|
this.btSave.Click += new System.EventHandler(this.btSave_Click);
|
||||||
|
//
|
||||||
|
// toolStripButton1
|
||||||
|
//
|
||||||
|
this.toolStripButton1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||||
|
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
|
||||||
|
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
|
this.toolStripButton1.Name = "toolStripButton1";
|
||||||
|
this.toolStripButton1.Size = new System.Drawing.Size(66, 22);
|
||||||
|
this.toolStripButton1.Text = "Refresh";
|
||||||
|
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
|
||||||
//
|
//
|
||||||
// Batch_processing
|
// Batch_processing
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(800, 450);
|
this.ClientSize = new System.Drawing.Size(866, 584);
|
||||||
this.Controls.Add(this.label1);
|
this.Controls.Add(this.dv1);
|
||||||
|
this.Controls.Add(this.bn);
|
||||||
this.Name = "Batch_processing";
|
this.Name = "Batch_processing";
|
||||||
this.Text = "Batch_processing";
|
this.Text = "Batch_processing";
|
||||||
|
this.Load += new System.EventHandler(this.Batch_processing_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dv1)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.bn)).EndInit();
|
||||||
|
this.bn.ResumeLayout(false);
|
||||||
|
this.bn.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
@@ -55,6 +219,21 @@
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private System.Windows.Forms.Label label1;
|
private System.Windows.Forms.DataGridView dv1;
|
||||||
|
private System.Windows.Forms.BindingSource bs;
|
||||||
|
private System.Windows.Forms.BindingNavigator bn;
|
||||||
|
private System.Windows.Forms.ToolStripButton bindingNavigatorAddNewItem;
|
||||||
|
private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
|
||||||
|
private System.Windows.Forms.ToolStripButton bindingNavigatorDeleteItem;
|
||||||
|
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem;
|
||||||
|
private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator;
|
||||||
|
private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1;
|
||||||
|
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem;
|
||||||
|
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem;
|
||||||
|
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2;
|
||||||
|
private System.Windows.Forms.ToolStripButton btSave;
|
||||||
|
private System.Windows.Forms.ToolStripButton toolStripButton1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System;
|
using AR;
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
@@ -12,11 +13,83 @@ namespace WindowsFormsApp1.Home
|
|||||||
{
|
{
|
||||||
public partial class Batch_processing : Form
|
public partial class Batch_processing : Form
|
||||||
{
|
{
|
||||||
|
Helper_DB db = new Helper_DB();
|
||||||
Main main;
|
Main main;
|
||||||
|
MySql.Data.MySqlClient.MySqlDataAdapter da;
|
||||||
|
DataTable dt = new DataTable();
|
||||||
public Batch_processing(Main _main)
|
public Batch_processing(Main _main)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
main = _main;
|
main = _main;
|
||||||
|
this.Text = $"매크로 데이터 관리";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Batch_processing_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RefreshData();
|
||||||
|
}
|
||||||
|
void RefreshData()
|
||||||
|
{
|
||||||
|
var sql = "select * from SetMacro order by tag";
|
||||||
|
var firstrun = da == null;
|
||||||
|
if(firstrun)
|
||||||
|
{
|
||||||
|
var cn = db.CreateConnection();
|
||||||
|
|
||||||
|
da = new MySql.Data.MySqlClient.MySqlDataAdapter(sql, cn);
|
||||||
|
var cb = new MySql.Data.MySqlClient.MySqlCommandBuilder(da);
|
||||||
|
|
||||||
|
// CommandBuilder가 Insert/Update/Delete 명령을 자동으로 생성하도록 설정
|
||||||
|
da.InsertCommand = cb.GetInsertCommand();
|
||||||
|
da.UpdateCommand = cb.GetUpdateCommand();
|
||||||
|
da.DeleteCommand = cb.GetDeleteCommand();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dt.Clear();
|
||||||
|
da.Fill(dt);
|
||||||
|
dt.AcceptChanges();
|
||||||
|
|
||||||
|
if(firstrun)
|
||||||
|
{
|
||||||
|
this.bs.DataSource = dt;
|
||||||
|
this.bn.BindingSource = this.bs;
|
||||||
|
this.dv1.DataSource = this.bs;
|
||||||
|
|
||||||
|
// idx 열(첫번째 열) 편집 비활성화 및 배경색 회색으로 설정
|
||||||
|
if (this.dv1.Columns.Count > 0)
|
||||||
|
{
|
||||||
|
this.dv1.Columns[0].ReadOnly = true;
|
||||||
|
this.dv1.Columns[0].DefaultCellStyle.BackColor = Color.LightGray;
|
||||||
|
this.dv1.Columns[0].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1, 3번 열 가운데 정렬
|
||||||
|
if (this.dv1.Columns.Count > 1)
|
||||||
|
{
|
||||||
|
this.dv1.Columns[1].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||||
|
}
|
||||||
|
if (this.dv1.Columns.Count > 3)
|
||||||
|
{
|
||||||
|
this.dv1.Columns[3].DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.dv1.AutoResizeColumns();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void btSave_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Validate();
|
||||||
|
this.bs.EndEdit();
|
||||||
|
if (UTIL.MsgQ("자료를 저장할까요?") != DialogResult.Yes) return;
|
||||||
|
var cnt = da.Update(this.dt);
|
||||||
|
dt.AcceptChanges();
|
||||||
|
UTIL.MsgI($"{cnt}건의 자료가 저장 되었습니다");
|
||||||
|
}
|
||||||
|
|
||||||
|
private void toolStripButton1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RefreshData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,4 +117,105 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
|
<metadata name="bs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>17, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="bn.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>156, 17</value>
|
||||||
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="bindingNavigatorAddNewItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFXSURBVDhPzc9LSwJhFAZgd5FkaAlFRCEhVCRm9TssIiqw
|
||||||
|
7CKWXZCQJA1Lw0JIo1Ckm1SL2rSoTYvaBEUQBhEF4YyXaex3fN/3hrNo4SxkNtELZ3U4D+9Rqf5tCmdV
|
||||||
|
yJ5U4zOlxvuBBuX7ismk1CDfGyDFENIJrXLgbV/zCzzE9MqB57gOpLgOIq7iNtJQGfg4rMFrshbpuA5P
|
||||||
|
u3W4j+pBxBVQwYPrUDMuAy248Btw6m3DkccoB18SWpBiEERcAxH9IMIyiOAGLcyB5h2gOTsYPwrGDyG+
|
||||||
|
2CEHHnfqpbr0ywsiLIEWFkDzTtDcJFjWBsYPg3GDYBkrtmdMcuAu0oibcBOupLqtOPcZQLNjYPwIku52
|
||||||
|
7M13IuoyIeI0IzxlkQPlOfYYpbqMG0DM1VX5oDylPxnXD8ZZseUwKweisybp39IE7T3Kgc3pboQmLAiM
|
||||||
|
98Jv61MO/Fl+ACQj2J5cFZvRAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="bindingNavigatorDeleteItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFrSURBVDhPtZBNKMNhHMf/V+WtlIsLSjkgk5iQTIbkJTKN
|
||||||
|
yLwlBw6LhFx2cCDlQg64SA4kJeVEstO8zWtrSn9pWmkX/OPyfMQQnrWm+Fy/3++n5/kpyl+A6xi6q8Gx
|
||||||
|
w88sJFiZR3SWIyxG2FoPKuHmCpZmvndYW4BeE6LViGgvhbmJgJLXFwpLMdh65JwTh19Sm4kw54K14VtJ
|
||||||
|
DHUgTNkwOSKPv8LiNKIs+U3EcAe4T2Gs3y8d6w8+/oArFzQW+L9UnYGo00NfU2jjD9jbRZj0iIpUqNL9
|
||||||
|
cuxRwZwHWTFoumjudZFQkxmaBM81mHIgPw5fWwWcH74d15sSCcuzwSXceaHZwENhPO6iVHz27c8Bo1ac
|
||||||
|
SRFox/uBJTw/wWAbGBI4SonFt7EqFW9L0lBbKtFurqVMYXcTLTsWZ2IYalc9aI9ySVGUnaQoNKdDzpiy
|
||||||
|
oSaH4zamg3opF97RRrrh7EDOuXDC+AAc2OXwP3kBiiMDHFY5tmwAAAAASUVORK5CYII=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAExSURBVDhPY2AYNKBw1vP/TQue/8+c+Pg/uhwMhLc/wCnH
|
||||||
|
kDvz2f9VR97/x6UovvvB/+CGa1jlwCBjytP/C/d9wKoovufh/6X7///3r76AIQcHCT1P/k/b8h5DUUT7
|
||||||
|
fbDmzFn//3uVnsBtQGTXo/+9qz+gKAptvQfW3Lru/3//zr//XfIP4DYgsPnh/7r57+CKglvu/l+09///
|
||||||
|
jnX//2fM+fnfru7nf/uM7bgN8Ki6/z9/2hsURXbFt/+nz/n937/r23+dwnf/LRLW4zbAvvTu/+zJrzEU
|
||||||
|
6aec/29S9OK/Stan/8aRy3AbYJF3539q/2usigySTvyXTfv6Xzd4HoYcHBhm3f4f1vISpyL91Mv/NXyn
|
||||||
|
YZUDA520G//9qh/iVaTiMQGnHINT7pX/IAV4FQ1KAADwdsCrWJS2HgAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="bindingNavigatorMovePreviousItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAC7SURBVDhPY2AYMiC8/cF/dDGiQXz3g//BDdfIMyC+5+H/
|
||||||
|
pfv///evvkC6ARHt98GaM2f9/+9VeoI0A0Jb74E1t677/9+/8+9/l/wDxBsQ3HL3/6K9//93rPv/P2PO
|
||||||
|
z/92dT//22dsJ94AELArvv0/fc7v//5d3/7rFL77b5GwnjQDQEA/5fx/k6IX/1WyPv03jlxGugEgYJB0
|
||||||
|
4r9s2tf/usHzyDMABPRTL//X8J1GvgEgoOIxgTIDBi8AANAUYJgsLP+3AAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="bindingNavigatorMoveNextItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACkSURBVDhPY2AYdKBw1vP/6GIkgdyZz/4ndN8j35CMKU//
|
||||||
|
z9v/+39C1x3yDEnoefJ/9r5f/zu3/v3vVnqZdEMiux79n7Lt1/+SpX//J0z/+98m9yxphgQ2P/zfuvY9
|
||||||
|
WLNxyZf/0tHX/htHLiPeEI+q+/9L5r6Da1Z06SFeMwjYl979H9jyjDzNIGCRd+e/TcEV8jSDgGHWbfI1
|
||||||
|
g4BO2g3yNQ9NAACgfl+gY6ualwAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="bindingNavigatorMoveLastItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAErSURBVDhPY2AYVKBw1vP/6GIwAJJrWvD8f+bExzjVMOTO
|
||||||
|
fPY/ofseVgUguVVH3v8Pb3+AVR4MMqY8/T9v/+//CV13MBSB5Bbu+/A/uOEahhwcJPQ8+T9736//nVv/
|
||||||
|
/ncrvYyiECQ3bcv7//7VF3AbENn16P+Ubb/+lyz9+z9h+t//Nrln4YpBcr2rP/z3Kj2B24DA5of/W9e+
|
||||||
|
B2s2LvnyXzr62n/jyGVgDSC5uvnv/rvkH8BtgEfV/f8lc9/BNSu69MAVg+Typ735b5+xHbcB9qV3/we2
|
||||||
|
PMPQDJPLnvz6v0XCetwGWOTd+W9TcAVDM0wutf813EtYgWHWbayaQQAkF9by8r9u8Dys8mCgk3YDpyRI
|
||||||
|
zq/64X8N32k41eAFTrlX/qt4TABjdLmBBQC+0b+zZl1WGAAAAABJRU5ErkJggg==
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="btSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
|
||||||
|
YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
|
||||||
|
/aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
|
||||||
|
I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
|
||||||
|
cX79DFKrHHD5d9D26hvicx4pABt2lpg10zYzU0zr7+e3xXGcrkEB2O2TNec9nJFwB3alZn5jZorfeDZh
|
||||||
|
6Q3g8s06BeCoKF4MRURoH1+BY2oNCbeb0TIclIYxOhzf8frTOuo7FxCbbVIAzpni0iceEc8vhzEwGkJD
|
||||||
|
lx83ymxifejdKjRNk/8PWnyIyTQqAJek0jqHwfEVscu31baIu8+90sTE4nY025dQ2/5FIPpnXlzKuK8A
|
||||||
|
HBUzHot52djqQ6HZhfR7IwK4mKpHtvEDMqvfCiQ6zaAAXM8x94aIWTNrLLG4kVUzgaTSPlzLtyJOZxbb
|
||||||
|
1wtfyg4Q+AfA3aZlButjSfxGcUJBk4g5tuP3haQKRKXcUQDOmbvNTpPOJeFFjordZmbWTNvMTHFUcpUC
|
||||||
|
nOccAdABIDXXE1nzAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
|
||||||
|
YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
|
||||||
|
/aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
|
||||||
|
I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
|
||||||
|
cX79DFKrHHD5d9D26hvicx4pABt2lpg10zYzU0zr7+e3xXGcrkEB2O2TNec9nJFwB3alZn5jZorfeDZh
|
||||||
|
6Q3g8s06BeCoKF4MRURoH1+BY2oNCbeb0TIclIYxOhzf8frTOuo7FxCbbVIAzpni0iceEc8vhzEwGkJD
|
||||||
|
lx83ymxifejdKjRNk/8PWnyIyTQqAJek0jqHwfEVscu31baIu8+90sTE4nY025dQ2/5FIPpnXlzKuK8A
|
||||||
|
HBUzHot52djqQ6HZhfR7IwK4mKpHtvEDMqvfCiQ6zaAAXM8x94aIWTNrLLG4kVUzgaTSPlzLtyJOZxbb
|
||||||
|
1wtfyg4Q+AfA3aZlButjSfxGcUJBk4g5tuP3haQKRKXcUQDOmbvNTpPOJeFFjordZmbWTNvMTHFUcpUC
|
||||||
|
nOccAdABIDXXE1nzAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -255,7 +255,7 @@ namespace UniMarc.마크
|
|||||||
|
|
||||||
String_Text st = new String_Text();
|
String_Text st = new String_Text();
|
||||||
|
|
||||||
string ViewMarc = st.ConvertMarcType(SelectMarc);
|
string ViewMarc = st.ConvertMarcType(SelectMarc,out string errmesage);
|
||||||
List<string> Tmp = new List<string>(ViewMarc.Split('\n'));
|
List<string> Tmp = new List<string>(ViewMarc.Split('\n'));
|
||||||
for (int a = 0; a < Tmp.Count; a++)
|
for (int a = 0; a < Tmp.Count; a++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ namespace UniMarc.마크
|
|||||||
else
|
else
|
||||||
return;
|
return;
|
||||||
|
|
||||||
richTextBox1.Text = st.ConvertMarcType(dataGridView1.Rows[row].Cells["Marc"].Value.ToString());
|
richTextBox1.Text = st.ConvertMarcType(dataGridView1.Rows[row].Cells["Marc"].Value.ToString(),out string errmesage);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Btn_Excel_Click(object sender, EventArgs e)
|
private void Btn_Excel_Click(object sender, EventArgs e)
|
||||||
|
|||||||
149
unimarc/unimarc/마크/Check_Copy_Sub_Selector.Designer.cs
generated
Normal file
149
unimarc/unimarc/마크/Check_Copy_Sub_Selector.Designer.cs
generated
Normal file
@@ -0,0 +1,149 @@
|
|||||||
|
|
||||||
|
namespace UniMarc.마크
|
||||||
|
{
|
||||||
|
partial class Check_Copy_Sub_Selector
|
||||||
|
{
|
||||||
|
/// <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.dv1 = new System.Windows.Forms.DataGridView();
|
||||||
|
this.lib_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
|
this.tbSearch = new System.Windows.Forms.TextBox();
|
||||||
|
this.btFind = new System.Windows.Forms.Button();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit();
|
||||||
|
this.panel1.SuspendLayout();
|
||||||
|
this.SuspendLayout();
|
||||||
|
//
|
||||||
|
// dv1
|
||||||
|
//
|
||||||
|
this.dv1.AllowUserToAddRows = false;
|
||||||
|
this.dv1.AllowUserToDeleteRows = false;
|
||||||
|
this.dv1.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
|
||||||
|
this.dv1.BackgroundColor = System.Drawing.SystemColors.Control;
|
||||||
|
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.dv1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||||
|
this.dv1.ColumnHeadersHeight = 35;
|
||||||
|
this.dv1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
|
||||||
|
this.dv1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
|
this.lib_name});
|
||||||
|
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||||
|
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
|
||||||
|
dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||||
|
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
|
||||||
|
dataGridViewCellStyle2.Padding = new System.Windows.Forms.Padding(0, 2, 0, 2);
|
||||||
|
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||||
|
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||||
|
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||||
|
this.dv1.DefaultCellStyle = dataGridViewCellStyle2;
|
||||||
|
this.dv1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.dv1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.dv1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
|
this.dv1.Name = "dv1";
|
||||||
|
this.dv1.ReadOnly = true;
|
||||||
|
this.dv1.RowHeadersWidth = 51;
|
||||||
|
this.dv1.RowTemplate.Height = 23;
|
||||||
|
this.dv1.Size = new System.Drawing.Size(631, 823);
|
||||||
|
this.dv1.TabIndex = 0;
|
||||||
|
this.dv1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
|
||||||
|
this.dv1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
|
||||||
|
this.dv1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
|
||||||
|
//
|
||||||
|
// lib_name
|
||||||
|
//
|
||||||
|
this.lib_name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;
|
||||||
|
this.lib_name.HeaderText = "도서관명";
|
||||||
|
this.lib_name.MinimumWidth = 6;
|
||||||
|
this.lib_name.Name = "lib_name";
|
||||||
|
this.lib_name.ReadOnly = true;
|
||||||
|
//
|
||||||
|
// panel1
|
||||||
|
//
|
||||||
|
this.panel1.Controls.Add(this.tbSearch);
|
||||||
|
this.panel1.Controls.Add(this.btFind);
|
||||||
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
|
this.panel1.Location = new System.Drawing.Point(0, 823);
|
||||||
|
this.panel1.Name = "panel1";
|
||||||
|
this.panel1.Padding = new System.Windows.Forms.Padding(3);
|
||||||
|
this.panel1.Size = new System.Drawing.Size(631, 45);
|
||||||
|
this.panel1.TabIndex = 1;
|
||||||
|
//
|
||||||
|
// tbSearch
|
||||||
|
//
|
||||||
|
this.tbSearch.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
|
this.tbSearch.Font = new System.Drawing.Font("굴림", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||||
|
this.tbSearch.Location = new System.Drawing.Point(3, 3);
|
||||||
|
this.tbSearch.Name = "tbSearch";
|
||||||
|
this.tbSearch.Size = new System.Drawing.Size(498, 38);
|
||||||
|
this.tbSearch.TabIndex = 0;
|
||||||
|
this.tbSearch.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
|
// btFind
|
||||||
|
//
|
||||||
|
this.btFind.Dock = System.Windows.Forms.DockStyle.Right;
|
||||||
|
this.btFind.Location = new System.Drawing.Point(501, 3);
|
||||||
|
this.btFind.Name = "btFind";
|
||||||
|
this.btFind.Size = new System.Drawing.Size(127, 39);
|
||||||
|
this.btFind.TabIndex = 1;
|
||||||
|
this.btFind.Text = "검색";
|
||||||
|
this.btFind.UseVisualStyleBackColor = true;
|
||||||
|
this.btFind.Click += new System.EventHandler(this.btFind_Click);
|
||||||
|
//
|
||||||
|
// Check_Copy_Sub_Selector
|
||||||
|
//
|
||||||
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||||
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
|
this.ClientSize = new System.Drawing.Size(631, 868);
|
||||||
|
this.Controls.Add(this.dv1);
|
||||||
|
this.Controls.Add(this.panel1);
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
|
this.Name = "Check_Copy_Sub_Selector";
|
||||||
|
this.Text = "도서관 검색";
|
||||||
|
this.Load += new System.EventHandler(this.Check_Copy_Sub_Selector_Load);
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.dv1)).EndInit();
|
||||||
|
this.panel1.ResumeLayout(false);
|
||||||
|
this.panel1.PerformLayout();
|
||||||
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
private System.Windows.Forms.DataGridView dv1;
|
||||||
|
private System.Windows.Forms.Panel panel1;
|
||||||
|
private System.Windows.Forms.Button btFind;
|
||||||
|
private System.Windows.Forms.TextBox tbSearch;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn lib_name;
|
||||||
|
}
|
||||||
|
}
|
||||||
109
unimarc/unimarc/마크/Check_Copy_Sub_Selector.cs
Normal file
109
unimarc/unimarc/마크/Check_Copy_Sub_Selector.cs
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
using AR;
|
||||||
|
using Org.BouncyCastle.Utilities;
|
||||||
|
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.Windows.Forms.VisualStyles;
|
||||||
|
using WindowsFormsApp1;
|
||||||
|
using WindowsFormsApp1.Mac;
|
||||||
|
|
||||||
|
namespace UniMarc.마크
|
||||||
|
{
|
||||||
|
public partial class Check_Copy_Sub_Selector : Form
|
||||||
|
{
|
||||||
|
string[] Items;
|
||||||
|
public string SelectedValue = string.Empty;
|
||||||
|
public Check_Copy_Sub_Selector(string[] arrays, string search)
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
this.KeyPreview = true;
|
||||||
|
tbSearch.Text = search;
|
||||||
|
this.Items = arrays;
|
||||||
|
this.KeyDown += (s1, e1) => {
|
||||||
|
if (e1.KeyCode == Keys.Escape) this.Close();
|
||||||
|
};
|
||||||
|
this.tbSearch.ImeMode = ImeMode.Hangul;
|
||||||
|
this.tbSearch.KeyDown += (s1, e1) => {
|
||||||
|
if (e1.KeyCode == Keys.Enter) btFind.PerformClick();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
||||||
|
{
|
||||||
|
Skill_Grid sg = new Skill_Grid();
|
||||||
|
sg.Print_Grid_Num(sender, e);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.RowIndex < 0) return;
|
||||||
|
int row = e.RowIndex;
|
||||||
|
|
||||||
|
SetCode(e.RowIndex);
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetCode(int rowindex)
|
||||||
|
{
|
||||||
|
var drow = dv1.Rows[rowindex];
|
||||||
|
var title = drow.Cells[0].Value?.ToString() ?? string.Empty;
|
||||||
|
this.SelectedValue = title;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.KeyCode == Keys.Enter)
|
||||||
|
{
|
||||||
|
if (dv1.Rows.Count <= 0) return;
|
||||||
|
SetCode(dv1.CurrentRow.Index);
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
if (e.KeyCode == Keys.Escape)
|
||||||
|
{
|
||||||
|
SelectedValue = string.Empty;
|
||||||
|
this.Close();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void btFind_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var search = tbSearch.Text.Trim();
|
||||||
|
this.dv1.Rows.Clear();
|
||||||
|
foreach (var item in this.Items)
|
||||||
|
{
|
||||||
|
if (search.isEmpty() || item.ToLower().Contains(search.ToLower()))
|
||||||
|
this.dv1.Rows.Add(item);
|
||||||
|
}
|
||||||
|
if (search.isEmpty() == true)
|
||||||
|
{
|
||||||
|
tbSearch.Focus();
|
||||||
|
tbSearch.SelectAll();
|
||||||
|
}
|
||||||
|
else if (dv1.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
dv1.Focus();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tbSearch.Focus();
|
||||||
|
tbSearch.SelectAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Check_Copy_Sub_Selector_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
this.Show();
|
||||||
|
Application.DoEvents();
|
||||||
|
this.btFind.PerformClick();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -117,10 +117,7 @@
|
|||||||
<resheader name="writer">
|
<resheader name="writer">
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
</resheader>
|
</resheader>
|
||||||
<metadata name="file_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="lib_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>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
</root>
|
</root>
|
||||||
247
unimarc/unimarc/마크/Check_copyWD.Designer.cs
generated
247
unimarc/unimarc/마크/Check_copyWD.Designer.cs
generated
@@ -28,8 +28,11 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
|
this.components = new System.ComponentModel.Container();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
this.panel1 = new System.Windows.Forms.Panel();
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
|
this.label1 = new System.Windows.Forms.Label();
|
||||||
|
this.nudAddDelay = new System.Windows.Forms.NumericUpDown();
|
||||||
this.chkShowBrowser = new System.Windows.Forms.CheckBox();
|
this.chkShowBrowser = new System.Windows.Forms.CheckBox();
|
||||||
this.chkRetryErrData = new System.Windows.Forms.CheckBox();
|
this.chkRetryErrData = new System.Windows.Forms.CheckBox();
|
||||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||||
@@ -44,7 +47,7 @@
|
|||||||
this.btn_Stop = new System.Windows.Forms.Button();
|
this.btn_Stop = new System.Windows.Forms.Button();
|
||||||
this.btn_Close = new System.Windows.Forms.Button();
|
this.btn_Close = new System.Windows.Forms.Button();
|
||||||
this.tb_SearchTarget = new System.Windows.Forms.ComboBox();
|
this.tb_SearchTarget = new System.Windows.Forms.ComboBox();
|
||||||
this.btSearchLibrary = new System.Windows.Forms.Label();
|
this.btSearchLibrary = new System.Windows.Forms.Button();
|
||||||
this.panel2 = new System.Windows.Forms.Panel();
|
this.panel2 = new System.Windows.Forms.Panel();
|
||||||
this.btn_SiteDenote = new System.Windows.Forms.Button();
|
this.btn_SiteDenote = new System.Windows.Forms.Button();
|
||||||
this.lbl_PW = new System.Windows.Forms.Label();
|
this.lbl_PW = new System.Windows.Forms.Label();
|
||||||
@@ -54,6 +57,10 @@
|
|||||||
this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.Count = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.Count = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.dvc_remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.dvc_remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.dvc_resulthtml = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||||
|
this.유니코드문자로붙여넝ㅎ기ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
|
this.일반문자로붙여넣기ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||||
this.btn_ApplyFilter = new System.Windows.Forms.Button();
|
this.btn_ApplyFilter = new System.Windows.Forms.Button();
|
||||||
this.panel3 = new System.Windows.Forms.Panel();
|
this.panel3 = new System.Windows.Forms.Panel();
|
||||||
this.panel6 = new System.Windows.Forms.Panel();
|
this.panel6 = new System.Windows.Forms.Panel();
|
||||||
@@ -67,9 +74,11 @@
|
|||||||
this.btn_OpenMemo = new System.Windows.Forms.Button();
|
this.btn_OpenMemo = new System.Windows.Forms.Button();
|
||||||
this.chk_spChar = new System.Windows.Forms.CheckBox();
|
this.chk_spChar = new System.Windows.Forms.CheckBox();
|
||||||
this.panel1.SuspendLayout();
|
this.panel1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.nudAddDelay)).BeginInit();
|
||||||
this.groupBox1.SuspendLayout();
|
this.groupBox1.SuspendLayout();
|
||||||
this.panel2.SuspendLayout();
|
this.panel2.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit();
|
||||||
|
this.contextMenuStrip1.SuspendLayout();
|
||||||
this.panel3.SuspendLayout();
|
this.panel3.SuspendLayout();
|
||||||
this.panel6.SuspendLayout();
|
this.panel6.SuspendLayout();
|
||||||
this.statusStrip1.SuspendLayout();
|
this.statusStrip1.SuspendLayout();
|
||||||
@@ -79,6 +88,8 @@
|
|||||||
// panel1
|
// panel1
|
||||||
//
|
//
|
||||||
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.panel1.Controls.Add(this.label1);
|
||||||
|
this.panel1.Controls.Add(this.nudAddDelay);
|
||||||
this.panel1.Controls.Add(this.chkShowBrowser);
|
this.panel1.Controls.Add(this.chkShowBrowser);
|
||||||
this.panel1.Controls.Add(this.chkRetryErrData);
|
this.panel1.Controls.Add(this.chkRetryErrData);
|
||||||
this.panel1.Controls.Add(this.groupBox1);
|
this.panel1.Controls.Add(this.groupBox1);
|
||||||
@@ -88,19 +99,39 @@
|
|||||||
this.panel1.Controls.Add(this.btn_Start);
|
this.panel1.Controls.Add(this.btn_Start);
|
||||||
this.panel1.Controls.Add(this.btn_Stop);
|
this.panel1.Controls.Add(this.btn_Stop);
|
||||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.panel1.Location = new System.Drawing.Point(0, 34);
|
this.panel1.Location = new System.Drawing.Point(0, 42);
|
||||||
|
this.panel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.panel1.Name = "panel1";
|
this.panel1.Name = "panel1";
|
||||||
this.panel1.Size = new System.Drawing.Size(637, 106);
|
this.panel1.Size = new System.Drawing.Size(822, 132);
|
||||||
this.panel1.TabIndex = 0;
|
this.panel1.TabIndex = 0;
|
||||||
//
|
//
|
||||||
|
// label1
|
||||||
|
//
|
||||||
|
this.label1.AutoSize = true;
|
||||||
|
this.label1.Location = new System.Drawing.Point(639, 104);
|
||||||
|
this.label1.Name = "label1";
|
||||||
|
this.label1.Size = new System.Drawing.Size(67, 15);
|
||||||
|
this.label1.TabIndex = 10;
|
||||||
|
this.label1.Text = "추가지연";
|
||||||
|
//
|
||||||
|
// nudAddDelay
|
||||||
|
//
|
||||||
|
this.nudAddDelay.Location = new System.Drawing.Point(706, 99);
|
||||||
|
this.nudAddDelay.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
|
this.nudAddDelay.Name = "nudAddDelay";
|
||||||
|
this.nudAddDelay.Size = new System.Drawing.Size(64, 25);
|
||||||
|
this.nudAddDelay.TabIndex = 9;
|
||||||
|
this.nudAddDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
// chkShowBrowser
|
// chkShowBrowser
|
||||||
//
|
//
|
||||||
this.chkShowBrowser.AutoSize = true;
|
this.chkShowBrowser.AutoSize = true;
|
||||||
this.chkShowBrowser.Checked = true;
|
this.chkShowBrowser.Checked = true;
|
||||||
this.chkShowBrowser.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.chkShowBrowser.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.chkShowBrowser.Location = new System.Drawing.Point(515, 81);
|
this.chkShowBrowser.Location = new System.Drawing.Point(706, 62);
|
||||||
|
this.chkShowBrowser.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.chkShowBrowser.Name = "chkShowBrowser";
|
this.chkShowBrowser.Name = "chkShowBrowser";
|
||||||
this.chkShowBrowser.Size = new System.Drawing.Size(96, 16);
|
this.chkShowBrowser.Size = new System.Drawing.Size(119, 19);
|
||||||
this.chkShowBrowser.TabIndex = 8;
|
this.chkShowBrowser.TabIndex = 8;
|
||||||
this.chkShowBrowser.Text = "브라우저표시";
|
this.chkShowBrowser.Text = "브라우저표시";
|
||||||
this.chkShowBrowser.UseVisualStyleBackColor = true;
|
this.chkShowBrowser.UseVisualStyleBackColor = true;
|
||||||
@@ -110,9 +141,10 @@
|
|||||||
this.chkRetryErrData.AutoSize = true;
|
this.chkRetryErrData.AutoSize = true;
|
||||||
this.chkRetryErrData.Checked = true;
|
this.chkRetryErrData.Checked = true;
|
||||||
this.chkRetryErrData.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.chkRetryErrData.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
this.chkRetryErrData.Location = new System.Drawing.Point(319, 81);
|
this.chkRetryErrData.Location = new System.Drawing.Point(365, 101);
|
||||||
|
this.chkRetryErrData.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.chkRetryErrData.Name = "chkRetryErrData";
|
this.chkRetryErrData.Name = "chkRetryErrData";
|
||||||
this.chkRetryErrData.Size = new System.Drawing.Size(188, 16);
|
this.chkRetryErrData.Size = new System.Drawing.Size(234, 19);
|
||||||
this.chkRetryErrData.TabIndex = 7;
|
this.chkRetryErrData.TabIndex = 7;
|
||||||
this.chkRetryErrData.Text = "검색 후 오류 데이터 추가 검색";
|
this.chkRetryErrData.Text = "검색 후 오류 데이터 추가 검색";
|
||||||
this.chkRetryErrData.UseVisualStyleBackColor = true;
|
this.chkRetryErrData.UseVisualStyleBackColor = true;
|
||||||
@@ -123,9 +155,11 @@
|
|||||||
this.groupBox1.Controls.Add(this.radTargetEmpty);
|
this.groupBox1.Controls.Add(this.radTargetEmpty);
|
||||||
this.groupBox1.Controls.Add(this.radTargetErrEmpty);
|
this.groupBox1.Controls.Add(this.radTargetErrEmpty);
|
||||||
this.groupBox1.Controls.Add(this.radTargetAll);
|
this.groupBox1.Controls.Add(this.radTargetAll);
|
||||||
this.groupBox1.Location = new System.Drawing.Point(318, 34);
|
this.groupBox1.Location = new System.Drawing.Point(363, 42);
|
||||||
|
this.groupBox1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.groupBox1.Name = "groupBox1";
|
this.groupBox1.Name = "groupBox1";
|
||||||
this.groupBox1.Size = new System.Drawing.Size(304, 39);
|
this.groupBox1.Padding = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
|
this.groupBox1.Size = new System.Drawing.Size(336, 49);
|
||||||
this.groupBox1.TabIndex = 6;
|
this.groupBox1.TabIndex = 6;
|
||||||
this.groupBox1.TabStop = false;
|
this.groupBox1.TabStop = false;
|
||||||
this.groupBox1.Text = "검색대상";
|
this.groupBox1.Text = "검색대상";
|
||||||
@@ -133,9 +167,10 @@
|
|||||||
// radTargetErr
|
// radTargetErr
|
||||||
//
|
//
|
||||||
this.radTargetErr.AutoSize = true;
|
this.radTargetErr.AutoSize = true;
|
||||||
this.radTargetErr.Location = new System.Drawing.Point(197, 16);
|
this.radTargetErr.Location = new System.Drawing.Point(273, 20);
|
||||||
|
this.radTargetErr.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.radTargetErr.Name = "radTargetErr";
|
this.radTargetErr.Name = "radTargetErr";
|
||||||
this.radTargetErr.Size = new System.Drawing.Size(47, 16);
|
this.radTargetErr.Size = new System.Drawing.Size(58, 19);
|
||||||
this.radTargetErr.TabIndex = 9;
|
this.radTargetErr.TabIndex = 9;
|
||||||
this.radTargetErr.Text = "오류";
|
this.radTargetErr.Text = "오류";
|
||||||
this.radTargetErr.UseVisualStyleBackColor = true;
|
this.radTargetErr.UseVisualStyleBackColor = true;
|
||||||
@@ -143,9 +178,10 @@
|
|||||||
// radTargetEmpty
|
// radTargetEmpty
|
||||||
//
|
//
|
||||||
this.radTargetEmpty.AutoSize = true;
|
this.radTargetEmpty.AutoSize = true;
|
||||||
this.radTargetEmpty.Location = new System.Drawing.Point(144, 16);
|
this.radTargetEmpty.Location = new System.Drawing.Point(197, 20);
|
||||||
|
this.radTargetEmpty.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.radTargetEmpty.Name = "radTargetEmpty";
|
this.radTargetEmpty.Name = "radTargetEmpty";
|
||||||
this.radTargetEmpty.Size = new System.Drawing.Size(47, 16);
|
this.radTargetEmpty.Size = new System.Drawing.Size(58, 19);
|
||||||
this.radTargetEmpty.TabIndex = 8;
|
this.radTargetEmpty.TabIndex = 8;
|
||||||
this.radTargetEmpty.Text = "없음";
|
this.radTargetEmpty.Text = "없음";
|
||||||
this.radTargetEmpty.UseVisualStyleBackColor = true;
|
this.radTargetEmpty.UseVisualStyleBackColor = true;
|
||||||
@@ -153,9 +189,10 @@
|
|||||||
// radTargetErrEmpty
|
// radTargetErrEmpty
|
||||||
//
|
//
|
||||||
this.radTargetErrEmpty.AutoSize = true;
|
this.radTargetErrEmpty.AutoSize = true;
|
||||||
this.radTargetErrEmpty.Location = new System.Drawing.Point(61, 17);
|
this.radTargetErrEmpty.Location = new System.Drawing.Point(86, 20);
|
||||||
|
this.radTargetErrEmpty.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.radTargetErrEmpty.Name = "radTargetErrEmpty";
|
this.radTargetErrEmpty.Name = "radTargetErrEmpty";
|
||||||
this.radTargetErrEmpty.Size = new System.Drawing.Size(77, 16);
|
this.radTargetErrEmpty.Size = new System.Drawing.Size(96, 19);
|
||||||
this.radTargetErrEmpty.TabIndex = 7;
|
this.radTargetErrEmpty.TabIndex = 7;
|
||||||
this.radTargetErrEmpty.Text = "오류+없음";
|
this.radTargetErrEmpty.Text = "오류+없음";
|
||||||
this.radTargetErrEmpty.UseVisualStyleBackColor = true;
|
this.radTargetErrEmpty.UseVisualStyleBackColor = true;
|
||||||
@@ -164,9 +201,10 @@
|
|||||||
//
|
//
|
||||||
this.radTargetAll.AutoSize = true;
|
this.radTargetAll.AutoSize = true;
|
||||||
this.radTargetAll.Checked = true;
|
this.radTargetAll.Checked = true;
|
||||||
this.radTargetAll.Location = new System.Drawing.Point(8, 16);
|
this.radTargetAll.Location = new System.Drawing.Point(9, 20);
|
||||||
|
this.radTargetAll.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.radTargetAll.Name = "radTargetAll";
|
this.radTargetAll.Name = "radTargetAll";
|
||||||
this.radTargetAll.Size = new System.Drawing.Size(47, 16);
|
this.radTargetAll.Size = new System.Drawing.Size(58, 19);
|
||||||
this.radTargetAll.TabIndex = 6;
|
this.radTargetAll.TabIndex = 6;
|
||||||
this.radTargetAll.TabStop = true;
|
this.radTargetAll.TabStop = true;
|
||||||
this.radTargetAll.Text = "전체";
|
this.radTargetAll.Text = "전체";
|
||||||
@@ -175,9 +213,10 @@
|
|||||||
// rb_isNumber
|
// rb_isNumber
|
||||||
//
|
//
|
||||||
this.rb_isNumber.AutoSize = true;
|
this.rb_isNumber.AutoSize = true;
|
||||||
this.rb_isNumber.Location = new System.Drawing.Point(394, 8);
|
this.rb_isNumber.Location = new System.Drawing.Point(450, 10);
|
||||||
|
this.rb_isNumber.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.rb_isNumber.Name = "rb_isNumber";
|
this.rb_isNumber.Name = "rb_isNumber";
|
||||||
this.rb_isNumber.Size = new System.Drawing.Size(71, 16);
|
this.rb_isNumber.Size = new System.Drawing.Size(88, 19);
|
||||||
this.rb_isNumber.TabIndex = 5;
|
this.rb_isNumber.TabIndex = 5;
|
||||||
this.rb_isNumber.TabStop = true;
|
this.rb_isNumber.TabStop = true;
|
||||||
this.rb_isNumber.Text = "숫자표출";
|
this.rb_isNumber.Text = "숫자표출";
|
||||||
@@ -187,9 +226,10 @@
|
|||||||
//
|
//
|
||||||
this.rb_isHave.AutoSize = true;
|
this.rb_isHave.AutoSize = true;
|
||||||
this.rb_isHave.Checked = true;
|
this.rb_isHave.Checked = true;
|
||||||
this.rb_isHave.Location = new System.Drawing.Point(318, 8);
|
this.rb_isHave.Location = new System.Drawing.Point(363, 10);
|
||||||
|
this.rb_isHave.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.rb_isHave.Name = "rb_isHave";
|
this.rb_isHave.Name = "rb_isHave";
|
||||||
this.rb_isHave.Size = new System.Drawing.Size(71, 16);
|
this.rb_isHave.Size = new System.Drawing.Size(88, 19);
|
||||||
this.rb_isHave.TabIndex = 5;
|
this.rb_isHave.TabIndex = 5;
|
||||||
this.rb_isHave.TabStop = true;
|
this.rb_isHave.TabStop = true;
|
||||||
this.rb_isHave.Text = "소장표출";
|
this.rb_isHave.Text = "소장표출";
|
||||||
@@ -197,9 +237,10 @@
|
|||||||
//
|
//
|
||||||
// btn_SearchList
|
// btn_SearchList
|
||||||
//
|
//
|
||||||
this.btn_SearchList.Location = new System.Drawing.Point(4, 4);
|
this.btn_SearchList.Location = new System.Drawing.Point(5, 5);
|
||||||
|
this.btn_SearchList.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_SearchList.Name = "btn_SearchList";
|
this.btn_SearchList.Name = "btn_SearchList";
|
||||||
this.btn_SearchList.Size = new System.Drawing.Size(305, 93);
|
this.btn_SearchList.Size = new System.Drawing.Size(349, 116);
|
||||||
this.btn_SearchList.TabIndex = 3;
|
this.btn_SearchList.TabIndex = 3;
|
||||||
this.btn_SearchList.Text = "목록 검색";
|
this.btn_SearchList.Text = "목록 검색";
|
||||||
this.btn_SearchList.UseVisualStyleBackColor = true;
|
this.btn_SearchList.UseVisualStyleBackColor = true;
|
||||||
@@ -207,9 +248,10 @@
|
|||||||
//
|
//
|
||||||
// btn_Start
|
// btn_Start
|
||||||
//
|
//
|
||||||
this.btn_Start.Location = new System.Drawing.Point(470, 4);
|
this.btn_Start.Location = new System.Drawing.Point(537, 5);
|
||||||
|
this.btn_Start.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_Start.Name = "btn_Start";
|
this.btn_Start.Name = "btn_Start";
|
||||||
this.btn_Start.Size = new System.Drawing.Size(75, 24);
|
this.btn_Start.Size = new System.Drawing.Size(175, 30);
|
||||||
this.btn_Start.TabIndex = 2;
|
this.btn_Start.TabIndex = 2;
|
||||||
this.btn_Start.Text = "검색시작";
|
this.btn_Start.Text = "검색시작";
|
||||||
this.btn_Start.UseVisualStyleBackColor = true;
|
this.btn_Start.UseVisualStyleBackColor = true;
|
||||||
@@ -217,9 +259,10 @@
|
|||||||
//
|
//
|
||||||
// btn_Stop
|
// btn_Stop
|
||||||
//
|
//
|
||||||
this.btn_Stop.Location = new System.Drawing.Point(548, 4);
|
this.btn_Stop.Location = new System.Drawing.Point(721, 5);
|
||||||
|
this.btn_Stop.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_Stop.Name = "btn_Stop";
|
this.btn_Stop.Name = "btn_Stop";
|
||||||
this.btn_Stop.Size = new System.Drawing.Size(75, 24);
|
this.btn_Stop.Size = new System.Drawing.Size(86, 30);
|
||||||
this.btn_Stop.TabIndex = 2;
|
this.btn_Stop.TabIndex = 2;
|
||||||
this.btn_Stop.Text = "검색중지";
|
this.btn_Stop.Text = "검색중지";
|
||||||
this.btn_Stop.UseVisualStyleBackColor = true;
|
this.btn_Stop.UseVisualStyleBackColor = true;
|
||||||
@@ -227,9 +270,10 @@
|
|||||||
//
|
//
|
||||||
// btn_Close
|
// btn_Close
|
||||||
//
|
//
|
||||||
this.btn_Close.Location = new System.Drawing.Point(548, 4);
|
this.btn_Close.Location = new System.Drawing.Point(721, 5);
|
||||||
|
this.btn_Close.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_Close.Name = "btn_Close";
|
this.btn_Close.Name = "btn_Close";
|
||||||
this.btn_Close.Size = new System.Drawing.Size(75, 24);
|
this.btn_Close.Size = new System.Drawing.Size(86, 30);
|
||||||
this.btn_Close.TabIndex = 2;
|
this.btn_Close.TabIndex = 2;
|
||||||
this.btn_Close.Text = "닫 기";
|
this.btn_Close.Text = "닫 기";
|
||||||
this.btn_Close.UseVisualStyleBackColor = true;
|
this.btn_Close.UseVisualStyleBackColor = true;
|
||||||
@@ -237,13 +281,14 @@
|
|||||||
//
|
//
|
||||||
// tb_SearchTarget
|
// tb_SearchTarget
|
||||||
//
|
//
|
||||||
this.tb_SearchTarget.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
|
this.tb_SearchTarget.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
|
||||||
this.tb_SearchTarget.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
this.tb_SearchTarget.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
||||||
this.tb_SearchTarget.Enabled = false;
|
this.tb_SearchTarget.Enabled = false;
|
||||||
this.tb_SearchTarget.ImeMode = System.Windows.Forms.ImeMode.Hangul;
|
this.tb_SearchTarget.ImeMode = System.Windows.Forms.ImeMode.Hangul;
|
||||||
this.tb_SearchTarget.Location = new System.Drawing.Point(66, 6);
|
this.tb_SearchTarget.Location = new System.Drawing.Point(91, 8);
|
||||||
|
this.tb_SearchTarget.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.tb_SearchTarget.Name = "tb_SearchTarget";
|
this.tb_SearchTarget.Name = "tb_SearchTarget";
|
||||||
this.tb_SearchTarget.Size = new System.Drawing.Size(390, 20);
|
this.tb_SearchTarget.Size = new System.Drawing.Size(429, 23);
|
||||||
this.tb_SearchTarget.TabIndex = 1;
|
this.tb_SearchTarget.TabIndex = 1;
|
||||||
this.tb_SearchTarget.SelectedIndexChanged += new System.EventHandler(this.tb_SearchTarget_SelectedIndexChanged);
|
this.tb_SearchTarget.SelectedIndexChanged += new System.EventHandler(this.tb_SearchTarget_SelectedIndexChanged);
|
||||||
this.tb_SearchTarget.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_SearchTarget_KeyDown);
|
this.tb_SearchTarget.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_SearchTarget_KeyDown);
|
||||||
@@ -251,9 +296,9 @@
|
|||||||
// btSearchLibrary
|
// btSearchLibrary
|
||||||
//
|
//
|
||||||
this.btSearchLibrary.AutoSize = true;
|
this.btSearchLibrary.AutoSize = true;
|
||||||
this.btSearchLibrary.Location = new System.Drawing.Point(7, 10);
|
this.btSearchLibrary.Location = new System.Drawing.Point(8, 7);
|
||||||
this.btSearchLibrary.Name = "btSearchLibrary";
|
this.btSearchLibrary.Name = "btSearchLibrary";
|
||||||
this.btSearchLibrary.Size = new System.Drawing.Size(53, 12);
|
this.btSearchLibrary.Size = new System.Drawing.Size(77, 25);
|
||||||
this.btSearchLibrary.TabIndex = 0;
|
this.btSearchLibrary.TabIndex = 0;
|
||||||
this.btSearchLibrary.Text = "검색대상";
|
this.btSearchLibrary.Text = "검색대상";
|
||||||
this.btSearchLibrary.Click += new System.EventHandler(this.btSearchLibrary_Click);
|
this.btSearchLibrary.Click += new System.EventHandler(this.btSearchLibrary_Click);
|
||||||
@@ -269,15 +314,17 @@
|
|||||||
this.panel2.Controls.Add(this.btn_Close);
|
this.panel2.Controls.Add(this.btn_Close);
|
||||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
|
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.panel2.Location = new System.Drawing.Point(0, 0);
|
this.panel2.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panel2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.panel2.Name = "panel2";
|
this.panel2.Name = "panel2";
|
||||||
this.panel2.Size = new System.Drawing.Size(637, 34);
|
this.panel2.Size = new System.Drawing.Size(822, 42);
|
||||||
this.panel2.TabIndex = 0;
|
this.panel2.TabIndex = 0;
|
||||||
//
|
//
|
||||||
// btn_SiteDenote
|
// btn_SiteDenote
|
||||||
//
|
//
|
||||||
this.btn_SiteDenote.Location = new System.Drawing.Point(462, 5);
|
this.btn_SiteDenote.Location = new System.Drawing.Point(537, 6);
|
||||||
|
this.btn_SiteDenote.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_SiteDenote.Name = "btn_SiteDenote";
|
this.btn_SiteDenote.Name = "btn_SiteDenote";
|
||||||
this.btn_SiteDenote.Size = new System.Drawing.Size(77, 23);
|
this.btn_SiteDenote.Size = new System.Drawing.Size(177, 29);
|
||||||
this.btn_SiteDenote.TabIndex = 4;
|
this.btn_SiteDenote.TabIndex = 4;
|
||||||
this.btn_SiteDenote.Text = "사이트 표출";
|
this.btn_SiteDenote.Text = "사이트 표출";
|
||||||
this.btn_SiteDenote.UseVisualStyleBackColor = true;
|
this.btn_SiteDenote.UseVisualStyleBackColor = true;
|
||||||
@@ -286,18 +333,18 @@
|
|||||||
// lbl_PW
|
// lbl_PW
|
||||||
//
|
//
|
||||||
this.lbl_PW.AutoSize = true;
|
this.lbl_PW.AutoSize = true;
|
||||||
this.lbl_PW.Location = new System.Drawing.Point(379, 10);
|
this.lbl_PW.Location = new System.Drawing.Point(433, 12);
|
||||||
this.lbl_PW.Name = "lbl_PW";
|
this.lbl_PW.Name = "lbl_PW";
|
||||||
this.lbl_PW.Size = new System.Drawing.Size(9, 12);
|
this.lbl_PW.Size = new System.Drawing.Size(12, 15);
|
||||||
this.lbl_PW.TabIndex = 3;
|
this.lbl_PW.TabIndex = 3;
|
||||||
this.lbl_PW.Text = " ";
|
this.lbl_PW.Text = " ";
|
||||||
//
|
//
|
||||||
// lbl_ID
|
// lbl_ID
|
||||||
//
|
//
|
||||||
this.lbl_ID.AutoSize = true;
|
this.lbl_ID.AutoSize = true;
|
||||||
this.lbl_ID.Location = new System.Drawing.Point(316, 10);
|
this.lbl_ID.Location = new System.Drawing.Point(361, 12);
|
||||||
this.lbl_ID.Name = "lbl_ID";
|
this.lbl_ID.Name = "lbl_ID";
|
||||||
this.lbl_ID.Size = new System.Drawing.Size(9, 12);
|
this.lbl_ID.Size = new System.Drawing.Size(12, 15);
|
||||||
this.lbl_ID.TabIndex = 3;
|
this.lbl_ID.TabIndex = 3;
|
||||||
this.lbl_ID.Text = " ";
|
this.lbl_ID.Text = " ";
|
||||||
//
|
//
|
||||||
@@ -320,12 +367,16 @@
|
|||||||
this.book_name,
|
this.book_name,
|
||||||
this.book_comp,
|
this.book_comp,
|
||||||
this.Count,
|
this.Count,
|
||||||
this.dvc_remark});
|
this.dvc_remark,
|
||||||
|
this.dvc_resulthtml});
|
||||||
|
this.dv1.ContextMenuStrip = this.contextMenuStrip1;
|
||||||
this.dv1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.dv1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.dv1.Location = new System.Drawing.Point(0, 0);
|
this.dv1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.dv1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.dv1.Name = "dv1";
|
this.dv1.Name = "dv1";
|
||||||
|
this.dv1.RowHeadersWidth = 51;
|
||||||
this.dv1.RowTemplate.Height = 23;
|
this.dv1.RowTemplate.Height = 23;
|
||||||
this.dv1.Size = new System.Drawing.Size(637, 542);
|
this.dv1.Size = new System.Drawing.Size(822, 680);
|
||||||
this.dv1.TabIndex = 1;
|
this.dv1.TabIndex = 1;
|
||||||
this.dv1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
|
this.dv1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
|
||||||
this.dv1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
|
this.dv1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
|
||||||
@@ -333,6 +384,7 @@
|
|||||||
// book_name
|
// book_name
|
||||||
//
|
//
|
||||||
this.book_name.HeaderText = "도서명(총서명)";
|
this.book_name.HeaderText = "도서명(총서명)";
|
||||||
|
this.book_name.MinimumWidth = 6;
|
||||||
this.book_name.Name = "book_name";
|
this.book_name.Name = "book_name";
|
||||||
this.book_name.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
this.book_name.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||||
this.book_name.Width = 300;
|
this.book_name.Width = 300;
|
||||||
@@ -340,6 +392,7 @@
|
|||||||
// book_comp
|
// book_comp
|
||||||
//
|
//
|
||||||
this.book_comp.HeaderText = "출판사";
|
this.book_comp.HeaderText = "출판사";
|
||||||
|
this.book_comp.MinimumWidth = 6;
|
||||||
this.book_comp.Name = "book_comp";
|
this.book_comp.Name = "book_comp";
|
||||||
this.book_comp.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
this.book_comp.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||||
this.book_comp.Width = 120;
|
this.book_comp.Width = 120;
|
||||||
@@ -347,6 +400,7 @@
|
|||||||
// Count
|
// Count
|
||||||
//
|
//
|
||||||
this.Count.HeaderText = "검색 수";
|
this.Count.HeaderText = "검색 수";
|
||||||
|
this.Count.MinimumWidth = 6;
|
||||||
this.Count.Name = "Count";
|
this.Count.Name = "Count";
|
||||||
this.Count.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
this.Count.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
|
||||||
this.Count.Width = 50;
|
this.Count.Width = 50;
|
||||||
@@ -354,14 +408,46 @@
|
|||||||
// dvc_remark
|
// dvc_remark
|
||||||
//
|
//
|
||||||
this.dvc_remark.HeaderText = "비고";
|
this.dvc_remark.HeaderText = "비고";
|
||||||
|
this.dvc_remark.MinimumWidth = 6;
|
||||||
this.dvc_remark.Name = "dvc_remark";
|
this.dvc_remark.Name = "dvc_remark";
|
||||||
this.dvc_remark.Width = 110;
|
this.dvc_remark.Width = 110;
|
||||||
//
|
//
|
||||||
|
// dvc_resulthtml
|
||||||
|
//
|
||||||
|
this.dvc_resulthtml.HeaderText = "결과";
|
||||||
|
this.dvc_resulthtml.MinimumWidth = 6;
|
||||||
|
this.dvc_resulthtml.Name = "dvc_resulthtml";
|
||||||
|
this.dvc_resulthtml.Width = 125;
|
||||||
|
//
|
||||||
|
// contextMenuStrip1
|
||||||
|
//
|
||||||
|
this.contextMenuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||||
|
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.유니코드문자로붙여넝ㅎ기ToolStripMenuItem,
|
||||||
|
this.일반문자로붙여넣기ToolStripMenuItem});
|
||||||
|
this.contextMenuStrip1.Name = "contextMenuStrip1";
|
||||||
|
this.contextMenuStrip1.Size = new System.Drawing.Size(254, 52);
|
||||||
|
//
|
||||||
|
// 유니코드문자로붙여넝ㅎ기ToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.유니코드문자로붙여넝ㅎ기ToolStripMenuItem.Name = "유니코드문자로붙여넝ㅎ기ToolStripMenuItem";
|
||||||
|
this.유니코드문자로붙여넝ㅎ기ToolStripMenuItem.Size = new System.Drawing.Size(253, 24);
|
||||||
|
this.유니코드문자로붙여넝ㅎ기ToolStripMenuItem.Text = "유니코드 문자로 붙여넣기";
|
||||||
|
this.유니코드문자로붙여넝ㅎ기ToolStripMenuItem.Click += new System.EventHandler(this.유니코드문자로붙여넝ㅎ기ToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
|
// 일반문자로붙여넣기ToolStripMenuItem
|
||||||
|
//
|
||||||
|
this.일반문자로붙여넣기ToolStripMenuItem.Name = "일반문자로붙여넣기ToolStripMenuItem";
|
||||||
|
this.일반문자로붙여넣기ToolStripMenuItem.Size = new System.Drawing.Size(253, 24);
|
||||||
|
this.일반문자로붙여넣기ToolStripMenuItem.Text = "일반 문자로 붙여넣기";
|
||||||
|
this.일반문자로붙여넣기ToolStripMenuItem.Click += new System.EventHandler(this.일반문자로붙여넣기ToolStripMenuItem_Click);
|
||||||
|
//
|
||||||
// btn_ApplyFilter
|
// btn_ApplyFilter
|
||||||
//
|
//
|
||||||
this.btn_ApplyFilter.Location = new System.Drawing.Point(317, 4);
|
this.btn_ApplyFilter.Location = new System.Drawing.Point(362, 5);
|
||||||
|
this.btn_ApplyFilter.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_ApplyFilter.Name = "btn_ApplyFilter";
|
this.btn_ApplyFilter.Name = "btn_ApplyFilter";
|
||||||
this.btn_ApplyFilter.Size = new System.Drawing.Size(75, 24);
|
this.btn_ApplyFilter.Size = new System.Drawing.Size(86, 30);
|
||||||
this.btn_ApplyFilter.TabIndex = 2;
|
this.btn_ApplyFilter.TabIndex = 2;
|
||||||
this.btn_ApplyFilter.Text = "필터적용";
|
this.btn_ApplyFilter.Text = "필터적용";
|
||||||
this.btn_ApplyFilter.UseVisualStyleBackColor = true;
|
this.btn_ApplyFilter.UseVisualStyleBackColor = true;
|
||||||
@@ -375,8 +461,9 @@
|
|||||||
this.panel3.Controls.Add(this.panel2);
|
this.panel3.Controls.Add(this.panel2);
|
||||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.panel3.Location = new System.Drawing.Point(0, 0);
|
this.panel3.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panel3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.panel3.Name = "panel3";
|
this.panel3.Name = "panel3";
|
||||||
this.panel3.Size = new System.Drawing.Size(637, 738);
|
this.panel3.Size = new System.Drawing.Size(822, 922);
|
||||||
this.panel3.TabIndex = 3;
|
this.panel3.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// panel6
|
// panel6
|
||||||
@@ -384,32 +471,35 @@
|
|||||||
this.panel6.Controls.Add(this.dv1);
|
this.panel6.Controls.Add(this.dv1);
|
||||||
this.panel6.Controls.Add(this.statusStrip1);
|
this.panel6.Controls.Add(this.statusStrip1);
|
||||||
this.panel6.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.panel6.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.panel6.Location = new System.Drawing.Point(0, 174);
|
this.panel6.Location = new System.Drawing.Point(0, 216);
|
||||||
|
this.panel6.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.panel6.Name = "panel6";
|
this.panel6.Name = "panel6";
|
||||||
this.panel6.Size = new System.Drawing.Size(637, 564);
|
this.panel6.Size = new System.Drawing.Size(822, 706);
|
||||||
this.panel6.TabIndex = 3;
|
this.panel6.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// statusStrip1
|
// statusStrip1
|
||||||
//
|
//
|
||||||
|
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.lblStatus,
|
this.lblStatus,
|
||||||
this.lbSite});
|
this.lbSite});
|
||||||
this.statusStrip1.Location = new System.Drawing.Point(0, 542);
|
this.statusStrip1.Location = new System.Drawing.Point(0, 680);
|
||||||
this.statusStrip1.Name = "statusStrip1";
|
this.statusStrip1.Name = "statusStrip1";
|
||||||
this.statusStrip1.Size = new System.Drawing.Size(637, 22);
|
this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 16, 0);
|
||||||
|
this.statusStrip1.Size = new System.Drawing.Size(822, 26);
|
||||||
this.statusStrip1.TabIndex = 2;
|
this.statusStrip1.TabIndex = 2;
|
||||||
this.statusStrip1.Text = "statusStrip1";
|
this.statusStrip1.Text = "statusStrip1";
|
||||||
//
|
//
|
||||||
// lblStatus
|
// lblStatus
|
||||||
//
|
//
|
||||||
this.lblStatus.Name = "lblStatus";
|
this.lblStatus.Name = "lblStatus";
|
||||||
this.lblStatus.Size = new System.Drawing.Size(27, 20);
|
this.lblStatus.Size = new System.Drawing.Size(34, 24);
|
||||||
this.lblStatus.Text = "WD";
|
this.lblStatus.Text = "WD";
|
||||||
//
|
//
|
||||||
// lbSite
|
// lbSite
|
||||||
//
|
//
|
||||||
this.lbSite.Name = "lbSite";
|
this.lbSite.Name = "lbSite";
|
||||||
this.lbSite.Size = new System.Drawing.Size(55, 17);
|
this.lbSite.Size = new System.Drawing.Size(68, 20);
|
||||||
this.lbSite.Text = "-- Site --";
|
this.lbSite.Text = "-- Site --";
|
||||||
//
|
//
|
||||||
// panel4
|
// panel4
|
||||||
@@ -422,26 +512,29 @@
|
|||||||
this.panel4.Controls.Add(this.btn_ApplyFilter);
|
this.panel4.Controls.Add(this.btn_ApplyFilter);
|
||||||
this.panel4.Controls.Add(this.chk_spChar);
|
this.panel4.Controls.Add(this.chk_spChar);
|
||||||
this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
|
this.panel4.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.panel4.Location = new System.Drawing.Point(0, 140);
|
this.panel4.Location = new System.Drawing.Point(0, 174);
|
||||||
|
this.panel4.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.panel4.Name = "panel4";
|
this.panel4.Name = "panel4";
|
||||||
this.panel4.Size = new System.Drawing.Size(637, 34);
|
this.panel4.Size = new System.Drawing.Size(822, 42);
|
||||||
this.panel4.TabIndex = 2;
|
this.panel4.TabIndex = 2;
|
||||||
//
|
//
|
||||||
// chk_RemoveBrit
|
// chk_RemoveBrit
|
||||||
//
|
//
|
||||||
this.chk_RemoveBrit.AutoSize = true;
|
this.chk_RemoveBrit.AutoSize = true;
|
||||||
this.chk_RemoveBrit.Location = new System.Drawing.Point(113, 8);
|
this.chk_RemoveBrit.Location = new System.Drawing.Point(129, 10);
|
||||||
|
this.chk_RemoveBrit.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.chk_RemoveBrit.Name = "chk_RemoveBrit";
|
this.chk_RemoveBrit.Name = "chk_RemoveBrit";
|
||||||
this.chk_RemoveBrit.Size = new System.Drawing.Size(128, 16);
|
this.chk_RemoveBrit.Size = new System.Drawing.Size(159, 19);
|
||||||
this.chk_RemoveBrit.TabIndex = 0;
|
this.chk_RemoveBrit.TabIndex = 0;
|
||||||
this.chk_RemoveBrit.Text = "괄호안의 문자 제거";
|
this.chk_RemoveBrit.Text = "괄호안의 문자 제거";
|
||||||
this.chk_RemoveBrit.UseVisualStyleBackColor = true;
|
this.chk_RemoveBrit.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// btn_ResultEmpty
|
// btn_ResultEmpty
|
||||||
//
|
//
|
||||||
this.btn_ResultEmpty.Location = new System.Drawing.Point(471, 4);
|
this.btn_ResultEmpty.Location = new System.Drawing.Point(538, 5);
|
||||||
|
this.btn_ResultEmpty.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_ResultEmpty.Name = "btn_ResultEmpty";
|
this.btn_ResultEmpty.Name = "btn_ResultEmpty";
|
||||||
this.btn_ResultEmpty.Size = new System.Drawing.Size(75, 24);
|
this.btn_ResultEmpty.Size = new System.Drawing.Size(86, 30);
|
||||||
this.btn_ResultEmpty.TabIndex = 2;
|
this.btn_ResultEmpty.TabIndex = 2;
|
||||||
this.btn_ResultEmpty.Text = "결과 비움";
|
this.btn_ResultEmpty.Text = "결과 비움";
|
||||||
this.btn_ResultEmpty.UseVisualStyleBackColor = true;
|
this.btn_ResultEmpty.UseVisualStyleBackColor = true;
|
||||||
@@ -449,9 +542,10 @@
|
|||||||
//
|
//
|
||||||
// btn_GridReset
|
// btn_GridReset
|
||||||
//
|
//
|
||||||
this.btn_GridReset.Location = new System.Drawing.Point(548, 4);
|
this.btn_GridReset.Location = new System.Drawing.Point(626, 5);
|
||||||
|
this.btn_GridReset.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_GridReset.Name = "btn_GridReset";
|
this.btn_GridReset.Name = "btn_GridReset";
|
||||||
this.btn_GridReset.Size = new System.Drawing.Size(75, 24);
|
this.btn_GridReset.Size = new System.Drawing.Size(86, 30);
|
||||||
this.btn_GridReset.TabIndex = 2;
|
this.btn_GridReset.TabIndex = 2;
|
||||||
this.btn_GridReset.Text = "표 비우기";
|
this.btn_GridReset.Text = "표 비우기";
|
||||||
this.btn_GridReset.UseVisualStyleBackColor = true;
|
this.btn_GridReset.UseVisualStyleBackColor = true;
|
||||||
@@ -459,9 +553,10 @@
|
|||||||
//
|
//
|
||||||
// btn_OpenMemo
|
// btn_OpenMemo
|
||||||
//
|
//
|
||||||
this.btn_OpenMemo.Location = new System.Drawing.Point(394, 4);
|
this.btn_OpenMemo.Location = new System.Drawing.Point(450, 5);
|
||||||
|
this.btn_OpenMemo.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_OpenMemo.Name = "btn_OpenMemo";
|
this.btn_OpenMemo.Name = "btn_OpenMemo";
|
||||||
this.btn_OpenMemo.Size = new System.Drawing.Size(75, 24);
|
this.btn_OpenMemo.Size = new System.Drawing.Size(86, 30);
|
||||||
this.btn_OpenMemo.TabIndex = 2;
|
this.btn_OpenMemo.TabIndex = 2;
|
||||||
this.btn_OpenMemo.Text = ".txt 열기";
|
this.btn_OpenMemo.Text = ".txt 열기";
|
||||||
this.btn_OpenMemo.UseVisualStyleBackColor = true;
|
this.btn_OpenMemo.UseVisualStyleBackColor = true;
|
||||||
@@ -470,30 +565,34 @@
|
|||||||
// chk_spChar
|
// chk_spChar
|
||||||
//
|
//
|
||||||
this.chk_spChar.AutoSize = true;
|
this.chk_spChar.AutoSize = true;
|
||||||
this.chk_spChar.Location = new System.Drawing.Point(7, 8);
|
this.chk_spChar.Location = new System.Drawing.Point(8, 10);
|
||||||
|
this.chk_spChar.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.chk_spChar.Name = "chk_spChar";
|
this.chk_spChar.Name = "chk_spChar";
|
||||||
this.chk_spChar.Size = new System.Drawing.Size(100, 16);
|
this.chk_spChar.Size = new System.Drawing.Size(124, 19);
|
||||||
this.chk_spChar.TabIndex = 0;
|
this.chk_spChar.TabIndex = 0;
|
||||||
this.chk_spChar.Text = "특수문자 제거";
|
this.chk_spChar.Text = "특수문자 제거";
|
||||||
this.chk_spChar.UseVisualStyleBackColor = true;
|
this.chk_spChar.UseVisualStyleBackColor = true;
|
||||||
//
|
//
|
||||||
// Check_copyWD
|
// Check_copyWD
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(637, 738);
|
this.ClientSize = new System.Drawing.Size(822, 922);
|
||||||
this.Controls.Add(this.panel3);
|
this.Controls.Add(this.panel3);
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.Name = "Check_copyWD";
|
this.Name = "Check_copyWD";
|
||||||
this.Text = "복본조사(New)";
|
this.Text = "복본조사(New)";
|
||||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Check_copy_FormClosing);
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Check_copy_FormClosing);
|
||||||
this.Load += new System.EventHandler(this.Check_copy_Load);
|
this.Load += new System.EventHandler(this.Check_copy_Load);
|
||||||
this.panel1.ResumeLayout(false);
|
this.panel1.ResumeLayout(false);
|
||||||
this.panel1.PerformLayout();
|
this.panel1.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.nudAddDelay)).EndInit();
|
||||||
this.groupBox1.ResumeLayout(false);
|
this.groupBox1.ResumeLayout(false);
|
||||||
this.groupBox1.PerformLayout();
|
this.groupBox1.PerformLayout();
|
||||||
this.panel2.ResumeLayout(false);
|
this.panel2.ResumeLayout(false);
|
||||||
this.panel2.PerformLayout();
|
this.panel2.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dv1)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.dv1)).EndInit();
|
||||||
|
this.contextMenuStrip1.ResumeLayout(false);
|
||||||
this.panel3.ResumeLayout(false);
|
this.panel3.ResumeLayout(false);
|
||||||
this.panel6.ResumeLayout(false);
|
this.panel6.ResumeLayout(false);
|
||||||
this.panel6.PerformLayout();
|
this.panel6.PerformLayout();
|
||||||
@@ -508,7 +607,7 @@
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private System.Windows.Forms.Panel panel1;
|
private System.Windows.Forms.Panel panel1;
|
||||||
private System.Windows.Forms.Label btSearchLibrary;
|
private System.Windows.Forms.Button btSearchLibrary;
|
||||||
private System.Windows.Forms.Panel panel2;
|
private System.Windows.Forms.Panel panel2;
|
||||||
private System.Windows.Forms.Button btn_Close;
|
private System.Windows.Forms.Button btn_Close;
|
||||||
private System.Windows.Forms.Button btn_Stop;
|
private System.Windows.Forms.Button btn_Stop;
|
||||||
@@ -536,13 +635,19 @@
|
|||||||
private System.Windows.Forms.RadioButton radTargetErr;
|
private System.Windows.Forms.RadioButton radTargetErr;
|
||||||
private System.Windows.Forms.RadioButton radTargetEmpty;
|
private System.Windows.Forms.RadioButton radTargetEmpty;
|
||||||
private System.Windows.Forms.RadioButton radTargetErrEmpty;
|
private System.Windows.Forms.RadioButton radTargetErrEmpty;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn book_name;
|
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn book_comp;
|
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn Count;
|
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn dvc_remark;
|
|
||||||
public System.Windows.Forms.CheckBox chkRetryErrData;
|
public System.Windows.Forms.CheckBox chkRetryErrData;
|
||||||
public System.Windows.Forms.GroupBox groupBox1;
|
public System.Windows.Forms.GroupBox groupBox1;
|
||||||
public System.Windows.Forms.CheckBox chkShowBrowser;
|
public System.Windows.Forms.CheckBox chkShowBrowser;
|
||||||
private System.Windows.Forms.ToolStripStatusLabel lbSite;
|
private System.Windows.Forms.ToolStripStatusLabel lbSite;
|
||||||
|
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem 유니코드문자로붙여넝ㅎ기ToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.ToolStripMenuItem 일반문자로붙여넣기ToolStripMenuItem;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn book_name;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn book_comp;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn Count;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn dvc_remark;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn dvc_resulthtml;
|
||||||
|
private System.Windows.Forms.NumericUpDown nudAddDelay;
|
||||||
|
private System.Windows.Forms.Label label1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,9 @@ using AR;
|
|||||||
using UniMarc.SearchModel;
|
using UniMarc.SearchModel;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using UniMarc;
|
using UniMarc;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace WindowsFormsApp1.Mac
|
namespace WindowsFormsApp1.Mac
|
||||||
{
|
{
|
||||||
@@ -28,7 +31,7 @@ namespace WindowsFormsApp1.Mac
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return (DateTime.Now <= new DateTime(2025, 09, 30));
|
return (DateTime.Now <= new DateTime(2025, 12, 30));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -38,6 +41,9 @@ namespace WindowsFormsApp1.Mac
|
|||||||
main = _main;
|
main = _main;
|
||||||
db.DBcon();
|
db.DBcon();
|
||||||
|
|
||||||
|
// 도서관별 지연시간 설정 초기화
|
||||||
|
_delaySettings = new Helper_LibraryDelaySettings();
|
||||||
|
|
||||||
var idx = 1;
|
var idx = 1;
|
||||||
//도서검색(크롤링)
|
//도서검색(크롤링)
|
||||||
_searchService = new BookSearchService();
|
_searchService = new BookSearchService();
|
||||||
@@ -49,7 +55,7 @@ namespace WindowsFormsApp1.Mac
|
|||||||
_searchService.AddSearcher(new NamguLibrarySearcher(idx++, "#libSW", "효천어울림도서관"));
|
_searchService.AddSearcher(new NamguLibrarySearcher(idx++, "#libSW", "효천어울림도서관"));
|
||||||
|
|
||||||
|
|
||||||
if (GetDemoRunAuth == true)
|
|
||||||
{
|
{
|
||||||
//광주시교육청통합도서관
|
//광주시교육청통합도서관
|
||||||
_searchService.AddSearcher(new KwangjuCityEduLibrarySearcher(idx++, "MD", "중앙도서관"));
|
_searchService.AddSearcher(new KwangjuCityEduLibrarySearcher(idx++, "MD", "중앙도서관"));
|
||||||
@@ -405,6 +411,21 @@ namespace WindowsFormsApp1.Mac
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//고창도서관 추가 250903
|
||||||
|
|
||||||
|
_searchService.AddSearcher(new GochangLibSearcher(idx++, "MA", "고창군립도서관"));
|
||||||
|
_searchService.AddSearcher(new GochangLibSearcher(idx++, "MB", "선운산작은도서관"));
|
||||||
|
_searchService.AddSearcher(new GochangLibSearcher(idx++, "MC", "고수해마루작은도서관"));
|
||||||
|
_searchService.AddSearcher(new GochangLibSearcher(idx++, "MD", "고창군립성호도서관"));
|
||||||
|
_searchService.AddSearcher(new GochangLibSearcher(idx++, "ME", "대산큰별작은도서관"));
|
||||||
|
_searchService.AddSearcher(new GochangLibSearcher(idx++, "MF", "무장글샘작은도서관"));
|
||||||
|
_searchService.AddSearcher(new GochangLibSearcher(idx++, "MG", "글마루작은도서관"));
|
||||||
|
_searchService.AddSearcher(new GochangLibSearcher(idx++, "MH", "흥덕가온누리작은도서관"));
|
||||||
|
_searchService.AddSearcher(new GochangLibSearcher(idx++, "MI", "공음참나무골작은도서관"));
|
||||||
|
|
||||||
|
//전라남도립도서관 추가 250917
|
||||||
|
_searchService.AddSearcher(new JeonnamProvLibSearcher(idx++, "all", "전라남도립도서관"));
|
||||||
|
|
||||||
this.tb_SearchTarget.Items.Clear();
|
this.tb_SearchTarget.Items.Clear();
|
||||||
// this.tb_SearchTarget.Items.Add("-- 검색대상을 선택하세요 --");
|
// this.tb_SearchTarget.Items.Add("-- 검색대상을 선택하세요 --");
|
||||||
foreach (var item in _searchService.GetAvailableSites().OrderBy(t => t))
|
foreach (var item in _searchService.GetAvailableSites().OrderBy(t => t))
|
||||||
@@ -436,6 +457,7 @@ namespace WindowsFormsApp1.Mac
|
|||||||
|
|
||||||
private readonly BookSearchService _searchService;
|
private readonly BookSearchService _searchService;
|
||||||
private bool _isSearching = false;
|
private bool _isSearching = false;
|
||||||
|
private readonly Helper_LibraryDelaySettings _delaySettings;
|
||||||
|
|
||||||
private async void InitializeChromeDriver()
|
private async void InitializeChromeDriver()
|
||||||
{
|
{
|
||||||
@@ -533,13 +555,23 @@ namespace WindowsFormsApp1.Mac
|
|||||||
string Target = tb_SearchTarget.Text;
|
string Target = tb_SearchTarget.Text;
|
||||||
// if (Target == "") { MessageBox.Show("도서관명이 비어있습니다."); return; }
|
// if (Target == "") { MessageBox.Show("도서관명이 비어있습니다."); return; }
|
||||||
|
|
||||||
string area = "`Province`, `Area`, `LibName`, `Code`, `URL`, `SearcherNo`";
|
List<string> items = new List<string>();
|
||||||
string cmd = string.Format("SELECT {0} FROM `lib_CopyCheck` WHERE CONCAT( province , '_' , AREA , '_' , libname) LIKE '%{1}%' and ifnull(searcherno,0) > 0 ;", area, Target);
|
foreach (string item in tb_SearchTarget.Items)
|
||||||
string data = db.self_Made_Cmd(cmd);
|
{
|
||||||
string[] ary = data.Split('|');
|
if (items.Contains(item) == false) items.Add(item);
|
||||||
Check_Copy_Sub_Search ccs = new Check_Copy_Sub_Search(this);
|
}
|
||||||
ccs.Init(ary, Target);
|
|
||||||
ccs.Show();
|
|
||||||
|
//string area = "`Province`, `Area`, `LibName`, `Code`, `URL`, `SearcherNo`";
|
||||||
|
//string cmd = string.Format("SELECT {0} FROM `lib_CopyCheck` WHERE CONCAT( province , '_' , AREA , '_' , libname) LIKE '%{1}%' and ifnull(searcherno,0) > 0 ;", area, Target);
|
||||||
|
//string data = db.self_Made_Cmd(cmd);
|
||||||
|
string[] ary = items.ToArray();// data.Split('|');
|
||||||
|
using (var ccs = new Check_Copy_Sub_Selector(items.ToArray(), Target))
|
||||||
|
{
|
||||||
|
ccs.ShowDialog();
|
||||||
|
if (ccs.SelectedValue.isEmpty() == false)
|
||||||
|
tb_SearchTarget.Text = ccs.SelectedValue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void btn_SearchList_Click(object sender, EventArgs e)
|
private void btn_SearchList_Click(object sender, EventArgs e)
|
||||||
@@ -598,7 +630,10 @@ namespace WindowsFormsApp1.Mac
|
|||||||
int cnt_ok = 0;
|
int cnt_ok = 0;
|
||||||
int cnt_ng = 0;
|
int cnt_ng = 0;
|
||||||
int cnt_er = 0;
|
int cnt_er = 0;
|
||||||
|
int addDelay = (int)nudAddDelay.Value * 1000; //추가 지연시간 : 1개의 레코드 처리 후 추가 지연한다.
|
||||||
|
|
||||||
|
// 현재 지연시간을 도서관별로 저장
|
||||||
|
SaveLibraryDelaySettings(searcher.SiteName, (int)nudAddDelay.Value);
|
||||||
|
|
||||||
RetrySearch:
|
RetrySearch:
|
||||||
foreach (DataGridViewRow drow in this.dv1.Rows)
|
foreach (DataGridViewRow drow in this.dv1.Rows)
|
||||||
@@ -606,6 +641,10 @@ namespace WindowsFormsApp1.Mac
|
|||||||
if (this._isSearching == false)
|
if (this._isSearching == false)
|
||||||
{
|
{
|
||||||
drow.Cells["dvc_remark"].Value = "Cancel";
|
drow.Cells["dvc_remark"].Value = "Cancel";
|
||||||
|
if (dv1.Columns.Contains("dvc_resulthtml"))
|
||||||
|
{
|
||||||
|
drow.Cells["dvc_resulthtml"].Value = "";
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -616,6 +655,10 @@ namespace WindowsFormsApp1.Mac
|
|||||||
{
|
{
|
||||||
cnt_skip += 1;
|
cnt_skip += 1;
|
||||||
drow.Cells["dvc_remark"].Value = "No Title";
|
drow.Cells["dvc_remark"].Value = "No Title";
|
||||||
|
if (dv1.Columns.Contains("dvc_resulthtml"))
|
||||||
|
{
|
||||||
|
drow.Cells["dvc_resulthtml"].Value = "";
|
||||||
|
}
|
||||||
drow.DefaultCellStyle.BackColor = Color.HotPink;
|
drow.DefaultCellStyle.BackColor = Color.HotPink;
|
||||||
drow.DefaultCellStyle.ForeColor = Color.Blue;
|
drow.DefaultCellStyle.ForeColor = Color.Blue;
|
||||||
continue;
|
continue;
|
||||||
@@ -646,6 +689,13 @@ namespace WindowsFormsApp1.Mac
|
|||||||
{
|
{
|
||||||
drow.Cells["dvc_remark"].Value = rlt.ErrorMessage;
|
drow.Cells["dvc_remark"].Value = rlt.ErrorMessage;
|
||||||
drow.Cells["Count"].Value = $"{rlt.BookCount}";
|
drow.Cells["Count"].Value = $"{rlt.BookCount}";
|
||||||
|
|
||||||
|
// ResultHtml을 dvc_resulthtml 컬럼에 저장
|
||||||
|
if (dv1.Columns.Contains("dvc_resulthtml"))
|
||||||
|
{
|
||||||
|
drow.Cells["dvc_resulthtml"].Value = rlt.Resulthtml ?? "";
|
||||||
|
}
|
||||||
|
|
||||||
if (rlt.BookCount == 0)
|
if (rlt.BookCount == 0)
|
||||||
{
|
{
|
||||||
cnt_ng += 1;
|
cnt_ng += 1;
|
||||||
@@ -663,9 +713,18 @@ namespace WindowsFormsApp1.Mac
|
|||||||
{
|
{
|
||||||
cnt_er += 1;
|
cnt_er += 1;
|
||||||
drow.Cells["dvc_remark"].Value = $"Error|{rlt.ErrorMessage}";
|
drow.Cells["dvc_remark"].Value = $"Error|{rlt.ErrorMessage}";
|
||||||
|
|
||||||
|
// 오류시에도 ResultHtml이 있으면 저장 (디버깅용)
|
||||||
|
if (dv1.Columns.Contains("dvc_resulthtml"))
|
||||||
|
{
|
||||||
|
drow.Cells["dvc_resulthtml"].Value = rlt.Resulthtml ?? "";
|
||||||
|
}
|
||||||
|
|
||||||
drow.DefaultCellStyle.BackColor = Color.HotPink;
|
drow.DefaultCellStyle.BackColor = Color.HotPink;
|
||||||
drow.DefaultCellStyle.ForeColor = Color.Blue;
|
drow.DefaultCellStyle.ForeColor = Color.Blue;
|
||||||
}
|
}
|
||||||
|
if (addDelay > 0)
|
||||||
|
await Task.Delay(addDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_isSearching == true && retry == false && chkRetryErrData.Checked)
|
if (_isSearching == true && retry == false && chkRetryErrData.Checked)
|
||||||
@@ -847,6 +906,12 @@ namespace WindowsFormsApp1.Mac
|
|||||||
dv1.Rows[a].DefaultCellStyle.BackColor = Color.White;
|
dv1.Rows[a].DefaultCellStyle.BackColor = Color.White;
|
||||||
dv1.Rows[a].Cells["Count"].Value = "";
|
dv1.Rows[a].Cells["Count"].Value = "";
|
||||||
dv1.Rows[a].Cells["dvc_remark"].Value = "";
|
dv1.Rows[a].Cells["dvc_remark"].Value = "";
|
||||||
|
|
||||||
|
// dvc_resulthtml 컬럼도 초기화
|
||||||
|
if (dv1.Columns.Contains("dvc_resulthtml"))
|
||||||
|
{
|
||||||
|
dv1.Rows[a].Cells["dvc_resulthtml"].Value = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -898,6 +963,67 @@ namespace WindowsFormsApp1.Mac
|
|||||||
}
|
}
|
||||||
chkShowBrowser.Enabled = !searcher.HttpApiMode;
|
chkShowBrowser.Enabled = !searcher.HttpApiMode;
|
||||||
this.lbSite.Text = $"[{searcher.AreaCode}] {searcher.SiteUrl}";
|
this.lbSite.Text = $"[{searcher.AreaCode}] {searcher.SiteUrl}";
|
||||||
|
|
||||||
|
// 저장된 지연시간 불러오기
|
||||||
|
LoadLibraryDelaySettings(searcher.SiteName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 선택된 도서관의 저장된 지연시간을 불러와서 UI에 설정
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="libraryName">도서관 이름</param>
|
||||||
|
private void LoadLibraryDelaySettings(string libraryName)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var savedDelay = _delaySettings.GetDelay(libraryName);
|
||||||
|
if (savedDelay > 0)
|
||||||
|
{
|
||||||
|
nudAddDelay.Value = savedDelay;
|
||||||
|
Console.WriteLine($"도서관 지연시간 불러옴: {libraryName} = {savedDelay}초");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// 저장된 설정이 없으면 기본값 유지
|
||||||
|
Console.WriteLine($"도서관 지연시간 설정 없음, 기본값 사용: {libraryName}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"도서관 지연시간 불러오기 오류: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 검색 시작시 현재 지연시간을 저장
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="libraryName">도서관 이름</param>
|
||||||
|
/// <param name="delaySeconds">지연시간(초)</param>
|
||||||
|
private void SaveLibraryDelaySettings(string libraryName, int delaySeconds)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_delaySettings.SetDelay(libraryName, delaySeconds);
|
||||||
|
Console.WriteLine($"도서관 지연시간 저장됨: {libraryName} = {delaySeconds}초");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Console.WriteLine($"도서관 지연시간 저장 오류: {ex.Message}");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void 유니코드문자로붙여넝ㅎ기ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Skill_Grid sg = new Skill_Grid();
|
||||||
|
var newkey = new KeyEventArgs(Keys.Control | Keys.V | Keys.Alt);
|
||||||
|
sg.Excel_to_DataGridView(this.dv1, newkey);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void 일반문자로붙여넣기ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
Skill_Grid sg = new Skill_Grid();
|
||||||
|
var newkey = new KeyEventArgs(Keys.Control | Keys.V);
|
||||||
|
sg.Excel_to_DataGridView(this.dv1, newkey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -129,6 +129,12 @@
|
|||||||
<metadata name="dvc_remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="dvc_remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="dvc_resulthtml.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
|
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>134, 17</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>17, 17</value>
|
<value>17, 17</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|||||||
262
unimarc/unimarc/마크/DLS_Copy.Designer.cs
generated
262
unimarc/unimarc/마크/DLS_Copy.Designer.cs
generated
@@ -32,12 +32,18 @@
|
|||||||
this.panel1 = new System.Windows.Forms.Panel();
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
this.panel8 = new System.Windows.Forms.Panel();
|
this.panel8 = new System.Windows.Forms.Panel();
|
||||||
this.dv1 = new System.Windows.Forms.DataGridView();
|
this.dv1 = new System.Windows.Forms.DataGridView();
|
||||||
|
this.Book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.ISBN = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.dvc_count = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.dvc_Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.panel5 = new System.Windows.Forms.Panel();
|
this.panel5 = new System.Windows.Forms.Panel();
|
||||||
this.chkShowBrowser = new System.Windows.Forms.CheckBox();
|
this.btn_ResultEmpty = new System.Windows.Forms.Button();
|
||||||
|
this.btn_GridReset = new System.Windows.Forms.Button();
|
||||||
this.chk_RemoveBrit = new System.Windows.Forms.CheckBox();
|
this.chk_RemoveBrit = new System.Windows.Forms.CheckBox();
|
||||||
this.chk_spChar = new System.Windows.Forms.CheckBox();
|
this.chk_spChar = new System.Windows.Forms.CheckBox();
|
||||||
this.btn_ApplyFilter = new System.Windows.Forms.Button();
|
this.btn_ApplyFilter = new System.Windows.Forms.Button();
|
||||||
this.panel3 = new System.Windows.Forms.Panel();
|
this.panel3 = new System.Windows.Forms.Panel();
|
||||||
|
this.chkShowBrowser = new System.Windows.Forms.CheckBox();
|
||||||
this.label2 = new System.Windows.Forms.Label();
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
this.rBtn_ISBN = new System.Windows.Forms.RadioButton();
|
this.rBtn_ISBN = new System.Windows.Forms.RadioButton();
|
||||||
this.btnStop = new System.Windows.Forms.Button();
|
this.btnStop = new System.Windows.Forms.Button();
|
||||||
@@ -53,12 +59,8 @@
|
|||||||
this.tb_SearchClient = new System.Windows.Forms.TextBox();
|
this.tb_SearchClient = new System.Windows.Forms.TextBox();
|
||||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||||
this.lblStatus = new System.Windows.Forms.ToolStripLabel();
|
this.lblStatus = new System.Windows.Forms.ToolStripLabel();
|
||||||
this.btn_ResultEmpty = new System.Windows.Forms.Button();
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
this.btn_GridReset = new System.Windows.Forms.Button();
|
this.nudAddDelay = new System.Windows.Forms.NumericUpDown();
|
||||||
this.Book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.ISBN = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.dvc_count = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.dvc_Remark = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.panel1.SuspendLayout();
|
this.panel1.SuspendLayout();
|
||||||
this.panel8.SuspendLayout();
|
this.panel8.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit();
|
||||||
@@ -66,14 +68,16 @@
|
|||||||
this.panel3.SuspendLayout();
|
this.panel3.SuspendLayout();
|
||||||
this.panel2.SuspendLayout();
|
this.panel2.SuspendLayout();
|
||||||
this.statusStrip1.SuspendLayout();
|
this.statusStrip1.SuspendLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.nudAddDelay)).BeginInit();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// label1
|
// label1
|
||||||
//
|
//
|
||||||
this.label1.AutoSize = true;
|
this.label1.AutoSize = true;
|
||||||
this.label1.Location = new System.Drawing.Point(7, 5);
|
this.label1.Location = new System.Drawing.Point(8, 6);
|
||||||
|
this.label1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Size = new System.Drawing.Size(63, 22);
|
this.label1.Size = new System.Drawing.Size(88, 31);
|
||||||
this.label1.TabIndex = 0;
|
this.label1.TabIndex = 0;
|
||||||
this.label1.Text = "납품처명";
|
this.label1.Text = "납품처명";
|
||||||
this.label1.Click += new System.EventHandler(this.label1_Click);
|
this.label1.Click += new System.EventHandler(this.label1_Click);
|
||||||
@@ -87,17 +91,19 @@
|
|||||||
this.panel1.Controls.Add(this.panel2);
|
this.panel1.Controls.Add(this.panel2);
|
||||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.panel1.Name = "panel1";
|
this.panel1.Name = "panel1";
|
||||||
this.panel1.Size = new System.Drawing.Size(640, 699);
|
this.panel1.Size = new System.Drawing.Size(731, 879);
|
||||||
this.panel1.TabIndex = 1;
|
this.panel1.TabIndex = 1;
|
||||||
//
|
//
|
||||||
// panel8
|
// panel8
|
||||||
//
|
//
|
||||||
this.panel8.Controls.Add(this.dv1);
|
this.panel8.Controls.Add(this.dv1);
|
||||||
this.panel8.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.panel8.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.panel8.Location = new System.Drawing.Point(0, 103);
|
this.panel8.Location = new System.Drawing.Point(0, 127);
|
||||||
|
this.panel8.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.panel8.Name = "panel8";
|
this.panel8.Name = "panel8";
|
||||||
this.panel8.Size = new System.Drawing.Size(638, 594);
|
this.panel8.Size = new System.Drawing.Size(729, 750);
|
||||||
this.panel8.TabIndex = 5;
|
this.panel8.TabIndex = 5;
|
||||||
//
|
//
|
||||||
// dv1
|
// dv1
|
||||||
@@ -112,14 +118,44 @@
|
|||||||
this.dvc_Remark});
|
this.dvc_Remark});
|
||||||
this.dv1.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.dv1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.dv1.Location = new System.Drawing.Point(0, 0);
|
this.dv1.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.dv1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.dv1.Name = "dv1";
|
this.dv1.Name = "dv1";
|
||||||
this.dv1.RowHeadersWidth = 31;
|
this.dv1.RowHeadersWidth = 31;
|
||||||
this.dv1.RowTemplate.Height = 23;
|
this.dv1.RowTemplate.Height = 23;
|
||||||
this.dv1.Size = new System.Drawing.Size(638, 594);
|
this.dv1.Size = new System.Drawing.Size(729, 750);
|
||||||
this.dv1.TabIndex = 0;
|
this.dv1.TabIndex = 0;
|
||||||
this.dv1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
|
this.dv1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
|
||||||
this.dv1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
|
this.dv1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
|
||||||
//
|
//
|
||||||
|
// Book_name
|
||||||
|
//
|
||||||
|
this.Book_name.HeaderText = "도서명";
|
||||||
|
this.Book_name.MinimumWidth = 6;
|
||||||
|
this.Book_name.Name = "Book_name";
|
||||||
|
this.Book_name.Width = 140;
|
||||||
|
//
|
||||||
|
// ISBN
|
||||||
|
//
|
||||||
|
this.ISBN.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
|
||||||
|
this.ISBN.HeaderText = "ISBN";
|
||||||
|
this.ISBN.MinimumWidth = 6;
|
||||||
|
this.ISBN.Name = "ISBN";
|
||||||
|
this.ISBN.Width = 140;
|
||||||
|
//
|
||||||
|
// dvc_count
|
||||||
|
//
|
||||||
|
this.dvc_count.HeaderText = "검색";
|
||||||
|
this.dvc_count.MinimumWidth = 6;
|
||||||
|
this.dvc_count.Name = "dvc_count";
|
||||||
|
this.dvc_count.Width = 125;
|
||||||
|
//
|
||||||
|
// dvc_Remark
|
||||||
|
//
|
||||||
|
this.dvc_Remark.HeaderText = "비고";
|
||||||
|
this.dvc_Remark.MinimumWidth = 6;
|
||||||
|
this.dvc_Remark.Name = "dvc_Remark";
|
||||||
|
this.dvc_Remark.Width = 200;
|
||||||
|
//
|
||||||
// panel5
|
// panel5
|
||||||
//
|
//
|
||||||
this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
this.panel5.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
@@ -129,30 +165,41 @@
|
|||||||
this.panel5.Controls.Add(this.chk_spChar);
|
this.panel5.Controls.Add(this.chk_spChar);
|
||||||
this.panel5.Controls.Add(this.btn_ApplyFilter);
|
this.panel5.Controls.Add(this.btn_ApplyFilter);
|
||||||
this.panel5.Dock = System.Windows.Forms.DockStyle.Top;
|
this.panel5.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.panel5.Location = new System.Drawing.Point(0, 68);
|
this.panel5.Location = new System.Drawing.Point(0, 84);
|
||||||
|
this.panel5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.panel5.Name = "panel5";
|
this.panel5.Name = "panel5";
|
||||||
this.panel5.Size = new System.Drawing.Size(638, 35);
|
this.panel5.Size = new System.Drawing.Size(729, 43);
|
||||||
this.panel5.TabIndex = 4;
|
this.panel5.TabIndex = 4;
|
||||||
//
|
//
|
||||||
// chkShowBrowser
|
// btn_ResultEmpty
|
||||||
//
|
//
|
||||||
this.chkShowBrowser.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.btn_ResultEmpty.Location = new System.Drawing.Point(546, 5);
|
||||||
this.chkShowBrowser.AutoSize = true;
|
this.btn_ResultEmpty.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.chkShowBrowser.Checked = true;
|
this.btn_ResultEmpty.Name = "btn_ResultEmpty";
|
||||||
this.chkShowBrowser.CheckState = System.Windows.Forms.CheckState.Checked;
|
this.btn_ResultEmpty.Size = new System.Drawing.Size(86, 30);
|
||||||
this.chkShowBrowser.Location = new System.Drawing.Point(354, 9);
|
this.btn_ResultEmpty.TabIndex = 6;
|
||||||
this.chkShowBrowser.Name = "chkShowBrowser";
|
this.btn_ResultEmpty.Text = "결과 비움";
|
||||||
this.chkShowBrowser.Size = new System.Drawing.Size(96, 16);
|
this.btn_ResultEmpty.UseVisualStyleBackColor = true;
|
||||||
this.chkShowBrowser.TabIndex = 209;
|
this.btn_ResultEmpty.Click += new System.EventHandler(this.btn_ResultEmpty_Click);
|
||||||
this.chkShowBrowser.Text = "브라우저표시";
|
//
|
||||||
this.chkShowBrowser.UseVisualStyleBackColor = true;
|
// btn_GridReset
|
||||||
|
//
|
||||||
|
this.btn_GridReset.Location = new System.Drawing.Point(634, 5);
|
||||||
|
this.btn_GridReset.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
|
this.btn_GridReset.Name = "btn_GridReset";
|
||||||
|
this.btn_GridReset.Size = new System.Drawing.Size(86, 30);
|
||||||
|
this.btn_GridReset.TabIndex = 7;
|
||||||
|
this.btn_GridReset.Text = "표 비우기";
|
||||||
|
this.btn_GridReset.UseVisualStyleBackColor = true;
|
||||||
|
this.btn_GridReset.Click += new System.EventHandler(this.btn_GridReset_Click);
|
||||||
//
|
//
|
||||||
// chk_RemoveBrit
|
// chk_RemoveBrit
|
||||||
//
|
//
|
||||||
this.chk_RemoveBrit.AutoSize = true;
|
this.chk_RemoveBrit.AutoSize = true;
|
||||||
this.chk_RemoveBrit.Location = new System.Drawing.Point(116, 8);
|
this.chk_RemoveBrit.Location = new System.Drawing.Point(133, 10);
|
||||||
|
this.chk_RemoveBrit.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.chk_RemoveBrit.Name = "chk_RemoveBrit";
|
this.chk_RemoveBrit.Name = "chk_RemoveBrit";
|
||||||
this.chk_RemoveBrit.Size = new System.Drawing.Size(128, 16);
|
this.chk_RemoveBrit.Size = new System.Drawing.Size(159, 19);
|
||||||
this.chk_RemoveBrit.TabIndex = 3;
|
this.chk_RemoveBrit.TabIndex = 3;
|
||||||
this.chk_RemoveBrit.Text = "괄호안의 문자 제거";
|
this.chk_RemoveBrit.Text = "괄호안의 문자 제거";
|
||||||
this.chk_RemoveBrit.UseVisualStyleBackColor = true;
|
this.chk_RemoveBrit.UseVisualStyleBackColor = true;
|
||||||
@@ -160,9 +207,10 @@
|
|||||||
// chk_spChar
|
// chk_spChar
|
||||||
//
|
//
|
||||||
this.chk_spChar.AutoSize = true;
|
this.chk_spChar.AutoSize = true;
|
||||||
this.chk_spChar.Location = new System.Drawing.Point(10, 8);
|
this.chk_spChar.Location = new System.Drawing.Point(11, 10);
|
||||||
|
this.chk_spChar.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.chk_spChar.Name = "chk_spChar";
|
this.chk_spChar.Name = "chk_spChar";
|
||||||
this.chk_spChar.Size = new System.Drawing.Size(100, 16);
|
this.chk_spChar.Size = new System.Drawing.Size(124, 19);
|
||||||
this.chk_spChar.TabIndex = 4;
|
this.chk_spChar.TabIndex = 4;
|
||||||
this.chk_spChar.Text = "특수문자 제거";
|
this.chk_spChar.Text = "특수문자 제거";
|
||||||
this.chk_spChar.UseVisualStyleBackColor = true;
|
this.chk_spChar.UseVisualStyleBackColor = true;
|
||||||
@@ -170,9 +218,10 @@
|
|||||||
// btn_ApplyFilter
|
// btn_ApplyFilter
|
||||||
//
|
//
|
||||||
this.btn_ApplyFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.btn_ApplyFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.btn_ApplyFilter.Location = new System.Drawing.Point(258, 4);
|
this.btn_ApplyFilter.Location = new System.Drawing.Point(295, 5);
|
||||||
|
this.btn_ApplyFilter.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_ApplyFilter.Name = "btn_ApplyFilter";
|
this.btn_ApplyFilter.Name = "btn_ApplyFilter";
|
||||||
this.btn_ApplyFilter.Size = new System.Drawing.Size(75, 24);
|
this.btn_ApplyFilter.Size = new System.Drawing.Size(86, 30);
|
||||||
this.btn_ApplyFilter.TabIndex = 5;
|
this.btn_ApplyFilter.TabIndex = 5;
|
||||||
this.btn_ApplyFilter.Text = "필터적용";
|
this.btn_ApplyFilter.Text = "필터적용";
|
||||||
this.btn_ApplyFilter.UseVisualStyleBackColor = true;
|
this.btn_ApplyFilter.UseVisualStyleBackColor = true;
|
||||||
@@ -181,6 +230,8 @@
|
|||||||
// panel3
|
// panel3
|
||||||
//
|
//
|
||||||
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.panel3.Controls.Add(this.label3);
|
||||||
|
this.panel3.Controls.Add(this.nudAddDelay);
|
||||||
this.panel3.Controls.Add(this.chkShowBrowser);
|
this.panel3.Controls.Add(this.chkShowBrowser);
|
||||||
this.panel3.Controls.Add(this.label2);
|
this.panel3.Controls.Add(this.label2);
|
||||||
this.panel3.Controls.Add(this.rBtn_ISBN);
|
this.panel3.Controls.Add(this.rBtn_ISBN);
|
||||||
@@ -188,17 +239,32 @@
|
|||||||
this.panel3.Controls.Add(this.btn_Search);
|
this.panel3.Controls.Add(this.btn_Search);
|
||||||
this.panel3.Controls.Add(this.rBtn_BookName);
|
this.panel3.Controls.Add(this.rBtn_BookName);
|
||||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
|
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.panel3.Location = new System.Drawing.Point(0, 33);
|
this.panel3.Location = new System.Drawing.Point(0, 41);
|
||||||
|
this.panel3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.panel3.Name = "panel3";
|
this.panel3.Name = "panel3";
|
||||||
this.panel3.Size = new System.Drawing.Size(638, 35);
|
this.panel3.Size = new System.Drawing.Size(729, 43);
|
||||||
this.panel3.TabIndex = 4;
|
this.panel3.TabIndex = 4;
|
||||||
//
|
//
|
||||||
|
// chkShowBrowser
|
||||||
|
//
|
||||||
|
this.chkShowBrowser.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
|
this.chkShowBrowser.AutoSize = true;
|
||||||
|
this.chkShowBrowser.Checked = true;
|
||||||
|
this.chkShowBrowser.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||||
|
this.chkShowBrowser.Location = new System.Drawing.Point(395, 11);
|
||||||
|
this.chkShowBrowser.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
|
this.chkShowBrowser.Name = "chkShowBrowser";
|
||||||
|
this.chkShowBrowser.Size = new System.Drawing.Size(119, 19);
|
||||||
|
this.chkShowBrowser.TabIndex = 209;
|
||||||
|
this.chkShowBrowser.Text = "브라우저표시";
|
||||||
|
this.chkShowBrowser.UseVisualStyleBackColor = true;
|
||||||
|
//
|
||||||
// label2
|
// label2
|
||||||
//
|
//
|
||||||
this.label2.AutoSize = true;
|
this.label2.AutoSize = true;
|
||||||
this.label2.Location = new System.Drawing.Point(7, 11);
|
this.label2.Location = new System.Drawing.Point(8, 14);
|
||||||
this.label2.Name = "label2";
|
this.label2.Name = "label2";
|
||||||
this.label2.Size = new System.Drawing.Size(53, 12);
|
this.label2.Size = new System.Drawing.Size(67, 15);
|
||||||
this.label2.TabIndex = 3;
|
this.label2.TabIndex = 3;
|
||||||
this.label2.Text = "검색조건";
|
this.label2.Text = "검색조건";
|
||||||
//
|
//
|
||||||
@@ -206,9 +272,10 @@
|
|||||||
//
|
//
|
||||||
this.rBtn_ISBN.AutoSize = true;
|
this.rBtn_ISBN.AutoSize = true;
|
||||||
this.rBtn_ISBN.Checked = true;
|
this.rBtn_ISBN.Checked = true;
|
||||||
this.rBtn_ISBN.Location = new System.Drawing.Point(153, 9);
|
this.rBtn_ISBN.Location = new System.Drawing.Point(175, 11);
|
||||||
|
this.rBtn_ISBN.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.rBtn_ISBN.Name = "rBtn_ISBN";
|
this.rBtn_ISBN.Name = "rBtn_ISBN";
|
||||||
this.rBtn_ISBN.Size = new System.Drawing.Size(51, 16);
|
this.rBtn_ISBN.Size = new System.Drawing.Size(60, 19);
|
||||||
this.rBtn_ISBN.TabIndex = 4;
|
this.rBtn_ISBN.TabIndex = 4;
|
||||||
this.rBtn_ISBN.TabStop = true;
|
this.rBtn_ISBN.TabStop = true;
|
||||||
this.rBtn_ISBN.Text = "ISBN";
|
this.rBtn_ISBN.Text = "ISBN";
|
||||||
@@ -216,9 +283,10 @@
|
|||||||
//
|
//
|
||||||
// btnStop
|
// btnStop
|
||||||
//
|
//
|
||||||
this.btnStop.Location = new System.Drawing.Point(283, 5);
|
this.btnStop.Location = new System.Drawing.Point(323, 6);
|
||||||
|
this.btnStop.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btnStop.Name = "btnStop";
|
this.btnStop.Name = "btnStop";
|
||||||
this.btnStop.Size = new System.Drawing.Size(65, 23);
|
this.btnStop.Size = new System.Drawing.Size(74, 29);
|
||||||
this.btnStop.TabIndex = 2;
|
this.btnStop.TabIndex = 2;
|
||||||
this.btnStop.Text = "중 지";
|
this.btnStop.Text = "중 지";
|
||||||
this.btnStop.UseVisualStyleBackColor = true;
|
this.btnStop.UseVisualStyleBackColor = true;
|
||||||
@@ -226,9 +294,10 @@
|
|||||||
//
|
//
|
||||||
// btn_Search
|
// btn_Search
|
||||||
//
|
//
|
||||||
this.btn_Search.Location = new System.Drawing.Point(217, 5);
|
this.btn_Search.Location = new System.Drawing.Point(248, 6);
|
||||||
|
this.btn_Search.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_Search.Name = "btn_Search";
|
this.btn_Search.Name = "btn_Search";
|
||||||
this.btn_Search.Size = new System.Drawing.Size(65, 23);
|
this.btn_Search.Size = new System.Drawing.Size(74, 29);
|
||||||
this.btn_Search.TabIndex = 2;
|
this.btn_Search.TabIndex = 2;
|
||||||
this.btn_Search.Text = "검 색";
|
this.btn_Search.Text = "검 색";
|
||||||
this.btn_Search.UseVisualStyleBackColor = true;
|
this.btn_Search.UseVisualStyleBackColor = true;
|
||||||
@@ -237,9 +306,10 @@
|
|||||||
// rBtn_BookName
|
// rBtn_BookName
|
||||||
//
|
//
|
||||||
this.rBtn_BookName.AutoSize = true;
|
this.rBtn_BookName.AutoSize = true;
|
||||||
this.rBtn_BookName.Location = new System.Drawing.Point(68, 9);
|
this.rBtn_BookName.Location = new System.Drawing.Point(78, 11);
|
||||||
|
this.rBtn_BookName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.rBtn_BookName.Name = "rBtn_BookName";
|
this.rBtn_BookName.Name = "rBtn_BookName";
|
||||||
this.rBtn_BookName.Size = new System.Drawing.Size(59, 16);
|
this.rBtn_BookName.Size = new System.Drawing.Size(73, 19);
|
||||||
this.rBtn_BookName.TabIndex = 4;
|
this.rBtn_BookName.TabIndex = 4;
|
||||||
this.rBtn_BookName.Text = "도서명";
|
this.rBtn_BookName.Text = "도서명";
|
||||||
this.rBtn_BookName.UseVisualStyleBackColor = true;
|
this.rBtn_BookName.UseVisualStyleBackColor = true;
|
||||||
@@ -257,16 +327,18 @@
|
|||||||
this.panel2.Controls.Add(this.tb_SearchClient);
|
this.panel2.Controls.Add(this.tb_SearchClient);
|
||||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
|
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.panel2.Location = new System.Drawing.Point(0, 0);
|
this.panel2.Location = new System.Drawing.Point(0, 0);
|
||||||
|
this.panel2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.panel2.Name = "panel2";
|
this.panel2.Name = "panel2";
|
||||||
this.panel2.Size = new System.Drawing.Size(638, 33);
|
this.panel2.Size = new System.Drawing.Size(729, 41);
|
||||||
this.panel2.TabIndex = 3;
|
this.panel2.TabIndex = 3;
|
||||||
//
|
//
|
||||||
// btn_SiteDenote
|
// btn_SiteDenote
|
||||||
//
|
//
|
||||||
this.btn_SiteDenote.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.btn_SiteDenote.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.btn_SiteDenote.Location = new System.Drawing.Point(555, 5);
|
this.btn_SiteDenote.Location = new System.Drawing.Point(634, 6);
|
||||||
|
this.btn_SiteDenote.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_SiteDenote.Name = "btn_SiteDenote";
|
this.btn_SiteDenote.Name = "btn_SiteDenote";
|
||||||
this.btn_SiteDenote.Size = new System.Drawing.Size(77, 23);
|
this.btn_SiteDenote.Size = new System.Drawing.Size(88, 29);
|
||||||
this.btn_SiteDenote.TabIndex = 6;
|
this.btn_SiteDenote.TabIndex = 6;
|
||||||
this.btn_SiteDenote.Text = "사이트 표출";
|
this.btn_SiteDenote.Text = "사이트 표출";
|
||||||
this.btn_SiteDenote.UseVisualStyleBackColor = true;
|
this.btn_SiteDenote.UseVisualStyleBackColor = true;
|
||||||
@@ -275,9 +347,10 @@
|
|||||||
// btn_Connect
|
// btn_Connect
|
||||||
//
|
//
|
||||||
this.btn_Connect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
this.btn_Connect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.btn_Connect.Location = new System.Drawing.Point(479, 5);
|
this.btn_Connect.Location = new System.Drawing.Point(547, 6);
|
||||||
|
this.btn_Connect.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_Connect.Name = "btn_Connect";
|
this.btn_Connect.Name = "btn_Connect";
|
||||||
this.btn_Connect.Size = new System.Drawing.Size(70, 23);
|
this.btn_Connect.Size = new System.Drawing.Size(80, 29);
|
||||||
this.btn_Connect.TabIndex = 5;
|
this.btn_Connect.TabIndex = 5;
|
||||||
this.btn_Connect.Text = "접속";
|
this.btn_Connect.Text = "접속";
|
||||||
this.btn_Connect.UseVisualStyleBackColor = true;
|
this.btn_Connect.UseVisualStyleBackColor = true;
|
||||||
@@ -286,36 +359,36 @@
|
|||||||
// lbl_PW
|
// lbl_PW
|
||||||
//
|
//
|
||||||
this.lbl_PW.AutoSize = true;
|
this.lbl_PW.AutoSize = true;
|
||||||
this.lbl_PW.Location = new System.Drawing.Point(297, 37);
|
this.lbl_PW.Location = new System.Drawing.Point(339, 46);
|
||||||
this.lbl_PW.Name = "lbl_PW";
|
this.lbl_PW.Name = "lbl_PW";
|
||||||
this.lbl_PW.Size = new System.Drawing.Size(23, 12);
|
this.lbl_PW.Size = new System.Drawing.Size(31, 15);
|
||||||
this.lbl_PW.TabIndex = 3;
|
this.lbl_PW.TabIndex = 3;
|
||||||
this.lbl_PW.Text = "PW";
|
this.lbl_PW.Text = "PW";
|
||||||
//
|
//
|
||||||
// lbl_Area
|
// lbl_Area
|
||||||
//
|
//
|
||||||
this.lbl_Area.AutoSize = true;
|
this.lbl_Area.AutoSize = true;
|
||||||
this.lbl_Area.Location = new System.Drawing.Point(97, 37);
|
this.lbl_Area.Location = new System.Drawing.Point(111, 46);
|
||||||
this.lbl_Area.Name = "lbl_Area";
|
this.lbl_Area.Name = "lbl_Area";
|
||||||
this.lbl_Area.Size = new System.Drawing.Size(31, 12);
|
this.lbl_Area.Size = new System.Drawing.Size(36, 15);
|
||||||
this.lbl_Area.TabIndex = 3;
|
this.lbl_Area.TabIndex = 3;
|
||||||
this.lbl_Area.Text = "Area";
|
this.lbl_Area.Text = "Area";
|
||||||
//
|
//
|
||||||
// lbl_ID
|
// lbl_ID
|
||||||
//
|
//
|
||||||
this.lbl_ID.AutoSize = true;
|
this.lbl_ID.AutoSize = true;
|
||||||
this.lbl_ID.Location = new System.Drawing.Point(185, 37);
|
this.lbl_ID.Location = new System.Drawing.Point(211, 46);
|
||||||
this.lbl_ID.Name = "lbl_ID";
|
this.lbl_ID.Name = "lbl_ID";
|
||||||
this.lbl_ID.Size = new System.Drawing.Size(16, 12);
|
this.lbl_ID.Size = new System.Drawing.Size(20, 15);
|
||||||
this.lbl_ID.TabIndex = 3;
|
this.lbl_ID.TabIndex = 3;
|
||||||
this.lbl_ID.Text = "ID";
|
this.lbl_ID.Text = "ID";
|
||||||
//
|
//
|
||||||
// lbl_Client
|
// lbl_Client
|
||||||
//
|
//
|
||||||
this.lbl_Client.AutoSize = true;
|
this.lbl_Client.AutoSize = true;
|
||||||
this.lbl_Client.Location = new System.Drawing.Point(7, 37);
|
this.lbl_Client.Location = new System.Drawing.Point(8, 46);
|
||||||
this.lbl_Client.Name = "lbl_Client";
|
this.lbl_Client.Name = "lbl_Client";
|
||||||
this.lbl_Client.Size = new System.Drawing.Size(37, 12);
|
this.lbl_Client.Size = new System.Drawing.Size(43, 15);
|
||||||
this.lbl_Client.TabIndex = 3;
|
this.lbl_Client.TabIndex = 3;
|
||||||
this.lbl_Client.Text = "Client";
|
this.lbl_Client.Text = "Client";
|
||||||
//
|
//
|
||||||
@@ -324,80 +397,58 @@
|
|||||||
this.tb_SearchClient.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
this.tb_SearchClient.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||||
| System.Windows.Forms.AnchorStyles.Right)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.tb_SearchClient.ImeMode = System.Windows.Forms.ImeMode.Hangul;
|
this.tb_SearchClient.ImeMode = System.Windows.Forms.ImeMode.Hangul;
|
||||||
this.tb_SearchClient.Location = new System.Drawing.Point(76, 6);
|
this.tb_SearchClient.Location = new System.Drawing.Point(87, 8);
|
||||||
|
this.tb_SearchClient.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.tb_SearchClient.Name = "tb_SearchClient";
|
this.tb_SearchClient.Name = "tb_SearchClient";
|
||||||
this.tb_SearchClient.Size = new System.Drawing.Size(397, 21);
|
this.tb_SearchClient.Size = new System.Drawing.Size(453, 25);
|
||||||
this.tb_SearchClient.TabIndex = 1;
|
this.tb_SearchClient.TabIndex = 1;
|
||||||
this.tb_SearchClient.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_SearchClient_KeyDown);
|
this.tb_SearchClient.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_SearchClient_KeyDown);
|
||||||
//
|
//
|
||||||
// statusStrip1
|
// statusStrip1
|
||||||
//
|
//
|
||||||
|
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
this.lblStatus});
|
this.lblStatus});
|
||||||
this.statusStrip1.Location = new System.Drawing.Point(0, 699);
|
this.statusStrip1.Location = new System.Drawing.Point(0, 879);
|
||||||
this.statusStrip1.Name = "statusStrip1";
|
this.statusStrip1.Name = "statusStrip1";
|
||||||
this.statusStrip1.Size = new System.Drawing.Size(640, 22);
|
this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 16, 0);
|
||||||
|
this.statusStrip1.Size = new System.Drawing.Size(731, 22);
|
||||||
this.statusStrip1.TabIndex = 3;
|
this.statusStrip1.TabIndex = 3;
|
||||||
this.statusStrip1.Text = "statusStrip1";
|
this.statusStrip1.Text = "statusStrip1";
|
||||||
//
|
//
|
||||||
// lblStatus
|
// lblStatus
|
||||||
//
|
//
|
||||||
this.lblStatus.Name = "lblStatus";
|
this.lblStatus.Name = "lblStatus";
|
||||||
this.lblStatus.Size = new System.Drawing.Size(27, 20);
|
this.lblStatus.Size = new System.Drawing.Size(34, 20);
|
||||||
this.lblStatus.Text = "WD";
|
this.lblStatus.Text = "WD";
|
||||||
this.lblStatus.Click += new System.EventHandler(this.lblStatus_Click);
|
this.lblStatus.Click += new System.EventHandler(this.lblStatus_Click);
|
||||||
//
|
//
|
||||||
// btn_ResultEmpty
|
// label3
|
||||||
//
|
//
|
||||||
this.btn_ResultEmpty.Location = new System.Drawing.Point(478, 4);
|
this.label3.AutoSize = true;
|
||||||
this.btn_ResultEmpty.Name = "btn_ResultEmpty";
|
this.label3.Location = new System.Drawing.Point(591, 13);
|
||||||
this.btn_ResultEmpty.Size = new System.Drawing.Size(75, 24);
|
this.label3.Name = "label3";
|
||||||
this.btn_ResultEmpty.TabIndex = 6;
|
this.label3.Size = new System.Drawing.Size(67, 15);
|
||||||
this.btn_ResultEmpty.Text = "결과 비움";
|
this.label3.TabIndex = 211;
|
||||||
this.btn_ResultEmpty.UseVisualStyleBackColor = true;
|
this.label3.Text = "추가지연";
|
||||||
this.btn_ResultEmpty.Click += new System.EventHandler(this.btn_ResultEmpty_Click);
|
|
||||||
//
|
//
|
||||||
// btn_GridReset
|
// nudAddDelay
|
||||||
//
|
//
|
||||||
this.btn_GridReset.Location = new System.Drawing.Point(555, 4);
|
this.nudAddDelay.Location = new System.Drawing.Point(658, 8);
|
||||||
this.btn_GridReset.Name = "btn_GridReset";
|
this.nudAddDelay.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.btn_GridReset.Size = new System.Drawing.Size(75, 24);
|
this.nudAddDelay.Name = "nudAddDelay";
|
||||||
this.btn_GridReset.TabIndex = 7;
|
this.nudAddDelay.Size = new System.Drawing.Size(64, 25);
|
||||||
this.btn_GridReset.Text = "표 비우기";
|
this.nudAddDelay.TabIndex = 210;
|
||||||
this.btn_GridReset.UseVisualStyleBackColor = true;
|
this.nudAddDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
this.btn_GridReset.Click += new System.EventHandler(this.btn_GridReset_Click);
|
|
||||||
//
|
|
||||||
// Book_name
|
|
||||||
//
|
|
||||||
this.Book_name.HeaderText = "도서명";
|
|
||||||
this.Book_name.Name = "Book_name";
|
|
||||||
this.Book_name.Width = 140;
|
|
||||||
//
|
|
||||||
// ISBN
|
|
||||||
//
|
|
||||||
this.ISBN.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None;
|
|
||||||
this.ISBN.HeaderText = "ISBN";
|
|
||||||
this.ISBN.Name = "ISBN";
|
|
||||||
this.ISBN.Width = 140;
|
|
||||||
//
|
|
||||||
// dvc_count
|
|
||||||
//
|
|
||||||
this.dvc_count.HeaderText = "검색";
|
|
||||||
this.dvc_count.Name = "dvc_count";
|
|
||||||
//
|
|
||||||
// dvc_Remark
|
|
||||||
//
|
|
||||||
this.dvc_Remark.HeaderText = "비고";
|
|
||||||
this.dvc_Remark.Name = "dvc_Remark";
|
|
||||||
this.dvc_Remark.Width = 200;
|
|
||||||
//
|
//
|
||||||
// DLS_Copy
|
// DLS_Copy
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(640, 721);
|
this.ClientSize = new System.Drawing.Size(731, 901);
|
||||||
this.Controls.Add(this.panel1);
|
this.Controls.Add(this.panel1);
|
||||||
this.Controls.Add(this.statusStrip1);
|
this.Controls.Add(this.statusStrip1);
|
||||||
|
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||||
this.Name = "DLS_Copy";
|
this.Name = "DLS_Copy";
|
||||||
this.Text = "DLS 복본조사";
|
this.Text = "DLS 복본조사";
|
||||||
this.Load += new System.EventHandler(this.DLS_Copy_Load);
|
this.Load += new System.EventHandler(this.DLS_Copy_Load);
|
||||||
@@ -412,6 +463,7 @@
|
|||||||
this.panel2.PerformLayout();
|
this.panel2.PerformLayout();
|
||||||
this.statusStrip1.ResumeLayout(false);
|
this.statusStrip1.ResumeLayout(false);
|
||||||
this.statusStrip1.PerformLayout();
|
this.statusStrip1.PerformLayout();
|
||||||
|
((System.ComponentModel.ISupportInitialize)(this.nudAddDelay)).EndInit();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
@@ -450,5 +502,7 @@
|
|||||||
private System.Windows.Forms.DataGridViewTextBoxColumn ISBN;
|
private System.Windows.Forms.DataGridViewTextBoxColumn ISBN;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn dvc_count;
|
private System.Windows.Forms.DataGridViewTextBoxColumn dvc_count;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn dvc_Remark;
|
private System.Windows.Forms.DataGridViewTextBoxColumn dvc_Remark;
|
||||||
|
private System.Windows.Forms.Label label3;
|
||||||
|
private System.Windows.Forms.NumericUpDown nudAddDelay;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -212,6 +212,8 @@ namespace WindowsFormsApp1.Mac
|
|||||||
var sType = rBtn_ISBN.Checked ? "ea_isbn" : "title";
|
var sType = rBtn_ISBN.Checked ? "ea_isbn" : "title";
|
||||||
_searcher.SetParameter(this.lbl_ID.Text, lbl_PW.Text, "유덕초등학교", sType);
|
_searcher.SetParameter(this.lbl_ID.Text, lbl_PW.Text, "유덕초등학교", sType);
|
||||||
|
|
||||||
|
int addDelay = (int)nudAddDelay.Value * 1000; //추가 지연시간 : 1개의 레코드 처리 후 추가 지연한다.
|
||||||
|
|
||||||
foreach (DataGridViewRow dr in this.dv1.Rows)
|
foreach (DataGridViewRow dr in this.dv1.Rows)
|
||||||
{
|
{
|
||||||
var title = dr.Cells[0].Value?.ToString() ?? string.Empty;
|
var title = dr.Cells[0].Value?.ToString() ?? string.Empty;
|
||||||
@@ -232,6 +234,9 @@ namespace WindowsFormsApp1.Mac
|
|||||||
else
|
else
|
||||||
dr.DefaultCellStyle.BackColor = Color.LightSkyBlue;
|
dr.DefaultCellStyle.BackColor = Color.LightSkyBlue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (addDelay > 0)
|
||||||
|
await Task.Delay(addDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
149
unimarc/unimarc/마크/Mac_List.Designer.cs
generated
149
unimarc/unimarc/마크/Mac_List.Designer.cs
generated
@@ -46,20 +46,22 @@
|
|||||||
this.btn_Delete = new System.Windows.Forms.Button();
|
this.btn_Delete = new System.Windows.Forms.Button();
|
||||||
this.btn_AddList = new System.Windows.Forms.Button();
|
this.btn_AddList = new System.Windows.Forms.Button();
|
||||||
this.panel1 = new System.Windows.Forms.Panel();
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
this.panel2 = new System.Windows.Forms.Panel();
|
|
||||||
this.btnSearchISBN = new System.Windows.Forms.Button();
|
this.btnSearchISBN = new System.Windows.Forms.Button();
|
||||||
this.check = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.panel2 = new System.Windows.Forms.Panel();
|
||||||
this.charge = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.etc = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.state = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.unstock = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.stock = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.work_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.list_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.end_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.start_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
|
||||||
this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.start_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.end_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.dvc_custname = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.list_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.work_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.stock = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.unstock = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.state = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.etc = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.charge = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.dvc_cust = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
|
this.check = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||||
this.panel1.SuspendLayout();
|
this.panel1.SuspendLayout();
|
||||||
this.panel2.SuspendLayout();
|
this.panel2.SuspendLayout();
|
||||||
@@ -102,6 +104,7 @@
|
|||||||
this.idx,
|
this.idx,
|
||||||
this.start_date,
|
this.start_date,
|
||||||
this.end_date,
|
this.end_date,
|
||||||
|
this.dvc_custname,
|
||||||
this.list_name,
|
this.list_name,
|
||||||
this.work_name,
|
this.work_name,
|
||||||
this.count,
|
this.count,
|
||||||
@@ -110,6 +113,7 @@
|
|||||||
this.state,
|
this.state,
|
||||||
this.etc,
|
this.etc,
|
||||||
this.charge,
|
this.charge,
|
||||||
|
this.dvc_cust,
|
||||||
this.check});
|
this.check});
|
||||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
|
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
|
||||||
@@ -126,7 +130,7 @@
|
|||||||
this.dataGridView1.RowHeadersWidth = 40;
|
this.dataGridView1.RowHeadersWidth = 40;
|
||||||
this.dataGridView1.RowTemplate.Height = 23;
|
this.dataGridView1.RowTemplate.Height = 23;
|
||||||
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||||
this.dataGridView1.Size = new System.Drawing.Size(1124, 623);
|
this.dataGridView1.Size = new System.Drawing.Size(1179, 623);
|
||||||
this.dataGridView1.TabIndex = 48;
|
this.dataGridView1.TabIndex = 48;
|
||||||
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
|
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
|
||||||
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
|
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
|
||||||
@@ -268,18 +272,9 @@
|
|||||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.panel1.Name = "panel1";
|
this.panel1.Name = "panel1";
|
||||||
this.panel1.Size = new System.Drawing.Size(1124, 38);
|
this.panel1.Size = new System.Drawing.Size(1179, 38);
|
||||||
this.panel1.TabIndex = 52;
|
this.panel1.TabIndex = 52;
|
||||||
//
|
//
|
||||||
// panel2
|
|
||||||
//
|
|
||||||
this.panel2.Controls.Add(this.dataGridView1);
|
|
||||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
|
||||||
this.panel2.Location = new System.Drawing.Point(0, 38);
|
|
||||||
this.panel2.Name = "panel2";
|
|
||||||
this.panel2.Size = new System.Drawing.Size(1124, 623);
|
|
||||||
this.panel2.TabIndex = 53;
|
|
||||||
//
|
|
||||||
// btnSearchISBN
|
// btnSearchISBN
|
||||||
//
|
//
|
||||||
this.btnSearchISBN.Location = new System.Drawing.Point(547, 2);
|
this.btnSearchISBN.Location = new System.Drawing.Point(547, 2);
|
||||||
@@ -291,36 +286,52 @@
|
|||||||
this.btnSearchISBN.UseVisualStyleBackColor = true;
|
this.btnSearchISBN.UseVisualStyleBackColor = true;
|
||||||
this.btnSearchISBN.Click += new System.EventHandler(this.btnSearchISBN_Click);
|
this.btnSearchISBN.Click += new System.EventHandler(this.btnSearchISBN_Click);
|
||||||
//
|
//
|
||||||
// check
|
// panel2
|
||||||
//
|
//
|
||||||
this.check.HeaderText = "V";
|
this.panel2.Controls.Add(this.dataGridView1);
|
||||||
this.check.Name = "check";
|
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.check.Width = 35;
|
this.panel2.Location = new System.Drawing.Point(0, 38);
|
||||||
|
this.panel2.Name = "panel2";
|
||||||
|
this.panel2.Size = new System.Drawing.Size(1179, 623);
|
||||||
|
this.panel2.TabIndex = 53;
|
||||||
//
|
//
|
||||||
// charge
|
// idx
|
||||||
//
|
//
|
||||||
this.charge.HeaderText = "담당자";
|
this.idx.HeaderText = "idx";
|
||||||
this.charge.Name = "charge";
|
this.idx.Name = "idx";
|
||||||
this.charge.Width = 70;
|
this.idx.Visible = false;
|
||||||
//
|
//
|
||||||
// etc
|
// start_date
|
||||||
//
|
//
|
||||||
this.etc.HeaderText = "비고";
|
this.start_date.HeaderText = "목록일자";
|
||||||
this.etc.Name = "etc";
|
this.start_date.Name = "start_date";
|
||||||
this.etc.Width = 280;
|
|
||||||
//
|
//
|
||||||
// state
|
// end_date
|
||||||
//
|
//
|
||||||
this.state.HeaderText = "상태";
|
this.end_date.HeaderText = "완료일자";
|
||||||
this.state.Name = "state";
|
this.end_date.Name = "end_date";
|
||||||
this.state.Width = 70;
|
|
||||||
//
|
//
|
||||||
// unstock
|
// dvc_custname
|
||||||
//
|
//
|
||||||
this.unstock.HeaderText = "미입고";
|
this.dvc_custname.HeaderText = "납품처";
|
||||||
this.unstock.Name = "unstock";
|
this.dvc_custname.Name = "dvc_custname";
|
||||||
this.unstock.Visible = false;
|
//
|
||||||
this.unstock.Width = 70;
|
// list_name
|
||||||
|
//
|
||||||
|
this.list_name.HeaderText = "목록명";
|
||||||
|
this.list_name.Name = "list_name";
|
||||||
|
this.list_name.Width = 200;
|
||||||
|
//
|
||||||
|
// work_name
|
||||||
|
//
|
||||||
|
this.work_name.HeaderText = "작업명";
|
||||||
|
this.work_name.Name = "work_name";
|
||||||
|
//
|
||||||
|
// count
|
||||||
|
//
|
||||||
|
this.count.HeaderText = "수량";
|
||||||
|
this.count.Name = "count";
|
||||||
|
this.count.Width = 80;
|
||||||
//
|
//
|
||||||
// stock
|
// stock
|
||||||
//
|
//
|
||||||
@@ -329,44 +340,48 @@
|
|||||||
this.stock.Visible = false;
|
this.stock.Visible = false;
|
||||||
this.stock.Width = 70;
|
this.stock.Width = 70;
|
||||||
//
|
//
|
||||||
// count
|
// unstock
|
||||||
//
|
//
|
||||||
this.count.HeaderText = "수량";
|
this.unstock.HeaderText = "미입고";
|
||||||
this.count.Name = "count";
|
this.unstock.Name = "unstock";
|
||||||
this.count.Width = 80;
|
this.unstock.Visible = false;
|
||||||
|
this.unstock.Width = 70;
|
||||||
//
|
//
|
||||||
// work_name
|
// state
|
||||||
//
|
//
|
||||||
this.work_name.HeaderText = "작업명";
|
this.state.HeaderText = "상태";
|
||||||
this.work_name.Name = "work_name";
|
this.state.Name = "state";
|
||||||
|
this.state.Width = 70;
|
||||||
//
|
//
|
||||||
// list_name
|
// etc
|
||||||
//
|
//
|
||||||
this.list_name.HeaderText = "목록명";
|
this.etc.HeaderText = "비고";
|
||||||
this.list_name.Name = "list_name";
|
this.etc.Name = "etc";
|
||||||
this.list_name.Width = 200;
|
this.etc.Width = 280;
|
||||||
//
|
//
|
||||||
// end_date
|
// charge
|
||||||
//
|
//
|
||||||
this.end_date.HeaderText = "완료일자";
|
this.charge.HeaderText = "담당자";
|
||||||
this.end_date.Name = "end_date";
|
this.charge.Name = "charge";
|
||||||
|
this.charge.Width = 70;
|
||||||
//
|
//
|
||||||
// start_date
|
// dvc_cust
|
||||||
//
|
//
|
||||||
this.start_date.HeaderText = "목록일자";
|
this.dvc_cust.HeaderText = "CustomerIDX";
|
||||||
this.start_date.Name = "start_date";
|
this.dvc_cust.Name = "dvc_cust";
|
||||||
|
this.dvc_cust.Visible = false;
|
||||||
//
|
//
|
||||||
// idx
|
// check
|
||||||
//
|
//
|
||||||
this.idx.HeaderText = "idx";
|
this.check.HeaderText = "V";
|
||||||
this.idx.Name = "idx";
|
this.check.Name = "check";
|
||||||
this.idx.Visible = false;
|
this.check.Width = 35;
|
||||||
//
|
//
|
||||||
// Mac_List
|
// Mac_List
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(1124, 661);
|
this.ClientSize = new System.Drawing.Size(1179, 661);
|
||||||
this.Controls.Add(this.panel2);
|
this.Controls.Add(this.panel2);
|
||||||
this.Controls.Add(this.panel1);
|
this.Controls.Add(this.panel1);
|
||||||
this.Name = "Mac_List";
|
this.Name = "Mac_List";
|
||||||
@@ -404,6 +419,7 @@
|
|||||||
private System.Windows.Forms.DataGridViewTextBoxColumn idx;
|
private System.Windows.Forms.DataGridViewTextBoxColumn idx;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn start_date;
|
private System.Windows.Forms.DataGridViewTextBoxColumn start_date;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn end_date;
|
private System.Windows.Forms.DataGridViewTextBoxColumn end_date;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn dvc_custname;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn list_name;
|
private System.Windows.Forms.DataGridViewTextBoxColumn list_name;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn work_name;
|
private System.Windows.Forms.DataGridViewTextBoxColumn work_name;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn count;
|
private System.Windows.Forms.DataGridViewTextBoxColumn count;
|
||||||
@@ -412,6 +428,7 @@
|
|||||||
private System.Windows.Forms.DataGridViewTextBoxColumn state;
|
private System.Windows.Forms.DataGridViewTextBoxColumn state;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn etc;
|
private System.Windows.Forms.DataGridViewTextBoxColumn etc;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn charge;
|
private System.Windows.Forms.DataGridViewTextBoxColumn charge;
|
||||||
|
private System.Windows.Forms.DataGridViewTextBoxColumn dvc_cust;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn check;
|
private System.Windows.Forms.DataGridViewTextBoxColumn check;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -44,7 +44,8 @@ namespace WindowsFormsApp1.Mac
|
|||||||
}
|
}
|
||||||
private void tb_Search_KeyDown(object sender, KeyEventArgs e)
|
private void tb_Search_KeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.KeyCode == Keys.Enter) {
|
if (e.KeyCode == Keys.Enter)
|
||||||
|
{
|
||||||
btn_Lookup_Click(null, null);
|
btn_Lookup_Click(null, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -55,9 +56,8 @@ namespace WindowsFormsApp1.Mac
|
|||||||
/* idx / 목록일자 / 완료일자 / 목록명 / 작업명
|
/* idx / 목록일자 / 완료일자 / 목록명 / 작업명
|
||||||
* 전체수량 / 입고 / 미입고 / 상태 / 비고
|
* 전체수량 / 입고 / 미입고 / 상태 / 비고
|
||||||
* 마크담당자 */
|
* 마크담당자 */
|
||||||
string Area = "`idx`, `date`, `date_res`, `list_name`, `work_name`, " +
|
string Area = $"`idx`, `date`, `date_res`,GetClientName({compidx},customer) as custname, `list_name`, `work_name`, " +
|
||||||
"`vol`, `stock`, `unstock`, `state`, `m_etc`, " +
|
"`vol`, `stock`, `unstock`, `state`, `m_etc`,`m_charge`,`customer` ";
|
||||||
"`m_charge`";
|
|
||||||
string search = tb_Search.Text;
|
string search = tb_Search.Text;
|
||||||
string state = cb_state.Text;
|
string state = cb_state.Text;
|
||||||
|
|
||||||
@@ -83,14 +83,14 @@ namespace WindowsFormsApp1.Mac
|
|||||||
/// <param name="data"></param>
|
/// <param name="data"></param>
|
||||||
private void input_Grid(string[] data)
|
private void input_Grid(string[] data)
|
||||||
{
|
{
|
||||||
/* idx / 목록일자 / 완료일자 / 목록명 / 작업명
|
/* idx / 목록일자 / 완료일자 / 납품처 / 목록명 / 작업명
|
||||||
* 전체수량 / 입고 / 미입고 / 상태 / 비고
|
* 전체수량 / 입고 / 미입고 / 상태 / 비고
|
||||||
* 마크담당자 */
|
* 마크담당자 */
|
||||||
|
|
||||||
string[] grid = { "", "", "", "", "",
|
string[] grid = { "", "", "", "", "",
|
||||||
"", "", "", "", "",
|
"", "", "", "", "",
|
||||||
"", "" };
|
"", "" ,"","","","","",""};
|
||||||
int area_count = 11;
|
int area_count = 13;
|
||||||
dataGridView1.Rows.Clear();
|
dataGridView1.Rows.Clear();
|
||||||
for (int a = 0; a < data.Length; a++)
|
for (int a = 0; a < data.Length; a++)
|
||||||
{
|
{
|
||||||
@@ -104,7 +104,12 @@ namespace WindowsFormsApp1.Mac
|
|||||||
if (a % area_count == 7) { grid[7] = data[a]; }
|
if (a % area_count == 7) { grid[7] = data[a]; }
|
||||||
if (a % area_count == 8) { grid[8] = data[a]; }
|
if (a % area_count == 8) { grid[8] = data[a]; }
|
||||||
if (a % area_count == 9) { grid[9] = data[a]; }
|
if (a % area_count == 9) { grid[9] = data[a]; }
|
||||||
if (a % area_count == 10) { grid[10] = data[a];
|
if (a % area_count == 10) { grid[10] = data[a]; }
|
||||||
|
if (a % area_count == 11) { grid[11] = data[a]; }
|
||||||
|
//if (a % area_count == 12) { grid[12] = data[a]; }
|
||||||
|
if (a % area_count == 12)
|
||||||
|
{ //cutomeridx
|
||||||
|
grid[12] = data[a];
|
||||||
dataGridView1.Rows.Add(grid);
|
dataGridView1.Rows.Add(grid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -126,14 +131,16 @@ namespace WindowsFormsApp1.Mac
|
|||||||
string table = "Obj_List";
|
string table = "Obj_List";
|
||||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||||
{
|
{
|
||||||
if (dataGridView1.Rows[a].Cells["check"].Value.ToString() == "V") {
|
if (dataGridView1.Rows[a].Cells["check"].Value.ToString() == "V")
|
||||||
|
{
|
||||||
string[] edit_col = {
|
string[] edit_col = {
|
||||||
"date", "date_res", "list_name", "work_name", "vol",
|
"date", "date_res","custname", "list_name", "work_name", "vol",
|
||||||
"stock", "unstock", "state", "m_etc", "m_charge"
|
"stock", "unstock", "state", "m_etc", "m_charge","customer"
|
||||||
};
|
};
|
||||||
string[] edit_tbl = {
|
string[] edit_tbl = {
|
||||||
dataGridView1.Rows[a].Cells["start_date"].Value.ToString(),
|
dataGridView1.Rows[a].Cells["start_date"].Value.ToString(),
|
||||||
dataGridView1.Rows[a].Cells["end_date"].Value.ToString(),
|
dataGridView1.Rows[a].Cells["end_date"].Value.ToString(),
|
||||||
|
dataGridView1.Rows[a].Cells["custname"].Value.ToString(),
|
||||||
dataGridView1.Rows[a].Cells["list_name"].Value.ToString(),
|
dataGridView1.Rows[a].Cells["list_name"].Value.ToString(),
|
||||||
dataGridView1.Rows[a].Cells["work_name"].Value.ToString(),
|
dataGridView1.Rows[a].Cells["work_name"].Value.ToString(),
|
||||||
dataGridView1.Rows[a].Cells["count"].Value.ToString(),
|
dataGridView1.Rows[a].Cells["count"].Value.ToString(),
|
||||||
@@ -141,7 +148,9 @@ namespace WindowsFormsApp1.Mac
|
|||||||
dataGridView1.Rows[a].Cells["unstock"].Value.ToString(),
|
dataGridView1.Rows[a].Cells["unstock"].Value.ToString(),
|
||||||
dataGridView1.Rows[a].Cells["state"].Value.ToString(),
|
dataGridView1.Rows[a].Cells["state"].Value.ToString(),
|
||||||
dataGridView1.Rows[a].Cells["etc"].Value.ToString(),
|
dataGridView1.Rows[a].Cells["etc"].Value.ToString(),
|
||||||
dataGridView1.Rows[a].Cells["charge"].Value.ToString()
|
dataGridView1.Rows[a].Cells["charge"].Value.ToString(),
|
||||||
|
dataGridView1.Rows[a].Cells["customer"].Value.ToString(),
|
||||||
|
|
||||||
};
|
};
|
||||||
string[] sear_col = { "idx", "comp_num" };
|
string[] sear_col = { "idx", "comp_num" };
|
||||||
string[] sear_tbl = { dataGridView1.Rows[a].Cells["idx"].Value.ToString(), compidx };
|
string[] sear_tbl = { dataGridView1.Rows[a].Cells["idx"].Value.ToString(), compidx };
|
||||||
@@ -159,7 +168,7 @@ namespace WindowsFormsApp1.Mac
|
|||||||
{
|
{
|
||||||
Excel_text et = new Excel_text();
|
Excel_text et = new Excel_text();
|
||||||
string[] Excel_title = {
|
string[] Excel_title = {
|
||||||
"NO", "목록일자", "완료일자", "목록명", "마크담당자",
|
"NO", "목록일자", "완료일자", "납품처","목록명", "마크담당자",
|
||||||
//"작업명", "수량", "입고", "미입고", "상태", "비고" };
|
//"작업명", "수량", "입고", "미입고", "상태", "비고" };
|
||||||
"작업명", "수량", "상태", "비고" };
|
"작업명", "수량", "상태", "비고" };
|
||||||
int rowCount = dataGridView1.RowCount;
|
int rowCount = dataGridView1.RowCount;
|
||||||
@@ -169,21 +178,19 @@ namespace WindowsFormsApp1.Mac
|
|||||||
for (int a = 0; a < rowCount; a++)
|
for (int a = 0; a < rowCount; a++)
|
||||||
{
|
{
|
||||||
int row_idx = dataGridView1.Rows[a].HeaderCell.RowIndex + 1;
|
int row_idx = dataGridView1.Rows[a].HeaderCell.RowIndex + 1;
|
||||||
inputExcel[a, 0] = row_idx.ToString();
|
|
||||||
inputExcel[a, 1] = dataGridView1.Rows[a].Cells["start_date"].Value.ToString();
|
|
||||||
inputExcel[a, 2] = dataGridView1.Rows[a].Cells["end_date"].Value.ToString();
|
|
||||||
inputExcel[a, 3] = dataGridView1.Rows[a].Cells["list_name"].Value.ToString();
|
|
||||||
inputExcel[a, 4] = dataGridView1.Rows[a].Cells["charge"].Value.ToString();
|
|
||||||
inputExcel[a, 5] = dataGridView1.Rows[a].Cells["work_name"].Value.ToString();
|
|
||||||
inputExcel[a, 6] = dataGridView1.Rows[a].Cells["count"].Value.ToString();
|
|
||||||
|
|
||||||
inputExcel[a, 7] = dataGridView1.Rows[a].Cells["state"].Value.ToString();
|
var seq = 0;
|
||||||
inputExcel[a, 8] = dataGridView1.Rows[a].Cells["etc"].Value.ToString();
|
inputExcel[a, seq++] = row_idx.ToString();
|
||||||
|
inputExcel[a, seq++] = dataGridView1.Rows[a].Cells["start_date"].Value.ToString();
|
||||||
// inputExcel[a, 7] = dataGridView1.Rows[a].Cells["stock"].Value.ToString();
|
inputExcel[a, seq++] = dataGridView1.Rows[a].Cells["end_date"].Value.ToString();
|
||||||
// inputExcel[a, 8] = dataGridView1.Rows[a].Cells["unstock"].Value.ToString();
|
inputExcel[a, seq++] = dataGridView1.Rows[a].Cells["custname"]?.Value.ToString() ?? "";
|
||||||
// inputExcel[a, 9] = dataGridView1.Rows[a].Cells["state"].Value.ToString();
|
inputExcel[a, seq++] = dataGridView1.Rows[a].Cells["list_name"].Value.ToString();
|
||||||
// inputExcel[a, 10] =dataGridView1.Rows[a].Cells["etc"].Value.ToString();
|
inputExcel[a, seq++] = dataGridView1.Rows[a].Cells["charge"].Value.ToString();
|
||||||
|
inputExcel[a, seq++] = dataGridView1.Rows[a].Cells["work_name"].Value.ToString();
|
||||||
|
inputExcel[a, seq++] = dataGridView1.Rows[a].Cells["count"].Value.ToString();
|
||||||
|
inputExcel[a, seq++] = dataGridView1.Rows[a].Cells["state"].Value.ToString();
|
||||||
|
inputExcel[a, seq++] = dataGridView1.Rows[a].Cells["etc"].Value.ToString();
|
||||||
|
inputExcel[a, seq++] = dataGridView1.Rows[a].Cells["customer"]?.Value.ToString() ?? "";
|
||||||
}
|
}
|
||||||
et.Mk_Excel(Excel_title, inputExcel);
|
et.Mk_Excel(Excel_title, inputExcel);
|
||||||
}
|
}
|
||||||
@@ -198,19 +205,23 @@ namespace WindowsFormsApp1.Mac
|
|||||||
|
|
||||||
private void btn_Progress_Click(object sender, EventArgs e)
|
private void btn_Progress_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
for(int a = 0; a < dataGridView1.Rows.Count; a++)
|
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||||
{
|
{
|
||||||
if (dataGridView1.Rows[a].Cells["check"].Value.ToString() == "V") {
|
if (dataGridView1.Rows[a].Cells["check"].Value.ToString() == "V")
|
||||||
if (dataGridView1.Rows[a].Cells["state"].Value.ToString() == "진행") {
|
{
|
||||||
|
if (dataGridView1.Rows[a].Cells["state"].Value.ToString() == "진행")
|
||||||
|
{
|
||||||
MessageBox.Show("체크된 목록이 현재 진행중입니다.");
|
MessageBox.Show("체크된 목록이 현재 진행중입니다.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(int a= 0; a < dataGridView1.Rows.Count; a++)
|
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||||
{
|
{
|
||||||
if (dataGridView1.Rows[a].Cells["check"].Value.ToString() == "V") {
|
if (dataGridView1.Rows[a].Cells["check"].Value.ToString() == "V")
|
||||||
if (dataGridView1.Rows[a].Cells["state"].Value.ToString() == "완료") {
|
{
|
||||||
|
if (dataGridView1.Rows[a].Cells["state"].Value.ToString() == "완료")
|
||||||
|
{
|
||||||
dataGridView1.Rows[a].Cells["state"].Value = "진행";
|
dataGridView1.Rows[a].Cells["state"].Value = "진행";
|
||||||
state_Save(a);
|
state_Save(a);
|
||||||
}
|
}
|
||||||
@@ -225,8 +236,10 @@ namespace WindowsFormsApp1.Mac
|
|||||||
{
|
{
|
||||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||||
{
|
{
|
||||||
if (dataGridView1.Rows[a].Cells["check"].Value.ToString() == "V") {
|
if (dataGridView1.Rows[a].Cells["check"].Value.ToString() == "V")
|
||||||
if (dataGridView1.Rows[a].Cells["state"].Value.ToString() == "완료") {
|
{
|
||||||
|
if (dataGridView1.Rows[a].Cells["state"].Value.ToString() == "완료")
|
||||||
|
{
|
||||||
MessageBox.Show("체크된 목록은 현재 완료되어있습니다.");
|
MessageBox.Show("체크된 목록은 현재 완료되어있습니다.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -234,8 +247,10 @@ namespace WindowsFormsApp1.Mac
|
|||||||
}
|
}
|
||||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||||
{
|
{
|
||||||
if (dataGridView1.Rows[a].Cells["check"].Value.ToString() == "V") {
|
if (dataGridView1.Rows[a].Cells["check"].Value.ToString() == "V")
|
||||||
if (dataGridView1.Rows[a].Cells["state"].Value.ToString() == "진행") {
|
{
|
||||||
|
if (dataGridView1.Rows[a].Cells["state"].Value.ToString() == "진행")
|
||||||
|
{
|
||||||
dataGridView1.Rows[a].Cells["state"].Value = "완료";
|
dataGridView1.Rows[a].Cells["state"].Value = "완료";
|
||||||
state_Save(a);
|
state_Save(a);
|
||||||
}
|
}
|
||||||
@@ -268,7 +283,8 @@ namespace WindowsFormsApp1.Mac
|
|||||||
{
|
{
|
||||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||||
{
|
{
|
||||||
if (dataGridView1.Rows[a].Cells["check"].Value.ToString() == "V") {
|
if (dataGridView1.Rows[a].Cells["check"].Value.ToString() == "V")
|
||||||
|
{
|
||||||
string l_idx = dataGridView1.Rows[a].Cells["idx"].Value.ToString();
|
string l_idx = dataGridView1.Rows[a].Cells["idx"].Value.ToString();
|
||||||
string D_cmd = db.DB_Delete("Obj_List", "comp_num", compidx,
|
string D_cmd = db.DB_Delete("Obj_List", "comp_num", compidx,
|
||||||
"idx", l_idx);
|
"idx", l_idx);
|
||||||
@@ -294,14 +310,18 @@ namespace WindowsFormsApp1.Mac
|
|||||||
{
|
{
|
||||||
int idx_row = e.RowIndex;
|
int idx_row = e.RowIndex;
|
||||||
int idx_col = e.ColumnIndex;
|
int idx_col = e.ColumnIndex;
|
||||||
if (3 <= idx_col && idx_col <= 8) {
|
if (3 <= idx_col && idx_col <= 8)
|
||||||
|
{
|
||||||
ExcelTest.Marc marc = new ExcelTest.Marc(this);
|
ExcelTest.Marc marc = new ExcelTest.Marc(this);
|
||||||
marc.MdiParent = main;
|
marc.MdiParent = main;
|
||||||
marc.WindowState = FormWindowState.Maximized;
|
marc.WindowState = FormWindowState.Maximized;
|
||||||
marc.Show();
|
marc.Show();
|
||||||
marc.input_list(
|
marc.input_list(
|
||||||
dataGridView1.Rows[idx_row].Cells["idx"].Value.ToString(),
|
dataGridView1.Rows[idx_row].Cells["idx"].Value.ToString(),
|
||||||
dataGridView1.Rows[idx_row].Cells["list_name"].Value.ToString(), compidx);
|
dataGridView1.Rows[idx_row].Cells["list_name"].Value.ToString(), compidx,
|
||||||
|
(dataGridView1.Rows[idx_row].Cells["dvc_cust"]?.Value.ToString() ?? string.Empty),
|
||||||
|
(dataGridView1.Rows[idx_row].Cells["dvc_custname"]?.Value.ToString() ?? string.Empty)
|
||||||
|
);
|
||||||
/// marc.input_list(
|
/// marc.input_list(
|
||||||
/// dataGridView1.Rows[idx_row].Cells["idx"].Value.ToString(),
|
/// dataGridView1.Rows[idx_row].Cells["idx"].Value.ToString(),
|
||||||
/// dataGridView1.Rows[idx_row].Cells["list_name"].Value.ToString());
|
/// dataGridView1.Rows[idx_row].Cells["list_name"].Value.ToString());
|
||||||
|
|||||||
@@ -126,6 +126,9 @@
|
|||||||
<metadata name="end_date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="end_date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="dvc_custname.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="list_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="list_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
@@ -150,6 +153,9 @@
|
|||||||
<metadata name="charge.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="charge.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="dvc_cust.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
<value>True</value>
|
||||||
|
</metadata>
|
||||||
<metadata name="check.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="check.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
|||||||
109
unimarc/unimarc/마크/Mac_List_Add.Designer.cs
generated
109
unimarc/unimarc/마크/Mac_List_Add.Designer.cs
generated
@@ -29,14 +29,15 @@ namespace UniMarc.마크
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
this.panel1 = new System.Windows.Forms.Panel();
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
|
this.tbCustomIDX = new System.Windows.Forms.TextBox();
|
||||||
this.label5 = new System.Windows.Forms.Label();
|
this.label5 = new System.Windows.Forms.Label();
|
||||||
this.cb_Gubun = new System.Windows.Forms.ComboBox();
|
this.cb_Gubun = new System.Windows.Forms.ComboBox();
|
||||||
this.btn_DelRow = new System.Windows.Forms.Button();
|
this.btn_DelRow = new System.Windows.Forms.Button();
|
||||||
@@ -48,7 +49,7 @@ namespace UniMarc.마크
|
|||||||
this.label3 = new System.Windows.Forms.Label();
|
this.label3 = new System.Windows.Forms.Label();
|
||||||
this.label2 = new System.Windows.Forms.Label();
|
this.label2 = new System.Windows.Forms.Label();
|
||||||
this.label4 = new System.Windows.Forms.Label();
|
this.label4 = new System.Windows.Forms.Label();
|
||||||
this.label1 = new System.Windows.Forms.Label();
|
this.btCustom = new System.Windows.Forms.Button();
|
||||||
this.tb_ExpectList = new System.Windows.Forms.TextBox();
|
this.tb_ExpectList = new System.Windows.Forms.TextBox();
|
||||||
this.tb_divName = new System.Windows.Forms.TextBox();
|
this.tb_divName = new System.Windows.Forms.TextBox();
|
||||||
this.tb_divComp = new System.Windows.Forms.TextBox();
|
this.tb_divComp = new System.Windows.Forms.TextBox();
|
||||||
@@ -72,6 +73,7 @@ namespace UniMarc.마크
|
|||||||
// panel1
|
// panel1
|
||||||
//
|
//
|
||||||
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.panel1.Controls.Add(this.tbCustomIDX);
|
||||||
this.panel1.Controls.Add(this.label5);
|
this.panel1.Controls.Add(this.label5);
|
||||||
this.panel1.Controls.Add(this.cb_Gubun);
|
this.panel1.Controls.Add(this.cb_Gubun);
|
||||||
this.panel1.Controls.Add(this.btn_DelRow);
|
this.panel1.Controls.Add(this.btn_DelRow);
|
||||||
@@ -83,7 +85,7 @@ namespace UniMarc.마크
|
|||||||
this.panel1.Controls.Add(this.label3);
|
this.panel1.Controls.Add(this.label3);
|
||||||
this.panel1.Controls.Add(this.label2);
|
this.panel1.Controls.Add(this.label2);
|
||||||
this.panel1.Controls.Add(this.label4);
|
this.panel1.Controls.Add(this.label4);
|
||||||
this.panel1.Controls.Add(this.label1);
|
this.panel1.Controls.Add(this.btCustom);
|
||||||
this.panel1.Controls.Add(this.tb_ExpectList);
|
this.panel1.Controls.Add(this.tb_ExpectList);
|
||||||
this.panel1.Controls.Add(this.tb_divName);
|
this.panel1.Controls.Add(this.tb_divName);
|
||||||
this.panel1.Controls.Add(this.tb_divComp);
|
this.panel1.Controls.Add(this.tb_divComp);
|
||||||
@@ -93,6 +95,16 @@ namespace UniMarc.마크
|
|||||||
this.panel1.Size = new System.Drawing.Size(897, 59);
|
this.panel1.Size = new System.Drawing.Size(897, 59);
|
||||||
this.panel1.TabIndex = 0;
|
this.panel1.TabIndex = 0;
|
||||||
//
|
//
|
||||||
|
// tbCustomIDX
|
||||||
|
//
|
||||||
|
this.tbCustomIDX.Location = new System.Drawing.Point(175, 5);
|
||||||
|
this.tbCustomIDX.Name = "tbCustomIDX";
|
||||||
|
this.tbCustomIDX.ReadOnly = true;
|
||||||
|
this.tbCustomIDX.Size = new System.Drawing.Size(66, 21);
|
||||||
|
this.tbCustomIDX.TabIndex = 15;
|
||||||
|
this.tbCustomIDX.TabStop = false;
|
||||||
|
this.tbCustomIDX.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
|
||||||
|
//
|
||||||
// label5
|
// label5
|
||||||
//
|
//
|
||||||
this.label5.AutoSize = true;
|
this.label5.AutoSize = true;
|
||||||
@@ -135,7 +147,7 @@ namespace UniMarc.마크
|
|||||||
//
|
//
|
||||||
this.cb_User.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
this.cb_User.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||||
this.cb_User.FormattingEnabled = true;
|
this.cb_User.FormattingEnabled = true;
|
||||||
this.cb_User.Location = new System.Drawing.Point(373, 5);
|
this.cb_User.Location = new System.Drawing.Point(452, 5);
|
||||||
this.cb_User.Name = "cb_User";
|
this.cb_User.Name = "cb_User";
|
||||||
this.cb_User.Size = new System.Drawing.Size(82, 20);
|
this.cb_User.Size = new System.Drawing.Size(82, 20);
|
||||||
this.cb_User.TabIndex = 2;
|
this.cb_User.TabIndex = 2;
|
||||||
@@ -173,7 +185,7 @@ namespace UniMarc.마크
|
|||||||
// label3
|
// label3
|
||||||
//
|
//
|
||||||
this.label3.AutoSize = true;
|
this.label3.AutoSize = true;
|
||||||
this.label3.Location = new System.Drawing.Point(330, 9);
|
this.label3.Location = new System.Drawing.Point(409, 9);
|
||||||
this.label3.Name = "label3";
|
this.label3.Name = "label3";
|
||||||
this.label3.Size = new System.Drawing.Size(41, 12);
|
this.label3.Size = new System.Drawing.Size(41, 12);
|
||||||
this.label3.TabIndex = 13;
|
this.label3.TabIndex = 13;
|
||||||
@@ -182,7 +194,7 @@ namespace UniMarc.마크
|
|||||||
// label2
|
// label2
|
||||||
//
|
//
|
||||||
this.label2.AutoSize = true;
|
this.label2.AutoSize = true;
|
||||||
this.label2.Location = new System.Drawing.Point(178, 9);
|
this.label2.Location = new System.Drawing.Point(257, 9);
|
||||||
this.label2.Name = "label2";
|
this.label2.Name = "label2";
|
||||||
this.label2.Size = new System.Drawing.Size(41, 12);
|
this.label2.Size = new System.Drawing.Size(41, 12);
|
||||||
this.label2.TabIndex = 11;
|
this.label2.TabIndex = 11;
|
||||||
@@ -197,14 +209,15 @@ namespace UniMarc.마크
|
|||||||
this.label4.TabIndex = 10;
|
this.label4.TabIndex = 10;
|
||||||
this.label4.Text = "생성될 목록명";
|
this.label4.Text = "생성될 목록명";
|
||||||
//
|
//
|
||||||
// label1
|
// btCustom
|
||||||
//
|
//
|
||||||
this.label1.AutoSize = true;
|
this.btCustom.AutoSize = true;
|
||||||
this.label1.Location = new System.Drawing.Point(26, 9);
|
this.btCustom.Location = new System.Drawing.Point(5, 4);
|
||||||
this.label1.Name = "label1";
|
this.btCustom.Name = "btCustom";
|
||||||
this.label1.Size = new System.Drawing.Size(41, 12);
|
this.btCustom.Size = new System.Drawing.Size(61, 22);
|
||||||
this.label1.TabIndex = 9;
|
this.btCustom.TabIndex = 9;
|
||||||
this.label1.Text = "납품처";
|
this.btCustom.Text = "납품처";
|
||||||
|
this.btCustom.Click += new System.EventHandler(this.label1_Click);
|
||||||
//
|
//
|
||||||
// tb_ExpectList
|
// tb_ExpectList
|
||||||
//
|
//
|
||||||
@@ -216,7 +229,7 @@ namespace UniMarc.마크
|
|||||||
//
|
//
|
||||||
// tb_divName
|
// tb_divName
|
||||||
//
|
//
|
||||||
this.tb_divName.Location = new System.Drawing.Point(221, 5);
|
this.tb_divName.Location = new System.Drawing.Point(300, 5);
|
||||||
this.tb_divName.Name = "tb_divName";
|
this.tb_divName.Name = "tb_divName";
|
||||||
this.tb_divName.Size = new System.Drawing.Size(100, 21);
|
this.tb_divName.Size = new System.Drawing.Size(100, 21);
|
||||||
this.tb_divName.TabIndex = 1;
|
this.tb_divName.TabIndex = 1;
|
||||||
@@ -229,6 +242,7 @@ namespace UniMarc.마크
|
|||||||
this.tb_divComp.Size = new System.Drawing.Size(100, 21);
|
this.tb_divComp.Size = new System.Drawing.Size(100, 21);
|
||||||
this.tb_divComp.TabIndex = 0;
|
this.tb_divComp.TabIndex = 0;
|
||||||
this.tb_divComp.TextChanged += new System.EventHandler(this.Delivery_TextChanged);
|
this.tb_divComp.TextChanged += new System.EventHandler(this.Delivery_TextChanged);
|
||||||
|
this.tb_divComp.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_divComp_KeyDown);
|
||||||
//
|
//
|
||||||
// panel2
|
// panel2
|
||||||
//
|
//
|
||||||
@@ -244,14 +258,14 @@ namespace UniMarc.마크
|
|||||||
this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
|
this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
|
||||||
this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||||
this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
|
this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
|
||||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||||
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
|
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control;
|
||||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
dataGridViewCellStyle8.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||||
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
|
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8;
|
||||||
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
this.header,
|
this.header,
|
||||||
this.num,
|
this.num,
|
||||||
@@ -285,53 +299,53 @@ namespace UniMarc.마크
|
|||||||
//
|
//
|
||||||
// BookName
|
// BookName
|
||||||
//
|
//
|
||||||
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
||||||
this.BookName.DefaultCellStyle = dataGridViewCellStyle2;
|
this.BookName.DefaultCellStyle = dataGridViewCellStyle9;
|
||||||
this.BookName.HeaderText = "도서명";
|
this.BookName.HeaderText = "도서명";
|
||||||
this.BookName.Name = "BookName";
|
this.BookName.Name = "BookName";
|
||||||
this.BookName.Width = 200;
|
this.BookName.Width = 200;
|
||||||
//
|
//
|
||||||
// Author
|
// Author
|
||||||
//
|
//
|
||||||
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
||||||
this.Author.DefaultCellStyle = dataGridViewCellStyle3;
|
this.Author.DefaultCellStyle = dataGridViewCellStyle10;
|
||||||
this.Author.HeaderText = "저자";
|
this.Author.HeaderText = "저자";
|
||||||
this.Author.Name = "Author";
|
this.Author.Name = "Author";
|
||||||
//
|
//
|
||||||
// BookComp
|
// BookComp
|
||||||
//
|
//
|
||||||
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
||||||
this.BookComp.DefaultCellStyle = dataGridViewCellStyle4;
|
this.BookComp.DefaultCellStyle = dataGridViewCellStyle11;
|
||||||
this.BookComp.HeaderText = "출판사";
|
this.BookComp.HeaderText = "출판사";
|
||||||
this.BookComp.Name = "BookComp";
|
this.BookComp.Name = "BookComp";
|
||||||
this.BookComp.Width = 120;
|
this.BookComp.Width = 120;
|
||||||
//
|
//
|
||||||
// Price
|
// Price
|
||||||
//
|
//
|
||||||
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
||||||
dataGridViewCellStyle5.Format = "N0";
|
dataGridViewCellStyle12.Format = "N0";
|
||||||
dataGridViewCellStyle5.NullValue = "0";
|
dataGridViewCellStyle12.NullValue = "0";
|
||||||
this.Price.DefaultCellStyle = dataGridViewCellStyle5;
|
this.Price.DefaultCellStyle = dataGridViewCellStyle12;
|
||||||
this.Price.HeaderText = "가격";
|
this.Price.HeaderText = "가격";
|
||||||
this.Price.Name = "Price";
|
this.Price.Name = "Price";
|
||||||
this.Price.Width = 80;
|
this.Price.Width = 80;
|
||||||
//
|
//
|
||||||
// Count
|
// Count
|
||||||
//
|
//
|
||||||
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
||||||
dataGridViewCellStyle6.Format = "N0";
|
dataGridViewCellStyle13.Format = "N0";
|
||||||
dataGridViewCellStyle6.NullValue = "1";
|
dataGridViewCellStyle13.NullValue = "1";
|
||||||
this.Count.DefaultCellStyle = dataGridViewCellStyle6;
|
this.Count.DefaultCellStyle = dataGridViewCellStyle13;
|
||||||
this.Count.HeaderText = "수량";
|
this.Count.HeaderText = "수량";
|
||||||
this.Count.Name = "Count";
|
this.Count.Name = "Count";
|
||||||
this.Count.Width = 45;
|
this.Count.Width = 45;
|
||||||
//
|
//
|
||||||
// Total
|
// Total
|
||||||
//
|
//
|
||||||
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
dataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
|
||||||
dataGridViewCellStyle7.Format = "N0";
|
dataGridViewCellStyle14.Format = "N0";
|
||||||
dataGridViewCellStyle7.NullValue = "0";
|
dataGridViewCellStyle14.NullValue = "0";
|
||||||
this.Total.DefaultCellStyle = dataGridViewCellStyle7;
|
this.Total.DefaultCellStyle = dataGridViewCellStyle14;
|
||||||
this.Total.HeaderText = "합계";
|
this.Total.HeaderText = "합계";
|
||||||
this.Total.Name = "Total";
|
this.Total.Name = "Total";
|
||||||
this.Total.Width = 80;
|
this.Total.Width = 80;
|
||||||
@@ -370,7 +384,7 @@ namespace UniMarc.마크
|
|||||||
private System.Windows.Forms.DataGridView dataGridView1;
|
private System.Windows.Forms.DataGridView dataGridView1;
|
||||||
private System.Windows.Forms.Button btn_AddList;
|
private System.Windows.Forms.Button btn_AddList;
|
||||||
private System.Windows.Forms.Label label2;
|
private System.Windows.Forms.Label label2;
|
||||||
private System.Windows.Forms.Label label1;
|
private System.Windows.Forms.Button btCustom;
|
||||||
private System.Windows.Forms.TextBox tb_divName;
|
private System.Windows.Forms.TextBox tb_divName;
|
||||||
private System.Windows.Forms.TextBox tb_divComp;
|
private System.Windows.Forms.TextBox tb_divComp;
|
||||||
private System.Windows.Forms.Label label3;
|
private System.Windows.Forms.Label label3;
|
||||||
@@ -393,5 +407,6 @@ namespace UniMarc.마크
|
|||||||
private System.Windows.Forms.Label label5;
|
private System.Windows.Forms.Label label5;
|
||||||
private System.Windows.Forms.OpenFileDialog openFileDialog1;
|
private System.Windows.Forms.OpenFileDialog openFileDialog1;
|
||||||
private System.Windows.Forms.Button btn_DelRow;
|
private System.Windows.Forms.Button btn_DelRow;
|
||||||
|
private System.Windows.Forms.TextBox tbCustomIDX;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,9 @@ using System.Windows.Forms;
|
|||||||
using WindowsFormsApp1;
|
using WindowsFormsApp1;
|
||||||
using WindowsFormsApp1.Mac;
|
using WindowsFormsApp1.Mac;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using Microsoft.Office.Interop.Excel;
|
||||||
|
using UniMarc.ListOfValue;
|
||||||
|
using AR;
|
||||||
|
|
||||||
namespace UniMarc.마크
|
namespace UniMarc.마크
|
||||||
{
|
{
|
||||||
@@ -78,11 +81,22 @@ namespace UniMarc.마크
|
|||||||
string listName = tb_ExpectList.Text;
|
string listName = tb_ExpectList.Text;
|
||||||
string charge = cb_User.Text;
|
string charge = cb_User.Text;
|
||||||
|
|
||||||
if (!CopyCheck(compidx, listName, Today)) {
|
int custidx = -1;
|
||||||
|
if (int.TryParse(tbCustomIDX.Text, out custidx) == false)
|
||||||
|
{
|
||||||
|
UTIL.MsgE("납품처를 올바르게 선택하세요");
|
||||||
|
tb_divComp.Focus();
|
||||||
|
tb_divComp.SelectAll();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!CopyCheck(compidx, listName, Today))
|
||||||
|
{
|
||||||
MessageBox.Show("목록이 중복되었습니다! 다시 확인해주세요.", "Error");
|
MessageBox.Show("목록이 중복되었습니다! 다시 확인해주세요.", "Error");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (tb_ExpectList.Text == "") {
|
if (tb_ExpectList.Text == "")
|
||||||
|
{
|
||||||
MessageBox.Show("목록명이 비어있습니다! 다시 확인해주세요.", "Error");
|
MessageBox.Show("목록명이 비어있습니다! 다시 확인해주세요.", "Error");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -105,15 +119,15 @@ namespace UniMarc.마크
|
|||||||
if (dataGridView1.Rows[a].Cells["BookName"].Value.ToString() == "")
|
if (dataGridView1.Rows[a].Cells["BookName"].Value.ToString() == "")
|
||||||
break;
|
break;
|
||||||
|
|
||||||
string header = dataGridView1.Rows[a].Cells["header"].Value.ToString();
|
string header = dataGridView1.Rows[a].Cells["header"].Value.ToString();
|
||||||
string num = dataGridView1.Rows[a].Cells["num"].Value.ToString();
|
string num = dataGridView1.Rows[a].Cells["num"].Value.ToString();
|
||||||
string bookname = dataGridView1.Rows[a].Cells["BookName"].Value.ToString();
|
string bookname = dataGridView1.Rows[a].Cells["BookName"].Value.ToString();
|
||||||
string author = dataGridView1.Rows[a].Cells["Author"].Value.ToString();
|
string author = dataGridView1.Rows[a].Cells["Author"].Value.ToString();
|
||||||
string bookcomp = dataGridView1.Rows[a].Cells["BookComp"].Value.ToString();
|
string bookcomp = dataGridView1.Rows[a].Cells["BookComp"].Value.ToString();
|
||||||
string price = dataGridView1.Rows[a].Cells["Price"].Value.ToString().Replace(",", "");
|
string price = dataGridView1.Rows[a].Cells["Price"].Value.ToString().Replace(",", "");
|
||||||
string count = dataGridView1.Rows[a].Cells["Count"].Value.ToString().Replace(",", "");
|
string count = dataGridView1.Rows[a].Cells["Count"].Value.ToString().Replace(",", "");
|
||||||
string total = dataGridView1.Rows[a].Cells["Total"].Value.ToString().Replace(",", "");
|
string total = dataGridView1.Rows[a].Cells["Total"].Value.ToString().Replace(",", "");
|
||||||
string isbn = dataGridView1.Rows[a].Cells["ISBN"].Value.ToString();
|
string isbn = dataGridView1.Rows[a].Cells["ISBN"].Value.ToString();
|
||||||
|
|
||||||
string tmp = string.Format(
|
string tmp = string.Format(
|
||||||
"(\"{0}\", \"{1}\", \"{2}\", \"{3}\", \"{4}\", " +
|
"(\"{0}\", \"{1}\", \"{2}\", \"{3}\", \"{4}\", " +
|
||||||
@@ -176,12 +190,14 @@ namespace UniMarc.마크
|
|||||||
{
|
{
|
||||||
for (int a = 0; a < dataGridView1.Columns.Count; a++)
|
for (int a = 0; a < dataGridView1.Columns.Count; a++)
|
||||||
{
|
{
|
||||||
if (a == 5 || a == 7) {
|
if (a == 5 || a == 7)
|
||||||
|
{
|
||||||
if (dataGridView1.Rows[row].Cells[a].Value == null)
|
if (dataGridView1.Rows[row].Cells[a].Value == null)
|
||||||
dataGridView1.Rows[row].Cells[a].Value = "0";
|
dataGridView1.Rows[row].Cells[a].Value = "0";
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (a == 6) {
|
else if (a == 6)
|
||||||
|
{
|
||||||
if (dataGridView1.Rows[row].Cells[a].Value == null)
|
if (dataGridView1.Rows[row].Cells[a].Value == null)
|
||||||
dataGridView1.Rows[row].Cells[a].Value = "1";
|
dataGridView1.Rows[row].Cells[a].Value = "1";
|
||||||
}
|
}
|
||||||
@@ -252,5 +268,35 @@ namespace UniMarc.마크
|
|||||||
{
|
{
|
||||||
sg.Excel_to_DataGridView(sender, e);
|
sg.Excel_to_DataGridView(sender, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void label1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
LovCustom();
|
||||||
|
}
|
||||||
|
void LovCustom()
|
||||||
|
{
|
||||||
|
string compidx = Properties.Settings.Default.compidx;
|
||||||
|
var inputsearch = tb_divComp.Text.Trim();
|
||||||
|
var where = $"campanyidx={compidx}";
|
||||||
|
if (inputsearch.isEmpty() == false)
|
||||||
|
{
|
||||||
|
where = $" and c_sangho like '%{inputsearch.Replace("'", "''")}%'";
|
||||||
|
}
|
||||||
|
var dt = DB2.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where);
|
||||||
|
using (var f = new fSelectDT(dt))
|
||||||
|
if (f.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
var dr = f.SelectedRow;
|
||||||
|
if (dr == null) return;
|
||||||
|
tbCustomIDX.Text = dr["idx"]?.ToString() ?? string.Empty;
|
||||||
|
tb_divComp.Text = dr["c_sangho"]?.ToString() ?? string.Empty;
|
||||||
|
tb_divName.Focus(); //납품명으로 커서 이동
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void tb_divComp_KeyDown(object sender, KeyEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.KeyCode == Keys.Enter) LovCustom();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
//using Microsoft.Office.Interop.Excel;
|
//using Microsoft.Office.Interop.Excel;
|
||||||
|
using AR;
|
||||||
|
using OpenQA.Selenium.DevTools.V136.Animation;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Drawing;
|
using System.Drawing;
|
||||||
@@ -11,6 +13,7 @@ using System.Text.RegularExpressions;
|
|||||||
using System.Web.UI;
|
using System.Web.UI;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using UniMarc;
|
using UniMarc;
|
||||||
|
using UniMarc.ListOfValue;
|
||||||
using UniMarc.마크;
|
using UniMarc.마크;
|
||||||
using WindowsFormsApp1;
|
using WindowsFormsApp1;
|
||||||
using WindowsFormsApp1.Mac;
|
using WindowsFormsApp1.Mac;
|
||||||
@@ -27,6 +30,7 @@ namespace ExcelTest
|
|||||||
int SaveRowIdx = -1;
|
int SaveRowIdx = -1;
|
||||||
public string mUserName;
|
public string mUserName;
|
||||||
string mCompidx = UniMarc.Properties.Settings.Default.compidx;
|
string mCompidx = UniMarc.Properties.Settings.Default.compidx;
|
||||||
|
string mListIdx = "";
|
||||||
public string find;
|
public string find;
|
||||||
public string change;
|
public string change;
|
||||||
public string call = "";
|
public string call = "";
|
||||||
@@ -52,6 +56,8 @@ namespace ExcelTest
|
|||||||
mUserName = ml.user_name;
|
mUserName = ml.user_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string l_idx = string.Empty;
|
||||||
|
string c_idx = string.Empty;
|
||||||
private void Marc_Load(object sender, EventArgs e)
|
private void Marc_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
#region ComboBox Item Setting
|
#region ComboBox Item Setting
|
||||||
@@ -198,14 +204,18 @@ namespace ExcelTest
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="date">목록일자</param>
|
/// <param name="date">목록일자</param>
|
||||||
/// <param name="value">목록명</param>
|
/// <param name="value">목록명</param>
|
||||||
public void input_list(string l_idx, string value, string C_idx)
|
public void input_list(string l_idx, string value, string C_idx,string custidx,string custname)
|
||||||
{
|
{
|
||||||
db.DBcon();
|
db.DBcon();
|
||||||
|
this.l_idx = l_idx;
|
||||||
|
this.c_idx = C_idx;
|
||||||
string Area = "`idx`, `isbn_marc`, `header`, `num`, `book_name`, `author`, `book_comp`, `count`, `pay`, `image_url`, `m_idx`";
|
string Area = "`idx`, `isbn_marc`, `header`, `num`, `book_name`, `author`, `book_comp`, `count`, `pay`, `image_url`, `m_idx`";
|
||||||
string[] sear_tbl = { "l_idx", "compidx" };
|
string[] sear_tbl = { "l_idx", "compidx" };
|
||||||
string[] sear_col = { l_idx, C_idx };
|
string[] sear_col = { l_idx, C_idx };
|
||||||
|
|
||||||
lbl_BookList.Text = value;
|
lbl_BookList.Text = value;
|
||||||
|
tbCustName.Text = custname;
|
||||||
|
lbCustIDX.Text = custidx;
|
||||||
|
|
||||||
string cmd =
|
string cmd =
|
||||||
string.Format("SELECT {0} " +
|
string.Format("SELECT {0} " +
|
||||||
@@ -3651,6 +3661,39 @@ namespace ExcelTest
|
|||||||
sg.Print_Grid_Num(sender, e);
|
sg.Print_Grid_Num(sender, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void lbl_BookList_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
LovCustom();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void LovCustom()
|
||||||
|
{
|
||||||
|
var inputsearch = "";// tbCustName.Text.Trim();
|
||||||
|
var where = "";
|
||||||
|
if (inputsearch.isEmpty() == false)
|
||||||
|
{
|
||||||
|
where = $"c_sangho like '%{inputsearch.Replace("'", "''")}%'";
|
||||||
|
}
|
||||||
|
var dt = DB2.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where);
|
||||||
|
using (var f = new fSelectDT(dt))
|
||||||
|
if (f.ShowDialog() == DialogResult.OK)
|
||||||
|
{
|
||||||
|
var dr = f.SelectedRow;
|
||||||
|
if (dr == null) return;
|
||||||
|
lbCustIDX.Text = dr["idx"]?.ToString() ?? string.Empty;
|
||||||
|
tbCustName.Text = dr["c_sangho"]?.ToString() ?? string.Empty;
|
||||||
|
|
||||||
|
if(int.TryParse(lbCustIDX.Text,out int custidx) && custidx >= 0)
|
||||||
|
{
|
||||||
|
var sql = $"update Obj_List set customer={custidx} where idx = {l_idx} and comp_num={c_idx}";
|
||||||
|
var cnt = DB2.ExcuteNonQuery(sql);
|
||||||
|
if (cnt != 1)
|
||||||
|
UTIL.MsgE($"데이터 저장시 오류가 발생했습니다. 영향을 받은 행 수 = {cnt}");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
190
unimarc/unimarc/마크/Marc.designer.cs
generated
190
unimarc/unimarc/마크/Marc.designer.cs
generated
@@ -28,19 +28,19 @@
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Marc));
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Marc));
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
|
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
|
||||||
this.etc1 = new System.Windows.Forms.RichTextBox();
|
this.etc1 = new System.Windows.Forms.RichTextBox();
|
||||||
this.etc2 = new System.Windows.Forms.RichTextBox();
|
this.etc2 = new System.Windows.Forms.RichTextBox();
|
||||||
@@ -248,8 +248,10 @@
|
|||||||
this.text250a = new System.Windows.Forms.TextBox();
|
this.text250a = new System.Windows.Forms.TextBox();
|
||||||
this.lbl_SaveData = new System.Windows.Forms.Label();
|
this.lbl_SaveData = new System.Windows.Forms.Label();
|
||||||
this.lbl_ISBN = new System.Windows.Forms.Label();
|
this.lbl_ISBN = new System.Windows.Forms.Label();
|
||||||
this.lbl_BookList = new System.Windows.Forms.Label();
|
this.tbCustName = new System.Windows.Forms.Button();
|
||||||
this.checkBox4 = new System.Windows.Forms.CheckBox();
|
this.checkBox4 = new System.Windows.Forms.CheckBox();
|
||||||
|
this.lbCustIDX = new System.Windows.Forms.Label();
|
||||||
|
this.lbl_BookList = new System.Windows.Forms.Label();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.List_Book)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.List_Book)).BeginInit();
|
||||||
this.panel3.SuspendLayout();
|
this.panel3.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||||
@@ -551,14 +553,14 @@
|
|||||||
this.List_Book.AllowUserToResizeColumns = false;
|
this.List_Book.AllowUserToResizeColumns = false;
|
||||||
this.List_Book.BackgroundColor = System.Drawing.Color.Gray;
|
this.List_Book.BackgroundColor = System.Drawing.Color.Gray;
|
||||||
this.List_Book.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
this.List_Book.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||||
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||||
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
|
dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control;
|
||||||
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
dataGridViewCellStyle13.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||||
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
|
dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||||
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||||
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||||
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
this.List_Book.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
this.List_Book.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13;
|
||||||
this.List_Book.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
this.List_Book.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
this.list_idx,
|
this.list_idx,
|
||||||
this.ISBN13,
|
this.ISBN13,
|
||||||
@@ -580,14 +582,14 @@
|
|||||||
this.List_Book.MultiSelect = false;
|
this.List_Book.MultiSelect = false;
|
||||||
this.List_Book.Name = "List_Book";
|
this.List_Book.Name = "List_Book";
|
||||||
this.List_Book.ReadOnly = true;
|
this.List_Book.ReadOnly = true;
|
||||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
|
||||||
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.ControlDark;
|
dataGridViewCellStyle16.BackColor = System.Drawing.SystemColors.ControlDark;
|
||||||
dataGridViewCellStyle4.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
dataGridViewCellStyle16.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||||
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
|
dataGridViewCellStyle16.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||||
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
dataGridViewCellStyle16.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||||
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
dataGridViewCellStyle16.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||||
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
dataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
this.List_Book.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
|
this.List_Book.RowHeadersDefaultCellStyle = dataGridViewCellStyle16;
|
||||||
this.List_Book.RowTemplate.Height = 23;
|
this.List_Book.RowTemplate.Height = 23;
|
||||||
this.List_Book.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
this.List_Book.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||||
this.List_Book.Size = new System.Drawing.Size(543, 822);
|
this.List_Book.Size = new System.Drawing.Size(543, 822);
|
||||||
@@ -686,9 +688,9 @@
|
|||||||
//
|
//
|
||||||
// grade
|
// grade
|
||||||
//
|
//
|
||||||
dataGridViewCellStyle2.Format = "N0";
|
dataGridViewCellStyle14.Format = "N0";
|
||||||
dataGridViewCellStyle2.NullValue = null;
|
dataGridViewCellStyle14.NullValue = null;
|
||||||
this.grade.DefaultCellStyle = dataGridViewCellStyle2;
|
this.grade.DefaultCellStyle = dataGridViewCellStyle14;
|
||||||
this.grade.HeaderText = "등급";
|
this.grade.HeaderText = "등급";
|
||||||
this.grade.Name = "grade";
|
this.grade.Name = "grade";
|
||||||
this.grade.ReadOnly = true;
|
this.grade.ReadOnly = true;
|
||||||
@@ -697,8 +699,8 @@
|
|||||||
//
|
//
|
||||||
// colCheck
|
// colCheck
|
||||||
//
|
//
|
||||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||||
this.colCheck.DefaultCellStyle = dataGridViewCellStyle3;
|
this.colCheck.DefaultCellStyle = dataGridViewCellStyle15;
|
||||||
this.colCheck.HeaderText = "V";
|
this.colCheck.HeaderText = "V";
|
||||||
this.colCheck.Name = "colCheck";
|
this.colCheck.Name = "colCheck";
|
||||||
this.colCheck.ReadOnly = true;
|
this.colCheck.ReadOnly = true;
|
||||||
@@ -1092,8 +1094,8 @@
|
|||||||
this.GridView020.Name = "GridView020";
|
this.GridView020.Name = "GridView020";
|
||||||
this.GridView020.RowHeadersVisible = false;
|
this.GridView020.RowHeadersVisible = false;
|
||||||
this.GridView020.RowHeadersWidth = 30;
|
this.GridView020.RowHeadersWidth = 30;
|
||||||
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
dataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||||
this.GridView020.RowsDefaultCellStyle = dataGridViewCellStyle5;
|
this.GridView020.RowsDefaultCellStyle = dataGridViewCellStyle17;
|
||||||
this.GridView020.RowTemplate.Height = 23;
|
this.GridView020.RowTemplate.Height = 23;
|
||||||
this.GridView020.Size = new System.Drawing.Size(408, 80);
|
this.GridView020.Size = new System.Drawing.Size(408, 80);
|
||||||
this.GridView020.TabIndex = 244;
|
this.GridView020.TabIndex = 244;
|
||||||
@@ -1161,8 +1163,8 @@
|
|||||||
this.GridView505.Name = "GridView505";
|
this.GridView505.Name = "GridView505";
|
||||||
this.GridView505.RowHeadersVisible = false;
|
this.GridView505.RowHeadersVisible = false;
|
||||||
this.GridView505.RowHeadersWidth = 30;
|
this.GridView505.RowHeadersWidth = 30;
|
||||||
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
dataGridViewCellStyle18.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||||
this.GridView505.RowsDefaultCellStyle = dataGridViewCellStyle6;
|
this.GridView505.RowsDefaultCellStyle = dataGridViewCellStyle18;
|
||||||
this.GridView505.RowTemplate.Height = 23;
|
this.GridView505.RowTemplate.Height = 23;
|
||||||
this.GridView505.Size = new System.Drawing.Size(401, 71);
|
this.GridView505.Size = new System.Drawing.Size(401, 71);
|
||||||
this.GridView505.TabIndex = 246;
|
this.GridView505.TabIndex = 246;
|
||||||
@@ -1295,14 +1297,14 @@
|
|||||||
this.GridView246.AllowDrop = true;
|
this.GridView246.AllowDrop = true;
|
||||||
this.GridView246.AllowUserToAddRows = false;
|
this.GridView246.AllowUserToAddRows = false;
|
||||||
this.GridView246.AllowUserToResizeRows = false;
|
this.GridView246.AllowUserToResizeRows = false;
|
||||||
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||||
dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
|
dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Control;
|
||||||
dataGridViewCellStyle7.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
dataGridViewCellStyle19.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||||
dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
|
dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||||
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||||
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||||
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
this.GridView246.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
|
this.GridView246.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle19;
|
||||||
this.GridView246.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
this.GridView246.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
this.Text246Jisi,
|
this.Text246Jisi,
|
||||||
this.Text246i,
|
this.Text246i,
|
||||||
@@ -1314,8 +1316,8 @@
|
|||||||
this.GridView246.Name = "GridView246";
|
this.GridView246.Name = "GridView246";
|
||||||
this.GridView246.RowHeadersVisible = false;
|
this.GridView246.RowHeadersVisible = false;
|
||||||
this.GridView246.RowHeadersWidth = 30;
|
this.GridView246.RowHeadersWidth = 30;
|
||||||
dataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
dataGridViewCellStyle20.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||||
this.GridView246.RowsDefaultCellStyle = dataGridViewCellStyle8;
|
this.GridView246.RowsDefaultCellStyle = dataGridViewCellStyle20;
|
||||||
this.GridView246.RowTemplate.Height = 23;
|
this.GridView246.RowTemplate.Height = 23;
|
||||||
this.GridView246.Size = new System.Drawing.Size(493, 138);
|
this.GridView246.Size = new System.Drawing.Size(493, 138);
|
||||||
this.GridView246.TabIndex = 250;
|
this.GridView246.TabIndex = 250;
|
||||||
@@ -1465,14 +1467,14 @@
|
|||||||
this.GridView440.AllowDrop = true;
|
this.GridView440.AllowDrop = true;
|
||||||
this.GridView440.AllowUserToAddRows = false;
|
this.GridView440.AllowUserToAddRows = false;
|
||||||
this.GridView440.AllowUserToResizeRows = false;
|
this.GridView440.AllowUserToResizeRows = false;
|
||||||
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||||
dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control;
|
dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Control;
|
||||||
dataGridViewCellStyle9.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
dataGridViewCellStyle21.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||||
dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText;
|
dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||||
dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||||
dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||||
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
this.GridView440.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9;
|
this.GridView440.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle21;
|
||||||
this.GridView440.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
this.GridView440.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.GridView440.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
this.GridView440.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
this.text440a,
|
this.text440a,
|
||||||
@@ -1485,8 +1487,8 @@
|
|||||||
this.GridView440.Name = "GridView440";
|
this.GridView440.Name = "GridView440";
|
||||||
this.GridView440.RowHeadersVisible = false;
|
this.GridView440.RowHeadersVisible = false;
|
||||||
this.GridView440.RowHeadersWidth = 30;
|
this.GridView440.RowHeadersWidth = 30;
|
||||||
dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
dataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||||
this.GridView440.RowsDefaultCellStyle = dataGridViewCellStyle10;
|
this.GridView440.RowsDefaultCellStyle = dataGridViewCellStyle22;
|
||||||
this.GridView440.RowTemplate.Height = 23;
|
this.GridView440.RowTemplate.Height = 23;
|
||||||
this.GridView440.Size = new System.Drawing.Size(597, 71);
|
this.GridView440.Size = new System.Drawing.Size(597, 71);
|
||||||
this.GridView440.TabIndex = 245;
|
this.GridView440.TabIndex = 245;
|
||||||
@@ -1585,14 +1587,14 @@
|
|||||||
this.GridView490.AllowDrop = true;
|
this.GridView490.AllowDrop = true;
|
||||||
this.GridView490.AllowUserToAddRows = false;
|
this.GridView490.AllowUserToAddRows = false;
|
||||||
this.GridView490.AllowUserToResizeRows = false;
|
this.GridView490.AllowUserToResizeRows = false;
|
||||||
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||||
dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
|
dataGridViewCellStyle23.BackColor = System.Drawing.SystemColors.Control;
|
||||||
dataGridViewCellStyle11.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
dataGridViewCellStyle23.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||||
dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
|
dataGridViewCellStyle23.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||||
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
dataGridViewCellStyle23.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||||
dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
dataGridViewCellStyle23.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||||
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||||
this.GridView490.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
|
this.GridView490.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle23;
|
||||||
this.GridView490.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
this.GridView490.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||||
this.GridView490.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
this.GridView490.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||||
this.text490a,
|
this.text490a,
|
||||||
@@ -1601,8 +1603,8 @@
|
|||||||
this.GridView490.Name = "GridView490";
|
this.GridView490.Name = "GridView490";
|
||||||
this.GridView490.RowHeadersVisible = false;
|
this.GridView490.RowHeadersVisible = false;
|
||||||
this.GridView490.RowHeadersWidth = 30;
|
this.GridView490.RowHeadersWidth = 30;
|
||||||
dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
dataGridViewCellStyle24.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
|
||||||
this.GridView490.RowsDefaultCellStyle = dataGridViewCellStyle12;
|
this.GridView490.RowsDefaultCellStyle = dataGridViewCellStyle24;
|
||||||
this.GridView490.RowTemplate.Height = 23;
|
this.GridView490.RowTemplate.Height = 23;
|
||||||
this.GridView490.Size = new System.Drawing.Size(321, 71);
|
this.GridView490.Size = new System.Drawing.Size(321, 71);
|
||||||
this.GridView490.TabIndex = 247;
|
this.GridView490.TabIndex = 247;
|
||||||
@@ -2517,17 +2519,17 @@
|
|||||||
this.lbl_ISBN.TabIndex = 33;
|
this.lbl_ISBN.TabIndex = 33;
|
||||||
this.lbl_ISBN.Text = "[]";
|
this.lbl_ISBN.Text = "[]";
|
||||||
//
|
//
|
||||||
// lbl_BookList
|
// tbCustName
|
||||||
//
|
//
|
||||||
this.lbl_BookList.AutoSize = true;
|
this.tbCustName.BackColor = System.Drawing.Color.LightGray;
|
||||||
this.lbl_BookList.BackColor = System.Drawing.Color.LightGray;
|
this.tbCustName.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold);
|
||||||
this.lbl_BookList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
this.tbCustName.Location = new System.Drawing.Point(309, 7);
|
||||||
this.lbl_BookList.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold);
|
this.tbCustName.Name = "tbCustName";
|
||||||
this.lbl_BookList.Location = new System.Drawing.Point(12, 12);
|
this.tbCustName.Size = new System.Drawing.Size(161, 26);
|
||||||
this.lbl_BookList.Name = "lbl_BookList";
|
this.tbCustName.TabIndex = 33;
|
||||||
this.lbl_BookList.Size = new System.Drawing.Size(66, 21);
|
this.tbCustName.Text = " ";
|
||||||
this.lbl_BookList.TabIndex = 33;
|
this.tbCustName.UseVisualStyleBackColor = false;
|
||||||
this.lbl_BookList.Text = " ";
|
this.tbCustName.Click += new System.EventHandler(this.lbl_BookList_Click);
|
||||||
//
|
//
|
||||||
// checkBox4
|
// checkBox4
|
||||||
//
|
//
|
||||||
@@ -2540,15 +2542,41 @@
|
|||||||
this.checkBox4.UseVisualStyleBackColor = true;
|
this.checkBox4.UseVisualStyleBackColor = true;
|
||||||
this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
|
this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
|
||||||
//
|
//
|
||||||
|
// lbCustIDX
|
||||||
|
//
|
||||||
|
this.lbCustIDX.BackColor = System.Drawing.Color.LightGray;
|
||||||
|
this.lbCustIDX.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.lbCustIDX.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold);
|
||||||
|
this.lbCustIDX.Location = new System.Drawing.Point(476, 7);
|
||||||
|
this.lbCustIDX.Name = "lbCustIDX";
|
||||||
|
this.lbCustIDX.Size = new System.Drawing.Size(60, 26);
|
||||||
|
this.lbCustIDX.TabIndex = 319;
|
||||||
|
this.lbCustIDX.Text = " ";
|
||||||
|
this.lbCustIDX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
|
// lbl_BookList
|
||||||
|
//
|
||||||
|
this.lbl_BookList.BackColor = System.Drawing.Color.LightGray;
|
||||||
|
this.lbl_BookList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
|
this.lbl_BookList.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold);
|
||||||
|
this.lbl_BookList.Location = new System.Drawing.Point(12, 7);
|
||||||
|
this.lbl_BookList.Name = "lbl_BookList";
|
||||||
|
this.lbl_BookList.Size = new System.Drawing.Size(293, 26);
|
||||||
|
this.lbl_BookList.TabIndex = 320;
|
||||||
|
this.lbl_BookList.Text = " ";
|
||||||
|
this.lbl_BookList.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
|
||||||
|
//
|
||||||
// Marc
|
// Marc
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.BackColor = System.Drawing.Color.Gray;
|
this.BackColor = System.Drawing.Color.Gray;
|
||||||
this.ClientSize = new System.Drawing.Size(1808, 908);
|
this.ClientSize = new System.Drawing.Size(1808, 908);
|
||||||
|
this.Controls.Add(this.lbl_BookList);
|
||||||
|
this.Controls.Add(this.lbCustIDX);
|
||||||
this.Controls.Add(this.checkBox3);
|
this.Controls.Add(this.checkBox3);
|
||||||
this.Controls.Add(this.List_Book);
|
this.Controls.Add(this.List_Book);
|
||||||
this.Controls.Add(this.lbl_BookList);
|
this.Controls.Add(this.tbCustName);
|
||||||
this.Controls.Add(this.lbl_ISBN);
|
this.Controls.Add(this.lbl_ISBN);
|
||||||
this.Controls.Add(this.lbl_SaveData);
|
this.Controls.Add(this.lbl_SaveData);
|
||||||
this.Controls.Add(this.checkBox1);
|
this.Controls.Add(this.checkBox1);
|
||||||
@@ -2840,11 +2868,13 @@
|
|||||||
private System.Windows.Forms.DataGridViewTextBoxColumn user;
|
private System.Windows.Forms.DataGridViewTextBoxColumn user;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn SaveDate;
|
private System.Windows.Forms.DataGridViewTextBoxColumn SaveDate;
|
||||||
private System.Windows.Forms.Button btn_CopySelect;
|
private System.Windows.Forms.Button btn_CopySelect;
|
||||||
public System.Windows.Forms.Label lbl_BookList;
|
public System.Windows.Forms.Button tbCustName;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn text505n;
|
private System.Windows.Forms.DataGridViewTextBoxColumn text505n;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn text505t;
|
private System.Windows.Forms.DataGridViewTextBoxColumn text505t;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn text505d;
|
private System.Windows.Forms.DataGridViewTextBoxColumn text505d;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn text505e;
|
private System.Windows.Forms.DataGridViewTextBoxColumn text505e;
|
||||||
private System.Windows.Forms.CheckBox checkBox4;
|
private System.Windows.Forms.CheckBox checkBox4;
|
||||||
|
public System.Windows.Forms.Label lbCustIDX;
|
||||||
|
public System.Windows.Forms.Label lbl_BookList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -168,37 +168,38 @@
|
|||||||
iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAABGdBTUEAALGPC/xhBQAAAIFQTFRF////
|
iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAABGdBTUEAALGPC/xhBQAAAIFQTFRF////
|
||||||
AAAAlJSU4ODgU1NT6enp+Pj4w8PDxMTEkpKS/Pz81tbW5eXlRERE3NzcmZmZzMzMZGRkTU1Nb29vg4OD
|
AAAAlJSU4ODgU1NT6enp+Pj4w8PDxMTEkpKS/Pz81tbW5eXlRERE3NzcmZmZzMzMZGRkTU1Nb29vg4OD
|
||||||
urq6KioqW1tb8vLyf39/sbGxEhISPz8/i4uL0NDQZmZmIyMjoqKiNTU1tLS0GRkZp6end3d3Li4uOjo6
|
urq6KioqW1tb8vLyf39/sbGxEhISPz8/i4uL0NDQZmZmIyMjoqKiNTU1tLS0GRkZp6end3d3Li4uOjo6
|
||||||
Dg4OJSUlLUB5vgAABwxJREFUeF7tnX97ojAMx6ceIqDi/DXndJ47vZt7/y/wFOMUSKG0SWE8+fxz9zxl
|
Dg4OJSUlLUB5vgAABzdJREFUeF7tne12ojAQhosuIqBiRa212q7dult7/xe4R6wKwwRCMhMoZ56fPSnj
|
||||||
ZN8BaZq26ZMgCIIgCIIgCIIgCIIgCIIgCIIgCIIgCELrWHnDsb8+7uNuvD+u/fHQW0GLOT34t276kb99
|
K8l8BeLDgyAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIQt/Y+JNZsD0ekkFyOG6D2cTfwCGNGcI/tMQoDvaP
|
||||||
nn51siynu60f9eEqA7Zb+E+d9P1g9AaKcN42gR/C1dUIOl34X12E43gDMsrYxGP4IX26nZoVRtt/8Ovr
|
iy8Psl687YN4BIfrs9/Dv7TAKAinL1BagZddGETw37QIvQH8k2OiWbKDehTskhn871oGXssK4/0/qKOS
|
||||||
8bmtJvIssE6Fq/3n9feuxOao73wuAutTGD0nv7AJM80HmQisS6E/TaybMh3AfYq4CqxH4ULXuagp1wgC
|
z30zkQOvVYWbwydUoMHuqO98zgLbUxg/ws+uTap5IzOBbSkMFvBjN2IxhhdEuAhsR+FK17moqdf4LbAN
|
||||||
61A4MPn88kzf4X44N4HuFQ5/gWV7dh7cE+FboGuF/S3YpSFWhQF3gY4VTqp1f+V8RnDnNA8C3Sr8C0Yp
|
hWOT5Vdm8QovXOAq0L3Cya/iB7XgzYcXv3MT6FrhaF/4jLYkqjTgLtCxwnmz8FfPZwxNZOQEulX4N2eY
|
||||||
wcLOR4EuFUYnsEnLMjd4SAl0qDAGi/SswQKQFuhMYWgewpTzF4wkZAS6Ujj8DfZ4+LzHqlmBjhROwBob
|
CiztzAt0qTA+5Q2TsS4VDwWBDhUmBbuUbIuGigKdKYzMU5h6/uYtAYGuFE5+A7u0fN5zVSjQkcI5NEvN
|
||||||
p1uomhPoRuEajJUzms3jtT+JxtHEP3bnM/3w7hrF5QU6UbgHW8V8BAsvl60I+8M/2w+4opjF+XJEoAuF
|
6ZqqlgS6UbiFVpVM02WyDebxLJ4Hx8Ey1U/vLllcWaAThQdoFOU9XPmlbkU0mvzZv8OhKCtcoAuFmFnA
|
||||||
mNkMy3lhIB0uZhrf8RG3xK8wAEtKvrZ4YJJmMitO5ZzB3TW7wrIn+OLrJtJWa73XNQO3wpJvcFYtmzkY
|
elmZSEerVGMdH3FL/ApDaBLytccTkyLztLqV43ke7q7ZFaLfa46noDQ1FWy2etMVwK2wZg2mpYSkkvEU
|
||||||
wc9VgFnhHzCDMysY/iiYVNbIq/AdrKC8VE8OXlhUHJ+wKvTACMZJJ9WCEpb6rhScCsN8kv6bV7MU9pVe
|
XqAeZoV/oL0CaUX5o2DeWCOvwldoLs+TZrsFsGpYn7Aq9KG1HKdK71lFVOu7CnAqjMpN+hvPqtpVh6F+
|
||||||
lTwPp8IZ2MhzmMAlpmj0sTcYFard6LP9jNKktHe8wadwDBbyBHCFFStdp8qnUBlnGbuYDJo5ETaFr2Ag
|
IsCrMIXGbnzM4diG1HnoHIwK1W70Ub+pq2JeGx2v8CmcQVM3QjjUhI2uU+VTqMyzjF0MQLMnwqbwGVr6
|
||||||
y5tOiKaHnk/lUqjqCQ9DuIACrUELk8JQEUIe7H3MI8Uh0xUmhQpvTixQK7vFo1ARzLxRvqJntHpFHoU7
|
5kUnRdNDz6dyKVRFwo8JHGmBeqXnYFIYKVLID3sfk6c6ZbrApFDhzYkFanW3eBQqkpkXyimq/h6L8Ch8
|
||||||
uHsGOieToNftsyhUuBkfmonQjGtYFOLTn8SmdAM3DoV47vAZWonQFciiEH2ExG5UWyCHQvwR2o4m0ugL
|
g2Yu0DmZDC2BPAoVbiaA4+zQE8ijEN/+JDalKZDabAbeO3yEw+zQFciiEL2FxG5UWyCHQvwW2lYTRfQF
|
||||||
5FD4ArdO8QqNNFQQyKCwB3dOcbIZ8OaoIpBBIRryU40nEioJpFfYhxuneIFGEqoJpFeIzsKYZdVwKgqk
|
cih8gjbOPMNRVjQQyKBwCE2cOdkUvCWaCGRQiKb8VPVERiOB9ApH0MKZJzjKhmYC6RWiuzBmXTWchgLp
|
||||||
V4h1FTNoo6CqQHKFqJ+pnvhVUi2TeIFaITaeIXyElZ8gvUIsP0S30tpAILVCbGBI50hNBFIrPMJtHyEb
|
FWKhIoWDLGgqkFwh6meaN36V6FW9eagVYvUM4S1sfAfpFWL9oWZ7E1UYCKRWiBWGdI7URCC1wiO8PmXR
|
||||||
NBkJpFaIRGxLi4X2KcwEUiuEuz5CtRvAUCCxQmxwT5S6MBVIrBD5DP9BkyXGAokVIp/hHJrsMBdIrBCZ
|
ZCSQWiGSsa119wfrMBNIrRBeXvFYlgmGAokVYsU9UevCVCCxQmQZ/oNjzDAWSKwQWYZLOMYIc4HECpG9
|
||||||
qyAZVVSPZO6QKhzCTR+BJitsBNIqRBzNBppssHhFz5AqRBwNwVyhnUBahcjw/rLazA6rV/QMqULElVoP
|
CpKqonkmc4dU4QRe3fM8OMYEG4G0ChFHs4NjDLCYotQKEUdDsFdoJ5BWIVLen582s8NqilIrRFypdeFk
|
||||||
nGwF0sw430AGFrYhWzjuWUKZp10dQNadETS1BGToRJm/aABId0gT0TQGJEcTQ1NLQCYsMlshfjoLkPUA
|
K5BiFt1BCgvblC2aDS2h7NNuPqA+bwrH/GyQ0omw+O0CSDikyWg6A9KjSeCYnw2yYQFehfjprKA+wvq+
|
||||||
8aRo3SAKaWecagdJdxPP3NcNEpZSpvMbQPufYfu/w/b70vb3h+2Padofl7Z/bNH+8SHHGL9hcORpmgVL
|
GyAKaXecWgdpdxOVv10BSUsp2/kdoP/3sP/rEFHYM1/a/3jY/5ym/3lp/2uL/teHHDV+x+Do03QLll5b
|
||||||
rq1R8ORLmwRTzrtBcM1bNAiuuafmwDZ/2BgQV7OEppbAOI/fFEDVI+5e02D6Kwc00YFs+idbT1PGCqnw
|
p0ASU9JOV/sw9bw7BBIQSfYtOgTX3lN3QJxpz7IaxNWs4ZifDeJq+lYEQ3lOp2m4+FUCjrEGeemf7Hma
|
||||||
k6rrQgLyITob52PbvOhDKt51bcVgiwYZ3h9sAa2bKrARWHuEeBdLAvP60gKQvpglTcS9RliJO8Pc67xV
|
OjbICT+Fc11IQBaiszofe82LPqVCCijC59qqQfJ+jsQfe4CW7tnEKmJolv4tlgzm50srQGIxS5sI6dW4
|
||||||
YKVbdtBGC/tafRx0QyBPTMy/3wIFqzd5gjZq0D0z3H0ikm7nS9Zig0TifU850BenQ7yt+g7mton3rmVB
|
KaHcGcamqYubiHhx7w0OIgFpfLto7mO5BlNOzP++BQp23uQJDiICKfT5YyLSbudr1mJFIvF7TyXQieNR
|
||||||
3xv6iO2Gi/2HaQZgIw1joOFiD+kjWMjN1VVccbIP+AH0s+DtodCHyJZYxAv3cj5CRffL1WWgHUWnQ1y+
|
PmdSAHPbxO+uQdB5Q5+xXUG2L5h3ocbQWAZjooEFDOp3SPNgKTdXqLiA30SODOoCuix4IxR6E9kai/jB
|
||||||
IYubmgoJir8md2ZBURfjRP+HRQPuM+yJBcXKZXKH6inKRfHProeKuuvEEhXvSmcK7ZwoPg/aAi69/JTs
|
vZy3UBF+uUIGGig8j/j4BoibMxUyFN8md2cBKxPPUZH+i0UTbp7CsIjiyWVyh+orjoviKJuKRIpz14kl
|
||||||
FSdZBQd1opTlsx2tj1DW+qLqNHy4Xw5X813qem00+wPUi/idzTuz1txb4aHaBYfTzuq6iW+2I42Jysdw
|
KuaKt4ADGVAsD9oDXIblLdkLjMH+joNzopTHZ3Ol3ABkD+MCVdAI4IWvuNrvUp/XRvN+gPohfpbeBYb6
|
||||||
j9MyLMEoglXty1Dlxs64Xd+i6q4unMwdjl9wBMHB8fIWVa+YYFiDdqz+As84X7JLXkfYQxMW39Qwp05b
|
JC6CM/c2eKp2hr5HqkR9buKLbaUxV/kY7joNsIbW71idfRmp3Jjz51tU4erMydzhBCofeg647MlMEVVU
|
||||||
C7qndl4JtazeKds9qF/PO/QL388zR7jSMaXb677mOoFcNC+tAb2HS52jsQe0pK7+02Be0PHcqOkJXtAq
|
zDA8g3amXoHcNRMGtltyx+AcYR9tWNzg6R9WonaoGQ3Pgh6qnVeGQzd6R5GD39A/zzsKKudndip7K6gj
|
||||||
M9r5xM5GeOp7i0Cv8nOtC64rnW/RPSbnW7z763g+0y0WXPua+cJ+kYTa17R4BcXLCfjgSzdrEyrSbyQ0
|
8zdfS51ELl7WngF9gP/jirq7WH+u/sN4WRF4rrR0B8/UrMVvPrHfRngY+atQ7+Rn/pKwAnS3BmWaLgfH
|
||||||
ZDU533lPNTrRNJF6xGPD7ybtHiuOKc1wOhwsh/zsvI/GbR0jPv8w4J1aNmNYFj7r88I8+2LMwP6c1Quj
|
7PctXoNtskyxfV0c8/BKQmVcJEFnKbPiVxxeTsC7fSpvTaRov5HgYgdWA2yHn4YWnWiRWF3x2PDbeSpa
|
||||||
Ju9tJDhLdtT0jRy+fsCJMao5CtXC5kznn7Kw2tubvKyb+EdtpYo0z8W7sdRKBzSLcBzrfpIf8biJ3Z8O
|
QXVOaYbTcrAe8t/Oe7ctpckh/v3D0KaO5mJSlz7r80TZe6VkrJeF1THt3ATNQfBbstNWSsEGBPoJJ8a0
|
||||||
fT8YFR/9c9gE2gmrptKP/O3zNJ+N+Zrutovop6u7s/KG48H6uI+78X6/9qOh14ChrSAIgiAIgiAIgiAI
|
5SxUC5vfdG49CdXEP5hM1l3SvLnTIrHm7+JdWWu1A7pFNEt0l+R7Muti+NNhFIRTxV7uNx+7ULth1VVG
|
||||||
giAIgiAIgiAIgiAIAilPT/8BzuZT5uV+S2QAAAAASUVORK5CYII=
|
cbB/XJS7MV+Lt/0q/unq7mz8yWy8PR6SQXI4bIN44negtBUEQRAEQRAEQRAEQRAEQRAEQRAEQRAEQSDm
|
||||||
|
P87mU+ZvyRQDAAAAAElFTkSuQmCC
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<metadata name="CheckSet.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="CheckSet.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using System.Web.UI.WebControls;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using WindowsFormsApp1;
|
using WindowsFormsApp1;
|
||||||
|
using AR;
|
||||||
|
|
||||||
namespace UniMarc.마크
|
namespace UniMarc.마크
|
||||||
{
|
{
|
||||||
@@ -18,9 +19,9 @@ namespace UniMarc.마크
|
|||||||
|
|
||||||
public Macro(string pIDX, string pTagArr, string pRuncode)
|
public Macro(string pIDX, string pTagArr, string pRuncode)
|
||||||
{
|
{
|
||||||
mIDX= pIDX;
|
mIDX = pIDX;
|
||||||
mTagArr= pTagArr;
|
mTagArr = pTagArr;
|
||||||
mRuncode= pRuncode;
|
mRuncode = pRuncode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
internal class Macro_Gudu
|
internal class Macro_Gudu
|
||||||
@@ -60,7 +61,7 @@ namespace UniMarc.마크
|
|||||||
string tContentTag = string.Empty;
|
string tContentTag = string.Empty;
|
||||||
for (int i = 0; i < tMacroList.Count; i++)
|
for (int i = 0; i < tMacroList.Count; i++)
|
||||||
{
|
{
|
||||||
if (tMacroList[i].mRuncode == "etc" || tMacroList[i].mRuncode.Contains("jisi") || (tMacroList[i].mRuncode.Contains("del")&& !tMacroList[i].mRuncode.Contains("/")))
|
if (tMacroList[i].mRuncode == "etc" || tMacroList[i].mRuncode.Contains("jisi") || (tMacroList[i].mRuncode.Contains("del") && !tMacroList[i].mRuncode.Contains("/")))
|
||||||
{
|
{
|
||||||
if ((tMacroList[i].mIDX == "110" || tMacroList[i].mIDX == "111" || tMacroList[i].mIDX == "112")
|
if ((tMacroList[i].mIDX == "110" || tMacroList[i].mIDX == "111" || tMacroList[i].mIDX == "112")
|
||||||
&& (tMacroList[i].mTagArr == "256" || tMacroList[i].mTagArr == "500")
|
&& (tMacroList[i].mTagArr == "256" || tMacroList[i].mTagArr == "500")
|
||||||
@@ -221,7 +222,8 @@ namespace UniMarc.마크
|
|||||||
|
|
||||||
if (TakeTag[0] != "")
|
if (TakeTag[0] != "")
|
||||||
Tag += "▼a" + TakeTag[0];
|
Tag += "▼a" + TakeTag[0];
|
||||||
if (TakeTag[1] == "" && TakeTag[2] == "" && TakeTag[3] == "") {
|
if (TakeTag[1] == "" && TakeTag[2] == "" && TakeTag[3] == "")
|
||||||
|
{
|
||||||
Tag += "▲";
|
Tag += "▲";
|
||||||
return st.AddTagInMarc(Tag, ViewMarc);
|
return st.AddTagInMarc(Tag, ViewMarc);
|
||||||
}
|
}
|
||||||
@@ -268,13 +270,16 @@ namespace UniMarc.마크
|
|||||||
{
|
{
|
||||||
Jisi = ChangeJisi(idx, RunCode[cout], TagArray[cout], ContentTag, Jisi, Target);
|
Jisi = ChangeJisi(idx, RunCode[cout], TagArray[cout], ContentTag, Jisi, Target);
|
||||||
|
|
||||||
if (RunCode[cout] == "del") {
|
if (RunCode[cout] == "del")
|
||||||
if (TagArray[cout] == ContentTag) {
|
{
|
||||||
|
if (TagArray[cout] == ContentTag)
|
||||||
|
{
|
||||||
Target = "";
|
Target = "";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ContentTag == "020" && Jisi == "1 " && idx == "75") {
|
if (ContentTag == "020" && Jisi == "1 " && idx == "75")
|
||||||
|
{
|
||||||
Target = "";
|
Target = "";
|
||||||
}
|
}
|
||||||
switch (ContentTag)
|
switch (ContentTag)
|
||||||
@@ -578,6 +583,47 @@ namespace UniMarc.마크
|
|||||||
List<string> TMP = new List<string>(SplitContent);
|
List<string> TMP = new List<string>(SplitContent);
|
||||||
for (int a = 0; a < TMP.Count; a++)
|
for (int a = 0; a < TMP.Count; a++)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//빈데이터는 처리하지 않음
|
||||||
|
if (TMP[a].isEmpty()) continue;
|
||||||
|
|
||||||
|
//각 요소뒤에 ; 붙이기 , 로 끝나지않는 경우에만 ,; 문자가 있다면 삭제한다.
|
||||||
|
//아래 1보다 작다로 인해 a가 미처리되는 현상이 있어 위에다가 붙인다 2508014
|
||||||
|
if (idx == "113" && (TMP[a].StartsWith("d") || TMP[a].StartsWith("e")))
|
||||||
|
{
|
||||||
|
// 새로운 구두점 적용 로직 (2024년 수정)
|
||||||
|
var subfieldata = TMP[a].Trim();
|
||||||
|
var endsignal = subfieldata.EndsWith("▲");
|
||||||
|
if (endsignal) subfieldata = subfieldata.Substring(0, subfieldata.Length - 1);
|
||||||
|
|
||||||
|
// 현재 필드가 ,로 끝나지 않는 경우에만 ; 적용 검토
|
||||||
|
if (!subfieldata.EndsWith(",") && !subfieldata.EndsWith(";"))
|
||||||
|
{
|
||||||
|
// 다음 필드가 d나 e인지 확인
|
||||||
|
bool hasNextDE = false;
|
||||||
|
for (int nextIdx = a + 1; nextIdx < TMP.Count; nextIdx++)
|
||||||
|
{
|
||||||
|
if (!TMP[nextIdx].isEmpty() && (TMP[nextIdx].StartsWith("d") || TMP[nextIdx].StartsWith("e")))
|
||||||
|
{
|
||||||
|
hasNextDE = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 다음에 d나 e 필드가 있으면 ; 적용
|
||||||
|
if (hasNextDE)
|
||||||
|
{
|
||||||
|
subfieldata += ";";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ,; 문자가 있다면 ;로 변경
|
||||||
|
subfieldata = subfieldata.Replace(",;", ";");
|
||||||
|
if (endsignal) subfieldata += "▲";
|
||||||
|
TMP[a] = subfieldata;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (a <= 1) continue;
|
if (a <= 1) continue;
|
||||||
|
|
||||||
#region 구두점 적용
|
#region 구두점 적용
|
||||||
@@ -690,65 +736,67 @@ namespace UniMarc.마크
|
|||||||
|
|
||||||
// 245e 삭제
|
// 245e 삭제
|
||||||
if (TMP[a].StartsWith("e") && idx == "80")
|
if (TMP[a].StartsWith("e") && idx == "80")
|
||||||
{
|
{
|
||||||
if (TMP[a].Contains("▲"))
|
if (TMP[a].Contains("▲"))
|
||||||
TMP[a - 1] += "▲";
|
TMP[a - 1] += "▲";
|
||||||
|
|
||||||
TMP.RemoveAt(a);
|
TMP.RemoveAt(a);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 245b 삭제
|
// 245b 삭제
|
||||||
if (TMP[a].StartsWith("b") && idx == "81")
|
if (TMP[a].StartsWith("b") && idx == "81")
|
||||||
{
|
{
|
||||||
if (TMP[a].Contains("▲"))
|
if (TMP[a].Contains("▲"))
|
||||||
TMP[a - 1] += "▲";
|
TMP[a - 1] += "▲";
|
||||||
|
|
||||||
TMP.RemoveAt(a);
|
TMP.RemoveAt(a);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 245x 삭제
|
// 245x 삭제
|
||||||
if (TMP[a].StartsWith("x") && idx == "82")
|
if (TMP[a].StartsWith("x") && idx == "82")
|
||||||
{
|
{
|
||||||
if (TMP[a].Contains("▲"))
|
if (TMP[a].Contains("▲"))
|
||||||
TMP[a - 1] += "▲";
|
TMP[a - 1] += "▲";
|
||||||
|
|
||||||
TMP.RemoveAt(a);
|
TMP.RemoveAt(a);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 245n 삭제
|
// 245n 삭제
|
||||||
if (TMP[a].StartsWith("n") && idx == "83")
|
if (TMP[a].StartsWith("n") && idx == "83")
|
||||||
{
|
{
|
||||||
if (TMP[a].Contains("▲"))
|
if (TMP[a].Contains("▲"))
|
||||||
TMP[a - 1] += "▲";
|
TMP[a - 1] += "▲";
|
||||||
|
|
||||||
TMP.RemoveAt(a);
|
TMP.RemoveAt(a);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 245p 삭제
|
// 245p 삭제
|
||||||
if (TMP[a].StartsWith("p") && idx == "84")
|
if (TMP[a].StartsWith("p") && idx == "84")
|
||||||
{
|
{
|
||||||
if (TMP[a].Contains("▲"))
|
if (TMP[a].Contains("▲"))
|
||||||
TMP[a - 1] += "▲";
|
TMP[a - 1] += "▲";
|
||||||
|
|
||||||
TMP.RemoveAt(a);
|
TMP.RemoveAt(a);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 245h 삭제
|
// 245h 삭제
|
||||||
if (TMP[a].StartsWith("h") && idx == "85")
|
if (TMP[a].StartsWith("h") && idx == "85")
|
||||||
{
|
{
|
||||||
if (TMP[a].Contains("▲"))
|
if (TMP[a].Contains("▲"))
|
||||||
TMP[a - 1] += "▲";
|
TMP[a - 1] += "▲";
|
||||||
|
|
||||||
TMP.RemoveAt(a);
|
TMP.RemoveAt(a);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
SplitContent = TMP.ToArray();
|
SplitContent = TMP.ToArray();
|
||||||
return string.Join("▼", SplitContent);
|
return string.Join("▼", SplitContent);
|
||||||
@@ -880,7 +928,8 @@ namespace UniMarc.마크
|
|||||||
if (idx == "101")
|
if (idx == "101")
|
||||||
SplitContent[a] = SplitContent[a].Replace("p.", "");
|
SplitContent[a] = SplitContent[a].Replace("p.", "");
|
||||||
// 300 a 맨 앞이 [ 로 시작 될 경우 300a를 [1책] 으로 수정
|
// 300 a 맨 앞이 [ 로 시작 될 경우 300a를 [1책] 으로 수정
|
||||||
if (idx == "105") {
|
if (idx == "105")
|
||||||
|
{
|
||||||
string tmp = SplitContent[a].Substring(1);
|
string tmp = SplitContent[a].Substring(1);
|
||||||
if (tmp.StartsWith("["))
|
if (tmp.StartsWith("["))
|
||||||
SplitContent[a] = "a[1책]";
|
SplitContent[a] = "a[1책]";
|
||||||
@@ -919,7 +968,8 @@ namespace UniMarc.마크
|
|||||||
SplitContent[a] = SplitContent[a].Replace("천연색삽화", "채색삽화");
|
SplitContent[a] = SplitContent[a].Replace("천연색삽화", "채색삽화");
|
||||||
|
|
||||||
// 300b "천연색, 유성" 으로 덮어 씌움
|
// 300b "천연색, 유성" 으로 덮어 씌움
|
||||||
if (idx == "109") {
|
if (idx == "109")
|
||||||
|
{
|
||||||
SplitContent[a] = "b천연색, 유성";
|
SplitContent[a] = "b천연색, 유성";
|
||||||
if (SplitContent[a].Contains("▲"))
|
if (SplitContent[a].Contains("▲"))
|
||||||
SplitContent[a] += "▲";
|
SplitContent[a] += "▲";
|
||||||
@@ -929,12 +979,13 @@ namespace UniMarc.마크
|
|||||||
if (SplitContent[a].StartsWith("c"))
|
if (SplitContent[a].StartsWith("c"))
|
||||||
{
|
{
|
||||||
// $c 앞에는 ";" 적용
|
// $c 앞에는 ";" 적용
|
||||||
if( idx == "19")
|
if (idx == "19")
|
||||||
if (!SplitContent[a - 1].EndsWith(";"))
|
if (!SplitContent[a - 1].EndsWith(";"))
|
||||||
SplitContent[a - 1] += ";";
|
SplitContent[a - 1] += ";";
|
||||||
|
|
||||||
// $c X포함 뒷부분 삭제
|
// $c X포함 뒷부분 삭제
|
||||||
if (idx == "73") {
|
if (idx == "73")
|
||||||
|
{
|
||||||
SplitContent[a] = SplitContent[a].ToLower();
|
SplitContent[a] = SplitContent[a].ToLower();
|
||||||
string[] tmp = SplitContent[a].Split('x');
|
string[] tmp = SplitContent[a].Split('x');
|
||||||
SplitContent[a] = tmp[0] + "cm▲";
|
SplitContent[a] = tmp[0] + "cm▲";
|
||||||
@@ -942,9 +993,10 @@ namespace UniMarc.마크
|
|||||||
}
|
}
|
||||||
|
|
||||||
// $e 앞에는 "+" 적용
|
// $e 앞에는 "+" 적용
|
||||||
if (SplitContent[a].StartsWith("e") )
|
if (SplitContent[a].StartsWith("e"))
|
||||||
{
|
{
|
||||||
if (idx == "20") {
|
if (idx == "20")
|
||||||
|
{
|
||||||
if (!SplitContent[a - 1].EndsWith("+"))
|
if (!SplitContent[a - 1].EndsWith("+"))
|
||||||
SplitContent[a - 1] += "+";
|
SplitContent[a - 1] += "+";
|
||||||
}
|
}
|
||||||
@@ -969,11 +1021,13 @@ namespace UniMarc.마크
|
|||||||
// $p 앞에 $n이 나온 경우 "," 적용, $p앞에 $n이 없는 경우 "."적용
|
// $p 앞에 $n이 나온 경우 "," 적용, $p앞에 $n이 없는 경우 "."적용
|
||||||
if (SplitContent[a].StartsWith("p") && idx == "22")
|
if (SplitContent[a].StartsWith("p") && idx == "22")
|
||||||
{
|
{
|
||||||
if (SplitContent[a - 1].StartsWith("n")) {
|
if (SplitContent[a - 1].StartsWith("n"))
|
||||||
|
{
|
||||||
if (SplitContent[a - 1].EndsWith(","))
|
if (SplitContent[a - 1].EndsWith(","))
|
||||||
SplitContent[a - 1] += ",";
|
SplitContent[a - 1] += ",";
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
if (SplitContent[a - 1].EndsWith("."))
|
if (SplitContent[a - 1].EndsWith("."))
|
||||||
SplitContent[a - 1] += ".";
|
SplitContent[a - 1] += ".";
|
||||||
}
|
}
|
||||||
|
|||||||
68
unimarc/unimarc/마크/Marc_Plan.Designer.cs
generated
68
unimarc/unimarc/마크/Marc_Plan.Designer.cs
generated
@@ -29,7 +29,6 @@
|
|||||||
private void InitializeComponent()
|
private void InitializeComponent()
|
||||||
{
|
{
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Marc_Plan));
|
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
@@ -37,6 +36,7 @@
|
|||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||||
|
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Marc_Plan));
|
||||||
this.panel1 = new System.Windows.Forms.Panel();
|
this.panel1 = new System.Windows.Forms.Panel();
|
||||||
this.button1 = new System.Windows.Forms.Button();
|
this.button1 = new System.Windows.Forms.Button();
|
||||||
this.btn_ClassSymbol = new System.Windows.Forms.Button();
|
this.btn_ClassSymbol = new System.Windows.Forms.Button();
|
||||||
@@ -118,8 +118,6 @@
|
|||||||
this.tb_Garo = new System.Windows.Forms.TextBox();
|
this.tb_Garo = new System.Windows.Forms.TextBox();
|
||||||
this.panel7 = new System.Windows.Forms.Panel();
|
this.panel7 = new System.Windows.Forms.Panel();
|
||||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||||
this.printDocument1 = new System.Drawing.Printing.PrintDocument();
|
|
||||||
this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
|
|
||||||
this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.num = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.num = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.reg_num = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.reg_num = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
@@ -142,6 +140,10 @@
|
|||||||
this.marc = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.marc = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.search_tag2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
this.search_tag2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||||
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
|
||||||
|
this.printDocument1 = new System.Drawing.Printing.PrintDocument();
|
||||||
|
this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
|
||||||
|
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
|
||||||
|
this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
|
||||||
this.panel1.SuspendLayout();
|
this.panel1.SuspendLayout();
|
||||||
this.panel4.SuspendLayout();
|
this.panel4.SuspendLayout();
|
||||||
this.panel3.SuspendLayout();
|
this.panel3.SuspendLayout();
|
||||||
@@ -150,6 +152,7 @@
|
|||||||
this.panel6.SuspendLayout();
|
this.panel6.SuspendLayout();
|
||||||
this.panel7.SuspendLayout();
|
this.panel7.SuspendLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||||
|
this.toolStrip1.SuspendLayout();
|
||||||
this.SuspendLayout();
|
this.SuspendLayout();
|
||||||
//
|
//
|
||||||
// panel1
|
// panel1
|
||||||
@@ -994,8 +997,9 @@
|
|||||||
//
|
//
|
||||||
// panel7
|
// panel7
|
||||||
//
|
//
|
||||||
this.panel7.Controls.Add(this.checkBox1);
|
|
||||||
this.panel7.Controls.Add(this.dataGridView1);
|
this.panel7.Controls.Add(this.dataGridView1);
|
||||||
|
this.panel7.Controls.Add(this.toolStrip1);
|
||||||
|
this.panel7.Controls.Add(this.checkBox1);
|
||||||
this.panel7.Dock = System.Windows.Forms.DockStyle.Fill;
|
this.panel7.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||||
this.panel7.Location = new System.Drawing.Point(0, 70);
|
this.panel7.Location = new System.Drawing.Point(0, 70);
|
||||||
this.panel7.Name = "panel7";
|
this.panel7.Name = "panel7";
|
||||||
@@ -1047,7 +1051,7 @@
|
|||||||
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
|
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
|
||||||
this.dataGridView1.Name = "dataGridView1";
|
this.dataGridView1.Name = "dataGridView1";
|
||||||
this.dataGridView1.RowTemplate.Height = 23;
|
this.dataGridView1.RowTemplate.Height = 23;
|
||||||
this.dataGridView1.Size = new System.Drawing.Size(1730, 783);
|
this.dataGridView1.Size = new System.Drawing.Size(1730, 758);
|
||||||
this.dataGridView1.TabIndex = 1;
|
this.dataGridView1.TabIndex = 1;
|
||||||
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
|
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
|
||||||
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
|
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
|
||||||
@@ -1055,21 +1059,6 @@
|
|||||||
this.dataGridView1.SortCompare += new System.Windows.Forms.DataGridViewSortCompareEventHandler(this.dataGridView1_SortCompare);
|
this.dataGridView1.SortCompare += new System.Windows.Forms.DataGridViewSortCompareEventHandler(this.dataGridView1_SortCompare);
|
||||||
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
|
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
|
||||||
//
|
//
|
||||||
// printDocument1
|
|
||||||
//
|
|
||||||
this.printDocument1.BeginPrint += new System.Drawing.Printing.PrintEventHandler(this.printDocument1_BeginPrint);
|
|
||||||
this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage);
|
|
||||||
//
|
|
||||||
// printPreviewDialog1
|
|
||||||
//
|
|
||||||
this.printPreviewDialog1.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
|
||||||
this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
|
||||||
this.printPreviewDialog1.ClientSize = new System.Drawing.Size(400, 300);
|
|
||||||
this.printPreviewDialog1.Enabled = true;
|
|
||||||
this.printPreviewDialog1.Icon = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
|
|
||||||
this.printPreviewDialog1.Name = "printPreviewDialog1";
|
|
||||||
this.printPreviewDialog1.Visible = false;
|
|
||||||
//
|
|
||||||
// idx
|
// idx
|
||||||
//
|
//
|
||||||
this.idx.HeaderText = "idx";
|
this.idx.HeaderText = "idx";
|
||||||
@@ -1244,6 +1233,41 @@
|
|||||||
this.colCheck.TrueValue = "T";
|
this.colCheck.TrueValue = "T";
|
||||||
this.colCheck.Width = 27;
|
this.colCheck.Width = 27;
|
||||||
//
|
//
|
||||||
|
// printDocument1
|
||||||
|
//
|
||||||
|
this.printDocument1.BeginPrint += new System.Drawing.Printing.PrintEventHandler(this.printDocument1_BeginPrint);
|
||||||
|
this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage);
|
||||||
|
//
|
||||||
|
// printPreviewDialog1
|
||||||
|
//
|
||||||
|
this.printPreviewDialog1.AutoScrollMargin = new System.Drawing.Size(0, 0);
|
||||||
|
this.printPreviewDialog1.AutoScrollMinSize = new System.Drawing.Size(0, 0);
|
||||||
|
this.printPreviewDialog1.ClientSize = new System.Drawing.Size(400, 300);
|
||||||
|
this.printPreviewDialog1.Enabled = true;
|
||||||
|
this.printPreviewDialog1.Icon = ((System.Drawing.Icon)(resources.GetObject("printPreviewDialog1.Icon")));
|
||||||
|
this.printPreviewDialog1.Name = "printPreviewDialog1";
|
||||||
|
this.printPreviewDialog1.Visible = false;
|
||||||
|
//
|
||||||
|
// toolStrip1
|
||||||
|
//
|
||||||
|
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||||
|
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||||
|
this.toolStripButton1});
|
||||||
|
this.toolStrip1.Location = new System.Drawing.Point(0, 758);
|
||||||
|
this.toolStrip1.Name = "toolStrip1";
|
||||||
|
this.toolStrip1.Size = new System.Drawing.Size(1730, 25);
|
||||||
|
this.toolStrip1.TabIndex = 3;
|
||||||
|
this.toolStrip1.Text = "toolStrip1";
|
||||||
|
//
|
||||||
|
// toolStripButton1
|
||||||
|
//
|
||||||
|
this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
|
||||||
|
this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||||
|
this.toolStripButton1.Name = "toolStripButton1";
|
||||||
|
this.toolStripButton1.Size = new System.Drawing.Size(59, 22);
|
||||||
|
this.toolStripButton1.Text = "delete";
|
||||||
|
this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
|
||||||
|
//
|
||||||
// Marc_Plan
|
// Marc_Plan
|
||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||||
@@ -1270,6 +1294,8 @@
|
|||||||
this.panel7.ResumeLayout(false);
|
this.panel7.ResumeLayout(false);
|
||||||
this.panel7.PerformLayout();
|
this.panel7.PerformLayout();
|
||||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
||||||
|
this.toolStrip1.ResumeLayout(false);
|
||||||
|
this.toolStrip1.PerformLayout();
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1383,5 +1409,7 @@
|
|||||||
private System.Windows.Forms.DataGridViewTextBoxColumn marc;
|
private System.Windows.Forms.DataGridViewTextBoxColumn marc;
|
||||||
private System.Windows.Forms.DataGridViewTextBoxColumn search_tag2;
|
private System.Windows.Forms.DataGridViewTextBoxColumn search_tag2;
|
||||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
|
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
|
||||||
|
private System.Windows.Forms.ToolStrip toolStrip1;
|
||||||
|
private System.Windows.Forms.ToolStripButton toolStripButton1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using ExcelTest;
|
using AR;
|
||||||
|
using ExcelTest;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
@@ -28,6 +29,7 @@ namespace WindowsFormsApp1.Mac
|
|||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
main = _main;
|
main = _main;
|
||||||
|
this.toolStrip1.Visible = System.Diagnostics.Debugger.IsAttached;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Marc_Plan_Load(object sender, EventArgs e)
|
private void Marc_Plan_Load(object sender, EventArgs e)
|
||||||
@@ -105,11 +107,13 @@ namespace WindowsFormsApp1.Mac
|
|||||||
for (int a = 0; a < ary.Length; a++)
|
for (int a = 0; a < ary.Length; a++)
|
||||||
{
|
{
|
||||||
if (a % 16 == 00) { Grid[00] = ary[a]; } // idx
|
if (a % 16 == 00) { Grid[00] = ary[a]; } // idx
|
||||||
if (a % 16 == 01) { Grid[01] = ary[a];
|
if (a % 16 == 01)
|
||||||
if (ary[a] == "") Grid[02] = tCnt.ToString();
|
{
|
||||||
|
Grid[01] = ary[a];
|
||||||
|
if (ary[a] == "") Grid[02] = tCnt.ToString();
|
||||||
tCnt++;
|
tCnt++;
|
||||||
} // num
|
} // num
|
||||||
if (a % 16 == 02) { Grid[02] = ary[a];} // r_num
|
if (a % 16 == 02) { Grid[02] = ary[a]; } // r_num
|
||||||
if (a % 16 == 03) { Grid[03] = ary[a]; } // class_symbol
|
if (a % 16 == 03) { Grid[03] = ary[a]; } // class_symbol
|
||||||
if (a % 16 == 04) { Grid[04] = ary[a]; } // author_symbol
|
if (a % 16 == 04) { Grid[04] = ary[a]; } // author_symbol
|
||||||
if (a % 16 == 05) { Grid[09] = ary[a]; } // ISBN
|
if (a % 16 == 05) { Grid[09] = ary[a]; } // ISBN
|
||||||
@@ -122,7 +126,9 @@ namespace WindowsFormsApp1.Mac
|
|||||||
if (a % 16 == 12) { Grid[16] = ary[a]; } // book_comp
|
if (a % 16 == 12) { Grid[16] = ary[a]; } // book_comp
|
||||||
if (a % 16 == 13) { Grid[17] = ary[a]; } // price
|
if (a % 16 == 13) { Grid[17] = ary[a]; } // price
|
||||||
if (a % 16 == 14) { Grid[18] = ary[a]; } // midx
|
if (a % 16 == 14) { Grid[18] = ary[a]; } // midx
|
||||||
if (a % 16 == 15) { Grid[19] = ary[a]; // marc
|
if (a % 16 == 15)
|
||||||
|
{
|
||||||
|
Grid[19] = ary[a]; // marc
|
||||||
|
|
||||||
string[] vcf = st.Take_Tag(ary[a], GetTag);
|
string[] vcf = st.Take_Tag(ary[a], GetTag);
|
||||||
Grid[5] = vcf[0];
|
Grid[5] = vcf[0];
|
||||||
@@ -188,7 +194,8 @@ namespace WindowsFormsApp1.Mac
|
|||||||
|
|
||||||
private void checkBox1_CheckedChanged(object sender, EventArgs e)
|
private void checkBox1_CheckedChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
foreach (DataGridViewRow r in dataGridView1.Rows) {
|
foreach (DataGridViewRow r in dataGridView1.Rows)
|
||||||
|
{
|
||||||
if (((CheckBox)sender).Checked)
|
if (((CheckBox)sender).Checked)
|
||||||
r.Cells["colCheck"].Value = "T";
|
r.Cells["colCheck"].Value = "T";
|
||||||
else
|
else
|
||||||
@@ -203,7 +210,8 @@ namespace WindowsFormsApp1.Mac
|
|||||||
|
|
||||||
if (row < 0) return;
|
if (row < 0) return;
|
||||||
|
|
||||||
if (dataGridView1.Rows[row].Cells[col].ReadOnly) {
|
if (dataGridView1.Rows[row].Cells[col].ReadOnly)
|
||||||
|
{
|
||||||
string[] Marc = {
|
string[] Marc = {
|
||||||
dataGridView1.Rows[row].Cells["marc"].Value.ToString(),
|
dataGridView1.Rows[row].Cells["marc"].Value.ToString(),
|
||||||
dataGridView1.Rows[row].Cells["midx"].Value.ToString(),
|
dataGridView1.Rows[row].Cells["midx"].Value.ToString(),
|
||||||
@@ -252,7 +260,8 @@ namespace WindowsFormsApp1.Mac
|
|||||||
|
|
||||||
private void tb_SearchTag_KeyDown(object sender, KeyEventArgs e)
|
private void tb_SearchTag_KeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.KeyCode == Keys.Enter) {
|
if (e.KeyCode == Keys.Enter)
|
||||||
|
{
|
||||||
Search_Tag();
|
Search_Tag();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -268,7 +277,7 @@ namespace WindowsFormsApp1.Mac
|
|||||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||||
{
|
{
|
||||||
string marc = dataGridView1.Rows[a].Cells["marc"].Value.ToString();
|
string marc = dataGridView1.Rows[a].Cells["marc"].Value.ToString();
|
||||||
string[] tag = st.Take_Tag(marc, SearchTag,true);
|
string[] tag = st.Take_Tag(marc, SearchTag, true);
|
||||||
dataGridView1.Rows[a].Cells["search_tag2"].Value = tag[0];
|
dataGridView1.Rows[a].Cells["search_tag2"].Value = tag[0];
|
||||||
BackUpTag.Add(tag[0]);
|
BackUpTag.Add(tag[0]);
|
||||||
}
|
}
|
||||||
@@ -295,10 +304,10 @@ namespace WindowsFormsApp1.Mac
|
|||||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||||
{
|
{
|
||||||
string Content = string.Empty;
|
string Content = string.Empty;
|
||||||
if(dataGridView1.Rows[a].Cells["search_tag2"].Value!=null)
|
if (dataGridView1.Rows[a].Cells["search_tag2"].Value != null)
|
||||||
Content = dataGridView1.Rows[a].Cells["search_tag2"].Value.ToString();
|
Content = dataGridView1.Rows[a].Cells["search_tag2"].Value.ToString();
|
||||||
else if(dataGridView1.Rows[a].Cells["search_tag2"].Value == null)
|
else if (dataGridView1.Rows[a].Cells["search_tag2"].Value == null)
|
||||||
Content = "delete";
|
Content = "delete";
|
||||||
if (Content == "") continue;
|
if (Content == "") continue;
|
||||||
string marc = dataGridView1.Rows[a].Cells["marc"].Value.ToString();
|
string marc = dataGridView1.Rows[a].Cells["marc"].Value.ToString();
|
||||||
string viewMarc = split_Marc(marc);
|
string viewMarc = split_Marc(marc);
|
||||||
@@ -318,7 +327,7 @@ namespace WindowsFormsApp1.Mac
|
|||||||
string newTag = string.Format("▼{0}{1}", TagName, Content);
|
string newTag = string.Format("▼{0}{1}", TagName, Content);
|
||||||
if (ConvertTag == 8)
|
if (ConvertTag == 8)
|
||||||
{
|
{
|
||||||
oldTag = BackUpTag[a];
|
oldTag = BackUpTag[a];
|
||||||
newTag = Content;
|
newTag = Content;
|
||||||
}
|
}
|
||||||
// 해당 식별기호가 존재할 경우
|
// 해당 식별기호가 존재할 경우
|
||||||
@@ -434,7 +443,7 @@ namespace WindowsFormsApp1.Mac
|
|||||||
private void btn_Save_Click(object sender, EventArgs e)
|
private void btn_Save_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string table = "Specs_Marc";
|
string table = "Specs_Marc";
|
||||||
string[] Edit_Col = { "marc", "r_num", "class_symbol", "author_symbol", "prefix","price", "user", "editDate" };
|
string[] Edit_Col = { "marc", "r_num", "class_symbol", "author_symbol", "prefix", "price", "user", "editDate" };
|
||||||
string[] Where_Col = { "idx" };
|
string[] Where_Col = { "idx" };
|
||||||
|
|
||||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||||
@@ -529,6 +538,7 @@ namespace WindowsFormsApp1.Mac
|
|||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string totalerrmsg = "";
|
||||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||||
{
|
{
|
||||||
if (dataGridView1.Rows[a].Cells["marc"].Value.ToString() == "" &&
|
if (dataGridView1.Rows[a].Cells["marc"].Value.ToString() == "" &&
|
||||||
@@ -538,13 +548,17 @@ namespace WindowsFormsApp1.Mac
|
|||||||
if (dataGridView1.Rows[a].Cells["colCheck"].Value.ToString() != "T")
|
if (dataGridView1.Rows[a].Cells["colCheck"].Value.ToString() != "T")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (a == 825) Console.WriteLine("test");
|
||||||
string marc = dataGridView1.Rows[a].Cells["Marc"].Value.ToString().Replace("₩", "\\");
|
string marc = dataGridView1.Rows[a].Cells["Marc"].Value.ToString().Replace("₩", "\\");
|
||||||
marc = st.ConvertMarcType(marc);
|
marc = st.ConvertMarcType(marc, out string errmesage);
|
||||||
marc = st.made_Ori_marc(marc, FileEncodingType);
|
marc = st.made_Ori_marc(marc, FileEncodingType);
|
||||||
|
|
||||||
Marc_data += marc;
|
Marc_data += marc;
|
||||||
|
if (errmesage.isEmpty() == false) totalerrmsg += (totalerrmsg.isEmpty() ? "\n" : "") + errmesage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (totalerrmsg.isEmpty() == false)
|
||||||
|
UTIL.MsgI("경고 발생\n"+totalerrmsg);
|
||||||
|
|
||||||
string FileName;
|
string FileName;
|
||||||
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
||||||
saveFileDialog.Title = "저장 경로를 지정하세요.";
|
saveFileDialog.Title = "저장 경로를 지정하세요.";
|
||||||
@@ -553,15 +567,18 @@ namespace WindowsFormsApp1.Mac
|
|||||||
|
|
||||||
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
||||||
{
|
{
|
||||||
if (FileEncodingType == "ANSI") {
|
if (FileEncodingType == "ANSI")
|
||||||
|
{
|
||||||
FileName = saveFileDialog.FileName;
|
FileName = saveFileDialog.FileName;
|
||||||
System.IO.File.WriteAllText(FileName, Marc_data, Encoding.Default);
|
System.IO.File.WriteAllText(FileName, Marc_data, Encoding.Default);
|
||||||
}
|
}
|
||||||
else if (FileEncodingType == "UTF-8") {
|
else if (FileEncodingType == "UTF-8")
|
||||||
|
{
|
||||||
FileName = saveFileDialog.FileName;
|
FileName = saveFileDialog.FileName;
|
||||||
System.IO.File.WriteAllText(FileName, Marc_data, Encoding.UTF8);
|
System.IO.File.WriteAllText(FileName, Marc_data, Encoding.UTF8);
|
||||||
}
|
}
|
||||||
else if (FileEncodingType == "UniCode") {
|
else if (FileEncodingType == "UniCode")
|
||||||
|
{
|
||||||
FileName = saveFileDialog.FileName;
|
FileName = saveFileDialog.FileName;
|
||||||
System.IO.File.WriteAllText(FileName, Marc_data, Encoding.Unicode);
|
System.IO.File.WriteAllText(FileName, Marc_data, Encoding.Unicode);
|
||||||
}
|
}
|
||||||
@@ -573,12 +590,17 @@ namespace WindowsFormsApp1.Mac
|
|||||||
private void btn_ApplyMacro_Click(object sender, EventArgs e)
|
private void btn_ApplyMacro_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
Set_Macro sm = new Set_Macro(this, dataGridView1);
|
Set_Macro sm = new Set_Macro(this, dataGridView1);
|
||||||
sm.ViewMarcArray = Make_MarcArray();
|
sm.ViewMarcArray = Make_MarcArray(out string errmessage);
|
||||||
sm.Show();
|
sm.Show();
|
||||||
|
if(errmessage.isEmpty() == false)
|
||||||
|
UTIL.MsgI("경고 발생\n" + errmessage);
|
||||||
}
|
}
|
||||||
private void btnTag040_Click(object sender, EventArgs e)
|
private void btnTag040_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string[] tData = Make_MarcArray();
|
string[] tData = Make_MarcArray(out string errmessage);
|
||||||
|
if (errmessage.isEmpty() == false)
|
||||||
|
UTIL.MsgI("경고 발생\n" + errmessage);
|
||||||
|
|
||||||
string tNewTagData = tbTag040.Text;
|
string tNewTagData = tbTag040.Text;
|
||||||
List<string> tSplitMarc;
|
List<string> tSplitMarc;
|
||||||
for (int i = 0; i < tData.Length; i++)
|
for (int i = 0; i < tData.Length; i++)
|
||||||
@@ -660,7 +682,7 @@ namespace WindowsFormsApp1.Mac
|
|||||||
tField.Add(data[a] + "▲");
|
tField.Add(data[a] + "▲");
|
||||||
}
|
}
|
||||||
tTag008IDX = tTagNum.FindIndex(x => x == "008");
|
tTag008IDX = tTagNum.FindIndex(x => x == "008");
|
||||||
if (tTag008IDX == -1 ) continue;
|
if (tTag008IDX == -1) continue;
|
||||||
string tData = tField[tTag008IDX];
|
string tData = tField[tTag008IDX];
|
||||||
List<string> tListData = tData.ToCharArray().ToList().ConvertAll(x => x.ToString());
|
List<string> tListData = tData.ToCharArray().ToList().ConvertAll(x => x.ToString());
|
||||||
if (tListData.Count < 40) continue;
|
if (tListData.Count < 40) continue;
|
||||||
@@ -677,8 +699,9 @@ namespace WindowsFormsApp1.Mac
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private string[] Make_MarcArray()
|
private string[] Make_MarcArray(out string totalerrmsg)
|
||||||
{
|
{
|
||||||
|
totalerrmsg = string.Empty;
|
||||||
String_Text st = new String_Text();
|
String_Text st = new String_Text();
|
||||||
string[] MarcArray = new string[dataGridView1.RowCount];
|
string[] MarcArray = new string[dataGridView1.RowCount];
|
||||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||||
@@ -691,8 +714,8 @@ namespace WindowsFormsApp1.Mac
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
string marc = dataGridView1.Rows[a].Cells["Marc"].Value.ToString().Replace("₩", "\\");
|
string marc = dataGridView1.Rows[a].Cells["Marc"].Value.ToString().Replace("₩", "\\");
|
||||||
marc = st.ConvertMarcType(marc);
|
marc = st.ConvertMarcType(marc, out string errmesage);
|
||||||
|
if (errmesage.isEmpty() == false) totalerrmsg += (totalerrmsg.isEmpty() ? "\n" : "") + errmesage;
|
||||||
MarcArray[a] = marc;
|
MarcArray[a] = marc;
|
||||||
}
|
}
|
||||||
return MarcArray;
|
return MarcArray;
|
||||||
@@ -752,7 +775,7 @@ namespace WindowsFormsApp1.Mac
|
|||||||
int row = e.RowIndex;
|
int row = e.RowIndex;
|
||||||
int col = dataGridView1.CurrentCell.ColumnIndex;
|
int col = dataGridView1.CurrentCell.ColumnIndex;
|
||||||
|
|
||||||
if (col == 2 || col == 3 || col == 4 || col == 5 || col == 6 || col == 7|| col==17)
|
if (col == 2 || col == 3 || col == 4 || col == 5 || col == 6 || col == 7 || col == 17)
|
||||||
{
|
{
|
||||||
if (dataGridView1.Rows[row].Cells["num"].Value == null)
|
if (dataGridView1.Rows[row].Cells["num"].Value == null)
|
||||||
{
|
{
|
||||||
@@ -786,24 +809,26 @@ namespace WindowsFormsApp1.Mac
|
|||||||
string C = dataGridView1.Rows[row].Cells[6].Value.ToString();
|
string C = dataGridView1.Rows[row].Cells[6].Value.ToString();
|
||||||
string F = dataGridView1.Rows[row].Cells[7].Value.ToString();
|
string F = dataGridView1.Rows[row].Cells[7].Value.ToString();
|
||||||
|
|
||||||
if (L != "")
|
if (L != "")
|
||||||
L = string.Format("▼l{0}", L);
|
L = string.Format("▼l{0}", L);
|
||||||
|
|
||||||
if (V != "")
|
if (V != "")
|
||||||
V = string.Format("▼v{0}", V);
|
V = string.Format("▼v{0}", V);
|
||||||
|
|
||||||
if (C != "")
|
if (C != "")
|
||||||
C = string.Format("▼c{0}", C);
|
C = string.Format("▼c{0}", C);
|
||||||
|
|
||||||
if (F != "")
|
if (F != "")
|
||||||
F = string.Format("▼f{0}", F);
|
F = string.Format("▼f{0}", F);
|
||||||
|
|
||||||
AddTag = string.Format("049\t \t{0}{1}{2}{3}▲", L, V, C, F);
|
AddTag = string.Format("049\t \t{0}{1}{2}{3}▲", L, V, C, F);
|
||||||
|
|
||||||
if (L == "" && V == "" && C == "" && F == "") {
|
if (L == "" && V == "" && C == "" && F == "")
|
||||||
|
{
|
||||||
TypeView = st.RemoveTagNumber(TypeView, "049");
|
TypeView = st.RemoveTagNumber(TypeView, "049");
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
TypeView = AddTagInMarc(AddTag, TypeView);
|
TypeView = AddTagInMarc(AddTag, TypeView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -817,7 +842,8 @@ namespace WindowsFormsApp1.Mac
|
|||||||
string B = dataGridView1.Rows[row].Cells[4].Value.ToString();
|
string B = dataGridView1.Rows[row].Cells[4].Value.ToString();
|
||||||
string V = dataGridView1.Rows[row].Cells[5].Value.ToString();
|
string V = dataGridView1.Rows[row].Cells[5].Value.ToString();
|
||||||
|
|
||||||
if (A != "") {
|
if (A != "")
|
||||||
|
{
|
||||||
A = string.Format("▼a{0}", A);
|
A = string.Format("▼a{0}", A);
|
||||||
TypeView = st.ChangeTagInMarc("056a", A, TypeView);
|
TypeView = st.ChangeTagInMarc("056a", A, TypeView);
|
||||||
}
|
}
|
||||||
@@ -830,10 +856,12 @@ namespace WindowsFormsApp1.Mac
|
|||||||
|
|
||||||
AddTag = string.Format("090\t \t{0}{1}{2}▲", A, B, V);
|
AddTag = string.Format("090\t \t{0}{1}{2}▲", A, B, V);
|
||||||
|
|
||||||
if (A == "" && B == "" && V == "") {
|
if (A == "" && B == "" && V == "")
|
||||||
|
{
|
||||||
TypeView = st.RemoveTagNumber(TypeView, "090");
|
TypeView = st.RemoveTagNumber(TypeView, "090");
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
TypeView = AddTagInMarc(AddTag, TypeView);
|
TypeView = AddTagInMarc(AddTag, TypeView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1233,7 +1261,8 @@ namespace WindowsFormsApp1.Mac
|
|||||||
|
|
||||||
for (int b = 0; b < CheckList.GetLength(0); b++)
|
for (int b = 0; b < CheckList.GetLength(0); b++)
|
||||||
{
|
{
|
||||||
if (WorkFix.IndexOf(CheckList[b, 0]) > -1) {
|
if (WorkFix.IndexOf(CheckList[b, 0]) > -1)
|
||||||
|
{
|
||||||
dataGridView1.Rows[a].Cells[col].Style.BackColor = ColorList[Convert.ToInt32(CheckList[b, 1])];
|
dataGridView1.Rows[a].Cells[col].Style.BackColor = ColorList[Convert.ToInt32(CheckList[b, 1])];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1358,7 +1387,8 @@ namespace WindowsFormsApp1.Mac
|
|||||||
{
|
{
|
||||||
if (t == "") continue;
|
if (t == "") continue;
|
||||||
|
|
||||||
if (Target.IndexOf(t.TrimStart().TrimEnd()) > -1) {
|
if (Target.IndexOf(t.TrimStart().TrimEnd()) > -1)
|
||||||
|
{
|
||||||
dataGridView1.Rows[a].Cells["search_tag2"].Style.BackColor = Color.Yellow;
|
dataGridView1.Rows[a].Cells["search_tag2"].Style.BackColor = Color.Yellow;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -1370,5 +1400,82 @@ namespace WindowsFormsApp1.Mac
|
|||||||
{
|
{
|
||||||
mk_Grid(btn_Select_List.Text, this.date);
|
mk_Grid(btn_Select_List.Text, this.date);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void toolStripButton1_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// 범위 입력받기
|
||||||
|
string input = Microsoft.VisualBasic.Interaction.InputBox(
|
||||||
|
"삭제할 행 범위를 입력하세요.\n예) 1~100 (1번부터 100번까지 삭제)",
|
||||||
|
"행 범위 삭제",
|
||||||
|
"",
|
||||||
|
-1, -1);
|
||||||
|
|
||||||
|
// 취소 또는 빈 입력
|
||||||
|
if (string.IsNullOrWhiteSpace(input))
|
||||||
|
return;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// "1~100" 형식 파싱
|
||||||
|
string[] parts = input.Split('~', '-');
|
||||||
|
if (parts.Length != 2)
|
||||||
|
{
|
||||||
|
MessageBox.Show("올바른 형식으로 입력해주세요.\n예) 1~100", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int startRow = int.Parse(parts[0].Trim());
|
||||||
|
int endRow = int.Parse(parts[1].Trim());
|
||||||
|
|
||||||
|
// 범위 검증
|
||||||
|
if (startRow < 1 || endRow < 1)
|
||||||
|
{
|
||||||
|
MessageBox.Show("행 번호는 1 이상이어야 합니다.", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (startRow > endRow)
|
||||||
|
{
|
||||||
|
MessageBox.Show("시작 행 번호가 끝 행 번호보다 클 수 없습니다.", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 사용자 입력은 1부터 시작하지만, 인덱스는 0부터 시작하므로 -1
|
||||||
|
int startIndex = startRow - 1;
|
||||||
|
int endIndex = endRow - 1;
|
||||||
|
|
||||||
|
// 범위가 그리드 범위를 벗어나는지 확인
|
||||||
|
if (endIndex >= dataGridView1.Rows.Count)
|
||||||
|
{
|
||||||
|
MessageBox.Show($"입력한 범위가 전체 행 수({dataGridView1.Rows.Count})를 초과합니다.", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 삭제 확인
|
||||||
|
string confirmMsg = string.Format("{0}번부터 {1}번까지 총 {2}개의 행을 삭제하시겠습니까?",
|
||||||
|
startRow, endRow, endRow - startRow + 1);
|
||||||
|
if (MessageBox.Show(confirmMsg, "행 삭제 확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// 뒤에서부터 삭제 (인덱스가 꼬이지 않도록)
|
||||||
|
for (int i = endIndex; i >= startIndex; i--)
|
||||||
|
{
|
||||||
|
if (i < dataGridView1.Rows.Count && !dataGridView1.Rows[i].IsNewRow)
|
||||||
|
{
|
||||||
|
dataGridView1.Rows.RemoveAt(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
MessageBox.Show("삭제가 완료되었습니다.", "완료", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||||
|
}
|
||||||
|
catch (FormatException)
|
||||||
|
{
|
||||||
|
MessageBox.Show("숫자 형식으로 입력해주세요.\n예) 1~100", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
MessageBox.Show($"삭제 중 오류가 발생했습니다.\n{ex.Message}", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,13 +120,31 @@
|
|||||||
<metadata name="search_tag2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
<metadata name="search_tag2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||||
<value>True</value>
|
<value>True</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
|
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
|
<value>300, 6</value>
|
||||||
|
</metadata>
|
||||||
|
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||||
|
<data name="toolStripButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||||
|
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
|
||||||
|
YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
|
||||||
|
/aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
|
||||||
|
I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
|
||||||
|
cX79DFKrHHD5d9D26hvicx4pABt2lpg10zYzU0zr7+e3xXGcrkEB2O2TNec9nJFwB3alZn5jZorfeDZh
|
||||||
|
6Q3g8s06BeCoKF4MRURoH1+BY2oNCbeb0TIclIYxOhzf8frTOuo7FxCbbVIAzpni0iceEc8vhzEwGkJD
|
||||||
|
lx83ymxifejdKjRNk/8PWnyIyTQqAJek0jqHwfEVscu31baIu8+90sTE4nY025dQ2/5FIPpnXlzKuK8A
|
||||||
|
HBUzHot52djqQ6HZhfR7IwK4mKpHtvEDMqvfCiQ6zaAAXM8x94aIWTNrLLG4kVUzgaTSPlzLtyJOZxbb
|
||||||
|
1wtfyg4Q+AfA3aZlButjSfxGcUJBk4g5tuP3haQKRKXcUQDOmbvNTpPOJeFFjordZmbWTNvMTHFUcpUC
|
||||||
|
nOccAdABIDXXE1nzAAAAAElFTkSuQmCC
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
<metadata name="printDocument1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="printDocument1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>6, 7</value>
|
<value>6, 7</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<metadata name="printPreviewDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
<metadata name="printPreviewDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||||
<value>138, 6</value>
|
<value>138, 6</value>
|
||||||
</metadata>
|
</metadata>
|
||||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
|
||||||
<data name="printPreviewDialog1.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="printPreviewDialog1.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
AAABAAYAICAQAAAAAADoAgAAZgAAABAQEAAAAAAAKAEAAE4DAAAgIAAAAQAIAKgIAAB2BAAAEBAAAAEA
|
AAABAAYAICAQAAAAAADoAgAAZgAAABAQEAAAAAAAKAEAAE4DAAAgIAAAAQAIAKgIAAB2BAAAEBAAAAEA
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ namespace UniMarc.마크
|
|||||||
if (Author_res[3].IndexOf("[외]") > -1)
|
if (Author_res[3].IndexOf("[외]") > -1)
|
||||||
Author[0] = Marc[5];
|
Author[0] = Marc[5];
|
||||||
|
|
||||||
string tmp_ViewMarc = st.ConvertMarcType(insert_marc_data[14]);
|
string tmp_ViewMarc = st.ConvertMarcType(insert_marc_data[14],out string errmessage);
|
||||||
|
|
||||||
// 마크에서 추출한 데이터 DB에 적용하기 위한 반복문
|
// 마크에서 추출한 데이터 DB에 적용하기 위한 반복문
|
||||||
for (int b = 0; b < Marc.Length; b++)
|
for (int b = 0; b < Marc.Length; b++)
|
||||||
|
|||||||
@@ -162,11 +162,11 @@ namespace WindowsFormsApp1.Mac
|
|||||||
int count = 0;
|
int count = 0;
|
||||||
for (int a = 0; a < TargetGrid.Rows.Count; a++)
|
for (int a = 0; a < TargetGrid.Rows.Count; a++)
|
||||||
{
|
{
|
||||||
if (TargetGrid.Rows[a].Cells["marc"].Value.ToString() == "" &&
|
var marcstring = TargetGrid.Rows[a].Cells["marc"].Value?.ToString() ?? string.Empty;
|
||||||
TargetGrid.Rows[a].Cells["marc"].Value == null)
|
if (string.IsNullOrEmpty(marcstring))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (TargetGrid.Rows[a].Cells["colCheck"].Value.ToString() != "T")
|
if ((TargetGrid.Rows[a].Cells["colCheck"].Value?.ToString() ?? string.Empty) != "T")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
TargetGrid.Rows[a].Cells["marc"].Value = macro.MacroMarc(ViewMarcArray[count], tMacroList);
|
TargetGrid.Rows[a].Cells["marc"].Value = macro.MacroMarc(ViewMarcArray[count], tMacroList);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user