コード例 #1
0
ファイル: frmHome.cs プロジェクト: flashprogram/Cashier
        private void showMenu()
        {
            menu        = new frmMetroMainMenu(new MsgHandler(showSelected));
            menu.Width  = this.Width;
            menu.Height = this.Height - (fileToolStripMenuItem.Height + toolStrip1.Height);

            menu.ControlBox = false;
            menu.MdiParent  = this;



            menu.Show();

            // validate user type
            User s = new User(loginForm.userID);

            menu.user_type = s.userData["userDept"];
            menu.validateUserType();
            // set user details
            this.btnUser.Text  = s.userData["fullname"].Trim();
            this.btnUser.Width = 180;
            this.lbDept.Text   = s.userData["userDept"];

            menu.mtlUser.Text = s.userData["fullname"];

            menu.WindowState = FormWindowState.Maximized;
        }
コード例 #2
0
        private void showMenu()
        {
            frmMetroMainMenu f = new frmMetroMainMenu(new MsgHandler(showSelected) );
            f.Width = this.Width;
            f.Height = this.Height - ( fileToolStripMenuItem.Height + toolStrip1.Height );

            f.ControlBox = false;
            f.MdiParent = this;
            f.Show();

            // validate user type
            User s = new User(loginForm.userID);
            f.user_type = s.userData["userDept"];
            f.validateUserType();
            // set user details
            this.btnUser.Text = s.userData["fullname"];
            this.btnUser.Width += s.userData["fullname"].Length;
            this.lbDept.Text = s.userData["userDept"];

            f.mtlUser.Text = s.userData["fullname"];

            f.WindowState = FormWindowState.Maximized;
        }