Exemplo n.º 1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            mlBack.Visible = false;
            _instance      = this;
            switch (role)
            {
            case "Admin":
                ucAdmin ucAdmin = new ucAdmin();
                ucAdmin.Dock = DockStyle.Fill;
                metroPanelMF.Controls.Add(ucAdmin);
                this.control = "ucAdmin";
                break;

            case "PM":
                ucPM ucPM = new ucPM();
                ucPM.Dock = DockStyle.Fill;
                metroPanelMF.Controls.Add(ucPM);
                this.control = "ucPM";
                break;

            case "Member":
                ucMiembro ucMiembro = new ucMiembro();
                ucMiembro.Dock = DockStyle.Fill;
                metroPanelMF.Controls.Add(ucMiembro);
                this.control = "ucMiembro";
                break;

            default:
                break;
            }
        }
Exemplo n.º 2
0
        private void tsbLogin_Click(object sender, EventArgs e)
        {
            Login frmLogin = new Login();

            frmLogin.ShowDialog();

            if (Login.isSuccess)
            {
                ucAdmin ucadmin1 = new ucAdmin();
                ucadmin1.Dock = DockStyle.Fill;
                panel1.Controls.Clear();
                panel1.Controls.Add(ucadmin1);

                tsbLogin.Text    = "Admin";
                tsbLogin.Image   = MainProgram.Properties.Resources.icons8_manager_32;
                tsbLogin.Enabled = false;
            }
        }
Exemplo n.º 3
0
        private void btnAdmin_Click(object sender, EventArgs e)
        {
            //fAdmin a = new fAdmin();
            //a.loginAccount = LoginAccount;
            //this.Hide();
            //a.ShowDialog();
            //this.Show();


            setSelectForecolor((Bunifu.Framework.UI.BunifuFlatButton)sender);
            ucAdmin ucadmin = new ucAdmin();

            ucadmin.loginAccount = LoginAccount;
            pnTheme.Location     = new Point(46, 36);
            pnTheme.Controls.Clear();

            ucadmin.Dock    = DockStyle.Fill;
            ucadmin.Visible = false;
            pnTheme.Controls.Add(ucadmin);

            animationTable.ShowSync(ucadmin);
        }
Exemplo n.º 4
0
        private void fTableManager_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode.Equals(Keys.Tab))
            {
                btnMenu_Click(this, new EventArgs());
            }
            if (e.Control)
            {
                if (e.KeyCode.Equals(Keys.T))
                {
                    pnTheme.Location = new Point(46, 36);
                    pnTheme.Controls.Clear();
                    ucTable uctable = new ucTable();
                    uctable.Dock    = DockStyle.Fill;
                    uctable.Visible = false;
                    pnTheme.Controls.Add(uctable);
                    btnTable.selected        = true;
                    btnInformation.selected  = false;
                    btnAdmin.selected        = false;
                    btnTable.Textcolor       = Color.White;
                    btnInformation.Textcolor = Color.DimGray;
                    btnAdmin.Textcolor       = Color.DimGray;


                    animationTable.ShowSync(uctable);
                }
                if (e.KeyCode.Equals(Keys.I))
                {
                    pnTheme.Controls.Clear();
                    ucAcount ucAcount = new ucAcount();
                    ucAcount.LoginAccount = LoginAccount;
                    ucAcount.Dock         = DockStyle.Fill;

                    ucAcount.Visible = false;
                    pnTheme.Controls.Add(ucAcount);

                    animationTable.ShowSync(ucAcount);

                    btnTable.selected        = false;
                    btnInformation.selected  = true;
                    btnAdmin.selected        = false;
                    btnTable.Textcolor       = Color.DimGray;
                    btnInformation.Textcolor = Color.White;
                    btnAdmin.Textcolor       = Color.DimGray;
                }
                if (e.KeyCode.Equals(Keys.A))
                {
                    ucAdmin ucadmin = new ucAdmin();
                    ucadmin.loginAccount = LoginAccount;
                    pnTheme.Location     = new Point(46, 36);
                    pnTheme.Controls.Clear();

                    ucadmin.Dock    = DockStyle.Fill;
                    ucadmin.Visible = false;
                    pnTheme.Controls.Add(ucadmin);

                    animationTable.ShowSync(ucadmin);

                    btnTable.selected        = false;
                    btnInformation.selected  = false;
                    btnAdmin.selected        = true;
                    btnTable.Textcolor       = Color.DimGray;
                    btnInformation.Textcolor = Color.DimGray;
                    btnAdmin.Textcolor       = Color.White;
                }
            }
        }