예제 #1
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            MailLoader mail = new MailLoader();

            mail.readMail(txtUsername.Text, txtPassword.Text);

            if (mail.zastavica != 0)
            {
                FrmMails formMails = new FrmMails(mail.titles, mail.summaries, mail.senders);
                formMails.ShowDialog();
            }
        }
예제 #2
0
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            MailLoader mail = new MailLoader();

            mail.readMail(txtUsername.Text, txtPassword.Text);

            List <Tuple <string, double> > results = new List <Tuple <string, double> >();

            if (mail.zastavica != 0)
            {
                for (int i = 0; i < mail.titles.Count; i++)
                {
                    BayesClassifier classifier = new BayesClassifier();
                    var             result     = classifier.CheckEmail(mail.titles[i] + " " + mail.summaries[i]);
                    results.Add(result);
                }

                FrmMails formMails = new FrmMails(mail.titles, mail.summaries, mail.senders, results);
                formMails.ShowDialog();
            }
        }