Exemple #1
0
        private void SelectMessage(object sender, SelectionChangedEventArgs e)
        {
            MessageHeaderView msg = u_MessageList.SelectedItem as MessageHeaderView;

            if (mailView_.CurrentFolder != null)
            {
                mailView_.CurrentFolder.CurrentMessage = msg;
            }
        }
Exemple #2
0
        private void MessageProps(object sender, RoutedEventArgs e)
        {
            MessageHeaderView msg = mailView_.CurrentFolder.CurrentMessage;

            msg.FullMessage.Fetch();

            MessageProps props = new MessageProps(msg, this);

            props.Show();
        }
Exemple #3
0
        public MessageProps(MessageHeaderView msg, Window owner)
        {
            msg_  = msg;
            Owner = owner;

            msg.FullMessage.Updated += BodyUpdated;

            InitializeComponent();

            u_body.Text = msg_.FullMessage.Text;
        }
Exemple #4
0
 public bool IsFirst(MainWindow view, MessageHeaderView msg)
 {
     if (view != null)
     {
         return(view.IsFirstMessage(msg));
     }
     else
     {
         return(false);
     }
 }
Exemple #5
0
        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();
        }
Exemple #6
0
        public bool IsFirstMessage(MessageHeaderView current)
        {
            if (current.Folder == mailView_.CurrentFolder.Folder)
            {
                int pos = u_MessageList.Items.IndexOf(current);

                return(pos == 0);
            }
            else
            {
                return(false);
            }
        }
Exemple #7
0
        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);
        }
Exemple #8
0
        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);
            }
        }
Exemple #9
0
        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);
            }
        }