private void SelectMessage(object sender, SelectionChangedEventArgs e) { MessageHeaderView msg = u_MessageList.SelectedItem as MessageHeaderView; if (mailView_.CurrentFolder != null) { mailView_.CurrentFolder.CurrentMessage = msg; } }
private void MessageProps(object sender, RoutedEventArgs e) { MessageHeaderView msg = mailView_.CurrentFolder.CurrentMessage; msg.FullMessage.Fetch(); MessageProps props = new MessageProps(msg, this); props.Show(); }
public MessageProps(MessageHeaderView msg, Window owner) { msg_ = msg; Owner = owner; msg.FullMessage.Updated += BodyUpdated; InitializeComponent(); u_body.Text = msg_.FullMessage.Text; }
public bool IsFirst(MainWindow view, MessageHeaderView msg) { if (view != null) { return(view.IsFirstMessage(msg)); } else { return(false); } }
private void OpenMessage(object sender, RoutedEventArgs e) { MessageHeaderView msg = mailView_.CurrentFolder.CurrentMessage; msg.Body.Fetch(); Message m = new Message(mailView_.CurrentFolder, this); m.CurrentMessage = msg; m.Show(); m.Focus(); }
public bool IsFirstMessage(MessageHeaderView current) { if (current.Folder == mailView_.CurrentFolder.Folder) { int pos = u_MessageList.Items.IndexOf(current); return(pos == 0); } else { return(false); } }
public MessageHeaderView Prev(MainWindow view, MessageHeaderView msg) { MessageHeaderView nextMsg = null; if (view != null) { nextMsg = view.PrevMessage(msg); } if (nextMsg == null) { //nextMsg = Folder.FindPrev(this); } if (nextMsg != null) { nextMsg.Body.Fetch(); } return(nextMsg); }
public MessageHeaderView PrevMessage(MessageHeaderView current) { if (current.Folder == mailView_.CurrentFolder.Folder) { int pos = u_MessageList.Items.IndexOf(current); // If not found or the first item in the list if (pos <= 0) { return(null); } else { u_MessageList.SelectedIndex = pos - 1; } return(u_MessageList.SelectedItem as MessageHeaderView); } else { return(null); } }
public MessageHeaderView NextMessage(MessageHeaderView current) { if (current.Folder == mailView_.CurrentFolder.Folder) { int pos = u_MessageList.Items.IndexOf(current); // If not found or the last one in the list if (pos == u_MessageList.Items.Count - 1 || pos < 0) { return(null); } if (pos >= 0) { u_MessageList.SelectedIndex = pos + 1; } return(u_MessageList.SelectedItem as MessageHeaderView); } else { return(null); } }