Exemple #1
0
        private void metroTile9_Click(object sender, EventArgs e)
        {
            bool IsOk = false;
            if (!User.IsLoggedIn)
            {
                frmLogin oLogin = new frmLogin(this);
                oLogin.LoginDone += new EventHandler<LoginChanged>(frMain_LoginDone);
                if (MaskedDialog.ShowDialog(this, oLogin) == DialogResult.OK)
                {
                    IsOk = true;
                }
                oLogin.Dispose();
                oLogin = null;

                if (IsOk)
                {
                    frmCallStat ofrmCallStat = new frmCallStat(this);
                    //oCallAssistant.Show();
                    MaskedDialog.ShowDialog(this, ofrmCallStat);
                    ofrmCallStat.Dispose();
                    ofrmCallStat = null;
                }
            }
            else
            {
                frmCallStat ofrmCallStat = new frmCallStat(this);
                //oCallAssistant.Show();
                MaskedDialog.ShowDialog(this, ofrmCallStat);
                //ofrmCallStat.Dispose();
                //ofrmCallStat = null;
            }
        }
Exemple #2
0
        private void metroTile3_Click(object sender, EventArgs e)
        {
            bool IsOk = false;
            if (!User.IsLoggedIn)
            {
                frmLogin oLogin = new frmLogin(this);
                oLogin.LoginDone += new EventHandler<LoginChanged>(frMain_LoginDone);
                if (MaskedDialog.ShowDialog(this, oLogin) == DialogResult.OK)
                {
                    IsOk = true;
                }
                oLogin.Dispose();
                oLogin = null;

                if (IsOk)
                {
                    frmOURFeedBack ofrmOURFeedBack = new frmOURFeedBack(this);
                    MaskedDialog.ShowDialog(this, ofrmOURFeedBack);
                    ofrmOURFeedBack.Dispose();
                    ofrmOURFeedBack = null;
                    metroTile6.Text = "Logout";
                    metroTile6.Refresh();
                }
            }
            else
            {
                frmOURFeedBack ofrmOURFeedBack = new frmOURFeedBack(this);
                MaskedDialog.ShowDialog(this, ofrmOURFeedBack);
                ofrmOURFeedBack.Dispose();
                ofrmOURFeedBack = null;

            }
        }
Exemple #3
0
        private void metroTile6_Click(object sender, EventArgs e)
        {
            if (!User.IsLoggedIn)
            {
                frmLogin oLogin = new frmLogin(this);
                oLogin.LoginDone += new EventHandler<LoginChanged>(frMain_LoginDone);
                MaskedDialog.ShowDialog(this, oLogin);
                oLogin.Dispose();
                oLogin = null;
            }
            else
            {
                metroTile6.Text = "Login";
                metroTile6.Refresh();
                User.IsLoggedIn = false;
                tileUserName.Text = "N/A";
                tileUserName.Refresh();
                tileCountryFlag.TileImage = null;
                tileCountryFlag.Refresh();

            }
        }
Exemple #4
0
 private void frmMain_Activated(object sender, EventArgs e)
 {
     if (!isActive)
     {
         isActive = true;
         if (!User.IsLoggedIn)
         {
             frmLogin oLogin = new frmLogin(this);
             oLogin.LoginDone += new EventHandler<LoginChanged>(frMain_LoginDone);
             MaskedDialog.ShowDialog(this, oLogin);
             oLogin.Dispose();
             oLogin = null;
         }
     }
 }