Beispiel #1
0
 private void processResult(string result)
 {
     string[] userInfo = new UserAccounts().ParseUserInfo(result);
     if (userInfo[2].Equals("Admin"))
     {
         AdminPanel aPanel = new AdminPanel(userInfo);
         aPanel.Show();
     }
     else
     {
         ClientPanel cPanel = new ClientPanel(userInfo);
         cPanel.Show();
     }
     this.Hide();
 }
Beispiel #2
0
        private void registerAccount(String userName, String password, String adminType, String fName, String municpality)
        {
            String newAccount = userName + ";" + password + ";" + adminType + ";" + fName + ";" + municpality + ";" + "1" + "|";

            content += newAccount;
            File.WriteAllText("UserAccounts.txt", content);
            MessageBox.Show("Registered Succesfully!", "", MessageBoxButtons.OK, MessageBoxIcon.Information);

            if (cboAdminType.SelectedIndex == 0)
            {
                AdminPanel aPanel = new AdminPanel(newAccount.Split(';'));
                aPanel.Show();
            }
            else
            {
                ClientPanel cPanel = new ClientPanel(newAccount.Split(';'));
                cPanel.Show();
            }
            this.Close();
        }
Beispiel #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            ClientPanel cPanel = new ClientPanel(user);

            cPanel.Show();
        }