示例#1
0
        /// <summary>
        /// Clicking on the ok button, we confirm the data of the new Mailbox
        /// From the data it creates a new MailBoxProperties struct for initializing the new Mailbox object
        /// </summary>
        /// <param name="sender">sender</param>
        /// <param name="e">event</param>
        private void OkBtn_Click(object sender, RoutedEventArgs e)
        {
            Properties = new MailBoxProperties(
                _mvm.CurrentUser.Name,
                nameField.Text,
                imapField.Text,
                int.Parse(imapPortField.Text),
                smtpField.Text,
                int.Parse(smtpPortField.Text),
                accountField.Text,
                passwordField.Text,
                int.Parse(intervallField.Text)
                );
            var newMailbox = _mvm.CurrentUser.AddMailbox(Properties);

            DialogResult = true;
        }
示例#2
0
 public MailControl(MailBoxProperties properties, IList <Email> emails)
 {
     _properties = properties;
     _emails     = emails;
 }
示例#3
0
 /// <summary>
 /// Initializes a new inbox object, with the values of the properties struct given in the argument.
 /// </summary>
 /// <param name="properties">MailboxProperties struct, that carries the necessary data for the mailbox.</param>
 public Mailbox(MailBoxProperties properties)
 {
     Properties = properties;
     Control    = new MailControl(properties, Emails);
 }