Beispiel #1
0
 public void AddNewEmailAddress(NewEmailAddressEventArgs ea)
 {
     try
     {
         _writer.Write(MessageDictionary.AddEmailAddress);
         if (_reader.Read() == MessageDictionary.OK)
         {
             _writer.Write(ea.Address);
             _writer.Write(ea.Login);
             _writer.Write(ea.UseLoginPassword);
             _writer.Write(ea.ImapHost);
             _writer.Write(ea.ImapPort);
             _writer.Write(ea.ImapUseSsl);
             _writer.Write(ea.SmtpHost);
             _writer.Write(ea.SmtpPort);
             _writer.Write(ea.SmtpUseSsl);
             _writer.Write(ea.Name);
             return;
         }
         throw new Exception("Connection unsynced");
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message + Environment.NewLine + ex.StackTrace);
         ErrorHelper.LogError(ex);
         Logout();
     }
 }
Beispiel #2
0
        private void _parent_NewEmailAddress(object sender, NewEmailAddressEventArgs e)
        {
            //CustomTreeListNode rootNode = new CustomTreeListNode(e.Address,
            //    ImageHelper.UriToImageSource(new Uri("pack://application:,,,/resources/mail.png")));

            //EmailModel email = _parent.EmailClients.Last();
            //rootNode.ChildObject = email;

            //EmailTreeList.AddNode(rootNode);
        }