마크정리 에디터컨트롤 통합 작업 1차완료

This commit is contained in:
2026-01-23 22:40:36 +09:00
parent ed9afeab80
commit 4ffbb2fa2e
19 changed files with 935 additions and 412 deletions

View File

@@ -1,5 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data;
using System.IO.Ports; using System.IO.Ports;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@@ -51,7 +52,8 @@ namespace WindowsFormsApp1
connectionInfo.Timeout = TimeSpan.FromSeconds(30); connectionInfo.Timeout = TimeSpan.FromSeconds(30);
using (var client = new SshClient(connectionInfo)) using (var client = new SshClient(connectionInfo))
{ {
if (conn != null) { if (conn != null)
{
conn.Close(); conn.Close();
conn.Dispose(); conn.Dispose();
} }
@@ -123,8 +125,33 @@ namespace WindowsFormsApp1
} }
} }
} }
public DataTable ExecuteQueryData(string cmd)
{
DataTable dt = new DataTable();
try
{
conn.Open();
sqlcmd.CommandText = cmd;
sqlcmd.Connection = conn;
using (MySqlDataAdapter adapter = new MySqlDataAdapter(sqlcmd))
{
adapter.Fill(dt);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "ExecuteQueryData Error");
}
finally
{
if (conn.State == ConnectionState.Open) conn.Close();
}
return dt;
}
public string DB_Send_CMD_Search(string cmd) public string DB_Send_CMD_Search(string cmd)
{ {
// DB 연결 // DB 연결
conn.Open(); conn.Open();
// 쿼리 맵핑 // 쿼리 맵핑

View File

@@ -340,6 +340,7 @@
<Compile Include="마크\Check_Copy_Sub_Selector.Designer.cs"> <Compile Include="마크\Check_Copy_Sub_Selector.Designer.cs">
<DependentUpon>Check_Copy_Sub_Selector.cs</DependentUpon> <DependentUpon>Check_Copy_Sub_Selector.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="마크\FillBlankItem.cs" />
<Compile Include="마크\Help_007.cs"> <Compile Include="마크\Help_007.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>

View File

@@ -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>

View File

@@ -30,10 +30,6 @@ namespace UniMarc.마크
mUserName = m.User; mUserName = m.User;
mCompidx = m.com_idx; mCompidx = m.com_idx;
} }
public AddMarc()
{
InitializeComponent();
}
private void AddMarc_Load(object sender, EventArgs e) private void AddMarc_Load(object sender, EventArgs e)
{ {

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ExcelTest
{
public class FillBlankItem
{
public string Idx { get; set; }
public string Isbn { get; set; }
public string BookName { get; set; }
public string Author { get; set; }
public string Publisher { get; set; }
public string Price { get; set; }
public string BookMarc { get; set; } = ""; // Hidden column likely
}
}

View File

@@ -1574,17 +1574,16 @@ namespace ExcelTest
{ {
if (List_Book.Rows[a].DefaultCellStyle.ForeColor == Color.Red) if (List_Book.Rows[a].DefaultCellStyle.ForeColor == Color.Red)
{ {
string[] GridData = var item = new ExcelTest.FillBlankItem
{ {
a.ToString(), Idx = a.ToString(),
List_Book.Rows[a].Cells["ISBN13"].Value.ToString(), Isbn = List_Book.Rows[a].Cells["ISBN13"].Value.ToString(),
List_Book.Rows[a].Cells["book_name"].Value.ToString(), BookName = List_Book.Rows[a].Cells["book_name"].Value.ToString(),
List_Book.Rows[a].Cells["author"].Value.ToString(), Author = List_Book.Rows[a].Cells["author"].Value.ToString(),
List_Book.Rows[a].Cells["book_comp"].Value.ToString(), Publisher = List_Book.Rows[a].Cells["book_comp"].Value.ToString(),
List_Book.Rows[a].Cells["pay"].Value.ToString(), Price = List_Book.Rows[a].Cells["pay"].Value.ToString()
""
}; };
fb.InitFillBlank(GridData); fb.InitFillBlank(item);
} }
} }
fb.ISBN = ISBN; fb.ISBN = ISBN;

View File

@@ -52,17 +52,7 @@ namespace ExcelTest
string p_cust = ""; string p_cust = "";
string p_name = ""; string p_name = "";
public Marc2()
{
InitializeComponent();
this.ml = null;
mUserName = string.Empty;
marcEditorControl1.db = this.db;
marcEditorControl1.BookSaved += MarcEditorControl_BookSaved;
marcEditorControl1.FillBlankClicked += MarcEditorControl_FillBlankClicked;
marcEditorControl1.PrevButton += MarcEditorControl1_PrevButton;
marcEditorControl1.NextButton += MarcEditorControl1_NextButton;
}
private void MarcEditorControl1_NextButton(object sender, EventArgs e) private void MarcEditorControl1_NextButton(object sender, EventArgs e)
{ {
@@ -84,6 +74,7 @@ namespace ExcelTest
marcEditorControl1.FillBlankClicked += MarcEditorControl_FillBlankClicked; marcEditorControl1.FillBlankClicked += MarcEditorControl_FillBlankClicked;
marcEditorControl1.PrevButton += MarcEditorControl1_PrevButton; marcEditorControl1.PrevButton += MarcEditorControl1_PrevButton;
marcEditorControl1.NextButton += MarcEditorControl1_NextButton; marcEditorControl1.NextButton += MarcEditorControl1_NextButton;
marcEditorControl1.CloseButton += (s1, e1) => { this.Close(); };
} }
string l_idx = string.Empty; string l_idx = string.Empty;
@@ -253,7 +244,8 @@ namespace ExcelTest
if (item != null) item.ForeColor = gradeColor; if (item != null) item.ForeColor = gradeColor;
List_Book.Rows[a].DefaultCellStyle.ForeColor = gradeColor; List_Book.Rows[a].DefaultCellStyle.ForeColor = gradeColor;
if (isMyData) { if (isMyData)
{
Color saveColor = GetSaveDateColor(Chk_Arr[11]); Color saveColor = GetSaveDateColor(Chk_Arr[11]);
if (item != null) item.BackColor = saveColor; if (item != null) item.BackColor = saveColor;
List_Book.Rows[a].DefaultCellStyle.BackColor = saveColor; List_Book.Rows[a].DefaultCellStyle.BackColor = saveColor;
@@ -697,17 +689,16 @@ namespace ExcelTest
{ {
if (List_Book.Rows[a].DefaultCellStyle.ForeColor == Color.Red) if (List_Book.Rows[a].DefaultCellStyle.ForeColor == Color.Red)
{ {
string[] GridData = var item = new ExcelTest.FillBlankItem
{ {
a.ToString(), Idx = a.ToString(),
List_Book.Rows[a].Cells["ISBN13"].Value?.ToString() ?? "", Isbn = List_Book.Rows[a].Cells["ISBN13"].Value?.ToString() ?? "",
List_Book.Rows[a].Cells["book_name"].Value?.ToString() ?? "", BookName = List_Book.Rows[a].Cells["book_name"].Value?.ToString() ?? "",
List_Book.Rows[a].Cells["author"].Value?.ToString() ?? "", Author = List_Book.Rows[a].Cells["author"].Value?.ToString() ?? "",
List_Book.Rows[a].Cells["book_comp"].Value?.ToString() ?? "", Publisher = List_Book.Rows[a].Cells["book_comp"].Value?.ToString() ?? "",
List_Book.Rows[a].Cells["pay"].Value?.ToString() ?? "", Price = List_Book.Rows[a].Cells["pay"].Value?.ToString() ?? ""
""
}; };
fb.InitFillBlank(GridData); fb.InitFillBlank(item);
} }
} }
fb.ISBN = ISBN; fb.ISBN = ISBN;

View File

@@ -40,21 +40,11 @@ namespace ExcelTest
string l_idx = string.Empty; string l_idx = string.Empty;
string c_idx = string.Empty; string c_idx = string.Empty;
MacEditorParameter Param = null; MacEditorParameter Param = null;
//public string CurrentISBN13 { get; set; }
//public string CurrentMarcIdx { get; set; }
//public string CurrentUser { get; set; }
//public string CurrentSaveDate { get; set; }
//public string CurrentListIdx { get; set; }
public event EventHandler FillBlankClicked; public event EventHandler FillBlankClicked;
public event EventHandler PrevButton; public event EventHandler PrevButton;
public event EventHandler NextButton; public event EventHandler NextButton;
public event EventHandler CloseButton;
public MarcEditorControl() public MarcEditorControl()
{ {
@@ -274,11 +264,24 @@ namespace ExcelTest
memo.Location = new Point(1018, 8); memo.Location = new Point(1018, 8);
memo.Show(); memo.Show();
} }
public void SetMarcString(string text)
{
richTextBox1.Text = text;
// Sync with internal data structures (008, etc)
//string orimarc = st.made_Ori_marc(richTextBox1).Replace(@"\", "₩");
//LoadMarc(orimarc);
}
private void Btn_preview_Click(object sender, EventArgs e) private void Btn_preview_Click(object sender, EventArgs e)
{ {
Marc_Preview mp = new Marc_Preview(); var mp = new Marc_Preview();
mp.isbn = Param.ISBN13; mp.isbn = Param.ISBN13;
mp.richTextBox1.Text = richTextBox1.Text; mp.richTextBox1.Text = richTextBox1.Text;
mp.ButtonSave += (s, ev) =>
{
SetMarcString(ev);
btn_Reflesh008_Click(this, null);
};
mp.Show(); mp.Show();
} }
public class BookSavedEventArgs : EventArgs public class BookSavedEventArgs : EventArgs
@@ -659,7 +662,7 @@ namespace ExcelTest
/// </summary> /// </summary>
/// <param name="row">해당 데이터의 row값</param> /// <param name="row">해당 데이터의 row값</param>
/// <returns></returns> /// <returns></returns>
bool LoadMarc(string Marc_data) public bool LoadMarc(string Marc_data)
{ {
// Removed accessing List_Book // Removed accessing List_Book
// string Marc_data = List_Book.Rows[row].Cells["db_marc"].Value.ToString(); // string Marc_data = List_Book.Rows[row].Cells["db_marc"].Value.ToString();
@@ -1069,15 +1072,15 @@ namespace ExcelTest
richTextBox1.Text = richTextBox1.Text.Replace(data008, text); richTextBox1.Text = richTextBox1.Text.Replace(data008, text);
data008 = text; data008 = text;
} }
public void SetMarcString(string marcstr) //public void SetMarcString(string marcstr)
{ //{
this.richTextBox1.Text = marcstr; // this.richTextBox1.Text = marcstr;
} //}
#endregion #endregion
private void Btn_Close_Click(object sender, EventArgs e) private void Btn_Close_Click(object sender, EventArgs e)
{ {
CloseButton?.Invoke(this, EventArgs.Empty);
} }
private void pictureBox1_DoubleClick(object sender, EventArgs e) private void pictureBox1_DoubleClick(object sender, EventArgs e)

View File

@@ -2,15 +2,38 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks;
namespace UniMarc. namespace WindowsFormsApp1.Mac
{ {
public class MarcPlanItem public class MarcPlanItem
{ {
public string Idx { get; set; } public string Idx { get; set; }
public string Num { get; set; }
public string RegNum { get; set; }
public string ClassCode { get; set; }
public string AuthorCode { get; set; }
public string Volume { get; set; }
public string Copy { get; set; }
public string Prefix { get; set; }
public string Gu { get; set; }
public string Isbn { get; set; }
public string BookName { get; set; }
public string SBookName1 { get; set; }
public string SBookNum1 { get; set; }
public string SBookName2 { get; set; }
public string SBookNum2 { get; set; }
public string Author { get; set; }
public string BookComp { get; set; }
public string Price { get; set; }
public string Midx { get; set; }
public string Marc { get; set; }
public string SearchTag2 { get; set; }
public string ColCheck { get; set; } = "F";
// Properties used in SelectList specific loading (if needed, or mapped to above)
public string ListName { get; set; } public string ListName { get; set; }
public string Date { get; set; } public string Date { get; set; }
public string User { get; set; } public string User { get; set; }
public string ColCheck { get; set; } = "F";
} }
} }

View File

@@ -29,6 +29,8 @@ namespace UniMarc
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Marc_FillBlank));
this.panel6 = new System.Windows.Forms.Panel(); this.panel6 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.progressBar1 = new System.Windows.Forms.ProgressBar();
@@ -53,6 +55,19 @@ namespace UniMarc
this.Price = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.BookMarc = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.BookMarc = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.bs1 = new System.Windows.Forms.BindingSource(this.components);
this.bn1 = new System.Windows.Forms.BindingNavigator(this.components);
this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
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.panel6.SuspendLayout(); this.panel6.SuspendLayout();
this.panel3.SuspendLayout(); this.panel3.SuspendLayout();
this.panel4.SuspendLayout(); this.panel4.SuspendLayout();
@@ -60,6 +75,9 @@ namespace UniMarc
this.panel5.SuspendLayout(); this.panel5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bs1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.bn1)).BeginInit();
this.bn1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// panel6 // panel6
@@ -206,6 +224,7 @@ namespace UniMarc
// panel5 // panel5
// //
this.panel5.Controls.Add(this.dataGridView1); this.panel5.Controls.Add(this.dataGridView1);
this.panel5.Controls.Add(this.bn1);
this.panel5.Dock = System.Windows.Forms.DockStyle.Left; this.panel5.Dock = System.Windows.Forms.DockStyle.Left;
this.panel5.Location = new System.Drawing.Point(0, 0); this.panel5.Location = new System.Drawing.Point(0, 0);
this.panel5.Name = "panel5"; this.panel5.Name = "panel5";
@@ -230,7 +249,7 @@ namespace UniMarc
this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true; this.dataGridView1.ReadOnly = true;
this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(531, 702); this.dataGridView1.Size = new System.Drawing.Size(531, 677);
this.dataGridView1.TabIndex = 0; this.dataGridView1.TabIndex = 0;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick); this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
// //
@@ -293,6 +312,122 @@ namespace UniMarc
this.panel2.Size = new System.Drawing.Size(1316, 733); this.panel2.Size = new System.Drawing.Size(1316, 733);
this.panel2.TabIndex = 311; this.panel2.TabIndex = 311;
// //
// bn1
//
this.bn1.AddNewItem = this.bindingNavigatorAddNewItem;
this.bn1.BindingSource = this.bs1;
this.bn1.CountItem = this.bindingNavigatorCountItem;
this.bn1.DeleteItem = this.bindingNavigatorDeleteItem;
this.bn1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.bn1.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.bn1.Location = new System.Drawing.Point(0, 677);
this.bn1.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
this.bn1.MoveLastItem = this.bindingNavigatorMoveLastItem;
this.bn1.MoveNextItem = this.bindingNavigatorMoveNextItem;
this.bn1.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
this.bn1.Name = "bn1";
this.bn1.PositionItem = this.bindingNavigatorPositionItem;
this.bn1.Size = new System.Drawing.Size(531, 25);
this.bn1.TabIndex = 312;
this.bn1.Text = "bindingNavigator1";
//
// 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 = "새로 추가";
//
// bindingNavigatorCountItem
//
this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22);
this.bindingNavigatorCountItem.Text = "/{0}";
this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수";
//
// 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 = "삭제";
//
// 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);
//
// Marc_FillBlank // Marc_FillBlank
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -309,8 +444,13 @@ namespace UniMarc
this.panel4.ResumeLayout(false); this.panel4.ResumeLayout(false);
this.panel7.ResumeLayout(false); this.panel7.ResumeLayout(false);
this.panel5.ResumeLayout(false); this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel2.ResumeLayout(false); this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.bs1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.bn1)).EndInit();
this.bn1.ResumeLayout(false);
this.bn1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@@ -341,5 +481,18 @@ namespace UniMarc
private System.Windows.Forms.DataGridViewTextBoxColumn BookComp; private System.Windows.Forms.DataGridViewTextBoxColumn BookComp;
private System.Windows.Forms.DataGridViewTextBoxColumn Price; private System.Windows.Forms.DataGridViewTextBoxColumn Price;
private System.Windows.Forms.DataGridViewTextBoxColumn BookMarc; private System.Windows.Forms.DataGridViewTextBoxColumn BookMarc;
private System.Windows.Forms.BindingNavigator bn1;
private System.Windows.Forms.ToolStripButton bindingNavigatorAddNewItem;
private System.Windows.Forms.BindingSource bs1;
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;
} }
} }

