Exemple #1
0
        private void PasswordTB_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                ToLet.Database.DBConnectionProvider.getDBConnection();

                ToLet.Classes.User u = new ToLet.Classes.User();

                u.UserName = UsernameTB.Text;
                u.Password = PasswordTB.Text;

                bool b = ToLet.DBDataProvider.DBDataProvider.LogInCheck(u.UserName, u.Password);

                if (b)
                {
                    this.Hide();

                    this.mainui = new MainUI(this, u.UserName);
                    Image propic = ToLet.DBDataProvider.DBDataProvider.getProPic(u.UserName, u.Password);
                    mainui.ProPB.Image     = propic;
                    mainui.ProPB.SizeMode  = PictureBoxSizeMode.StretchImage;
                    mainui.accountLBL.Text = u.UserName;
                    mainui.MainUIButtonPANEL.Controls.Add(mainui.accountLBL);
                    mainui.setuserpass(u.UserName, u.Password);
                    mainui.Show();
                }
                else
                {
                    if (u.UserName == "")
                    {
                        LoginPANEL.Controls.Add(userNameLBL2);
                    }
                    if (u.Password == "")
                    {
                        LoginPANEL.Controls.Add(passwordLBL2);
                    }
                    else
                    {
                        MessageBox.Show("Invalid username or password");
                    }
                }
            }
        }
Exemple #2
0
 public SearchResultForm(MainUI m, Classes.PropertyDetails pd)
 {
     InitializeComponent();
     this.pd = pd;
     this.m  = m;
 }
 public PropertyDetailsForm(MainUI m)
 {
     InitializeComponent();
     this.m = m;
 }
Exemple #4
0
        public Start(MainUI mainui)
        {
            InitializeComponent();

            this.mainui = mainui;
        }
 public MailBox(MainUI m)
 {
     InitializeComponent();
     this.m = m;
 }