Пример #1
0
        /// <summary>
        /// 동적 메뉴  생성 메서드
        /// </summary>
        /// <param name="mdiParent"></param>
        /// <param name="formName"></param>
        /// <returns></returns>
        public static Form MdiChildrenShow(this FrmMAIN mdiParent, string formName)
        {
            Type type = Type.GetType("TEAM3FINAL." + formName);

            if (type != null)
            {
                foreach (Form frm in Application.OpenForms)
                {
                    if (frm.GetType() == type && frm.IsMdiChild)
                    {
                        frm.Dock = DockStyle.Fill;
                        frm.Left = 0;
                        frm.Top  = 0;
                        frm.Activate();
                        frm.BringToFront();
                        return(frm);
                    }
                }

                Form f = (Form)Activator.CreateInstance(type);
                f.MdiParent = mdiParent;
                f.Dock      = DockStyle.Fill;
                f.Left      = 0;
                f.Top       = 0;
                f.Show();

                return(f);
            }
            return(null);
        }
        private void BtnUnSet()
        {
            FrmMAIN frm = (FrmMAIN)this.MdiParent;

            frm.eSearch -= Search;
            frm.eInsert -= Insert;
            frm.eUpdate -= Update;
            frm.eDelete -= Delete;
            frm.ePrint  -= Print;
            frm.eReset  -= Reset;
        }
        /// <summary>
        /// 버튼 이벤트 델리게이트 추가
        /// </summary>
        private void BtnSet()
        {
            FrmMAIN frm = (FrmMAIN)this.MdiParent;

            frm.eSearch += Search;
            frm.eInsert += Insert;
            frm.eUpdate += Update;
            frm.eDelete += Delete;
            frm.ePrint  += Print;
            frm.eReset  += Reset;
        }
        private void FrmFactoryManage_FormClosing(object sender, FormClosingEventArgs e)
        {
            FrmMAIN frm = (FrmMAIN)this.MdiParent;

            frm.eSearch -= Search;
            frm.eInsert -= Insert;
            frm.eDelete -= Delete;
            frm.eUpdate -= Update;
            frm.eReset  -= Reset;
            frm.ePrint  -= Print;
        }
Пример #5
0
        private void FrmWorkRecord_FormClosing(object sender, FormClosingEventArgs e)
        {
            FrmMAIN frm = (FrmMAIN)this.MdiParent;

            frm.eSearch -= Search;
            frm.eInsert -= Insert;
            frm.eDelete -= Delete;
            frm.eUpdate -= Update;
            frm.eReset  -= Reset; //입력필요
            frm.ePrint  -= Print; //입력필요
        }
Пример #6
0
 private void BtnUnSet()
 {
     try
     {
         FrmMAIN frm = (FrmMAIN)this.MdiParent;
         frm.eSearch -= Search;
         frm.eInsert -= Insert;
         frm.eUpdate -= Update;
         frm.eDelete -= Delete;
         frm.ePrint  -= Print;
         frm.eReset  -= Reset;
     }
     catch (Exception err)
     {
         this.Log.WriteError($"[[RECV {this.Name}]]:{err.Message}");
     }
 }
Пример #7
0
 /// <summary>
 /// 버튼 이벤트 델리게이트 추가
 /// </summary>
 private void BtnSet()
 {
     try
     {
         FrmMAIN frm = (FrmMAIN)this.MdiParent;
         frm.eSearch += Search;
         frm.eInsert += Insert;
         frm.eUpdate += Update;
         frm.eDelete += Delete;
         frm.ePrint  += Print;
         frm.eReset  += Reset;
         frm.Readed  += Readed_BarCode;
     }
     catch (Exception err)
     {
         this.Log.WriteError($"[[RECV {this.Name}]]:{err.Message}");
     }
 }