View File

@@ -20,10 +20,30 @@ namespace UniMarc
public Dictionary<int, string> BulkMarcResults { get; private set; } = new Dictionary<int, string>(); public Dictionary<int, string> BulkMarcResults { get; private set; } = new Dictionary<int, string>();
bool isAll; bool isAll;
bool isBreak; bool isBreak;
List<FillBlankItem> _items = new List<FillBlankItem>();
public Marc_FillBlank() public Marc_FillBlank()
{ {
InitializeComponent(); InitializeComponent();
bs1.DataSource = _items;
dataGridView1.AutoGenerateColumns = false;
dataGridView1.DataSource = bs1;
// Map columns manually if not done in designer, but assuming designer has columns
// We need to map DataPropertyName.
if (dataGridView1.Columns["List_idx"] != null) dataGridView1.Columns["List_idx"].DataPropertyName = "Idx";
if (dataGridView1.Columns["ISBN13"] != null) dataGridView1.Columns["ISBN13"].DataPropertyName = "Isbn";
if (dataGridView1.Columns["BookName"] != null) dataGridView1.Columns["BookName"].DataPropertyName = "BookName";
// Check other column names?
// "BookMarc" was accessed by name.
if (dataGridView1.Columns["BookMarc"] != null) dataGridView1.Columns["BookMarc"].DataPropertyName = "BookMarc";
// Author, Publisher, Price?
// InitFillBlank accepts: [3]저자 [4]출판사 [5]가격
// We should guess column names if not visible or just assume they are bound if user set them up or I set them.
// Let's assume standard names or index binding is replaced by name binding.
// But wait, user said "bs1 is pre-made" (meaning in designer possibly?). If so, I shouldn't 'new' it if it's protected?
// "bs1은 미리 만들어뒀어" implies I might access it.
// In my previous step I saw NO bs1 in the file. So I adding it is safe if I make it matching.
} }
private void Marc_FillBlank_Load(object sender, EventArgs e) private void Marc_FillBlank_Load(object sender, EventArgs e)
@@ -55,10 +75,11 @@ namespace UniMarc
/// <summary> /// <summary>
/// 옆 그리드에 채울 정보를 입력 /// 옆 그리드에 채울 정보를 입력
/// </summary> /// </summary>
/// <param name="GridData">[0]idx [1]ISBN [2]도서명 [3]저자 [4]출판사 [5]가격</param> /// <param name="item">FillBlankItem 객체</param>
public void InitFillBlank(string[] GridData) public void InitFillBlank(FillBlankItem item)
{ {
dataGridView1.Rows.Add(GridData); _items.Add(item);
bs1.ResetBindings(false);
} }
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
@@ -181,13 +202,15 @@ namespace UniMarc
else else
{ {
String_Text st = new String_Text(); String_Text st = new String_Text();
for (int a = 0; a < dataGridView1.Rows.Count; a++) for (int a = 0; a < bs1.Count; a++)
{ {
string isbn = dataGridView1.Rows[a].Cells["ISBN13"].Value.ToString(); var item = (FillBlankItem)bs1.List[a];
string isbn = item.Isbn;
if (tb_URL.Text.Contains(isbn)) if (tb_URL.Text.Contains(isbn))
{ {
dataGridView1.Rows[a].Cells["BookMarc"].Value = SplitText(Text); item.BookMarc = SplitText(Text);
bs1.ResetBindings(false); // Update grid view
isBreak = true; isBreak = true;
} }
} }
@@ -260,28 +283,22 @@ namespace UniMarc
isAll = true; isAll = true;
BulkMarcResults.Clear(); BulkMarcResults.Clear();
for (int a = 0; a < dataGridView1.Rows.Count; a++) for (int a = 0; a < bs1.Count; a++)
{ {
for (int b = 0; b < dataGridView1.RowCount; b++) // Highlight row logic - might need direct grid access for style
{
dataGridView1.Rows[b].DefaultCellStyle.BackColor = Color.White;
}
isBreak = false;
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Yellow; dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Yellow;
// Assuming List_idx is stored as a cell value? Or should we trust the 'a' index?
// The original code used "List_idx" cell.
int idx = -1;
if (dataGridView1.Rows[a].Cells["List_idx"].Value != null)
idx = Convert.ToInt32(dataGridView1.Rows[a].Cells["List_idx"].Value.ToString());
else
idx = Convert.ToInt32(dataGridView1.Rows[a].Cells[0].Value.ToString()); // Fallback to column 0 if List_idx not guaranteed
string isbn = dataGridView1.Rows[a].Cells["ISBN13"].Value.ToString(); isBreak = false;
if (isbn == "") var item = (FillBlankItem)bs1.List[a];
int idx = int.Parse(item.Idx);
string isbn = item.Isbn;
if (string.IsNullOrEmpty(isbn))
{ {
dataGridView1.Rows[a].DefaultCellStyle.ForeColor = Color.Red; dataGridView1.Rows[a].DefaultCellStyle.ForeColor = Color.Red;
progressBar1.Value += 1; progressBar1.Value += 1;
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.White; // Reset bg
continue; continue;
} }
@@ -294,8 +311,8 @@ namespace UniMarc
Delay(300); Delay(300);
} }
string marc = dataGridView1.Rows[a].Cells["BookMarc"].Value.ToString(); string marc = item.BookMarc;
if (marc == "") if (string.IsNullOrEmpty(marc))
dataGridView1.Rows[a].DefaultCellStyle.ForeColor = Color.Red; dataGridView1.Rows[a].DefaultCellStyle.ForeColor = Color.Red;
else else
{ {
@@ -305,6 +322,7 @@ namespace UniMarc
BulkMarcResults.Add(idx, processedMarc); BulkMarcResults.Add(idx, processedMarc);
} }
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.White;
progressBar1.Value += 1; progressBar1.Value += 1;
} }
@@ -316,7 +334,6 @@ namespace UniMarc
string MakeMarc(string text) string MakeMarc(string text)
{ {
string[] SplitLine = text.Split('\n'); string[] SplitLine = text.Split('\n');
string result = ""; string result = "";
foreach (string line in SplitLine) foreach (string line in SplitLine)
{ {
@@ -358,7 +375,8 @@ namespace UniMarc
int row = e.RowIndex; int row = e.RowIndex;
richTextBox1.Text = dataGridView1.Rows[row].Cells["BookMarc"].Value.ToString(); var item = (FillBlankItem)bs1.Current;
richTextBox1.Text = item.BookMarc;
} }
} }
} }

