public PasswordWindow(MyEmail myEmail)
 {
     // initialize component
     InitializeComponent();
     // initialize myEmail
     this.myEmail = myEmail;
     // initialize password box
     PASSWORD_TEXTBOX = (PasswordBox)FindName("password_textbox");
 }
Exemple #2
0
        private void Submit_Button_Click(object obj, RoutedEventArgs e)
        {
            string subject = SUBJECT_TEXTBOX.Text;
            string message = MESSAGE_TEXTBOX.Text;
            string sender  = FROM_TEXTBOX.Text;
            string to      = TO_TEXTBOX.Text;

            // if input is valid, prompt the user to enter password
            if (validateInput(subject, message, sender, to))
            {
                myEmail = new MyEmail(subject, message, sender, "", to);
                var passwordWindow = new PasswordWindow(myEmail);
                passwordWindow.Show();
            }
            ;
        }