示例#1
0
 private void LoadListMessages()
 {
     listMessages = GMail.ListMessages();
     page         = 0;
     nPages       = (listMessages.Count + nMessagesOnPage - 1) / nMessagesOnPage;
     pageNumericUpDown.Maximum = nPages;
 }
示例#2
0
 private void FillInDataGridView()
 {
     pageNumericUpDown.Value = page + 1;
     messagesDataGridView.Rows.Clear();
     try
     {
         for (int i = page * nMessagesOnPage; i < page * nMessagesOnPage + nMessagesOnPage; i++)
         {
             MessageInfo messageInfo = GMail.GetMessageInfo(GMail.GetMessage(listMessages[i].Id));
             messagesDataGridView.Rows.Add(
                 messageInfo.To,
                 messageInfo.From,
                 messageInfo.Subject,
                 messageInfo.Date);
         }
     }
     catch { return; }
 }
示例#3
0
 private void Authorization()
 {
     GMail.UserAuthorization();
     LoadListMessages();
     FillInDataGridView();
 }