diff --git a/unimarc/unimarc/Main.Designer.cs b/unimarc/unimarc/Main.Designer.cs
index 10aed7e..a000397 100644
--- a/unimarc/unimarc/Main.Designer.cs
+++ b/unimarc/unimarc/Main.Designer.cs
@@ -135,10 +135,14 @@
this.IPText = new System.Windows.Forms.ToolStripLabel();
this.lblStatus = new System.Windows.Forms.ToolStripLabel();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
- this.마크작성1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.mdiTabControl = new System.Windows.Forms.TabControl();
+ this.tabPage1 = new System.Windows.Forms.TabPage();
+ this.tabPage2 = new System.Windows.Forms.TabPage();
+ this.menu_allclose = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.panel1.SuspendLayout();
this.toolStrip1.SuspendLayout();
+ this.mdiTabControl.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
@@ -150,7 +154,8 @@
this.마크ToolStripMenuItem,
this.작업일지ToolStripMenuItem,
this.편의기능ToolStripMenuItem,
- this.마스터ToolStripMenuItem});
+ this.마스터ToolStripMenuItem,
+ this.menu_allclose});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(1259, 24);
@@ -300,14 +305,14 @@
// 송금내역조회
//
this.송금내역조회.Name = "송금내역조회";
- this.송금내역조회.Size = new System.Drawing.Size(180, 22);
+ this.송금내역조회.Size = new System.Drawing.Size(154, 22);
this.송금내역조회.Text = "송금 내역 조회";
this.송금내역조회.Click += new System.EventHandler(this.송금내역조회ToolStripMenuItem_Click);
//
// 송금등록
//
this.송금등록.Name = "송금등록";
- this.송금등록.Size = new System.Drawing.Size(180, 22);
+ this.송금등록.Size = new System.Drawing.Size(154, 22);
this.송금등록.Text = "송금 등록";
this.송금등록.Click += new System.EventHandler(this.송금등록ToolStripMenuItem_Click);
//
@@ -318,7 +323,7 @@
this.매입장부,
this.매입미결제ToolStripMenuItem});
this.매입.Name = "매입";
- this.매입.Size = new System.Drawing.Size(180, 22);
+ this.매입.Size = new System.Drawing.Size(154, 22);
this.매입.Text = "매입";
//
// 매입집계
@@ -351,7 +356,7 @@
this.매출조회,
this.매출집계});
this.매출.Name = "매출";
- this.매출.Size = new System.Drawing.Size(180, 22);
+ this.매출.Size = new System.Drawing.Size(154, 22);
this.매출.Text = "매출";
//
// 매출입력
@@ -385,7 +390,7 @@
// 파트타임관리
//
this.파트타임관리.Name = "파트타임관리";
- this.파트타임관리.Size = new System.Drawing.Size(180, 22);
+ this.파트타임관리.Size = new System.Drawing.Size(154, 22);
this.파트타임관리.Text = "파트타임 관리";
this.파트타임관리.Click += new System.EventHandler(this.파트타임관리ToolStripMenuItem_Click);
//
@@ -417,7 +422,7 @@
// 단축키설정
//
this.단축키설정.Name = "단축키설정";
- this.단축키설정.Size = new System.Drawing.Size(180, 22);
+ this.단축키설정.Size = new System.Drawing.Size(138, 22);
this.단축키설정.Text = "단축키";
this.단축키설정.Visible = false;
this.단축키설정.Click += new System.EventHandler(this.단축키설정ToolStripMenuItem_Click);
@@ -425,14 +430,14 @@
// 매크로문구
//
this.매크로문구.Name = "매크로문구";
- this.매크로문구.Size = new System.Drawing.Size(180, 22);
+ this.매크로문구.Size = new System.Drawing.Size(138, 22);
this.매크로문구.Text = "매크로 문구";
this.매크로문구.Click += new System.EventHandler(this.매크로문구설정ToolStripMenuItem_Click);
//
// 불용어
//
this.불용어.Name = "불용어";
- this.불용어.Size = new System.Drawing.Size(180, 22);
+ this.불용어.Size = new System.Drawing.Size(138, 22);
this.불용어.Text = "불용어";
this.불용어.Visible = false;
this.불용어.Click += new System.EventHandler(this.불용어ToolStripMenuItem_Click);
@@ -440,7 +445,7 @@
// 작업지시서
//
this.작업지시서.Name = "작업지시서";
- this.작업지시서.Size = new System.Drawing.Size(180, 22);
+ this.작업지시서.Size = new System.Drawing.Size(138, 22);
this.작업지시서.Text = "작업지시서";
this.작업지시서.Visible = false;
this.작업지시서.Click += new System.EventHandler(this.작업지시서ToolStripMenuItem_Click);
@@ -448,7 +453,6 @@
// 마크작업
//
this.마크작업.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.마크작성1ToolStripMenuItem,
this.마크작성,
this.마크목록,
this.소장자료검색,
@@ -523,14 +527,14 @@
//
this.목록.Enabled = false;
this.목록.Name = "목록";
- this.목록.Size = new System.Drawing.Size(98, 22);
+ this.목록.Size = new System.Drawing.Size(180, 22);
this.목록.Text = "목록";
this.목록.Click += new System.EventHandler(this.목록_Click);
//
// 편목
//
this.편목.Name = "편목";
- this.편목.Size = new System.Drawing.Size(98, 22);
+ this.편목.Size = new System.Drawing.Size(180, 22);
this.편목.Text = "편목";
this.편목.Click += new System.EventHandler(this.편목ToolStripMenuItem_Click);
//
@@ -612,14 +616,14 @@
// DLS조회
//
this.DLS조회.Name = "DLS조회";
- this.DLS조회.Size = new System.Drawing.Size(154, 22);
+ this.DLS조회.Size = new System.Drawing.Size(180, 22);
this.DLS조회.Text = "DLS_조회/입력";
this.DLS조회.Click += new System.EventHandler(this.dLS조회ToolStripMenuItem_Click);
//
// dLS복본조사
//
this.dLS복본조사.Name = "dLS복본조사";
- this.dLS복본조사.Size = new System.Drawing.Size(154, 22);
+ this.dLS복본조사.Size = new System.Drawing.Size(180, 22);
this.dLS복본조사.Text = "DLS 복본조사";
this.dLS복본조사.Click += new System.EventHandler(this.dLS복본조사ToolStripMenuItem_Click);
//
@@ -1088,24 +1092,56 @@
this.lblStatus.Size = new System.Drawing.Size(27, 22);
this.lblStatus.Text = "WD";
//
- // 마크작성1ToolStripMenuItem
+ // mdiTabControl
//
- this.마크작성1ToolStripMenuItem.Name = "마크작성1ToolStripMenuItem";
- this.마크작성1ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
- this.마크작성1ToolStripMenuItem.Text = "마크 작성(1)";
- this.마크작성1ToolStripMenuItem.Click += new System.EventHandler(this.마크작성1ToolStripMenuItem_Click);
+ this.mdiTabControl.Controls.Add(this.tabPage1);
+ this.mdiTabControl.Controls.Add(this.tabPage2);
+ this.mdiTabControl.Dock = System.Windows.Forms.DockStyle.Fill;
+ this.mdiTabControl.Location = new System.Drawing.Point(0, 88);
+ this.mdiTabControl.Name = "mdiTabControl";
+ this.mdiTabControl.SelectedIndex = 0;
+ this.mdiTabControl.Size = new System.Drawing.Size(1259, 593);
+ this.mdiTabControl.TabIndex = 5;
+ //
+ // tabPage1
+ //
+ this.tabPage1.Location = new System.Drawing.Point(4, 22);
+ this.tabPage1.Name = "tabPage1";
+ this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage1.Size = new System.Drawing.Size(1251, 567);
+ this.tabPage1.TabIndex = 0;
+ this.tabPage1.Text = "tabPage1";
+ this.tabPage1.UseVisualStyleBackColor = true;
+ //
+ // tabPage2
+ //
+ this.tabPage2.Location = new System.Drawing.Point(4, 22);
+ this.tabPage2.Name = "tabPage2";
+ this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
+ this.tabPage2.Size = new System.Drawing.Size(1251, 567);
+ this.tabPage2.TabIndex = 1;
+ this.tabPage2.Text = "tabPage2";
+ this.tabPage2.UseVisualStyleBackColor = true;
+ //
+ // menu_allclose
+ //
+ this.menu_allclose.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
+ this.menu_allclose.Name = "menu_allclose";
+ this.menu_allclose.Size = new System.Drawing.Size(87, 20);
+ this.menu_allclose.Text = "전체 창 닫기";
+ this.menu_allclose.Click += new System.EventHandler(this.menu_allclose_Click);
//
// Main
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1259, 706);
+ this.Controls.Add(this.mdiTabControl);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.panel1);
this.Controls.Add(this.menuStrip1);
this.HelpButton = true;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.IsMdiContainer = true;
this.MainMenuStrip = this.menuStrip1;
this.Name = "Main";
this.Text = "메인";
@@ -1116,6 +1152,7 @@
this.panel1.ResumeLayout(false);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
+ this.mdiTabControl.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -1229,6 +1266,9 @@
private System.Windows.Forms.ToolStripLabel lblStatus;
private System.Windows.Forms.ToolStripMenuItem 복본조사2;
private System.Windows.Forms.ToolStripMenuItem btDevDb;
- private System.Windows.Forms.ToolStripMenuItem 마크작성1ToolStripMenuItem;
+ private System.Windows.Forms.TabControl mdiTabControl;
+ private System.Windows.Forms.TabPage tabPage1;
+ private System.Windows.Forms.TabPage tabPage2;
+ private System.Windows.Forms.ToolStripMenuItem menu_allclose;
}
}
\ No newline at end of file
diff --git a/unimarc/unimarc/Main.cs b/unimarc/unimarc/Main.cs
index 790ff99..705a18c 100644
--- a/unimarc/unimarc/Main.cs
+++ b/unimarc/unimarc/Main.cs
@@ -38,10 +38,13 @@ namespace WindowsFormsApp1
public string DB_User_Data;
public string User;
public string com_idx;
-
+
public Main()
{
InitializeComponent();
+ this.mdiTabControl.TabPages.Clear();
+ this.mdiTabControl.DrawMode = TabDrawMode.OwnerDrawFixed;
+ this.mdiTabControl.DrawItem += MdiTabControl_DrawItem;
PUB.Init();
this.btDevDb.Visible = System.Diagnostics.Debugger.IsAttached;
}
@@ -51,16 +54,20 @@ namespace WindowsFormsApp1
private void Main_Load(object sender, EventArgs e)
{
this.Visible = false; // 메인폼을 먼저 숨김
-
-
- login login = new login();
+
+
VersionText.Text = string.Format("UniMarc Ver.{0}", ip.VersionInfo());
- if (DialogResult.OK == login.ShowDialog(this)) {
- this.Visible = true;
- }
- else {
- this.Close();
+ using (login login = new login())
+ {
+ if (DialogResult.OK == login.ShowDialog(this))
+ {
+ this.Visible = true;
+ }
+ else
+ {
+ this.Close();
+ }
}
_DB.DBcon();
@@ -102,9 +109,6 @@ namespace WindowsFormsApp1
this.Text += $" (Build {Application.ProductVersion})";
}
-
-
-
///
/// factory client update checkd
///
@@ -134,13 +138,10 @@ namespace WindowsFormsApp1
}
}
-
-
-
#region 즐겨찾기 버튼 세팅
public void SetBtnName()
{
- string Area =
+ string Area =
"`ShortCut1`, `ShortCut2`, `ShortCut3`, `ShortCut4`, `ShortCut5`, " +
"`ShortCut6`, `ShortCut7`, `ShortCut8`, `ShortCut9`, `ShortCut10`, " +
"`ShortCut11`, `ShortCut12`";
@@ -235,7 +236,7 @@ namespace WindowsFormsApp1
"송금내역조회", "송금등록", "매입 집계", "매입 장부", "매출 입력",
"매출 입금", "매출 조회", "매출 집계", "파트타임 관리" };
ToolStripMenuItem[] AccT = {
- 송금내역조회, 송금등록, 매입집계, 매입장부, 매출입력,
+ 송금내역조회, 송금등록, 매입집계, 매입장부, 매출입력,
매출입금, 매출조회, 매출집계, 파트타임관리
};
ToolStripMenuItem[] TempAcc = {
@@ -279,15 +280,17 @@ namespace WindowsFormsApp1
for (int a = 0; a < MenuTotal.Length; a++)
{
bool IsText = false;
- for(int b = 0; b < MenuTotal[a].Length; b++)
+ for (int b = 0; b < MenuTotal[a].Length; b++)
{
- if (MenuTotal[a][b].Trim().ToLower() == btnText.Trim().ToLower()) {
+ if (MenuTotal[a][b].Trim().ToLower() == btnText.Trim().ToLower())
+ {
IsText = true;
count[1] = b;
break;
}
}
- if (IsText) {
+ if (IsText)
+ {
count[0] = a;
break;
}
@@ -299,7 +302,8 @@ namespace WindowsFormsApp1
return;
// 권한설정으로 인한 리턴
- if (!MenuCheckT[count[0]][count[1]].Enabled) {
+ if (!MenuCheckT[count[0]][count[1]].Enabled)
+ {
MessageBox.Show("권한이 설정되지 않았습니다!");
return;
}
@@ -389,1162 +393,404 @@ namespace WindowsFormsApp1
#region 홈 탭
// 홈 탭 클릭이벤트
- private User_Infor User_Infor;
- private Home_User_manage home_User_Manage;
- private Transaction_manage Home_transaction_Manage;
- private Order_manage Home_order_Manage;
- private pw_change Home_pw_Change;
- private Book_infor_manage Home_book_Infor_Manage;
- private ledger_of_use Home_ledger_Of_Use;
+ // Fields removed due to OpenFormInTab logic
private void 사용자정보ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (User_Infor != null)
- User_Infor.Focus();
-
- else
+ // User_Infor is special (TopMost), might need check.
+ // Using OpenFormInTab for now, but keeping original behavior if needed.
+ // Original: User_Infor.TopMost = true; User_Infor.Show();
+ OpenFormInTab(() =>
{
- User_Infor = new User_Infor(this);
- User_Infor.TopMost = true;
- User_Infor.FormClosed += (o, ea) => User_Infor = null;
- User_Infor.Show();
- }
- User_Infor.Show();
+ var f = new User_Infor(this);
+ f.TopMost = true;
+ return f;
+ });
}
private void 사용자관리ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (home_User_Manage != null)
- {
- home_User_Manage.Focus();
- }
- else
- {
- home_User_Manage = new Home_User_manage(this);
- home_User_Manage.MdiParent = this;
- home_User_Manage.WindowState = FormWindowState.Maximized;
- home_User_Manage.FormClosed += (o, ea) => home_User_Manage = null;
- home_User_Manage.Show();
- }
+ OpenFormInTab(() => new Home_User_manage(this));
}
private void 납품거래처관리ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Home_transaction_Manage != null)
- {
- Home_transaction_Manage.Focus();
- }
- else
- {
- Home_transaction_Manage = new Transaction_manage(this);
- Home_transaction_Manage.MdiParent = this;
- Home_transaction_Manage.WindowState = FormWindowState.Maximized;
- Home_transaction_Manage.FormClosed += (o, ea) => Home_transaction_Manage = null;
- Home_transaction_Manage.Show();
- }
+ OpenFormInTab(() => new Transaction_manage(this));
}
private void 주문처관리ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Home_order_Manage != null)
- {
- Home_order_Manage.Focus();
- }
- else
- {
- Home_order_Manage = new Order_manage(this);
- Home_order_Manage.MdiParent = this;
- Home_order_Manage.WindowState = FormWindowState.Maximized;
- Home_order_Manage.FormClosed += (o, ea) => Home_order_Manage = null;
- Home_order_Manage.Show();
- }
+ OpenFormInTab(() => new Order_manage(this));
}
private void 비밀번호변경ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Home_pw_Change != null)
- {
- Home_pw_Change.Focus();
- }
- else
- {
- Home_pw_Change = new pw_change(this);
- Home_pw_Change.MdiParent = this;
- Home_pw_Change.WindowState = FormWindowState.Maximized;
- Home_pw_Change.FormClosed += (o, ea) => Home_pw_Change = null;
- Home_pw_Change.Show();
- }
+ OpenFormInTab(() => new pw_change(this));
}
private void 도서정보관리ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Home_book_Infor_Manage != null)
- {
- Home_book_Infor_Manage.Focus();
- }
- else
- {
- Home_book_Infor_Manage = new Book_infor_manage();
- Home_book_Infor_Manage.FormClosed += (o, ea) => Home_book_Infor_Manage = null;
- Home_book_Infor_Manage.Show();
- }
- Home_book_Infor_Manage.Show();
+ OpenFormInTab(() => new Book_infor_manage());
}
private void 사용대장ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Home_ledger_Of_Use != null)
- {
- Home_ledger_Of_Use.Focus();
- }
- else
- {
- Home_ledger_Of_Use = new ledger_of_use(this);
- Home_ledger_Of_Use.MdiParent = this;
- Home_ledger_Of_Use.WindowState = FormWindowState.Maximized;
- Home_ledger_Of_Use.FormClosed += (o, ea) => Home_ledger_Of_Use = null;
- Home_ledger_Of_Use.Show();
- }
+ OpenFormInTab(() => new ledger_of_use(this));
}
#endregion
#region 납품관리 탭
// 납품관리 탭 클릭 이벤트
- Commodity_registration Del_commodity_Registration;
- List_Lookup del_list_lookup;
- List_aggregation del_list_Aggregation;
- Order_input del_order_Input;
- Purchase Del_purchase;
- Input_Lookup_Stock del_input_Lookup_Stock;
- Bring_Back del_bring_Back;
+ // Fields removed due to OpenFormInTab logic
private void 물품등록ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Del_commodity_Registration != null)
- {
- Del_commodity_Registration.Focus();
- }
- else
- {
- Del_commodity_Registration = new Commodity_registration(this);
- Del_commodity_Registration.MdiParent = this;
- Del_commodity_Registration.WindowState = FormWindowState.Maximized;
- Del_commodity_Registration.FormClosed += (o, ea) => Del_commodity_Registration = null;
- Del_commodity_Registration.Show();
- }
+ OpenFormInTab(() => new Commodity_registration(this));
}
private void 목록등록편의ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (del_list_lookup != null)
- {
- del_list_lookup.Focus();
- }
- else
- {
- del_list_lookup = new List_Lookup(this);
- del_list_lookup.MdiParent = this;
- del_list_lookup.WindowState = FormWindowState.Maximized;
- del_list_lookup.FormClosed += (o, ea) => del_list_lookup = null;
- del_list_lookup.Show();
- }
+ OpenFormInTab(() => new List_Lookup(this));
}
private void 목록집계ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (del_list_Aggregation != null)
- {
- del_list_Aggregation.Focus();
- }
- else
- {
- del_list_Aggregation = new List_aggregation(this);
- del_list_Aggregation.MdiParent = this;
- del_list_Aggregation.WindowState = FormWindowState.Maximized;
- del_list_Aggregation.FormClosed += (o, ea) => del_list_Aggregation = null;
- del_list_Aggregation.Show();
- }
+ OpenFormInTab(() => new List_aggregation(this));
}
private void 주문입력ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (del_order_Input != null)
- {
- del_order_Input.Focus();
- }
- else
- {
- del_order_Input = new Order_input(this);
- del_order_Input.MdiParent = this;
- del_order_Input.WindowState = FormWindowState.Maximized;
- del_order_Input.FormClosed += (o, ea) => del_order_Input = null;
- del_order_Input.Show();
- }
+ OpenFormInTab(() => new Order_input(this));
}
private void 매입ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Del_purchase != null)
- {
- Del_purchase.Focus();
- }
- else
- {
- Del_purchase = new Purchase(this);
- Del_purchase.MdiParent = this;
- Del_purchase.WindowState = FormWindowState.Maximized;
- Del_purchase.FormClosed += (o, ea) => Del_purchase = null;
- Del_purchase.Show();
- }
+ OpenFormInTab(() => new Purchase(this));
}
private void 재고입력및조회ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (del_input_Lookup_Stock != null)
- {
- del_input_Lookup_Stock.Focus();
- }
- else
- {
- del_input_Lookup_Stock = new Input_Lookup_Stock(this);
- del_input_Lookup_Stock.MdiParent = this;
- del_input_Lookup_Stock.WindowState = FormWindowState.Maximized;
- del_input_Lookup_Stock.FormClosed += (o, ea) => del_input_Lookup_Stock = null;
- del_input_Lookup_Stock.Show();
- }
+ OpenFormInTab(() => new Input_Lookup_Stock(this));
}
private void 반품처리ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (del_bring_Back != null)
- {
- del_bring_Back.Focus();
- }
- else
- {
- del_bring_Back = new Bring_Back(this);
- del_bring_Back.MdiParent = this;
- del_bring_Back.WindowState = FormWindowState.Maximized;
- del_bring_Back.FormClosed += (o, ea) => del_bring_Back = null;
- del_bring_Back.Show();
- }
+ OpenFormInTab(() => new Bring_Back(this));
}
#endregion
#region 회계 탭
// 회계 탭 클릭 이벤트
- Remit_reg2 Acc_remit_Reg2;
- Purchase_Input Acc_purchase_Input;
- Remit_reg Acc_remit_Reg;
- Purchase_Book Acc_purchase_Book;
- Purchase_Aggregation Acc_purchase_Aggregation;
- Purchase_not_pay Acc_purchase_Not_Pay;
- Sales_Input Acc_sales_Input;
- Sales_In_Pay Acc_sales_In_Pay;
- Sales_Deposit Acc_sales_Deposit;
- Sales_Lookup Acc_sales_Book;
- Sales_Not_Pay Acc_sales_Not_Pay;
- Sales_Book Acc_sales_book;
- Bill_manage Acc_bill_Manage;
- Part_time Acc_part_time;
+ // Fields removed due to OpenFormInTab logic
private void 파트타임관리ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Acc_part_time != null)
- {
- Acc_part_time.Focus();
- }
- else
- {
- Acc_part_time = new Part_time(this);
- Acc_part_time.MdiParent = this;
- // Acc_part_time.WindowState = FormWindowState.Maximized;
- Acc_part_time.FormClosed += (o, ea) => Acc_part_time = null;
- Acc_part_time.Show();
- }
+ OpenFormInTab(() => new Part_time(this));
}
private void 송금등록ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Acc_remit_Reg2 != null)
- {
- Acc_remit_Reg2.Focus();
- }
- else
- {
- Acc_remit_Reg2 = new Remit_reg2(this);
- // Acc_remit_Reg2.MdiParent = this;
- Acc_remit_Reg2.FormClosed += (o, ea) => Acc_remit_Reg2 = null;
- Acc_remit_Reg2.Show();
- }
+ // Acc_remit_Reg2 had commented out MdiParent setting in original code,
+ // but assuming it should be tabbed like others.
+ OpenFormInTab(() => new Remit_reg2(this));
}
private void 송금내역조회ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Acc_remit_Reg != null)
- {
- Acc_remit_Reg.Focus();
- }
- else
- {
- Acc_remit_Reg = new Remit_reg(this);
- Acc_remit_Reg.MdiParent = this;
- Acc_remit_Reg.WindowState = FormWindowState.Maximized;
- Acc_remit_Reg.FormClosed += (o, ea) => Acc_remit_Reg = null;
- Acc_remit_Reg.Show();
- }
+ OpenFormInTab(() => new Remit_reg(this));
}
private void 매입장부ToolStripMenuItem1_Click(object sender, EventArgs e)
{
- if (Acc_purchase_Book != null)
- {
- Acc_purchase_Book.Focus();
- }
- else
- {
- Acc_purchase_Book = new Purchase_Book(this);
- Acc_purchase_Book.MdiParent = this;
- Acc_purchase_Book.WindowState = FormWindowState.Maximized;
- Acc_purchase_Book.FormClosed += (o, ea) => Acc_purchase_Book = null;
- Acc_purchase_Book.Show();
- }
+ OpenFormInTab(() => new Purchase_Book(this));
}
private void 매입집계ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Acc_purchase_Aggregation != null)
- {
- Acc_purchase_Aggregation.Focus();
- }
- else
- {
- Acc_purchase_Aggregation = new Purchase_Aggregation(this);
- Acc_purchase_Aggregation.MdiParent = this;
- Acc_purchase_Aggregation.WindowState = FormWindowState.Maximized;
- Acc_purchase_Aggregation.FormClosed += (o, ea) => Acc_purchase_Aggregation = null;
- Acc_purchase_Aggregation.Show();
- }
+ OpenFormInTab(() => new Purchase_Aggregation(this));
}
-
+
private void 매입미결제ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Acc_purchase_Not_Pay != null)
- {
- Acc_purchase_Not_Pay.Focus();
- }
- else
- {
- Acc_purchase_Not_Pay = new Purchase_not_pay(this);
- Acc_purchase_Not_Pay.MdiParent = this;
- Acc_purchase_Not_Pay.WindowState = FormWindowState.Maximized;
- Acc_purchase_Not_Pay.FormClosed += (o, ea) => Acc_purchase_Not_Pay = null;
- Acc_purchase_Not_Pay.Show();
- }
+ OpenFormInTab(() => new Purchase_not_pay(this));
}
-
+
private void 매출입력ToolStripMenuItem1_Click(object sender, EventArgs e)
{
- if (Acc_sales_Input != null)
- {
- Acc_sales_Input.Focus();
- }
- else
- {
- Acc_sales_Input = new Sales_Input(this);
- Acc_sales_Input.MdiParent = this;
- Acc_sales_Input.WindowState = FormWindowState.Maximized;
- Acc_sales_Input.FormClosed += (o, ea) => Acc_sales_Input = null;
- Acc_sales_Input.Show();
- }
+ OpenFormInTab(() => new Sales_Input(this));
}
private void 매출입금toolStripMenuItem1_Click_1(object sender, EventArgs e)
{
- if (Acc_sales_In_Pay != null)
- {
- Acc_sales_In_Pay.Focus();
- }
- else
- {
- Acc_sales_In_Pay = new Sales_In_Pay(this);
- Acc_sales_In_Pay.FormClosed += (o, ea) => Acc_sales_In_Pay = null;
- Acc_sales_In_Pay.Show();
- }
+ OpenFormInTab(() => new Sales_In_Pay(this));
}
private void 매출입금ToolStripMenuItem1_Click(object sender, EventArgs e)
{
- if (Acc_sales_Deposit != null)
- {
- Acc_sales_Deposit.Focus();
- }
- else
- {
- Acc_sales_Deposit = new Sales_Deposit(this);
- Acc_sales_Deposit.MdiParent = this;
- Acc_sales_Deposit.WindowState = FormWindowState.Maximized;
- Acc_sales_Deposit.FormClosed += (o, ea) => Acc_sales_Deposit = null;
- Acc_sales_Deposit.Show();
- }
+ OpenFormInTab(() => new Sales_Deposit(this));
}
private void 매출장부ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Acc_sales_Book != null)
- {
- Acc_sales_Book.Focus();
- }
- else
- {
- Acc_sales_Book = new Sales_Lookup(this);
- Acc_sales_Book.MdiParent = this;
- Acc_sales_Book.WindowState = FormWindowState.Maximized;
- Acc_sales_Book.FormClosed += (o, ea) => Acc_sales_Book = null;
- Acc_sales_Book.Show();
- }
+ OpenFormInTab(() => new Sales_Lookup(this));
}
private void 매출미수금ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Acc_sales_book != null)
- {
- Acc_sales_book.Focus();
- }
- else
- {
- Acc_sales_book = new Sales_Book(this);
- Acc_sales_book.MdiParent = this;
- Acc_sales_book.WindowState = FormWindowState.Maximized;
- Acc_sales_book.FormClosed += (o, ea) => Acc_sales_book = null;
- Acc_sales_book.Show();
- }
+ OpenFormInTab(() => new Sales_Book(this));
}
private void 매출입금ToolStripMenuItem_Click(object sender, EventArgs e) // 계산서 관리
{
- if (Acc_bill_Manage != null)
- {
- Acc_bill_Manage.Focus();
- }
- else
- {
- Acc_bill_Manage = new Bill_manage(this);
- Acc_bill_Manage.MdiParent = this;
- Acc_bill_Manage.WindowState = FormWindowState.Maximized;
- Acc_bill_Manage.FormClosed += (o, ea) => Acc_bill_Manage = null;
- Acc_bill_Manage.Show();
- }
+ OpenFormInTab(() => new Bill_manage(this));
}
#endregion
- #region 마크 탭
-
#region 설정
-
- Setup_Shortcut Mac_shortcut;
- Set_Macro Mac_set_Macro;
- Nonverbal Mac_nonverbal;
- Job_Order Job_Order;
+ // Fields removed
+ // Mac_shortcut, Mac_set_Macro, Mac_nonverbal, Job_Order removed
private void 단축키설정ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Mac_shortcut != null)
- {
- Mac_shortcut.Focus();
- }
- else
- {
- Mac_shortcut = new Setup_Shortcut(this);
- Mac_shortcut.MdiParent = this;
- Mac_shortcut.WindowState = FormWindowState.Maximized;
- Mac_shortcut.FormClosed += (o, ea) => Mac_shortcut = null;
- Mac_shortcut.Show();
- }
+ OpenFormInTab(() => new Setup_Shortcut(this));
}
private void 매크로문구설정ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Mac_set_Macro != null)
- {
- Mac_set_Macro.Focus();
- }
- else
- {
- Mac_set_Macro = new Set_Macro(this);
- Mac_set_Macro.MdiParent = this;
- Mac_set_Macro.WindowState = FormWindowState.Maximized;
- Mac_set_Macro.FormClosed += (o, ea) => Mac_set_Macro = null;
- Mac_set_Macro.Show();
- }
+ OpenFormInTab(() => new Set_Macro(this));
}
private void 불용어ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Mac_nonverbal != null)
- {
- Mac_nonverbal.Focus();
- }
- else
- {
- Mac_nonverbal = new Nonverbal(this);
- Mac_nonverbal.MdiParent = this;
- Mac_nonverbal.WindowState = FormWindowState.Maximized;
- Mac_nonverbal.FormClosed += (o, ea) => Mac_nonverbal = null;
- Mac_nonverbal.Show();
- }
+ OpenFormInTab(() => new Nonverbal(this));
}
private void 작업지시서ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Job_Order != null)
- {
- Job_Order.Focus();
- }
- else
- {
- Job_Order = new Job_Order(this);
- Job_Order.MdiParent = this;
- Job_Order.WindowState = FormWindowState.Maximized;
- Job_Order.FormClosed += (o, ea) => Job_Order = null;
- Job_Order.Show();
- }
+ OpenFormInTab(() => new Job_Order(this));
}
#endregion
#region 마크 작업
-
- AddMarc AddMarc;
- Mac_List Mac_List;
- Marc_Plan Marc_Plan;
- Search_Infor Mac_search_Infor;
- Check_copy Mac_check_Copy;
- Check_ISBN Mac_check_ISBN;
+ // Fields removed
+ // AddMarc, Mac_List, Marc_Plan, Mac_search_Infor, Mac_check_Copy, Mac_check_ISBN removed
private void 마크작성ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (AddMarc != null)
- AddMarc.Focus();
- else
- {
- AddMarc = new AddMarc(this);
- AddMarc.MdiParent = this;
- AddMarc.WindowState = FormWindowState.Maximized;
- AddMarc.FormClosed += (o, ea) => AddMarc = null;
- AddMarc.Show();
- }
+ OpenFormInTab(() => new AddMarc(this));
}
private void 마크목록ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Mac_List != null)
- {
- Mac_List.Focus();
- }
- else
- {
- Mac_List = new Mac_List(this);
- Mac_List.MdiParent = this;
- Mac_List.WindowState = FormWindowState.Maximized;
- Mac_List.FormClosed += (o, ea) => Mac_List = null;
- Mac_List.Show();
- }
+ OpenFormInTab(() => new Mac_List(this));
}
private void 소장자료검색ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Mac_search_Infor != null)
- {
- Mac_search_Infor.Focus();
- }
- else
- {
- Mac_search_Infor = new Search_Infor(this);
- Mac_search_Infor.MdiParent = this;
- Mac_search_Infor.WindowState = FormWindowState.Maximized;
- Mac_search_Infor.FormClosed += (o, ea) => Mac_search_Infor = null;
- Mac_search_Infor.Show();
- }
+ OpenFormInTab(() => new Search_Infor(this));
}
private void 마크정리ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Marc_Plan != null)
- {
- Marc_Plan.Focus();
- }
- else
- {
- Marc_Plan = new Marc_Plan(this);
- Marc_Plan.MdiParent = this;
- Marc_Plan.WindowState = FormWindowState.Maximized;
- Marc_Plan.FormClosed += (o, ea) => Marc_Plan = null;
- Marc_Plan.Show();
- }
+ OpenFormInTab(() => new Marc_Plan(this));
}
private void 복본조사ToolStripMenuItem1_Click(object sender, EventArgs e)
{
- //if (Mac_check_Copy != null)
- //{
- // Mac_check_Copy.Focus();
- //}
- //else
- //{
- Mac_check_Copy = new Check_copy(this);
- Mac_check_Copy.MdiParent = this;
- Mac_check_Copy.WindowState = FormWindowState.Normal;
- Mac_check_Copy.FormClosed += (o, ea) => Mac_check_Copy = null;
- Mac_check_Copy.Show();
- //}
-
- //foreach (Form frm in Application.OpenForms)
- //{
- // if (frm.Name == "Check_copy")
- // {
- // frm.Activate();
- // return;
- // }
- //}
- //Mac_check_Copy = new Check_copy(this);
- //Mac_check_Copy.Show();
+ // Check_copy seems to be a normal windowstate form, but we convert it to tab as per request.
+ OpenFormInTab(() => new Check_copy(this));
}
private void iSBN조회ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Mac_check_ISBN != null)
+ OpenFormInTab(() =>
{
- Mac_check_ISBN.Focus();
- }
- else
- {
- Mac_check_ISBN = new Check_ISBN(this);
- Mac_check_ISBN.MdiParent = this;
- Mac_check_ISBN.WindowState = FormWindowState.Maximized;
- Mac_check_ISBN.FormClosed += (o, ea) => Mac_check_ISBN = null;
- Mac_check_ISBN.tb_list_name.Enabled = true;
- Mac_check_ISBN.Show();
- }
+ var f = new Check_ISBN(this);
+ f.tb_list_name.Enabled = true;
+ return f;
+ });
}
#endregion
#region DVD / CD / LP
-
- CD_LP cl;
- CD_LP_List cll;
+ // Fields removed
+ // cl, cll removed
private void 편목ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (cl != null)
- {
- cl.Focus();
- }
- else
- {
- cl = new CD_LP(this);
- cl.MdiParent = this;
- cl.WindowState = FormWindowState.Maximized;
- cl.FormClosed += (o, ea) => cl = null;
- cl.Show();
- }
+ OpenFormInTab(() => new CD_LP(this));
}
private void 목록_Click(object sender, EventArgs e)
{
- if (cll != null)
- {
- cll.Focus();
- }
- else
- {
- cll = new CD_LP_List(this);
- cll.MdiParent = this;
- cll.WindowState = FormWindowState.Maximized;
- cll.FormClosed += (o, ea) => cll = null;
- cll.Show();
- }
-
+ OpenFormInTab(() => new CD_LP_List(this));
}
#endregion
#region 반입 및 반출
-
- Mac_Input Mac_Input;
- Mac_Output Mac_Output;
+ // Fields removed
+ // Mac_Input, Mac_Output removed
private void 반입ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Mac_Input != null)
- {
- Mac_Input.Focus();
- }
- else
- {
- Mac_Input = new Mac_Input(this);
- Mac_Input.MdiParent = this;
- Mac_Input.WindowState = FormWindowState.Maximized;
- Mac_Input.FormClosed += (o, ea) => Mac_Input = null;
- Mac_Input.Show();
- }
+ OpenFormInTab(() => new Mac_Input(this));
}
private void 반출ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Mac_Output != null)
- {
- Mac_Output.Focus();
- }
- else
- {
- Mac_Output = new Mac_Output(this);
- Mac_Output.MdiParent = this;
- Mac_Output.WindowState = FormWindowState.Maximized;
- Mac_Output.FormClosed += (o, ea) => Mac_Output = null;
- Mac_Output.Show();
- }
+ OpenFormInTab(() => new Mac_Output(this));
}
#endregion
#region 부가기능
- Collect_Mac Mac_Collect;
- All_Book_manage Mac_all_Book_Manage;
- Mac_Chack_Up Mac_Chack_Up;
- Symbol_Add Mac_symbol_Add;
+ // Fields removed
+ // Mac_Collect, Mac_all_Book_Manage, Mac_Chack_Up, Mac_symbol_Add removed
private void 마크수집ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Mac_Collect != null)
- {
- Mac_Collect.Focus();
- }
- else
- {
- Mac_Collect = new Collect_Mac(this);
- Mac_Collect.MdiParent = this;
- Mac_Collect.WindowState = FormWindowState.Maximized;
- Mac_Collect.FormClosed += (o, ea) => Mac_Collect = null;
- Mac_Collect.Show();
- }
+ OpenFormInTab(() => new Collect_Mac(this));
}
private void 전집관리ToolStripMenuItem1_Click(object sender, EventArgs e)
{
- if (Mac_all_Book_Manage != null)
- {
- Mac_all_Book_Manage.Focus();
- }
- else
- {
- Mac_all_Book_Manage = new All_Book_manage(this);
- Mac_all_Book_Manage.MdiParent = this;
- Mac_all_Book_Manage.WindowState = FormWindowState.Maximized;
- Mac_all_Book_Manage.FormClosed += (o, ea) => Mac_all_Book_Manage = null;
- Mac_all_Book_Manage.Show();
- }
+ OpenFormInTab(() => new All_Book_manage(this));
}
private void 검수ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Mac_Chack_Up != null)
- {
- Mac_Chack_Up.Focus();
- }
- else
- {
- Mac_Chack_Up = new Mac_Chack_Up(this);
- Mac_Chack_Up.MdiParent = this;
- Mac_Chack_Up.WindowState = FormWindowState.Maximized;
- Mac_Chack_Up.FormClosed += (o, ea) => Mac_Chack_Up = null;
- Mac_Chack_Up.Show();
- }
+ OpenFormInTab(() => new Mac_Chack_Up(this));
}
private void 저자기호ToolStripMenuItem_Click(object sender, EventArgs e)
{
- // if (Mac_symbol_Add != null)
- // {
- // Mac_symbol_Add.Focus();
- // }
- // else
- // {
- // Mac_symbol_Add = new Symbol_Add(this);
- // Mac_symbol_Add.MdiParent = this;
- // Mac_symbol_Add.WindowState = FormWindowState.Maximized;
- // Mac_symbol_Add.FormClosed += (o, ea) => Mac_symbol_Add = null;
- // Mac_symbol_Add.Show();
- // }
-
- Mac_symbol_Add = new Symbol_Add(this);
- Mac_symbol_Add.Show();
+ // This was previously directly created and shown without checking active instance in commented out code.
+ // We will assume standard tab behavior is desired.
+ OpenFormInTab(() => new Symbol_Add(this));
}
#endregion
-
+
#region DLS
- School_Lookup DLS_school_Lookup;
- DLS_Copy Mac_dLS_Copy;
+ // Fields removed
+ // DLS_school_Lookup, Mac_dLS_Copy removed
private void dLS조회ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (DLS_school_Lookup != null)
- {
- DLS_school_Lookup.Focus();
- }
- else
- {
- DLS_school_Lookup = new School_Lookup(this);
- DLS_school_Lookup.MdiParent = this;
- DLS_school_Lookup.WindowState = FormWindowState.Maximized;
- DLS_school_Lookup.FormClosed += (o, ea) => DLS_school_Lookup = null;
- DLS_school_Lookup.Show();
- }
+ OpenFormInTab(() => new School_Lookup(this));
}
private void dLS복본조사ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Mac_dLS_Copy != null)
- {
- Mac_dLS_Copy.Focus();
- }
- else
- {
- Mac_dLS_Copy = new DLS_Copy(this);
- Mac_dLS_Copy.MdiParent = this;
- //Mac_dLS_Copy.WindowState = FormWindowState.Maximized;
- Mac_dLS_Copy.FormClosed += (o, ea) => Mac_dLS_Copy = null;
- Mac_dLS_Copy.Show();
- }
+ OpenFormInTab(() => new DLS_Copy(this));
}
#endregion
-
+
#region 기타
-
- Make_Document Make_Document;
- Mac_Stat Mac_Stat;
- Equip_manage Mac_equip_Manage;
+ // Fields removed
+ // Make_Document, Mac_Stat, Mac_equip_Manage removed
private void 서류작성ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Make_Document != null)
- {
- Make_Document.Focus();
- }
- else
- {
- Make_Document = new Make_Document(this);
- Make_Document.MdiParent = this;
- Make_Document.WindowState = FormWindowState.Maximized;
- Make_Document.FormClosed += (o, ea) => Make_Document = null;
- Make_Document.Show();
- }
+ OpenFormInTab(() => new Make_Document(this));
}
private void 마크통계ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (Mac_Stat != null)
- {
- Mac_Stat.Focus();
- }
- else
- {
- Mac_Stat = new Mac_Stat(this);
- Mac_Stat.MdiParent = this;
- Mac_Stat.WindowState = FormWindowState.Maximized;
- Mac_Stat.FormClosed += (o, ea) => Mac_Stat = null;
- Mac_Stat.Show();
- }
+ OpenFormInTab(() => new Mac_Stat(this));
}
private void 장비관리ToolStripMenuItem1_Click(object sender, EventArgs e)
{
- if (Mac_equip_Manage != null)
- {
- Mac_equip_Manage.Focus();
- }
- else
- {
- Mac_equip_Manage = new Equip_manage(this);
- Mac_equip_Manage.MdiParent = this;
- Mac_equip_Manage.WindowState = FormWindowState.Maximized;
- Mac_equip_Manage.FormClosed += (o, ea) => Mac_equip_Manage = null;
- Mac_equip_Manage.Show();
- }
+ OpenFormInTab(() => new Equip_manage(this));
}
#endregion
- #endregion
-
#region 작업일지 탭
// 작업일지 탭 이벤트
- Work_Log work_Log;
+ // 작업일지 탭 이벤트
+ // Fields removed
+ // work_Log removed
private void 작업일지ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (work_Log != null)
- {
- work_Log.Focus();
- }
- else
- {
- work_Log = new Work_Log(this);
- work_Log.MdiParent = this;
- work_Log.WindowState = FormWindowState.Maximized;
- work_Log.FormClosed += (o, ea) => work_Log = null;
- work_Log.Show();
- }
+ OpenFormInTab(() => new Work_Log(this));
}
#endregion
#region 편의기능 탭
// 편의기능 탭 이벤트
- Calendar calendar;
- Talk talk;
- Quick_menu quick_Menu;
- Board board;
- Send_Notice send_Notice;
- Sale_Sale sale_Sale;
- Sale_Settlement sale_Settlement;
- Sale_End sale_End;
- Sale_Member_Manage sale_Member_Manage;
+ // Fields removed
+ // calendar, talk, quick_Menu, board, send_Notice, sale_Sale, sale_Settlement, sale_End, sale_Member_Manage removed
private void 캘린더ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (calendar != null)
- {
- calendar.Focus();
- }
- else
- {
- calendar = new Calendar(this);
- calendar.MdiParent = this;
- calendar.WindowState = FormWindowState.Maximized;
- calendar.FormClosed += (o, ea) => calendar = null;
- calendar.Show();
- }
+ OpenFormInTab(() => new Calendar(this));
}
private void 채팅ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (talk != null)
- {
- talk.Focus();
- }
- else
- {
- talk = new Talk(this);
- talk.MdiParent = this;
- talk.WindowState = FormWindowState.Maximized;
- talk.FormClosed += (o, ea) => talk = null;
- talk.Show();
- }
+ OpenFormInTab(() => new Talk(this));
}
private void 퀵메뉴ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (quick_Menu != null)
- {
- quick_Menu.Focus();
- }
- else
- {
- quick_Menu = new Quick_menu(this);
- quick_Menu.MdiParent = this;
- quick_Menu.WindowState = FormWindowState.Maximized;
- quick_Menu.FormClosed += (o, ea) => quick_Menu = null;
- quick_Menu.Show();
- }
+ OpenFormInTab(() => new Quick_menu(this));
}
private void 게시판ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (board != null)
- {
- board.Focus();
- }
- else
- {
- board = new Board(this);
- board.MdiParent = this;
- board.WindowState = FormWindowState.Maximized;
- board.FormClosed += (o, ea) => board = null;
- board.Show();
- }
+ OpenFormInTab(() => new Board(this));
}
private void 공지발송ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (send_Notice != null)
- {
- send_Notice.Focus();
- }
- else
- {
- send_Notice = new Send_Notice(this);
- send_Notice.MdiParent = this;
- send_Notice.WindowState = FormWindowState.Maximized;
- send_Notice.FormClosed += (o, ea) => send_Notice = null;
- send_Notice.Show();
- }
+ OpenFormInTab(() => new Send_Notice(this));
}
private void 판매ToolStripMenuItem1_Click(object sender, EventArgs e)
{
- if (sale_Sale != null)
- {
- sale_Sale.Focus();
- }
- else
- {
- sale_Sale = new Sale_Sale(this);
- sale_Sale.MdiParent = this;
- sale_Sale.WindowState = FormWindowState.Maximized;
- sale_Sale.FormClosed += (o, ea) => sale_Sale = null;
- sale_Sale.Show();
- }
+ OpenFormInTab(() => new Sale_Sale(this));
}
private void 정산ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (sale_Settlement != null)
- {
- sale_Settlement.Focus();
- }
- else
- {
- sale_Settlement = new Sale_Settlement(this);
- sale_Settlement.MdiParent = this;
- sale_Settlement.WindowState = FormWindowState.Maximized;
- sale_Settlement.FormClosed += (o, ea) => sale_Settlement = null;
- sale_Settlement.Show();
- }
+ OpenFormInTab(() => new Sale_Settlement(this));
}
private void 판매마감ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (sale_End != null)
- {
- sale_End.Focus();
- }
- else
- {
- sale_End = new Sale_End(this);
- sale_End.MdiParent = this;
- sale_End.WindowState = FormWindowState.Maximized;
- sale_End.FormClosed += (o, ea) => sale_End = null;
- sale_End.Show();
- }
+ OpenFormInTab(() => new Sale_End(this));
}
private void 회원관리ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (sale_Member_Manage != null)
- {
- sale_Member_Manage.Focus();
- }
- else
- {
- sale_Member_Manage = new Sale_Member_Manage(this);
- sale_Member_Manage.MdiParent = this;
- sale_Member_Manage.WindowState = FormWindowState.Maximized;
- sale_Member_Manage.FormClosed += (o, ea) => sale_Member_Manage = null;
- sale_Member_Manage.Show();
- }
+ OpenFormInTab(() => new Sale_Member_Manage(this));
}
+
#endregion
#region 마스터 탭
// 마스터 탭 이벤트
- User_manage master_user_Manage;
- Notice_Send master_notice_Send;
- Sales_Details master_sales_Details;
- User_account_inquiry master_user_Account_Inquiry;
- Mac_Setting master_mac_setting;
- Batch_processing master_batch_Processing;
+ // Fields removed
+ // master_user_Manage, master_notice_Send, master_sales_Details, master_user_Account_Inquiry, master_mac_setting, master_batch_Processing removed
private void 신규사업자등록ToolStripMenuItem_Click(object sender, EventArgs e)
{
- //if (master_user_Manage != null)
- //{
- // master_user_Manage.Focus();
- //}
- //else
- //{
- // master_user_Manage = new User_manage(this);
- // master_user_Manage.FormClosed += (o, ea) => master_user_Manage = null;
- // master_user_Manage.Show();
- //}
- From_User_manage_List tUser_mamge = new From_User_manage_List();
- tUser_mamge.ShowDialog();
+ using (From_User_manage_List tUser_mamge = new From_User_manage_List())
+ {
+ tUser_mamge.ShowDialog();
+ }
}
- private void 기존사업자관리ToolStripMenuItem_Click(object sender, EventArgs e)
- {
-
- }
private void 공지발송ToolStripMenuItem1_Click(object sender, EventArgs e)
{
- if (master_notice_Send != null)
- {
- master_notice_Send.Focus();
- }
- else
- {
- master_notice_Send = new Notice_Send(this);
- master_notice_Send.MdiParent = this;
- master_notice_Send.WindowState = FormWindowState.Maximized;
- master_notice_Send.FormClosed += (o, ea) => master_notice_Send = null;
- master_notice_Send.Show();
- }
+ OpenFormInTab(() => new Notice_Send(this));
}
private void 매출내역ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (master_sales_Details != null)
- {
- master_sales_Details.Focus();
- }
- else
- {
- master_sales_Details = new Sales_Details(this);
- master_sales_Details.MdiParent = this;
- master_sales_Details.WindowState = FormWindowState.Maximized;
- master_sales_Details.FormClosed += (o, ea) => master_sales_Details = null;
- master_sales_Details.Show();
- }
+ OpenFormInTab(() => new Sales_Details(this));
}
private void 이용자거래처조회ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (master_user_Account_Inquiry != null)
- {
- master_user_Account_Inquiry.Focus();
- }
- else
- {
- master_user_Account_Inquiry = new User_account_inquiry(this);
- master_user_Account_Inquiry.MdiParent = this;
- master_user_Account_Inquiry.WindowState = FormWindowState.Maximized;
- master_user_Account_Inquiry.FormClosed += (o, ea) => master_user_Account_Inquiry = null;
- master_user_Account_Inquiry.Show();
- }
+ OpenFormInTab(() => new User_account_inquiry(this));
}
private void 마크설정ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (master_mac_setting != null)
- {
- master_mac_setting.Focus();
- }
- else
- {
- master_mac_setting = new Mac_Setting(this);
- master_mac_setting.MdiParent = this;
- master_mac_setting.WindowState = FormWindowState.Maximized;
- master_mac_setting.FormClosed += (o, ea) => master_mac_setting = null;
- master_mac_setting.Show();
- }
+ OpenFormInTab(() => new Mac_Setting(this));
}
private void 일괄처리관리ToolStripMenuItem_Click(object sender, EventArgs e)
{
- if (master_batch_Processing != null)
- {
- master_batch_Processing.Focus();
- }
- else
- {
- master_batch_Processing = new Batch_processing(this);
- master_batch_Processing.MdiParent = this;
- //master_batch_Processing.WindowState = FormWindowState.Maximized;
- master_batch_Processing.FormClosed += (o, ea) => master_batch_Processing = null;
- master_batch_Processing.Show();
- }
+ OpenFormInTab(() => new Batch_processing(this));
}
- #endregion
-
+
private void 복본조사2_Click(object sender, EventArgs e)
{
- var Mac_check_Copy = new Check_copyWD(this);
- Mac_check_Copy.MdiParent = this;
- Mac_check_Copy.WindowState = FormWindowState.Normal;
- Mac_check_Copy.FormClosed += (o, ea) => Mac_check_Copy = null;
- Mac_check_Copy.Show();
+ OpenFormInTab(() =>
+ {
+ var f = new Check_copyWD(this);
+ f.WindowState = FormWindowState.Normal;
+ return f;
+ });
}
private void btDevDb_Click(object sender, EventArgs e)
@@ -1553,17 +799,103 @@ namespace WindowsFormsApp1
f.Show();
}
- private void 마크작성1ToolStripMenuItem_Click(object sender, EventArgs e)
+ #endregion
+
+ private void AddTabForm(Form form)
{
- ExcelTest.Marc marc = new ExcelTest.Marc();
- marc.MdiParent = this;
- marc.WindowState = FormWindowState.Maximized;
- marc.Show();
- marc.input_list(
- "-1",
- string.Empty, this.com_idx,
- string.Empty, string.Empty
- );
+ form.TopLevel = false;
+ form.FormBorderStyle = FormBorderStyle.None;
+ form.Dock = DockStyle.Fill;
+
+ TabPage tb = new TabPage();
+ tb.Name = form.GetType().Name + "_" + form.GetHashCode(); // Unique name
+ tb.Text = form.Text;
+ tb.Tag = form; // Store form reference
+ tb.Controls.Add(form);
+
+ mdiTabControl.TabPages.Add(tb);
+ mdiTabControl.SelectedTab = tb;
+
+ form.Show();
+
+ // Handle Close
+ form.FormClosed += (s, e) =>
+ {
+ mdiTabControl.TabPages.Remove(tb);
+ tb.Dispose();
+ };
+
+ // Sync Text changes if necessary
+ form.TextChanged += (s, e) => { tb.Text = form.Text; };
+ }
+
+ private void MdiTabControl_DrawItem(object sender, DrawItemEventArgs e)
+ {
+ TabControl tc = sender as TabControl;
+ TabPage page = tc.TabPages[e.Index];
+ Rectangle bounds = e.Bounds;
+
+ // Determine colors
+ Color backColor = (e.State == DrawItemState.Selected) ? Color.Lime : SystemColors.Control;
+ Color foreColor = (e.State == DrawItemState.Selected) ? Color.Black : Color.Black;
+
+ // Fill background
+ using (SolidBrush brush = new SolidBrush(backColor))
+ {
+ e.Graphics.FillRectangle(brush, bounds);
+ }
+
+ // Draw text
+ TextRenderer.DrawText(e.Graphics, page.Text, page.Font, bounds, foreColor, TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter);
+ }
+
+ public T OpenFormInTab(Func createForm, bool allowMultiple = false) where T : Form
+ {
+ // Check if form is already open in tabs
+ if (!allowMultiple)
+ {
+ foreach (TabPage tb in mdiTabControl.TabPages)
+ {
+ if (tb.Tag is T)
+ {
+ mdiTabControl.SelectedTab = tb;
+ ((Form)tb.Tag).Focus();
+ return (T)tb.Tag;
+ }
+ }
+ }
+
+ // Not found, create and add
+ T form = createForm();
+ AddTabForm(form);
+ return form;
+ }
+
+ private void FocusTabFor(Form form)
+ {
+ foreach (TabPage tb in mdiTabControl.TabPages)
+ {
+ if (tb.Tag == form)
+ {
+ mdiTabControl.SelectedTab = tb;
+ form.Focus();
+ return;
+ }
+ }
+ }
+
+ private void menu_allclose_Click(object sender, EventArgs e)
+ {
+ // Create a copy of the list since closing forms modifies the collection
+ var tabs = mdiTabControl.TabPages.Cast().ToList();
+
+ foreach (TabPage tb in tabs)
+ {
+ if (tb.Tag is Form form)
+ {
+ form.Close();
+ }
+ }
}
}
}
\ No newline at end of file
diff --git a/unimarc/unimarc/마크/DLS_Copy.Designer.cs b/unimarc/unimarc/마크/DLS_Copy.Designer.cs
index 5ed57e8..11a7104 100644
--- a/unimarc/unimarc/마크/DLS_Copy.Designer.cs
+++ b/unimarc/unimarc/마크/DLS_Copy.Designer.cs
@@ -43,6 +43,8 @@
this.chk_spChar = new System.Windows.Forms.CheckBox();
this.btn_ApplyFilter = new System.Windows.Forms.Button();
this.panel3 = new System.Windows.Forms.Panel();
+ this.label3 = new System.Windows.Forms.Label();
+ this.nudAddDelay = new System.Windows.Forms.NumericUpDown();
this.chkShowBrowser = new System.Windows.Forms.CheckBox();
this.label2 = new System.Windows.Forms.Label();
this.rBtn_ISBN = new System.Windows.Forms.RadioButton();
@@ -59,25 +61,23 @@
this.tb_SearchClient = new System.Windows.Forms.TextBox();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.lblStatus = new System.Windows.Forms.ToolStripLabel();
- this.label3 = new System.Windows.Forms.Label();
- this.nudAddDelay = new System.Windows.Forms.NumericUpDown();
+ this.btn_Close = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.panel8.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit();
this.panel5.SuspendLayout();
this.panel3.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.nudAddDelay)).BeginInit();
this.panel2.SuspendLayout();
this.statusStrip1.SuspendLayout();
- ((System.ComponentModel.ISupportInitialize)(this.nudAddDelay)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(8, 6);
- this.label1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.label1.Location = new System.Drawing.Point(7, 5);
this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(88, 31);
+ this.label1.Size = new System.Drawing.Size(77, 25);
this.label1.TabIndex = 0;
this.label1.Text = "납품처명";
this.label1.Click += new System.EventHandler(this.label1_Click);
@@ -91,19 +91,17 @@
this.panel1.Controls.Add(this.panel2);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0);
- this.panel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(731, 879);
+ this.panel1.Size = new System.Drawing.Size(640, 699);
this.panel1.TabIndex = 1;
//
// panel8
//
this.panel8.Controls.Add(this.dv1);
this.panel8.Dock = System.Windows.Forms.DockStyle.Fill;
- this.panel8.Location = new System.Drawing.Point(0, 127);
- this.panel8.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.panel8.Location = new System.Drawing.Point(0, 103);
this.panel8.Name = "panel8";
- this.panel8.Size = new System.Drawing.Size(729, 750);
+ this.panel8.Size = new System.Drawing.Size(638, 594);
this.panel8.TabIndex = 5;
//
// dv1
@@ -118,11 +116,10 @@
this.dvc_Remark});
this.dv1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dv1.Location = new System.Drawing.Point(0, 0);
- this.dv1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.dv1.Name = "dv1";
this.dv1.RowHeadersWidth = 31;
this.dv1.RowTemplate.Height = 23;
- this.dv1.Size = new System.Drawing.Size(729, 750);
+ this.dv1.Size = new System.Drawing.Size(638, 594);
this.dv1.TabIndex = 0;
this.dv1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
this.dv1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
@@ -165,18 +162,16 @@
this.panel5.Controls.Add(this.chk_spChar);
this.panel5.Controls.Add(this.btn_ApplyFilter);
this.panel5.Dock = System.Windows.Forms.DockStyle.Top;
- this.panel5.Location = new System.Drawing.Point(0, 84);
- this.panel5.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.panel5.Location = new System.Drawing.Point(0, 68);
this.panel5.Name = "panel5";
- this.panel5.Size = new System.Drawing.Size(729, 43);
+ this.panel5.Size = new System.Drawing.Size(638, 35);
this.panel5.TabIndex = 4;
//
// btn_ResultEmpty
//
- this.btn_ResultEmpty.Location = new System.Drawing.Point(546, 5);
- this.btn_ResultEmpty.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.btn_ResultEmpty.Location = new System.Drawing.Point(478, 4);
this.btn_ResultEmpty.Name = "btn_ResultEmpty";
- this.btn_ResultEmpty.Size = new System.Drawing.Size(86, 30);
+ this.btn_ResultEmpty.Size = new System.Drawing.Size(75, 24);
this.btn_ResultEmpty.TabIndex = 6;
this.btn_ResultEmpty.Text = "결과 비움";
this.btn_ResultEmpty.UseVisualStyleBackColor = true;
@@ -184,10 +179,9 @@
//
// btn_GridReset
//
- this.btn_GridReset.Location = new System.Drawing.Point(634, 5);
- this.btn_GridReset.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.btn_GridReset.Location = new System.Drawing.Point(555, 4);
this.btn_GridReset.Name = "btn_GridReset";
- this.btn_GridReset.Size = new System.Drawing.Size(86, 30);
+ this.btn_GridReset.Size = new System.Drawing.Size(75, 24);
this.btn_GridReset.TabIndex = 7;
this.btn_GridReset.Text = "표 비우기";
this.btn_GridReset.UseVisualStyleBackColor = true;
@@ -196,10 +190,9 @@
// chk_RemoveBrit
//
this.chk_RemoveBrit.AutoSize = true;
- this.chk_RemoveBrit.Location = new System.Drawing.Point(133, 10);
- this.chk_RemoveBrit.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.chk_RemoveBrit.Location = new System.Drawing.Point(116, 8);
this.chk_RemoveBrit.Name = "chk_RemoveBrit";
- this.chk_RemoveBrit.Size = new System.Drawing.Size(159, 19);
+ this.chk_RemoveBrit.Size = new System.Drawing.Size(128, 16);
this.chk_RemoveBrit.TabIndex = 3;
this.chk_RemoveBrit.Text = "괄호안의 문자 제거";
this.chk_RemoveBrit.UseVisualStyleBackColor = true;
@@ -207,10 +200,9 @@
// chk_spChar
//
this.chk_spChar.AutoSize = true;
- this.chk_spChar.Location = new System.Drawing.Point(11, 10);
- this.chk_spChar.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.chk_spChar.Location = new System.Drawing.Point(10, 8);
this.chk_spChar.Name = "chk_spChar";
- this.chk_spChar.Size = new System.Drawing.Size(124, 19);
+ this.chk_spChar.Size = new System.Drawing.Size(100, 16);
this.chk_spChar.TabIndex = 4;
this.chk_spChar.Text = "특수문자 제거";
this.chk_spChar.UseVisualStyleBackColor = true;
@@ -218,10 +210,9 @@
// btn_ApplyFilter
//
this.btn_ApplyFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btn_ApplyFilter.Location = new System.Drawing.Point(295, 5);
- this.btn_ApplyFilter.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.btn_ApplyFilter.Location = new System.Drawing.Point(258, 4);
this.btn_ApplyFilter.Name = "btn_ApplyFilter";
- this.btn_ApplyFilter.Size = new System.Drawing.Size(86, 30);
+ this.btn_ApplyFilter.Size = new System.Drawing.Size(75, 24);
this.btn_ApplyFilter.TabIndex = 5;
this.btn_ApplyFilter.Text = "필터적용";
this.btn_ApplyFilter.UseVisualStyleBackColor = true;
@@ -239,22 +230,37 @@
this.panel3.Controls.Add(this.btn_Search);
this.panel3.Controls.Add(this.rBtn_BookName);
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
- this.panel3.Location = new System.Drawing.Point(0, 41);
- this.panel3.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.panel3.Location = new System.Drawing.Point(0, 33);
this.panel3.Name = "panel3";
- this.panel3.Size = new System.Drawing.Size(729, 43);
+ this.panel3.Size = new System.Drawing.Size(638, 35);
this.panel3.TabIndex = 4;
//
+ // label3
+ //
+ this.label3.AutoSize = true;
+ this.label3.Location = new System.Drawing.Point(517, 10);
+ this.label3.Name = "label3";
+ this.label3.Size = new System.Drawing.Size(53, 12);
+ this.label3.TabIndex = 211;
+ this.label3.Text = "추가지연";
+ //
+ // nudAddDelay
+ //
+ this.nudAddDelay.Location = new System.Drawing.Point(576, 6);
+ this.nudAddDelay.Name = "nudAddDelay";
+ this.nudAddDelay.Size = new System.Drawing.Size(56, 21);
+ this.nudAddDelay.TabIndex = 210;
+ this.nudAddDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ //
// chkShowBrowser
//
this.chkShowBrowser.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkShowBrowser.AutoSize = true;
this.chkShowBrowser.Checked = true;
this.chkShowBrowser.CheckState = System.Windows.Forms.CheckState.Checked;
- this.chkShowBrowser.Location = new System.Drawing.Point(395, 11);
- this.chkShowBrowser.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.chkShowBrowser.Location = new System.Drawing.Point(354, 9);
this.chkShowBrowser.Name = "chkShowBrowser";
- this.chkShowBrowser.Size = new System.Drawing.Size(119, 19);
+ this.chkShowBrowser.Size = new System.Drawing.Size(96, 16);
this.chkShowBrowser.TabIndex = 209;
this.chkShowBrowser.Text = "브라우저표시";
this.chkShowBrowser.UseVisualStyleBackColor = true;
@@ -262,9 +268,9 @@
// label2
//
this.label2.AutoSize = true;
- this.label2.Location = new System.Drawing.Point(8, 14);
+ this.label2.Location = new System.Drawing.Point(7, 11);
this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(67, 15);
+ this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 3;
this.label2.Text = "검색조건";
//
@@ -272,10 +278,9 @@
//
this.rBtn_ISBN.AutoSize = true;
this.rBtn_ISBN.Checked = true;
- this.rBtn_ISBN.Location = new System.Drawing.Point(175, 11);
- this.rBtn_ISBN.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.rBtn_ISBN.Location = new System.Drawing.Point(153, 9);
this.rBtn_ISBN.Name = "rBtn_ISBN";
- this.rBtn_ISBN.Size = new System.Drawing.Size(60, 19);
+ this.rBtn_ISBN.Size = new System.Drawing.Size(51, 16);
this.rBtn_ISBN.TabIndex = 4;
this.rBtn_ISBN.TabStop = true;
this.rBtn_ISBN.Text = "ISBN";
@@ -283,10 +288,9 @@
//
// btnStop
//
- this.btnStop.Location = new System.Drawing.Point(323, 6);
- this.btnStop.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.btnStop.Location = new System.Drawing.Point(283, 5);
this.btnStop.Name = "btnStop";
- this.btnStop.Size = new System.Drawing.Size(74, 29);
+ this.btnStop.Size = new System.Drawing.Size(65, 23);
this.btnStop.TabIndex = 2;
this.btnStop.Text = "중 지";
this.btnStop.UseVisualStyleBackColor = true;
@@ -294,10 +298,9 @@
//
// btn_Search
//
- this.btn_Search.Location = new System.Drawing.Point(248, 6);
- this.btn_Search.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.btn_Search.Location = new System.Drawing.Point(217, 5);
this.btn_Search.Name = "btn_Search";
- this.btn_Search.Size = new System.Drawing.Size(74, 29);
+ this.btn_Search.Size = new System.Drawing.Size(65, 23);
this.btn_Search.TabIndex = 2;
this.btn_Search.Text = "검 색";
this.btn_Search.UseVisualStyleBackColor = true;
@@ -306,10 +309,9 @@
// rBtn_BookName
//
this.rBtn_BookName.AutoSize = true;
- this.rBtn_BookName.Location = new System.Drawing.Point(78, 11);
- this.rBtn_BookName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.rBtn_BookName.Location = new System.Drawing.Point(68, 9);
this.rBtn_BookName.Name = "rBtn_BookName";
- this.rBtn_BookName.Size = new System.Drawing.Size(73, 19);
+ this.rBtn_BookName.Size = new System.Drawing.Size(59, 16);
this.rBtn_BookName.TabIndex = 4;
this.rBtn_BookName.Text = "도서명";
this.rBtn_BookName.UseVisualStyleBackColor = true;
@@ -317,6 +319,7 @@
// panel2
//
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.panel2.Controls.Add(this.btn_Close);
this.panel2.Controls.Add(this.btn_SiteDenote);
this.panel2.Controls.Add(this.btn_Connect);
this.panel2.Controls.Add(this.lbl_PW);
@@ -327,18 +330,16 @@
this.panel2.Controls.Add(this.tb_SearchClient);
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0);
- this.panel2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panel2.Name = "panel2";
- this.panel2.Size = new System.Drawing.Size(729, 41);
+ this.panel2.Size = new System.Drawing.Size(638, 33);
this.panel2.TabIndex = 3;
//
// btn_SiteDenote
//
this.btn_SiteDenote.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btn_SiteDenote.Location = new System.Drawing.Point(634, 6);
- this.btn_SiteDenote.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.btn_SiteDenote.Location = new System.Drawing.Point(479, 5);
this.btn_SiteDenote.Name = "btn_SiteDenote";
- this.btn_SiteDenote.Size = new System.Drawing.Size(88, 29);
+ this.btn_SiteDenote.Size = new System.Drawing.Size(77, 23);
this.btn_SiteDenote.TabIndex = 6;
this.btn_SiteDenote.Text = "사이트 표출";
this.btn_SiteDenote.UseVisualStyleBackColor = true;
@@ -347,10 +348,9 @@
// btn_Connect
//
this.btn_Connect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.btn_Connect.Location = new System.Drawing.Point(547, 6);
- this.btn_Connect.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.btn_Connect.Location = new System.Drawing.Point(406, 5);
this.btn_Connect.Name = "btn_Connect";
- this.btn_Connect.Size = new System.Drawing.Size(80, 29);
+ this.btn_Connect.Size = new System.Drawing.Size(70, 23);
this.btn_Connect.TabIndex = 5;
this.btn_Connect.Text = "접속";
this.btn_Connect.UseVisualStyleBackColor = true;
@@ -359,36 +359,36 @@
// lbl_PW
//
this.lbl_PW.AutoSize = true;
- this.lbl_PW.Location = new System.Drawing.Point(339, 46);
+ this.lbl_PW.Location = new System.Drawing.Point(297, 37);
this.lbl_PW.Name = "lbl_PW";
- this.lbl_PW.Size = new System.Drawing.Size(31, 15);
+ this.lbl_PW.Size = new System.Drawing.Size(23, 12);
this.lbl_PW.TabIndex = 3;
this.lbl_PW.Text = "PW";
//
// lbl_Area
//
this.lbl_Area.AutoSize = true;
- this.lbl_Area.Location = new System.Drawing.Point(111, 46);
+ this.lbl_Area.Location = new System.Drawing.Point(97, 37);
this.lbl_Area.Name = "lbl_Area";
- this.lbl_Area.Size = new System.Drawing.Size(36, 15);
+ this.lbl_Area.Size = new System.Drawing.Size(31, 12);
this.lbl_Area.TabIndex = 3;
this.lbl_Area.Text = "Area";
//
// lbl_ID
//
this.lbl_ID.AutoSize = true;
- this.lbl_ID.Location = new System.Drawing.Point(211, 46);
+ this.lbl_ID.Location = new System.Drawing.Point(185, 37);
this.lbl_ID.Name = "lbl_ID";
- this.lbl_ID.Size = new System.Drawing.Size(20, 15);
+ this.lbl_ID.Size = new System.Drawing.Size(16, 12);
this.lbl_ID.TabIndex = 3;
this.lbl_ID.Text = "ID";
//
// lbl_Client
//
this.lbl_Client.AutoSize = true;
- this.lbl_Client.Location = new System.Drawing.Point(8, 46);
+ this.lbl_Client.Location = new System.Drawing.Point(7, 37);
this.lbl_Client.Name = "lbl_Client";
- this.lbl_Client.Size = new System.Drawing.Size(43, 15);
+ this.lbl_Client.Size = new System.Drawing.Size(37, 12);
this.lbl_Client.TabIndex = 3;
this.lbl_Client.Text = "Client";
//
@@ -397,10 +397,9 @@
this.tb_SearchClient.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tb_SearchClient.ImeMode = System.Windows.Forms.ImeMode.Hangul;
- this.tb_SearchClient.Location = new System.Drawing.Point(87, 8);
- this.tb_SearchClient.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
+ this.tb_SearchClient.Location = new System.Drawing.Point(76, 6);
this.tb_SearchClient.Name = "tb_SearchClient";
- this.tb_SearchClient.Size = new System.Drawing.Size(453, 25);
+ this.tb_SearchClient.Size = new System.Drawing.Size(326, 21);
this.tb_SearchClient.TabIndex = 1;
this.tb_SearchClient.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_SearchClient_KeyDown);
//
@@ -409,46 +408,36 @@
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.lblStatus});
- this.statusStrip1.Location = new System.Drawing.Point(0, 879);
+ this.statusStrip1.Location = new System.Drawing.Point(0, 699);
this.statusStrip1.Name = "statusStrip1";
- this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 16, 0);
- this.statusStrip1.Size = new System.Drawing.Size(731, 22);
+ this.statusStrip1.Size = new System.Drawing.Size(640, 22);
this.statusStrip1.TabIndex = 3;
this.statusStrip1.Text = "statusStrip1";
//
// lblStatus
//
this.lblStatus.Name = "lblStatus";
- this.lblStatus.Size = new System.Drawing.Size(34, 20);
+ this.lblStatus.Size = new System.Drawing.Size(27, 20);
this.lblStatus.Text = "WD";
this.lblStatus.Click += new System.EventHandler(this.lblStatus_Click);
//
- // label3
+ // btn_Close
//
- this.label3.AutoSize = true;
- this.label3.Location = new System.Drawing.Point(591, 13);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(67, 15);
- this.label3.TabIndex = 211;
- this.label3.Text = "추가지연";
- //
- // nudAddDelay
- //
- this.nudAddDelay.Location = new System.Drawing.Point(658, 8);
- this.nudAddDelay.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
- this.nudAddDelay.Name = "nudAddDelay";
- this.nudAddDelay.Size = new System.Drawing.Size(64, 25);
- this.nudAddDelay.TabIndex = 210;
- this.nudAddDelay.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
+ this.btn_Close.Location = new System.Drawing.Point(559, 4);
+ this.btn_Close.Name = "btn_Close";
+ this.btn_Close.Size = new System.Drawing.Size(75, 24);
+ this.btn_Close.TabIndex = 7;
+ this.btn_Close.Text = "닫 기";
+ this.btn_Close.UseVisualStyleBackColor = true;
+ this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
//
// DLS_Copy
//
- this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(731, 901);
+ this.ClientSize = new System.Drawing.Size(640, 721);
this.Controls.Add(this.panel1);
this.Controls.Add(this.statusStrip1);
- this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "DLS_Copy";
this.Text = "DLS 복본조사";
this.Load += new System.EventHandler(this.DLS_Copy_Load);
@@ -459,11 +448,11 @@
this.panel5.PerformLayout();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.nudAddDelay)).EndInit();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
- ((System.ComponentModel.ISupportInitialize)(this.nudAddDelay)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -504,5 +493,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn dvc_Remark;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.NumericUpDown nudAddDelay;
+ private System.Windows.Forms.Button btn_Close;
}
}
\ No newline at end of file
diff --git a/unimarc/unimarc/마크/DLS_Copy.cs b/unimarc/unimarc/마크/DLS_Copy.cs
index 0b50dd2..05a3696 100644
--- a/unimarc/unimarc/마크/DLS_Copy.cs
+++ b/unimarc/unimarc/마크/DLS_Copy.cs
@@ -412,5 +412,10 @@ namespace WindowsFormsApp1.Mac
dv1.Rows[a].Cells[booknamecol].Value = st.RemoveWordInBracket(Target).Trim();
}
}
+
+ private void btn_Close_Click(object sender, EventArgs e)
+ {
+ this.Close();
+ }
}
}
diff --git a/unimarc/unimarc/마크/DLS_Copy.resx b/unimarc/unimarc/마크/DLS_Copy.resx
index 7a575ec..2e0b4d2 100644
--- a/unimarc/unimarc/마크/DLS_Copy.resx
+++ b/unimarc/unimarc/마크/DLS_Copy.resx
@@ -129,6 +129,18 @@
True
+
+ True
+
+
+ True
+
+
+ True
+
+
+ True
+
17, 17
diff --git a/unimarc/unimarc/마크/Mac_List.cs b/unimarc/unimarc/마크/Mac_List.cs
index c9b9bb9..5c67520 100644
--- a/unimarc/unimarc/마크/Mac_List.cs
+++ b/unimarc/unimarc/마크/Mac_List.cs
@@ -312,19 +312,14 @@ namespace WindowsFormsApp1.Mac
int idx_col = e.ColumnIndex;
if (3 <= idx_col && idx_col <= 8)
{
- ExcelTest.Marc marc = new ExcelTest.Marc(this);
- marc.MdiParent = main;
- marc.WindowState = FormWindowState.Maximized;
- marc.Show();
+ var marc = this.main.OpenFormInTab(() => new ExcelTest.Marc(this), allowMultiple: true);
+
marc.input_list(
dataGridView1.Rows[idx_row].Cells["idx"].Value.ToString(),
dataGridView1.Rows[idx_row].Cells["list_name"].Value.ToString(), compidx,
(dataGridView1.Rows[idx_row].Cells["dvc_cust"]?.Value.ToString() ?? string.Empty),
(dataGridView1.Rows[idx_row].Cells["dvc_custname"]?.Value.ToString() ?? string.Empty)
);
- /// marc.input_list(
- /// dataGridView1.Rows[idx_row].Cells["idx"].Value.ToString(),
- /// dataGridView1.Rows[idx_row].Cells["list_name"].Value.ToString());
}
if (((DataGridView)sender).Columns[idx_col].Name == "check")
{
diff --git a/unimarc/unimarc/마크/Marc.cs b/unimarc/unimarc/마크/Marc.cs
index 3796a30..dde4f25 100644
--- a/unimarc/unimarc/마크/Marc.cs
+++ b/unimarc/unimarc/마크/Marc.cs
@@ -210,6 +210,14 @@ namespace ExcelTest
public void input_list(string l_idx, string value, string C_idx, string custidx, string custname)
{
db.DBcon();
+ if (value.isEmpty() == false)
+ {
+ if (value.IndexOf("]") != -1)
+ this.Text = $"마크 작성(1)-{value.Substring(value.IndexOf("]")+1)}";
+ else
+ this.Text = $"마크 작성(1){value}";
+ }
+
this.l_idx = l_idx;
this.c_idx = C_idx;
string Area = "`idx`, `isbn_marc`, `header`, `num`, `book_name`, `author`, `book_comp`, `count`, `pay`, `image_url`, `m_idx`";
@@ -269,7 +277,7 @@ namespace ExcelTest
mLoadCompleted = true;
List_Book.ClearSelection();
- if(this.List_Book.RowCount > 0)
+ if (this.List_Book.RowCount > 0)
List_Book.Rows[0].Selected = true;
}
@@ -3759,7 +3767,7 @@ namespace ExcelTest
DataGridViewRow selectedRow = List_Book.SelectedRows[0];
int nRow = List_Book.Rows.Add();
DataGridViewRow newRow = List_Book.Rows[nRow];
-
+
for (int i = 0; i < selectedRow.Cells.Count; i++)
{
newRow.Cells[i].Value = selectedRow.Cells[i].Value;