Example #1
0
        private void BtnSave_Click(object sender, RoutedEventArgs e)
        {
            string footer = new TextRange(tbFooter.Document.ContentStart, tbFooter.Document.ContentEnd).Text;
            int    useMail;

            if (rbGmail.IsChecked == true)
            {
                useMail = Globals.USE_EMAIL_GMAIL;
            }
            else if (rbMapuaMail.IsChecked == true)
            {
                useMail = Globals.USE_EMAIL_MAPUA;
            }
            else
            {
                useMail = Globals.ERROR;
            }

            emClass.SaveEmailSettings(useMail, tbEmailAddress1.Text, tbPassword1.Password, tbEmailAddress2.Text, tbPassword2.Password, footer);
            MessageBox.Show("Saved Successfully!", "Success", MessageBoxButton.OK, MessageBoxImage.Information);
        }