Example #1
0
        void tsilReminder_Click(object sender, EventArgs e)
        {
            Form frm = new Epoint.Systems.Customizes.frmView();

            frm.Size = new System.Drawing.Size(300, 200);
            frm.Controls.Add(this.ucModuleManagement);
            frm.Tag             = "RMD";
            frm.Name            = "frmRMD";
            frm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            frm.MinimizeBox     = false;
            frm.MaximizeBox     = false;
            frm.StartPosition   = FormStartPosition.CenterParent;
            frm.Text            = Languages.GetLanguage("Reminder");
            this.ucModuleManagement.Location                = new Point(0, 0);
            this.ucModuleManagement.lvReminder.Visible      = true;
            this.ucModuleManagement.lvOpeningModule.Visible = false;
            this.ucModuleManagement.Height = this.UcModuleHeight;
            this.ucModuleManagement.Dock   = DockStyle.Fill;
            frm.FormClosed += new FormClosedEventHandler(frm_FormClosed);
            //frm.KeyDown += new KeyEventHandler(frm_KeyDown);
            //frm.KeyPress += new KeyPressEventHandler(frm_KeyPress);
            frm.ShowDialog();

            //Common.AddObjectOnCurentTab(uc);
        }
Example #2
0
        public void RunMethodFormBase()
        {
            if (this.NarMain.SelectedLink == null)
            {
                return;
            }

            if (this.NarMain.SelectedLink.Item.Tag == "")
            {
                return;
            }

            int iID = int.Parse(this.NarMain.SelectedLink.ItemName);

            NarvarItemControl tbCtrl = (NarvarItemControl)this.NarMain.SelectedLink.Item;

            frmMain frmM = (frmMain)this.FindForm();



            tsmiControl  tsmi      = Common.FindTsmi(frmM.msMainSys, iID);
            tbTabControl tbTabMain = frmM.tbTabMain;

            if (tsmi != null)
            {
                tbTabPageControl tbTabPage = new tbTabPageControl();
                tbTabPage.Name = "tabPage" + iID.ToString();

                for (int i = 0; i < tbTabMain.TabPages.Count; i++)
                {
                    if (tbTabPage.Name == tbTabMain.TabPages[i].Name)
                    {
                        tbTabMain.SelectedTabPage = tbTabMain.TabPages[i];
                        return;
                    }
                }

                frmBase obj = (frmBase)Common.RunMethodTabFormBase(tsmi);

                if (Common.InlistLike(obj.Text, "frm"))
                {
                    frmView fv = new frmView();
                    try
                    {
                        fv           = (frmView)obj;
                        fv.Object_ID = tbCtrl.strObject_ID;
                    }
                    catch { }

                    if (!fv.isView)
                    {
                        return;
                    }
                }       //obj.Visible = false;
                Common.AddFormOnTab(obj, "tabPage" + iID.ToString(), tbCtrl.strVietNamese, tbCtrl.strEnglish, tbCtrl.strOtherLanguage, tbCtrl.strImageFileName, tbCtrl.strObject_ID);
            }
        }