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; }
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."; } }
public static void LoadLoginPage(ref LoginPage lp) { MainFrame.Content = lp; ImapService.Initialize(); }
private void ButtonLogOut(object sender, RoutedEventArgs e) { ImapService.Logout(); Email.LoadLoginPage(ref Email.loginpage); }