private void LoadListMessages() { listMessages = GMail.ListMessages(); page = 0; nPages = (listMessages.Count + nMessagesOnPage - 1) / nMessagesOnPage; pageNumericUpDown.Maximum = nPages; }
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; } }
private void Authorization() { GMail.UserAuthorization(); LoadListMessages(); FillInDataGridView(); }