예제 #1
0
        private void submitbtn_Click(object sender, EventArgs e)
        {
            if (ValidateForm())
            {
                // TODO: works with string, not list<> video 15: 30 min
                // LoginTrackerModel s = new LoginTrackerModel(servernamedrop.Text);
                LoginTrackerModel l = (LoginTrackerModel)servernamedrop.SelectedItem;
                // s.servername = servernamedrop.Text;
                // Add Servername to table
                GlobalConfig.Connections.CreateLogin(l);

                // Call Main Menu Form
                MainMenuForm mmf = new MainMenuForm();
                mmf.Show();

                this.Close();

                // clear form
                passwordlbl.Text             = "";
                servernamedrop.SelectedIndex = -1;
            }
            else
            {
                MessageBox.Show("You have entered a wrong password!");
            }
        }
        private void backbtn_Click(object sender, EventArgs e)
        {
            MainMenuForm mmf = new MainMenuForm();

            mmf.Show();
            this.Close();
        }