diff --git a/ISBN_Check_test/.vs/ISBN_Check_test/v16/.suo b/ISBN_Check_test/.vs/ISBN_Check_test/v16/.suo index 5ed219e..2f2c7d1 100644 Binary files a/ISBN_Check_test/.vs/ISBN_Check_test/v16/.suo and b/ISBN_Check_test/.vs/ISBN_Check_test/v16/.suo differ diff --git a/unimarc/.vs/unimarc/v16/.suo b/unimarc/.vs/unimarc/v16/.suo index 3a5952b..d08aa96 100644 Binary files a/unimarc/.vs/unimarc/v16/.suo and b/unimarc/.vs/unimarc/v16/.suo differ diff --git a/unimarc/unimarc/bin/Debug/UniMarc.exe b/unimarc/unimarc/bin/Debug/UniMarc.exe index be1cddd..34bc77b 100644 Binary files a/unimarc/unimarc/bin/Debug/UniMarc.exe and b/unimarc/unimarc/bin/Debug/UniMarc.exe differ diff --git a/unimarc/unimarc/bin/Debug/UniMarc.pdb b/unimarc/unimarc/bin/Debug/UniMarc.pdb index 38faff0..7d72089 100644 Binary files a/unimarc/unimarc/bin/Debug/UniMarc.pdb and b/unimarc/unimarc/bin/Debug/UniMarc.pdb differ diff --git a/unimarc/unimarc/bin/Debug/ko/UniMarc.resources.dll b/unimarc/unimarc/bin/Debug/ko/UniMarc.resources.dll index 9d84cde..8a9372f 100644 Binary files a/unimarc/unimarc/bin/Debug/ko/UniMarc.resources.dll and b/unimarc/unimarc/bin/Debug/ko/UniMarc.resources.dll differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache b/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache index 3783035..28de3dd 100644 Binary files a/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache and b/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.exe b/unimarc/unimarc/obj/Debug/UniMarc.exe index be1cddd..34bc77b 100644 Binary files a/unimarc/unimarc/obj/Debug/UniMarc.exe and b/unimarc/unimarc/obj/Debug/UniMarc.exe differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.pdb b/unimarc/unimarc/obj/Debug/UniMarc.pdb index 38faff0..7d72089 100644 Binary files a/unimarc/unimarc/obj/Debug/UniMarc.pdb and b/unimarc/unimarc/obj/Debug/UniMarc.pdb differ diff --git a/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll b/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll index 9d84cde..8a9372f 100644 Binary files a/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll and b/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll differ diff --git a/unimarc/unimarc/마크/Check_copy.Designer.cs b/unimarc/unimarc/마크/Check_copy.Designer.cs index 927a785..8ed3a91 100644 --- a/unimarc/unimarc/마크/Check_copy.Designer.cs +++ b/unimarc/unimarc/마크/Check_copy.Designer.cs @@ -42,6 +42,9 @@ this.label1 = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Count = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.webBrowser1 = new System.Windows.Forms.WebBrowser(); this.btn_ApplyFilter = new System.Windows.Forms.Button(); this.panel3 = new System.Windows.Forms.Panel(); @@ -53,9 +56,6 @@ this.btn_OpenMemo = new System.Windows.Forms.Button(); this.chk_spChar = new System.Windows.Forms.CheckBox(); this.panel5 = new System.Windows.Forms.Panel(); - this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Count = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.SearchCount)).BeginInit(); this.panel2.SuspendLayout(); @@ -224,6 +224,27 @@ this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown); // + // book_name + // + this.book_name.HeaderText = "도서명(총서명)"; + this.book_name.Name = "book_name"; + this.book_name.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.book_name.Width = 350; + // + // book_comp + // + this.book_comp.HeaderText = "출판사"; + this.book_comp.Name = "book_comp"; + this.book_comp.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.book_comp.Width = 150; + // + // Count + // + this.Count.HeaderText = "검색 수"; + this.Count.Name = "Count"; + this.Count.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; + this.Count.Width = 70; + // // webBrowser1 // this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill; @@ -343,27 +364,6 @@ this.panel5.Size = new System.Drawing.Size(673, 738); this.panel5.TabIndex = 4; // - // book_name - // - this.book_name.HeaderText = "도서명(총서명)"; - this.book_name.Name = "book_name"; - this.book_name.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.book_name.Width = 350; - // - // book_comp - // - this.book_comp.HeaderText = "출판사"; - this.book_comp.Name = "book_comp"; - this.book_comp.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.book_comp.Width = 150; - // - // Count - // - this.Count.HeaderText = "검색 수"; - this.Count.Name = "Count"; - this.Count.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable; - this.Count.Width = 70; - // // Check_copy // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); diff --git a/unimarc/unimarc/마크/Check_copy.cs b/unimarc/unimarc/마크/Check_copy.cs index 3df8133..376e771 100644 --- a/unimarc/unimarc/마크/Check_copy.cs +++ b/unimarc/unimarc/마크/Check_copy.cs @@ -877,6 +877,7 @@ namespace WindowsFormsApp1.Mac private void btn_Stop_Click(object sender, EventArgs e) { webBrowser1.Stop(); + webBrowser1.DocumentCompleted -= this.webBrowser1_DocumentCompleted; } #region 전남 diff --git a/unimarc/unimarc/마크/Marc_Plan.Designer.cs b/unimarc/unimarc/마크/Marc_Plan.Designer.cs index 0098f03..df58953 100644 --- a/unimarc/unimarc/마크/Marc_Plan.Designer.cs +++ b/unimarc/unimarc/마크/Marc_Plan.Designer.cs @@ -197,7 +197,7 @@ // // btn_Close // - this.btn_Close.Location = new System.Drawing.Point(903, 6); + this.btn_Close.Location = new System.Drawing.Point(919, 6); this.btn_Close.Name = "btn_Close"; this.btn_Close.Size = new System.Drawing.Size(86, 23); this.btn_Close.TabIndex = 5; diff --git a/unimarc/unimarc/마크/Marc_Plan.cs b/unimarc/unimarc/마크/Marc_Plan.cs index 263f8ec..048d31c 100644 --- a/unimarc/unimarc/마크/Marc_Plan.cs +++ b/unimarc/unimarc/마크/Marc_Plan.cs @@ -217,6 +217,7 @@ namespace WindowsFormsApp1.Mac } } #region SearchTag_KeyDown_Sub + List BackUpTag = new List(); private void Search_Tag() { @@ -237,9 +238,68 @@ namespace WindowsFormsApp1.Mac private void btn_ChangeTag_Click(object sender, EventArgs e) { string msg = string.Format("『{0}』 태그를 변경하시겠습니까?", tb_SearchTag.Text); + // 아니오 선택시 아래코드 실행되지않음. if (MessageBox.Show(msg, "태그변경", MessageBoxButtons.YesNo) == DialogResult.No) return; + if (tb_SearchTag.Text.Length <= 3) + { + MessageBox.Show("변경할 태그 검색을 양식에 맞춰주세요. ex) 245a"); + return; + } + + string TagNum = tb_SearchTag.Text.Substring(0, 3); + int ConvertTag = Convert.ToInt32(TagNum); + string TagName = tb_SearchTag.Text.Substring(tb_SearchTag.Text.Length - 1); + + for (int a = 0; a < dataGridView1.Rows.Count; a++) + { + string Content = dataGridView1.Rows[a].Cells["search_tag"].Value.ToString(); + if (Content == "") continue; + string marc = dataGridView1.Rows[a].Cells["marc"].Value.ToString(); + string viewMarc = split_Marc(marc); + + string MakeMarcLine = string.Format("{0}\t \t▼{1}{2}▲", TagNum, TagName, Content); + List AryMarc = new List(viewMarc.Split('\n')); + + int index = 0; + foreach (string LineMarc in AryMarc) + { + int TagInt = Convert.ToInt32(LineMarc.Substring(0, 3)); + + // 해당 마크가 존재하는 태그일 경우 + if (ConvertTag == TagInt) + { + string oldTag = string.Format("▼{0}{1}", TagName, BackUpTag[a]); + string newTag = string.Format("▼{0}{1}", TagName, Content); + // 해당 식별기호가 존재할 경우 + if (LineMarc.Contains(oldTag)) + { + AryMarc[index] = LineMarc.Replace(oldTag, newTag); + } + // 해당 식별기호가 존재하지 않을 경우 + else + { + + } + } + + // 해당 마크가 존재하지 않는 태그일 경우 + else if (ConvertTag < TagInt) + { + AryMarc.Insert(index, MakeMarcLine); + break; + } + + index++; + } + + dataGridView1.Rows[a].Cells["marc"].Value = string.Join("\n", AryMarc); + } + + + #region 보류 + /* for (int a = 0; a < dataGridView1.Rows.Count; a++) { string marc = dataGridView1.Rows[a].Cells["marc"].Value.ToString(); @@ -251,9 +311,67 @@ namespace WindowsFormsApp1.Mac if (dataGridView1.Rows[a].Cells["colCheck"].Value.ToString() == "T") dataGridView1.Rows[a].Cells["marc"].Value = marc.Replace(BackUpTag[a], changeTag); } + */ + #endregion + MessageBox.Show("변경되었습니다!", "태그변경"); } + /// + /// 마크데이터가 있는지 확인하고 메모장으로 출력 + /// + /// 마크 데이터 + /// + string split_Marc(string Marc_data) + { + if (Marc_data.Length < 3) return ""; + + string result = string.Empty; + + List TagNum = new List(); // 태그번호 + List field = new List(); // 가변길이필드 저장 + + // 특수기호 육안으로 확인하기 쉽게 변환 + Marc_data = Marc_data.Replace("", "▼"); + Marc_data = Marc_data.Replace("", "▲"); + Marc_data = Marc_data.Replace("₩", "\\"); + // string leader = Marc_data.Substring(0, 24); + + int startidx = 0; + string[] data = Marc_data.Substring(24).Split('▲'); // 리더부를 제외한 디렉터리, 가변길이필드 저장 + + // List에 필요한 데이터 집어넣는 작업. + for (int a = 1; a < data.Length - 1; a++) + { + TagNum.Add(data[0].Substring(startidx, 3)); + startidx += 12; + field.Add(data[a] + "▲"); + } + + // List에 들어간 데이터를 메모장에 출력시키는 작업. + for (int a = 0; a < TagNum.Count; a++) + { + string res = TagNum[a]; + if (TagNum[a] == "008") + { + //text008.Text = field[a].Replace("▲", ""); + continue; + } + else { } + if (field[a].IndexOf("▼") == -1) + { + res += "\t \t" + field[a]; + } + else + { + string temp = field[a].Insert(2, "\t"); + res += "\t" + temp; + } + result += res + "\n"; + } + return result; + } + private void btn_Save_Click(object sender, EventArgs e) { string table = "Specs_Marc";