示例#1
0
        public DisplayOne()
        {
            InitializeComponent();
            MsgList list = MsgList.Instance();

            showId.Text  = list.showID(0);
            showSen.Text = list.showSender(0);
            showSub.Text = list.showSub(0);
            showCon.Text = list.showCon(0);
        }
示例#2
0
        //METHOD FOR PREVIOUS BUTTON CLICK, RETREIVES PREVIOUS MESSAGE IN LIST.
        private void prev_Click(object sender, RoutedEventArgs e)
        {
            MsgList list = MsgList.Instance();
            int     max  = list.getSize() - 1;

            if (current == 0)
            {
                current      = max;
                showId.Text  = list.showID(current);
                showSen.Text = list.showSender(current);
                showSub.Text = list.showSub(current);
                showCon.Text = list.showCon(current);
            }
            else
            {
                showId.Text  = list.showID(current - 1);
                showSen.Text = list.showSender(current - 1);
                showSub.Text = list.showSub(current - 1);
                showCon.Text = list.showCon(current - 1);
                current--;
            }
        }
示例#3
0
        //METHOD FOR NEXT BUTTON CLICK, RETRIEVES NEXT MESSAGE IN LIST.
        private void next_Click(object sender, RoutedEventArgs e)
        {
            MsgList list = MsgList.Instance();
            int     max  = list.getSize() - 1;

            if (current != max)
            {
                showId.Text  = list.showID(current + 1);
                showSen.Text = list.showSender(current + 1);
                showSub.Text = list.showSub(current + 1);
                showCon.Text = list.showCon(current + 1);
                current++;
            }
            else
            {
                current      = 0;
                showId.Text  = list.showID(current);
                showSen.Text = list.showSender(current);
                showSub.Text = list.showSub(current);
                showCon.Text = list.showCon(current);
            }
        }
示例#4
0
        public DisplayAll()
        {
            InitializeComponent();
            //METHOD FOR DISPLAYING MESSAGES.
            MsgList list = MsgList.Instance();
            int     size = list.getSize();

            for (int i = 0; i < size; i++)
            {
                string message = "Message ID:" + list.showID(i) + " Sender: " + list.showSender(i) + " Subject: " + list.showSub(i) + " Content: " + list.showCon(i);
                messageView.Items.Add(message);
            }
        }