コード例 #1
0
ファイル: FrmMain.cs プロジェクト: ivicelig/INTS_FSpam
        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();
            }
        }