Пример #1
0
 private void profileComBox_SelectedIndexChanged_1(object sender, EventArgs e)
 {
     profileComBox.Visible = false;
     if (profileComBox.SelectedItem.ToString() == "User Data")
     {
         if (userProfile == null)
         {
             userProfile             = new UserProfile();
             userProfile.FormClosed += delegate { tips = null; };
         }
         userProfile.Show();
         this.Hide();
         //register.Show();
         //this.Hide();
     }
     else if (profileComBox.SelectedItem.ToString() == "Logout")
     {
         if (startScreen == null)
         {
             startScreen             = new StartScreen();
             startScreen.FormClosed += delegate { tips = null; };
         }
         startScreen.currentUser = currentUser;
         startScreen.Show();
         this.Hide();
         // startScreen.Show();
         //this.Hide();
     }
 }
Пример #2
0
 private void Home_Load(object sender, EventArgs e)
 {
     welcomeLbl.Text = currentUser.getName();
     if (tips == null)
     {
         tips             = new Tips();
         tips.FormClosed += delegate { tips = null; };
     }
     tipsLbl.Text = tips.tip1Lbl.Text + " and remeber to stay Hydrated!";
 }
Пример #3
0
 private void todaysTipsBtn_Click(object sender, EventArgs e)
 {
     if (tips == null)
     {
         tips             = new Tips();
         tips.FormClosed += delegate { tips = null; };
     }
     tips.home        = this;
     tips.currentUser = currentUser;
     tips.Show();
     this.Hide();
 }