Пример #1
0
        public FmMain()
        {
            InitializeComponent();

            frm           = new FormHome(this);
            frm.MdiParent = this;
            frm.Show();
        }
Пример #2
0
        // 返回首页
        private void btnHome_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            bool flag = false;

            for (int i = 0; i < this.MdiChildren.Length; i++)
            {
                if (this.MdiChildren[i].Name.ToString().ToLower() == "FormHome".ToLower())
                {
                    this.MdiChildren[i].Activate();
                    this.MdiChildren[i].Show();
                    this.MdiChildren[i].WindowState = FormWindowState.Normal;
                    flag = true;
                    break;
                }
            }

            if (!flag)
            {
                frm           = new FormHome();
                frm.MdiParent = this;
                frm.Show();
            }
        }