Ejemplo n.º 1
0
        private void GetClick(object sender, RoutedEventArgs e)
        {
            if (client == null)
            {
                return;
            }
            List <LetterClass> letters = new List <LetterClass>();
            List <int>         EmailIds;

            client.GetEmailIdList(out EmailIds);
            string to, from, subject, date, size, text, email;

            foreach (var item in EmailIds)
            {
                client.GetRawEmail(item, out email);
                subject = LetterClass.GetSubjectFromText(email);
                to      = LetterClass.GetReceiverFromText(email);
                from    = LetterClass.GetSenderFromText(email);
                date    = LetterClass.GetDateFromText(email);
                size    = client.GetEmailSize(item).ToString();
                text    = email;
                letters.Add(new LetterClass(subject, from, to, size, date, text, item));
            }
            list_letters.ItemsSource = letters;
        }
Ejemplo n.º 2
0
        private void LetterDoubleClick(object sender, MouseButtonEventArgs e)
        {
            LetterClass letter = (LetterClass)(sender as ListView).SelectedItem;

            if (letter == null)
            {
                return;
            }
            LetterTextWindow letterText = new LetterTextWindow(letter.Text);

            letterText.Show();
        }