Exemple #1
0
 private void jalankanWindow()
 {
     while (true)
     {
         if (!Program.session.isLogin())
         {
             frmLogin login = new frmLogin();
             login.ShowDialog();
             login.Focus();
         }
         else
         {
             if (Program.role.jendelaPertama == userRole.JENDELA_PERTAMA_OPERATOR)
             {
                 frmMainOperator formOperator = new frmMainOperator();
                 formOperator.Focus();
                 formOperator.ShowDialog(this);
             }
             else
             {
                 frmAdmin formAdmin = new frmAdmin();
                 formAdmin.Focus();
                 formAdmin.ShowDialog(this);
             }
         }
     }
 }
Exemple #2
0
        private void jalankanWindow()
        {
            while (true)
            {
                if (!Program.session.isLogin())
                {
                    frmLogin login = new frmLogin();
                    login.ShowDialog();
                    login.Focus();
                }
                else
                {
                    if (Program.role.jendelaPertama == userRole.JENDELA_PERTAMA_OPERATOR)
                    {
                        frmMainOperator formOperator = new frmMainOperator();
                        formOperator.Focus();
                        formOperator.ShowDialog(this);

                    }
                    else
                    {
                        frmAdmin formAdmin = new frmAdmin();
                        formAdmin.Focus();
                        formAdmin.ShowDialog(this);

                    }
                }
            }
        }