Example #1
0
        private void sendReceive_btn_Click(object sender, EventArgs e)
        {
            dbHandler = new DBHandler();

            List <Message> mails = new List <Message>();

            mails = POPClient.GetAllMails(Setting.Default.pop3_server, Setting.Default.pop3_port, Setting.Default.ssl, Setting.Default.username, Setting.Default.password);
            foreach (Message mail in mails)
            {
                dbHandler.InsertMail(mail);
            }
        }
Example #2
0
        /* Events to execute when ProgressChanged has been completed */
        private void WorkerRunCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            /* Create a new list and insert the values e.result from RunWorkerAsync*/
            List <Message> mails = new List <Message>();

            mails = (List <Message>)e.Result;

            /* for each mail run the insertmail function */
            foreach (Message mail in mails)
            {
                dbHandler.InsertMail(mail);
            }

            /* Reset the progressbar to 0 */
            StripProgressBar.Value = 0;
            StripStatusLabel.Text  = string.Empty;

            /* insert data into the datagridview */
            inboxDataGridView.DataSource = dbHandler.GetAllSendersSubjects();
        }
Example #3
0
        private void sendReceive_btn_Click(object sender, EventArgs e)
        {
            dbHandler = new DBHandler();

            List<Message> mails = new List<Message>();
            mails = POPClient.GetAllMails(Setting.Default.pop3_server, Setting.Default.pop3_port, Setting.Default.ssl, Setting.Default.username, Setting.Default.password);
            foreach (Message mail in mails)
            {
                dbHandler.InsertMail(mail);
            }
        }