Ejemplo n.º 1
0
        private string curFolder = "";                                                                             // Tracks the current folder in mail

        public HomePage()
        {
            InitializeComponent();
            ContentFrame = contentFrame;

            foldersList.ItemsSource = ImapService.GetFolders();

            ClearRoom();
        }
        public FolderMessagePage(string name)
        {
            InitializeComponent();

            msgs = ImapService.GetMessagesForFolder(name);
            foreach (Message msg in msgs)
            {
                msgList.Add(new EmailMessage()
                {
                    Subject = msg.Subject, From = msg.From.DisplayName, Time = msg.Date.Value.ToString()
                });
            }
            messagesList.ItemsSource = msgList;
        }
Ejemplo n.º 3
0
        private void loginBtn_Click(object sender, RoutedEventArgs e)
        {
            Email.LoggedIn = ImapService.Login(username.Text, password.Password);

            // Also navigate the user
            if (Email.LoggedIn)
            {
                // Logged in
                Email.MainFrame.Content = new HomePage();
            }
            else
            {
                // Problem
                error.Text = "There was a problem logging you in to Google Mail.";
            }
        }
Ejemplo n.º 4
0
 public static void LoadLoginPage(ref LoginPage lp)
 {
     MainFrame.Content = lp;
     ImapService.Initialize();
 }
Ejemplo n.º 5
0
 private void ButtonLogOut(object sender, RoutedEventArgs e)
 {
     ImapService.Logout();
     Email.LoadLoginPage(ref Email.loginpage);
 }