Esempio n. 1
0
        private void HomeItemSelected(object sender, RoutedEventArgs e)
        {
            HomeWindow win3 = new HomeWindow();

            win3.Show();
            this.Close();
        }
Esempio n. 2
0
 private void AccountClick(object sender, RoutedEventArgs e)
 {
     if (txtPassword1.Password == "" || txtPassword2.Password == "" || txtPassword3.Password == "")
     {
         label1.Content    = "You must fill in all the fields!";
         label1.Visibility = Visibility.Visible;
     }
     else if (txtPassword1.Password == txtPassword2.Password)
     {
         label1.Content    = "Your current password is equal to the new one!";
         label1.Visibility = Visibility.Visible;
     }
     else if (txtPassword2.Password == txtPassword3.Password)
     {
         label1.Content    = "New password doesn't match to its confirmation!";
         label1.Visibility = Visibility.Visible;
     }
     else
     {
         PopupNotifier popup = new PopupNotifier();
         popup.TitleText   = "";
         popup.ContentText = "Password updated successfuly!";
         popup.Popup();
         HomeWindow win = new HomeWindow();
         win.Show();
         this.Close();
     }
 }
Esempio n. 3
0
        private void MemberAdded(object sender, RoutedEventArgs e)
        {
            int  date, hour, month;
            bool isNumeric1 = int.TryParse(txtDay.Text, out date);
            bool isNumeric2 = int.TryParse(txtMonth.Text, out month);
            bool isNumeric3 = int.TryParse(txtHour.Text, out hour);

            if (txtDescription.Text == "" || txtHour.Text == "" || txtDay.Text == "" || txtMonth.Text == "")
            {
                label1.Content = "You must fill in all the fields!";
            }
            else if (isNumeric1 == false || isNumeric2 == false || isNumeric3 == false)
            {
                label1.Content = "Hour, Date and Month must be numbers!";
            }
            else
            {
                PopupNotifier popup = new PopupNotifier();
                popup.TitleText   = "";
                popup.ContentText = "Reunion added successfuly!";
                popup.Popup();
                HomeWindow win3 = new HomeWindow();
                win3.Show();
                this.Close();
            }
        }
Esempio n. 4
0
        private void MemberAdded(object sender, RoutedEventArgs e)
        {
            int  age, courseyear;
            bool isNumeric1 = int.TryParse(txtAge.Text, out age);
            bool isNumeric2 = int.TryParse(txtCourseYear.Text, out courseyear);

            if (txtName.Text == "" || txtAge.Text == "" || txtCourse.Text == "" || txtCourseYear.Text == "" || selectOption.SelectedValue == null)
            {
                label1.Content = "You must fill in all the fields!";
            }
            else if (isNumeric1 == false || isNumeric2 == false)
            {
                label1.Content = "Age and Course Year must be numbers!";
            }
            else
            {
                PopupNotifier popup = new PopupNotifier();
                popup.TitleText   = "";
                popup.ContentText = "Member added successfuly!";
                popup.Popup();
                HomeWindow win = new HomeWindow();
                win.Show();
                this.Close();
            }
        }
Esempio n. 5
0
 private void ButtonLogin_Click(object sender, RoutedEventArgs e)
 {
     if (txtUsername.Text == "" || txtPassword.Password == "")
     {
         label1.Content    = "Invalid Username and/or Password!";
         label1.Visibility = Visibility.Visible;
     }
     else
     {
         HomeWindow win2 = new HomeWindow();
         win2.Show();
         this.Close();
     }
 }
Esempio n. 6
0
 private void MemberAdded(object sender, RoutedEventArgs e)
 {
     if (selectOption.SelectedValue == null || selectOption2.SelectedValue == null)
     {
         label1.Content = "You must fill in all fields!";
     }
     else
     {
         PopupNotifier popup = new PopupNotifier();
         popup.TitleText   = "";
         popup.ContentText = "Member renewed successfuly!";
         popup.Popup();
         HomeWindow win = new HomeWindow();
         win.Show();
         this.Close();
     }
 }