View File

@@ -138,4 +138,75 @@
<metadata name="BookMarc.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="BookMarc.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="bn1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>663, 10</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/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wAAADsABataJCQAAAVdJREFUOE/Nz0tLAmEUBmB3kWRoCUVEISFUJGb1OywiKrDsIpZdkJAkDUvDQkij
UKSbVIvatKhNi9oERRAGEQXhjJdp7Hd83/eGs2jhLGQ20QtndTgP71Gp/m0KZ1XInlTjM6XG+4EG5fuK
yaTUIN8bIMUQ0gmtcuBtX/MLPMT0yoHnuA6kuA4iruI20lAZ+DiswWuyFum4Dk+7dbiP6kHEFVDBg+tQ
My4DLbjwG3DqbcORxygHXxJakGIQRFwDEf0gwjKI4AYtzIHmHaA5Oxg/CsYPIb7YIQced+qluvTLCyIs
gRYWQPNO0NwkWNYGxg+DcYNgGSu2Z0xy4C7SiJtwE66kuq049xlAs2Ng/AiS7nbszXci6jIh4jQjPGWR
A+U59hiluowbQMzVVfmgPKU/GdcPxlmx5TArB6KzJunf0gTtPcqBzeluhCYsCIz3wm/rUw78WX4AJCPY
nlwVm9EAAAAASUVORK5CYII=
</value>
</data>
<metadata name="bs1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>590, 10</value>
</metadata>
<data name="bindingNavigatorDeleteItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wAAADsABataJCQAAAWtJREFUOE+1kE0ow2Ecx/9X5a2UiwtKOSCTmJBMhuQlMo3IvCUHDouEXHZwIOVC
DrhIDiQl5USy07zNa2tKf2laaRf84/J8xBCetab4XL/f76fn+SnKX4DrGLqrwbHDzywkWJlHdJYjLEbY
Wg8q4eYKlma+d1hbgF4TotWIaC+FuYmAktcXCksx2HrknBOHX1KbiTDngrXhW0kMdSBM2TA5Io+/wuI0
oiz5TcRwB7hPYazfLx3rDz7+gCsXNBb4v1SdgajTQ19TaOMP2NtFmPSIilSo0v1y7FHBnAdZMWi6aO51
kVCTGZoEzzWYciA/Dl9bBZwfvh3XmxIJy7PBJdx5odnAQ2E87qJUfPbtzwGjVpxJEWjH+4ElPD/BYBsY
EjhKicW3sSoVb0vSUFsq0W6upUxhdxMtOxZnYhhqVz1oj3JJUZSdpCg0p0POmLKhJofjNqaDeikX3tFG
uuHsQM65cML4ABzY5fA/eQGKIwMcVjm2bAAAAABJRU5ErkJggg==
</value>
</data>
<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>
</root> </root>

View File

