Example #1
0
 private void bunifuFlatButton1_Click(object sender, EventArgs e)
 {
     if (ob == null)
     {
         ob             = new yesnofrm(1);
         ob.Owner       = this;
         ob.FormClosed += new FormClosedEventHandler(ob_FormClosed);
         ob.warningtext = "Are you sure.Do You Want to Logout?";
         ob.Show();
         this.Enabled = false;
     }
     else
     {
         ob.Activate();
     }
 }
Example #2
0
        private void bsettingchange_Click(object sender, EventArgs e)
        {
            if (tnewpas.Text.Length > 7 || (tnewpas.Text == "" && trenewpass.Text == ""))
            {
                string usname   = tusername.Text;
                string oldpas   = toldpas.Text;
                string newpas   = tnewpas.Text;
                string renewpas = trenewpass.Text;

                if (cc == null)
                {
                    cc             = new yesnofrm(2, uid, usname, oldpas, newpas, renewpas, uname);
                    cc.Owner       = this;
                    cc.FormClosed += new FormClosedEventHandler(cc_FormClosed);
                    cc.warningtext = "Are You Sure To Save Settings?";
                    cc.Show();
                    this.Enabled = false;
                }
                else
                {
                    cc.Activate();
                }
            }

            else
            {
                MessageBox.Show("Password must be contained atleast 8 characters");
            }
        }