@@ -28,14 +28,15 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.components = new System.ComponentModel.Container();
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();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Marc_Plan)); 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();
@@ -71,6 +72,7 @@
this.btn_ChangeColor = new System.Windows.Forms.Button(); this.btn_ChangeColor = new System.Windows.Forms.Button();
this.tb_SearchChangeColor = new System.Windows.Forms.TextBox(); this.tb_SearchChangeColor = new System.Windows.Forms.TextBox();
this.panel5 = new System.Windows.Forms.Panel(); this.panel5 = new System.Windows.Forms.Panel();
this.chkEditorTest = new System.Windows.Forms.CheckBox();
this.cbTag008_32 = new System.Windows.Forms.ComboBox(); this.cbTag008_32 = new System.Windows.Forms.ComboBox();
this.btnTag008 = new System.Windows.Forms.Button(); this.btnTag008 = new System.Windows.Forms.Button();
this.btnTag040 = new System.Windows.Forms.Button(); this.btnTag040 = new System.Windows.Forms.Button();
@@ -141,11 +143,20 @@
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.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.bn1 = new System.Windows.Forms.BindingNavigator(this.components);
this.bs1 = new System.Windows.Forms.BindingSource(this.components);
this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
this.btDelete = new System.Windows.Forms.ToolStripButton();
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.printDocument1 = new System.Drawing.Printing.PrintDocument(); this.printDocument1 = new System.Drawing.Printing.PrintDocument();
this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog(); this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
this.chkEditorTest = new System.Windows.Forms.CheckBox();
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();
@@ -154,7 +165,9 @@
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(); ((System.ComponentModel.ISupportInitialize)(this.bn1)).BeginInit();
this.bn1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bs1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// panel1 // panel1
@@ -522,6 +535,18 @@
this.panel5.Size = new System.Drawing.Size(1730, 55); this.panel5.Size = new System.Drawing.Size(1730, 55);
this.panel5.TabIndex = 9; this.panel5.TabIndex = 9;
// //
// chkEditorTest
//
this.chkEditorTest.BackColor = System.Drawing.SystemColors.Control;
this.chkEditorTest.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.chkEditorTest.ForeColor = System.Drawing.Color.Blue;
this.chkEditorTest.Location = new System.Drawing.Point(596, 32);
this.chkEditorTest.Name = "chkEditorTest";
this.chkEditorTest.Size = new System.Drawing.Size(159, 27);
this.chkEditorTest.TabIndex = 53;
this.chkEditorTest.Text = "Editor (Old)";
this.chkEditorTest.UseVisualStyleBackColor = false;
//
// cbTag008_32 // cbTag008_32
// //
this.cbTag008_32.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cbTag008_32.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@@ -1012,7 +1037,7 @@
// panel7 // panel7
// //
this.panel7.Controls.Add(this.dataGridView1); this.panel7.Controls.Add(this.dataGridView1);
this.panel7.Controls.Add(this.toolStrip1); this.panel7.Controls.Add(this.bn1);
this.panel7.Controls.Add(this.checkBox1); 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, 90); this.panel7.Location = new System.Drawing.Point(0, 90);
@@ -1027,14 +1052,14 @@
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; dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.AppWorkspace; dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.AppWorkspace;
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); dataGridViewCellStyle9.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9;
this.dataGridView1.ColumnHeadersHeight = 25; this.dataGridView1.ColumnHeadersHeight = 25;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -1090,8 +1115,8 @@
// //
// reg_num // reg_num
// //
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.reg_num.DefaultCellStyle = dataGridViewCellStyle2; this.reg_num.DefaultCellStyle = dataGridViewCellStyle10;
this.reg_num.FillWeight = 130.9363F; this.reg_num.FillWeight = 130.9363F;
this.reg_num.HeaderText = "등록번호"; this.reg_num.HeaderText = "등록번호";
this.reg_num.Name = "reg_num"; this.reg_num.Name = "reg_num";
@@ -1099,8 +1124,8 @@
// //
// class_code // class_code
// //
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.class_code.DefaultCellStyle = dataGridViewCellStyle3; this.class_code.DefaultCellStyle = dataGridViewCellStyle11;
this.class_code.FillWeight = 76.41504F; this.class_code.FillWeight = 76.41504F;
this.class_code.HeaderText = "분류"; this.class_code.HeaderText = "분류";
this.class_code.Name = "class_code"; this.class_code.Name = "class_code";
@@ -1108,8 +1133,8 @@
// //
// author_code // author_code
// //
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.author_code.DefaultCellStyle = dataGridViewCellStyle4; this.author_code.DefaultCellStyle = dataGridViewCellStyle12;
this.author_code.FillWeight = 77.02635F; this.author_code.FillWeight = 77.02635F;
this.author_code.HeaderText = "저자기호"; this.author_code.HeaderText = "저자기호";
this.author_code.Name = "author_code"; this.author_code.Name = "author_code";
@@ -1117,8 +1142,8 @@
// //
// volume // volume
// //
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.volume.DefaultCellStyle = dataGridViewCellStyle5; this.volume.DefaultCellStyle = dataGridViewCellStyle13;
this.volume.FillWeight = 38.80909F; this.volume.FillWeight = 38.80909F;
this.volume.HeaderText = "V"; this.volume.HeaderText = "V";
this.volume.Name = "volume"; this.volume.Name = "volume";
@@ -1127,8 +1152,8 @@
// //
// copy // copy
// //
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); dataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.copy.DefaultCellStyle = dataGridViewCellStyle6; this.copy.DefaultCellStyle = dataGridViewCellStyle14;
this.copy.FillWeight = 40.14827F; this.copy.FillWeight = 40.14827F;
this.copy.HeaderText = "C"; this.copy.HeaderText = "C";
this.copy.Name = "copy"; this.copy.Name = "copy";
@@ -1137,8 +1162,8 @@
// //
// prefix // prefix
// //
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); dataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.prefix.DefaultCellStyle = dataGridViewCellStyle7; this.prefix.DefaultCellStyle = dataGridViewCellStyle15;
this.prefix.FillWeight = 41.51828F; this.prefix.FillWeight = 41.51828F;
this.prefix.HeaderText = "F"; this.prefix.HeaderText = "F";
this.prefix.Name = "prefix"; this.prefix.Name = "prefix";
@@ -1210,8 +1235,8 @@
// //
// price // price
// //
dataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); dataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
this.price.DefaultCellStyle = dataGridViewCellStyle8; this.price.DefaultCellStyle = dataGridViewCellStyle16;
this.price.FillWeight = 86.15041F; this.price.FillWeight = 86.15041F;
this.price.HeaderText = "정가"; this.price.HeaderText = "정가";
this.price.Name = "price"; this.price.Name = "price";
@@ -1247,16 +1272,112 @@
this.colCheck.TrueValue = "T"; this.colCheck.TrueValue = "T";
this.colCheck.Width = 27; this.colCheck.Width = 27;
// //
// toolStrip1 // bn1
// //
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Bottom; this.bn1.AddNewItem = null;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.bn1.BindingSource = this.bs1;
this.toolStripButton1}); this.bn1.CountItem = this.bindingNavigatorCountItem;
this.toolStrip1.Location = new System.Drawing.Point(0, 738); this.bn1.DeleteItem = null;
this.toolStrip1.Name = "toolStrip1"; this.bn1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.toolStrip1.Size = new System.Drawing.Size(1730, 25); this.bn1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStrip1.TabIndex = 3; this.bindingNavigatorMoveFirstItem,
this.toolStrip1.Text = "toolStrip1"; this.bindingNavigatorMovePreviousItem,
this.bindingNavigatorSeparator,
this.bindingNavigatorPositionItem,
this.bindingNavigatorCountItem,
this.bindingNavigatorSeparator1,
this.bindingNavigatorMoveNextItem,
this.bindingNavigatorMoveLastItem,
this.bindingNavigatorSeparator2,
this.btDelete});
this.bn1.Location = new System.Drawing.Point(0, 738);
this.bn1.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
this.bn1.MoveLastItem = this.bindingNavigatorMoveLastItem;
this.bn1.MoveNextItem = this.bindingNavigatorMoveNextItem;
this.bn1.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
this.bn1.Name = "bn1";
this.bn1.PositionItem = this.bindingNavigatorPositionItem;
this.bn1.Size = new System.Drawing.Size(1730, 25);
this.bn1.TabIndex = 12;
this.bn1.Text = "bindingNavigator1";
//
// bindingNavigatorCountItem
//
this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22);
this.bindingNavigatorCountItem.Text = "/{0}";
this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수";
//
// btDelete
//
this.btDelete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.btDelete.Image = ((System.Drawing.Image)(resources.GetObject("btDelete.Image")));
this.btDelete.Name = "btDelete";
this.btDelete.RightToLeftAutoMirrorImage = true;
this.btDelete.Size = new System.Drawing.Size(23, 22);
this.btDelete.Text = "삭제";
this.btDelete.Click += new System.EventHandler(this.bindingNavigatorDeleteItem_Click);
//
// 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);
// //
// printDocument1 // printDocument1
// //
@@ -1273,29 +1394,6 @@
this.printPreviewDialog1.Name = "printPreviewDialog1"; this.printPreviewDialog1.Name = "printPreviewDialog1";
this.printPreviewDialog1.Visible = false; this.printPreviewDialog1.Visible = false;
// //
// chkEditorTest
//
this.chkEditorTest.BackColor = System.Drawing.SystemColors.Control;
this.chkEditorTest.Checked = true;
this.chkEditorTest.CheckState = System.Windows.Forms.CheckState.Checked;
this.chkEditorTest.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.chkEditorTest.ForeColor = System.Drawing.Color.Blue;
this.chkEditorTest.Location = new System.Drawing.Point(596, 32);
this.chkEditorTest.Name = "chkEditorTest";
this.chkEditorTest.Size = new System.Drawing.Size(106, 27);
this.chkEditorTest.TabIndex = 53;
this.chkEditorTest.Text = "Editor (OLD)";
this.chkEditorTest.UseVisualStyleBackColor = false;
//
// 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);
@@ -1322,8 +1420,10 @@
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); ((System.ComponentModel.ISupportInitialize)(this.bn1)).EndInit();
this.toolStrip1.PerformLayout(); this.bn1.ResumeLayout(false);
this.bn1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.bs1)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@@ -1437,9 +1537,19 @@
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;
private System.Windows.Forms.ComboBox cb_authorTypeE; private System.Windows.Forms.ComboBox cb_authorTypeE;
private System.Windows.Forms.CheckBox chkEditorTest; private System.Windows.Forms.CheckBox chkEditorTest;
private System.Windows.Forms.BindingNavigator bn1;
private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
private System.Windows.Forms.ToolStripButton btDelete;
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 bs1;
} }
} }

View File

@@ -29,7 +29,43 @@ namespace WindowsFormsApp1.Mac
{ {
InitializeComponent(); InitializeComponent();
main = _main; main = _main;
this.toolStrip1.Visible = System.Diagnostics.Debugger.IsAttached; this.btDelete.Visible = System.Diagnostics.Debugger.IsAttached;
// Configure Binding
dataGridView1.AutoGenerateColumns = false;
// Map columns
dataGridView1.Columns["idx"].DataPropertyName = "Idx";
dataGridView1.Columns["num"].DataPropertyName = "Num";
dataGridView1.Columns["reg_num"].DataPropertyName = "RegNum";
dataGridView1.Columns["class_code"].DataPropertyName = "ClassCode";
dataGridView1.Columns["author_code"].DataPropertyName = "AuthorCode";
dataGridView1.Columns["volume"].DataPropertyName = "Volume";
dataGridView1.Columns["copy"].DataPropertyName = "Copy";
dataGridView1.Columns["prefix"].DataPropertyName = "Prefix";
dataGridView1.Columns["gu"].DataPropertyName = "Gu";
dataGridView1.Columns["ISBN"].DataPropertyName = "Isbn";
dataGridView1.Columns["book_name"].DataPropertyName = "BookName";
dataGridView1.Columns["s_book_name1"].DataPropertyName = "SBookName1";
dataGridView1.Columns["s_book_num1"].DataPropertyName = "SBookNum1";
dataGridView1.Columns["s_book_name2"].DataPropertyName = "SBookName2";
dataGridView1.Columns["s_book_num2"].DataPropertyName = "SBookNum2";
dataGridView1.Columns["author"].DataPropertyName = "Author";
dataGridView1.Columns["book_comp"].DataPropertyName = "BookComp";
dataGridView1.Columns["price"].DataPropertyName = "Price";
dataGridView1.Columns["midx"].DataPropertyName = "Midx";
dataGridView1.Columns["marc"].DataPropertyName = "Marc";
dataGridView1.Columns["search_tag2"].DataPropertyName = "SearchTag2";
dataGridView1.Columns["colCheck"].DataPropertyName = "ColCheck";
// CheckBox column value mapping is usually handled automatically for True/False value types if configured,
// but since we using string "T"/"F", we might need cell formatting or just stick to using a helper property if grid supports it.
// The existing code uses "T"/"F". The DataGridViewCheckBoxColumn TrueValue/FalseValue defaults are usually bool.
// I should set TrueValue/FalseValue for the column to "T"/"F" in Designer or code.
// Assuming default is bool, let's try to stick to logic.
((DataGridViewCheckBoxColumn)dataGridView1.Columns["colCheck"]).TrueValue = "T";
((DataGridViewCheckBoxColumn)dataGridView1.Columns["colCheck"]).FalseValue = "F";
this.bs1.DataSource = typeof(MarcPlanItem);
this.dataGridView1.DataSource = this.bs1;
} }
private void Marc_Plan_Load(object sender, EventArgs e) private void Marc_Plan_Load(object sender, EventArgs e)
@@ -66,13 +102,10 @@ namespace WindowsFormsApp1.Mac
sub.TopMost = true; sub.TopMost = true;
if (sub.ShowDialog() == DialogResult.OK) if (sub.ShowDialog() == DialogResult.OK)
{ {
if (sub.ResultFileRows != null && sub.ResultFileRows.Count > 0) //데이터가 있다면?
if (sub.ResultItems != null && sub.ResultItems.Any())
{ {
this.dataGridView1.Rows.Clear(); bs1.DataSource = sub.ResultItems;
foreach (var row in sub.ResultFileRows)
{
this.dataGridView1.Rows.Add(row);
}
} }
else if (!string.IsNullOrEmpty(sub.ResultIdx)) else if (!string.IsNullOrEmpty(sub.ResultIdx))
{ {
@@ -85,7 +118,7 @@ namespace WindowsFormsApp1.Mac
#region SelectList_Sub #region SelectList_Sub
public void mk_Grid(string ListName, string date, string[] Grid) public void mk_Grid(string ListName, string date)
{ {
btn_Select_List.Text = ListName; btn_Select_List.Text = ListName;
this.date = date; this.date = date;
@@ -114,74 +147,69 @@ namespace WindowsFormsApp1.Mac
string[] Search_col = { "work_list", "date" }; string[] Search_col = { "work_list", "date" };
string[] Search_data = { ListName, date }; string[] Search_data = { ListName, date };
string cmd = db.More_DB_Search(Table, Search_col, Search_data, Area); string cmd = db.More_DB_Search(Table, Search_col, Search_data, Area);
string res = db.DB_Send_CMD_Search(cmd); var res = db.ExecuteQueryData(cmd); // Assumed called above
var list = new List<MarcPlanItem>();
string[] ary = res.Split('|');
int tCnt = 1; int tCnt = 1;
for (int a = 0; a < ary.Length; a++)
foreach (DataRow dr in res.Rows)
{ {
if (a % 16 == 00) { Grid[00] = ary[a]; } // idx MarcPlanItem item = new MarcPlanItem();
if (a % 16 == 01) item.Idx = dr["idx"].ToString();
item.Num = dr["num"].ToString();
if (string.IsNullOrEmpty(item.Num))
{ {
Grid[01] = ary[a]; item.Num = tCnt.ToString();
if (ary[a] == "") Grid[02] = tCnt.ToString(); }
tCnt++; tCnt++;
} // num
if (a % 16 == 02) { Grid[02] = ary[a]; } // r_num
if (a % 16 == 03) { Grid[03] = ary[a]; } // class_symbol
if (a % 16 == 04) { Grid[04] = ary[a]; } // author_symbol
if (a % 16 == 05) { Grid[09] = ary[a]; } // ISBN
if (a % 16 == 06) { Grid[10] = ary[a]; } // book_name
if (a % 16 == 07) { Grid[11] = ary[a]; } // s_book_name1
if (a % 16 == 08) { Grid[12] = ary[a]; } // s_book_num1
if (a % 16 == 09) { Grid[13] = ary[a]; } // s_book_name2
if (a % 16 == 10) { Grid[14] = ary[a]; } // s_book_num2
if (a % 16 == 11) { Grid[15] = ary[a]; } // author
if (a % 16 == 12) { Grid[16] = ary[a]; } // book_comp
if (a % 16 == 13) { Grid[17] = ary[a]; } // price
if (a % 16 == 14) { Grid[18] = ary[a]; } // midx
if (a % 16 == 15)
{
Grid[19] = ary[a]; // marc
string[] vcf = st.Take_Tag(ary[a], GetTag); item.RegNum = dr["r_num"].ToString();
Grid[5] = vcf[0]; item.ClassCode = dr["class_symbol"].ToString();
Grid[6] = vcf[1]; item.AuthorCode = dr["author_symbol"].ToString();
Grid[7] = vcf[2]; item.Isbn = dr["ISBN"].ToString();
item.BookName = dr["book_name"].ToString();
item.SBookName1 = dr["s_book_name1"].ToString();
item.SBookNum1 = dr["s_book_num1"].ToString();
item.SBookName2 = dr["s_book_name2"].ToString();
item.SBookNum2 = dr["s_book_num2"].ToString();
item.Author = dr["author"].ToString();
item.BookComp = dr["book_comp"].ToString();
item.Price = dr["price"].ToString();
item.Midx = dr["midx"].ToString();
string[] ab = st.Take_Tag(ary[a], GetTag2); string rawMarc = dr["marc"].ToString();
// Logic for MARC tag processing
string[] vcf = st.Take_Tag(rawMarc, GetTag);
item.Volume = vcf[0];
item.Copy = vcf[1];
item.Prefix = vcf[2];
string[] ab = st.Take_Tag(rawMarc, GetTag2);
if (ab[0] != "") if (ab[0] != "")
Grid[19] = Grid[19].Replace(ab[0], Grid[3]); rawMarc = rawMarc.Replace(ab[0], item.ClassCode);
if (ab[1] != "") if (ab[1] != "")
Grid[19] = Grid[19].Replace(ab[1], Grid[4]); rawMarc = rawMarc.Replace(ab[1], item.AuthorCode);
vcf = new string[] { "", "", "" }; string[] vcf_marc = new string[] { "", "", "" };
vcf[0] = string.Format("▼a{0}", Grid[3]); vcf_marc[0] = string.Format("▼a{0}", item.ClassCode);
vcf[1] = string.Format("▼b{0}", Grid[4]); vcf_marc[1] = string.Format("▼b{0}", item.AuthorCode);
if (Grid[5] != "") if (!string.IsNullOrEmpty(item.Volume))
vcf[2] = string.Format("▼c{0}", Grid[5]); vcf_marc[2] = string.Format("▼c{0}", item.Volume);
string AddTag = string.Format("090\t \t{0}{1}{2}▲", vcf[0], vcf[1], vcf[2]);
string TypeView = ConvertMarcType(Grid[19]);
Grid[19] = st.made_Ori_marc(AddTagInMarc(AddTag, TypeView));
dataGridView1.Rows.Add(Grid); string AddTag = string.Format("090\t \t{0}{1}{2}▲", vcf_marc[0], vcf_marc[1], vcf_marc[2]);
} string TypeView = ConvertMarcType(rawMarc);
} item.Marc = st.made_Ori_marc(AddTagInMarc(AddTag, TypeView));
}
public void mk_Grid(string ListName, string date)
{
string[] grid = {
"", "", "", "", "",
"", "", "", "", "",
"", "", "", "", "",
"", "", "", "", "",
"", "T", "", ""
};
mk_Grid(ListName, date, grid); item.ColCheck = "F";
list.Add(item);
} }
bs1.DataSource = list;
}
public void mk_Panel(string idx, string ListName, string date) public void mk_Panel(string idx, string ListName, string date)
{ {
string Table = "Specs_List"; string Table = "Specs_List";
@@ -222,14 +250,26 @@ namespace WindowsFormsApp1.Mac
private (string marc, MacEditorParameter p) GetBookData(int row) private (string marc, MacEditorParameter p) GetBookData(int row)
{ {
string bookName = dataGridView1.Rows[row].Cells["book_name"].Value.ToString(); // Fallback or deprecated, ideally redirect to item based or remove if possible.
string author = dataGridView1.Rows[row].Cells["author"].Value.ToString(); // BUT existing non-bound usage calls might exist? No, this is private and used in editor opening.
string publisher = dataGridView1.Rows[row].Cells["book_comp"].Value.ToString(); // Let's keep for safety but implement new one.
string price = dataGridView1.Rows[row].Cells["price"].Value.ToString(); if (row >= 0 && row < bs1.Count)
string isbn = dataGridView1.Rows[row].Cells["ISBN"].Value.ToString(); {
string idx = dataGridView1.Rows[row].Cells["idx"].Value.ToString(); return GetBookData((MarcPlanItem)bs1.List[row]);
string midx = dataGridView1.Rows[row].Cells["midx"].Value.ToString(); }
string marc = dataGridView1.Rows[row].Cells["marc"].Value.ToString(); return ("", new MacEditorParameter());
}
private (string marc, MacEditorParameter p) GetBookData(MarcPlanItem item)
{
string bookName = item.BookName;
string author = item.Author;
string publisher = item.BookComp;
string price = item.Price;
string isbn = item.Isbn;
string idx = item.Idx;
string midx = item.Midx;
string marc = item.Marc;
string cmd = string.Format("SELECT `user`, `editDate`, `etc1`, `etc2` FROM `Specs_Marc` WHERE `idx` = \"{0}\"", midx); string cmd = string.Format("SELECT `user`, `editDate`, `etc1`, `etc2` FROM `Specs_Marc` WHERE `idx` = \"{0}\"", midx);
string res = db.DB_Send_CMD_Search(cmd); string res = db.DB_Send_CMD_Search(cmd);
@@ -270,7 +310,7 @@ namespace WindowsFormsApp1.Mac
if (dataGridView1.Rows[row].Cells[col].ReadOnly) if (dataGridView1.Rows[row].Cells[col].ReadOnly)
{ {
if (chkEditorTest.Checked == false) if (chkEditorTest.Checked == true)
{ {
string[] Marc = { string[] Marc = {
dataGridView1.Rows[row].Cells["marc"].Value.ToString(), dataGridView1.Rows[row].Cells["marc"].Value.ToString(),
@@ -292,77 +332,85 @@ namespace WindowsFormsApp1.Mac
} }
else else
{ {
int currentEditorRow = row; // Sync BindingSource position
string isbn = dataGridView1.Rows[row].Cells["ISBN"].Value.ToString(); bs1.Position = row;
string marcData = dataGridView1.Rows[row].Cells["marc"].Value.ToString();
var currentItem = (MarcPlanItem)bs1.Current;
string isbn = currentItem.Isbn;
string marcData = currentItem.Marc;
var f = new Marc_Plan_Sub_MarcEdit2(isbn, marcData); var f = new Marc_Plan_Sub_MarcEdit2(isbn, marcData);
var data = GetBookData(currentEditorRow); var data = GetBookData(currentItem);
f.LoadBook(data.marc, data.p); f.LoadBook(data.marc, data.p);
f.RequestNext += (s, args) => f.RequestNext += (s, args) =>
{ {
if (currentEditorRow < dataGridView1.RowCount - 1) if (bs1.Position < bs1.Count - 1)
{ {
currentEditorRow++; bs1.MoveNext();
var nextData = GetBookData(currentEditorRow); var nextItem = (MarcPlanItem)bs1.Current;
var nextData = GetBookData(nextItem);
f.LoadBook(nextData.marc, nextData.p); f.LoadBook(nextData.marc, nextData.p);
// Optional: Sync grid selection // Optional: Ensure visible
dataGridView1.ClearSelection(); if (dataGridView1.CurrentRow != null)
dataGridView1.Rows[currentEditorRow].Selected = true; dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.CurrentRow.Index;
// Ensure visible
dataGridView1.FirstDisplayedScrollingRowIndex = currentEditorRow;
} }
}; };
f.RequestPrev += (s, args) => f.RequestPrev += (s, args) =>
{ {
if (currentEditorRow > 0) if (bs1.Position > 0)
{ {
currentEditorRow--; bs1.MovePrevious();
var prevData = GetBookData(currentEditorRow); var prevItem = (MarcPlanItem)bs1.Current;
var prevData = GetBookData(prevItem);
f.LoadBook(prevData.marc, prevData.p); f.LoadBook(prevData.marc, prevData.p);
// Optional: Sync grid selection // Optional: Ensure visible
dataGridView1.ClearSelection(); if (dataGridView1.CurrentRow != null)
dataGridView1.Rows[currentEditorRow].Selected = true; dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.CurrentRow.Index;
// Ensure visible
dataGridView1.FirstDisplayedScrollingRowIndex = currentEditorRow;
} }
}; };
f.BookUpdated += (s, args) => f.BookUpdated += (s, args) =>
{ {
dataGridView1.Rows[currentEditorRow].Cells["book_name"].Value = args.BookName; var item = (MarcPlanItem)bs1.Current;
dataGridView1.Rows[currentEditorRow].Cells["marc"].Value = args.Marc; item.BookName = args.BookName;
item.Marc = args.Marc;
bs1.ResetCurrentItem(); // Refresh grid
}; };
f.RequestFillBlankData += (s, args) => f.RequestFillBlankData += (s, args) =>
{ {
var dataList = new List<string[]>(); var dataList = new List<FillBlankItem>();
string currentIsbn = dataGridView1.Rows[currentEditorRow].Cells["ISBN"].Value.ToString(); var currentBoundItem = (MarcPlanItem)bs1.Current;
for (int a = 0; a < dataGridView1.Rows.Count; a++) for (int a = 0; a < bs1.Count; a++)
{ {
// Criteria for "Fill Blank" candidates. // Criteria for "Fill Blank" candidates.
// Original legacy logic used Red color. Here we check if db_marc (marc column) is empty or too short. // Check if MARC is empty or short
string mData = dataGridView1.Rows[a].Cells["marc"].Value?.ToString() ?? ""; var mItem = (MarcPlanItem)bs1.List[a];
if (mData.Length < 10) // Assuming usage of "Red" roughly equates to invalid/missing MARC string mData = mItem.Marc ?? "";
if (mData.Length < 10)
{ {
string[] rowData = { var item = new FillBlankItem
a.ToString(), {
dataGridView1.Rows[a].Cells["ISBN"].Value?.ToString() ?? "", Idx = a.ToString(),
dataGridView1.Rows[a].Cells["book_name"].Value?.ToString() ?? "", Isbn = mItem.Isbn ?? "",
dataGridView1.Rows[a].Cells["author"].Value?.ToString() ?? "", BookName = mItem.BookName ?? "",
dataGridView1.Rows[a].Cells["book_comp"].Value?.ToString() ?? "", Author = mItem.Author ?? "",
dataGridView1.Rows[a].Cells["price"].Value?.ToString() ?? "", // 'pay' in Marc2 might be 'price' here? Checked GetBookData: yes, price. Publisher = mItem.BookComp ?? "",
"" Price = mItem.Price ?? ""
}; };
dataList.Add(rowData); dataList.Add(item);
} }
} }
f.OpenFillBlank(dataList, currentIsbn); if(dataList.Any()==false)
{
UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다");
}
else f.OpenFillBlank(dataList, currentBoundItem.Isbn);
}; };
f.BulkBooksUpdated += (s, args) => f.BulkBooksUpdated += (s, args) =>
@@ -372,14 +420,15 @@ namespace WindowsFormsApp1.Mac
int rowIdx = kvp.Key; int rowIdx = kvp.Key;
string newMarc = kvp.Value; string newMarc = kvp.Value;
// Ensure rowIdx is valid (it should be, as it came from 'a' loop index) // Ensure rowIdx is valid
if (rowIdx >= 0 && rowIdx < dataGridView1.Rows.Count) if (rowIdx >= 0 && rowIdx < bs1.Count)
{ {
dataGridView1.Rows[rowIdx].Cells["marc"].Value = newMarc; var mItem = (MarcPlanItem)bs1.List[rowIdx];
// Optional: Update color or status to indicate filled? mItem.Marc = newMarc;
// Legacy code updated color. Marc_Plan might not enforce color rules yet, but setting value is key. // We might want to refresh specific rows or all, simpler to reset item or all
} }
} }
bs1.ResetBindings(false); // Refresh all to reflect changes
}; };
f.Show(); f.Show();
@@ -1556,6 +1605,11 @@ namespace WindowsFormsApp1.Mac
} }
private void toolStripButton1_Click(object sender, EventArgs e) private void toolStripButton1_Click(object sender, EventArgs e)
{
}
private void bindingNavigatorDeleteItem_Click(object sender, EventArgs e)
{ {
// 범위 입력받기 // 범위 입력받기
string input = Microsoft.VisualBasic.Interaction.InputBox( string input = Microsoft.VisualBasic.Interaction.InputBox(
@@ -1598,10 +1652,10 @@ namespace WindowsFormsApp1.Mac
int startIndex = startRow - 1; int startIndex = startRow - 1;
int endIndex = endRow - 1; int endIndex = endRow - 1;
// 범위가 그리드 범위를 벗어나는지 확인 // 범위가 데이터 범위를 벗어나는지 확인
if (endIndex >= dataGridView1.Rows.Count) if (endIndex >= bs1.Count)
{ {
MessageBox.Show($"입력한 범위가 전체 수({dataGridView1.Rows.Count})를 초과합니다.", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning); MessageBox.Show($"입력한 범위가 전체 데이터 수({bs1.Count})를 초과합니다.", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return; return;
} }
@@ -1614,9 +1668,9 @@ namespace WindowsFormsApp1.Mac
// 뒤에서부터 삭제 (인덱스가 꼬이지 않도록) // 뒤에서부터 삭제 (인덱스가 꼬이지 않도록)
for (int i = endIndex; i >= startIndex; i--) for (int i = endIndex; i >= startIndex; i--)
{ {
if (i < dataGridView1.Rows.Count && !dataGridView1.Rows[i].IsNewRow) if (i < bs1.Count)
{ {
dataGridView1.Rows.RemoveAt(i); bs1.RemoveAt(i);
} }
} }

View File

@@ -117,33 +117,76 @@
<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="bn1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>437, 11</value>
</metadata>
<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"> <metadata name="bn1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>300, 6</value> <value>437, 11</value>
</metadata>
<metadata name="bs1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>517, 10</value>
</metadata> </metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <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"> <data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK wQAADsEBuJFr7QAAATFJREFUOE9jYBg0oHDW8/9NC57/z5z4+D+6HAyEtz/AKceQO/PZ/1VH3v/HpSi+
YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X +8H/4IZrWOXAIGPK0/8L933Aqii+5+H/pfv///evvoAhBwcJPU/+T9vyHkNRRPt9sObMWf//e5WewG1A
/aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t ZNej/72rP6AoCm29B9bcuu7/f//Ov/9d8g/gNiCw+eH/uvnv4IqCW+7+X7T3//+Odf//Z8z5+d+u7ud/
I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM +4ztuA3wqLr/P3/aGxRFdsW3/6fP+f3fv+vbf53Cd/8tEtbjNsC+9O7/7MmvMRTpp5z/b1L04r9K1qf/
cX79DFKrHHD5d9D26hvicx4pABt2lpg10zYzU0zr7+e3xXGcrkEB2O2TNec9nJFwB3alZn5jZorfeDZh xpHLcBtgkXfnf2r/a6yKDJJO/JdN+/pfN3gehhwcGGbd/h/W8hKnIv3Uy/81fKdhlQMDnbQb//2qH+JV
6Q3g8s06BeCoKF4MRURoH1+BY2oNCbeb0TIclIYxOhzf8frTOuo7FxCbbVIAzpni0iceEc8vhzEwGkJD pOIxAaccg1Pulf8gBXgVDUoAAPB2wKtYlLYeAAAAAElFTkSuQmCC
lx83ymxifejdKjRNk/8PWnyIyTQqAJek0jqHwfEVscu31baIu8+90sTE4nY025dQ2/5FIPpnXlzKuK8A </value>
HBUzHot52djqQ6HZhfR7IwK4mKpHtvEDMqvfCiQ6zaAAXM8x94aIWTNrLLG4kVUzgaTSPlzLtyJOZxbb </data>
1wtfyg4Q+AfA3aZlButjSfxGcUJBk4g5tuP3haQKRKXcUQDOmbvNTpPOJeFFjordZmbWTNvMTHFUcpUC <data name="bindingNavigatorMovePreviousItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
nOccAdABIDXXE1nzAAAAAElFTkSuQmCC <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wQAADsEBuJFr7QAAALtJREFUOE9jYBgyILz9wX90MaJBfPeD/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
wQAADsEBuJFr7QAAAKRJREFUOE9jYBh0oHDW8//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
wQAADsEBuJFr7QAAAStJREFUOE9jYBhUoHDW8//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="btDelete.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wQAADsEBuJFr7QAAAWtJREFUOE+1kE0ow2Ecx/9X5a2UiwtKOSCTmJBMhuQlMo3IvCUHDouEXHZwIOVC
DrhIDiQl5USy07zNa2tKf2laaRf84/J8xBCetab4XL/f76fn+SnKX4DrGLqrwbHDzywkWJlHdJYjLEbY
Wg8q4eYKlma+d1hbgF4TotWIaC+FuYmAktcXCksx2HrknBOHX1KbiTDngrXhW0kMdSBM2TA5Io+/wuI0
oiz5TcRwB7hPYazfLx3rDz7+gCsXNBb4v1SdgajTQ19TaOMP2NtFmPSIilSo0v1y7FHBnAdZMWi6aO51
kVCTGZoEzzWYciA/Dl9bBZwfvh3XmxIJy7PBJdx5odnAQ2E87qJUfPbtzwGjVpxJEWjH+4ElPD/BYBsY
EjhKicW3sSoVb0vSUFsq0W6upUxhdxMtOxZnYhhqVz1oj3JJUZSdpCg0p0POmLKhJofjNqaDeikX3tFG
uuHsQM65cML4ABzY5fA/eQGKIwMcVjm2bAAAAABJRU5ErkJggg==
</value> </value>
</data> </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>18, 17</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>193, 17</value>
</metadata> </metadata>
<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>
@@ -319,6 +362,6 @@
</value> </value>
</data> </data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>40</value> <value>84</value>
</metadata> </metadata>
</root> </root>

View File

@@ -35,6 +35,7 @@ namespace UniMarc.마크
marcEditorControl1.BookSaved += MarcEditorControl_BookSaved; marcEditorControl1.BookSaved += MarcEditorControl_BookSaved;
marcEditorControl1.NextButton += MarcEditorControl1_NextButton; marcEditorControl1.NextButton += MarcEditorControl1_NextButton;
marcEditorControl1.PrevButton += MarcEditorControl1_PrevButton; marcEditorControl1.PrevButton += MarcEditorControl1_PrevButton;
marcEditorControl1.CloseButton += (s1, e1) => { this.Close(); };
marcEditorControl1.Dock = DockStyle.Fill; marcEditorControl1.Dock = DockStyle.Fill;
this.StartPosition = FormStartPosition.CenterScreen; this.StartPosition = FormStartPosition.CenterScreen;
this.Controls.Add(marcEditorControl1); this.Controls.Add(marcEditorControl1);
@@ -58,12 +59,12 @@ namespace UniMarc.마크
public event EventHandler RequestFillBlankData; public event EventHandler RequestFillBlankData;
public void OpenFillBlank(List<string[]> gridData, string currentIsbn) public void OpenFillBlank(List<FillBlankItem> gridData, string currentIsbn)
{ {
var fb = new UniMarc.Marc_FillBlank(); var fb = new UniMarc.Marc_FillBlank();
foreach (var rowData in gridData) foreach (var item in gridData)
{ {
fb.InitFillBlank(rowData); fb.InitFillBlank(item);
} }
fb.ISBN = currentIsbn; fb.ISBN = currentIsbn;

View File

@@ -20,7 +20,7 @@ namespace UniMarc.마크
public string ResultIdx { get; private set; } public string ResultIdx { get; private set; }
public string ResultListName { get; private set; } public string ResultListName { get; private set; }
public string ResultDate { get; private set; } public string ResultDate { get; private set; }
public List<string[]> ResultFileRows { get; private set; } public List<MarcPlanItem> ResultItems { get; private set; }
public Marc_Plan_Sub_SelectList() public Marc_Plan_Sub_SelectList()
{ {
@@ -247,27 +247,27 @@ namespace UniMarc.마크
private void btn_OpenFile_Click(object sender, EventArgs e) private void btn_OpenFile_Click(object sender, EventArgs e)
{ {
OpenFileDialog OpenFileDialog = new OpenFileDialog(); OpenFileDialog OpenFileDialog = new OpenFileDialog();
if (OpenFileDialog.ShowDialog() == DialogResult.OK) if (OpenFileDialog.ShowDialog() != DialogResult.OK) return;
{
if (OpenFileDialog.ShowDialog() == DialogResult.OK) var filePath = OpenFileDialog.FileName;
{
//mp.dataGridView1.Rows.Clear(); // Decoupled
string filePath = OpenFileDialog.FileName;
try try
{ {
System.IO.StreamReader r = new System.IO.StreamReader(filePath, Encoding.Default); var filedata = System.IO.File.ReadAllText(filePath, System.Text.Encoding.Default);
InputGridByFileData(r.ReadToEnd()); InputGridByFileData(filedata);
r.Close(); DialogResult = DialogResult.OK;
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.ToString()); MessageBox.Show(ex.ToString());
} }
} }
}
}
#region OpenFileSub #region OpenFileSub
/// <summary>
/// 파일로부터 목록을 가져온다
/// </summary>
/// <param name="text"></param>
void InputGridByFileData(string text) void InputGridByFileData(string text)
{ {
String_Text st = new String_Text(); String_Text st = new String_Text();
@@ -280,9 +280,8 @@ namespace UniMarc.마크
"049l", "090a", "090b", "049v", "049c", "049f", "049l", "090a", "090b", "049v", "049c", "049f",
// ISBN, 도서명, 총서명1, 총서번호1, 총서명2, 총서번호2, 출판사, 정가, 저자 // ISBN, 도서명, 총서명1, 총서번호1, 총서명2, 총서번호2, 출판사, 정가, 저자
"020a", "245a", "440a", "440v", "490a", "490v", "260b", "950b", "245d" }; "020a", "245a", "440a", "440v", "490a", "490v", "260b", "950b", "245d" };
string[] Search_Res = st.Take_Tag(grid[a], Search); string[] Search_Res = st.Take_Tag(grid[a], Search);
string[] Author_Search = { "100a", "110a", "111a" }; string[] Author_Search = { "100a", "110a", "111a" };
string[] Author_Res = st.Take_Tag(grid[a], Author_Search); string[] Author_Res = st.Take_Tag(grid[a], Author_Search);
string author_Fin = Search_Res[14]; string author_Fin = Search_Res[14];
@@ -295,22 +294,41 @@ namespace UniMarc.마크
} }
} }
string[] AddGrid = {
// idx, 연번, 등록번호, 분류, 저자기호 // idx, 연번, 등록번호, 분류, 저자기호
"", "", Search_Res[0], Search_Res[1], Search_Res[2], // "", "", Search_Res[0], Search_Res[1], Search_Res[2],
// 볼륨v, 복본c, 별치f, 구분, isbn // 볼륨v, 복본c, 별치f, 구분, isbn
Search_Res[3], Search_Res[4], Search_Res[5], "", Search_Res[6], // Search_Res[3], Search_Res[4], Search_Res[5], "", Search_Res[6],
// 도서명, 총서명1, 총서번호1, 총서명1, 총서번호2 // 도서명, 총서명1, 총서번호1, 총서명1, 총서번호2
Search_Res[7], Search_Res[8], Search_Res[9], Search_Res[10], Search_Res[11], // Search_Res[7], Search_Res[8], Search_Res[9], Search_Res[10], Search_Res[11],
// 저자, 출판사, 정가, midx, 마크 // 저자, 출판사, 정가, midx, 마크
author_Fin, Search_Res[12], Search_Res[13], "", grid[a], // author_Fin, Search_Res[12], Search_Res[13], "", grid[a],
// 검색태그 // 검색태그
"", "T" }; // "", "T"
if (ResultFileRows == null) ResultFileRows = new List<string[]>();
ResultFileRows.Add(AddGrid); var item = new MarcPlanItem
//mp.dataGridView1.Rows.Add(AddGrid); {
RegNum = Search_Res[0],
ClassCode = Search_Res[1],
AuthorCode = Search_Res[2],
Volume = Search_Res[3],
Copy = Search_Res[4],
Prefix = Search_Res[5],
Isbn = Search_Res[6],
BookName = Search_Res[7],
SBookName1 = Search_Res[8],
SBookNum1 = Search_Res[9],
SBookName2 = Search_Res[10],
SBookNum2 = Search_Res[11],
Author = author_Fin,
BookComp = Search_Res[12],
Price = Search_Res[13],
Marc = grid[a],
ColCheck = "T"
};
if (ResultItems == null) ResultItems = new List<MarcPlanItem>();
ResultItems.Add(item);
} }
this.DialogResult = DialogResult.OK;
} }
#endregion #endregion
@@ -344,18 +362,11 @@ namespace UniMarc.마크
if (dataGridView1.Columns[col].Name == "colCheck") if (dataGridView1.Columns[col].Name == "colCheck")
return; return;
string idx = dataGridView1.Rows[row].Cells["idx"].Value.ToString(); var drow = dataGridView1.Rows[row].DataBoundItem as MarcPlanItem;
string list_name = dataGridView1.Rows[row].Cells["list_name"].Value.ToString(); ResultIdx = drow.Idx;//idx;
string date = dataGridView1.Rows[row].Cells["date"].Value.ToString(); ResultListName = drow.ListName;// list_name;
ResultDate = drow.Date;//date;
ResultIdx = idx;
ResultListName = list_name;
ResultDate = date;
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
//mp.mk_Grid(list_name, date);
//mp.mk_Panel(idx, list_name, date);
this.Close(); this.Close();
} }

View File

@@ -103,9 +103,9 @@ namespace UniMarc.마크
// //
// btn_Search // btn_Search
// //
this.btn_Search.Location = new System.Drawing.Point(172, 12); this.btn_Search.Location = new System.Drawing.Point(270, 7);
this.btn_Search.Name = "btn_Search"; this.btn_Search.Name = "btn_Search";
this.btn_Search.Size = new System.Drawing.Size(75, 23); this.btn_Search.Size = new System.Drawing.Size(75, 31);
this.btn_Search.TabIndex = 0; this.btn_Search.TabIndex = 0;
this.btn_Search.Text = "검 색"; this.btn_Search.Text = "검 색";
this.btn_Search.UseVisualStyleBackColor = true; this.btn_Search.UseVisualStyleBackColor = true;
@@ -113,9 +113,9 @@ namespace UniMarc.마크
// //
// btn_Save // btn_Save
// //
this.btn_Save.Location = new System.Drawing.Point(253, 12); this.btn_Save.Location = new System.Drawing.Point(351, 7);
this.btn_Save.Name = "btn_Save"; this.btn_Save.Name = "btn_Save";
this.btn_Save.Size = new System.Drawing.Size(75, 23); this.btn_Save.Size = new System.Drawing.Size(75, 31);
this.btn_Save.TabIndex = 0; this.btn_Save.TabIndex = 0;
this.btn_Save.Text = "마크 저장"; this.btn_Save.Text = "마크 저장";
this.btn_Save.UseVisualStyleBackColor = true; this.btn_Save.UseVisualStyleBackColor = true;

View File

@@ -14,9 +14,11 @@ namespace UniMarc.마크
public partial class Marc_Preview : Form public partial class Marc_Preview : Form
{ {
public string isbn; public string isbn;
AddMarc am; //AddMarc am;
Marc mac; //Marc mac;
public EventHandler<string> ButtonSave;
public Marc_Preview() public Marc_Preview()
{ {
InitializeComponent(); InitializeComponent();
@@ -103,10 +105,11 @@ namespace UniMarc.마크
private void btn_Save_Click(object sender, EventArgs e) private void btn_Save_Click(object sender, EventArgs e)
{ {
if (mac != null) //if (mac != null)
mac.richTextBox1.Text = richTextBox1.Text; // mac.richTextBox1.Text = richTextBox1.Text;
else if (am != null) //else if (am != null)
am.richTextBox1.Text = richTextBox1.Text; // am.richTextBox1.Text = richTextBox1.Text;
ButtonSave?.Invoke(this, richTextBox1.Text);
} }
/// <summary> /// <summary>