示例#1
0
        private void btnSendMail_Click(object sender, EventArgs e)
        {
            var s = new Student(tbEMail.Text, tbName.Text, tbSchool.Text, "");

#if !DEBUG
            if (s.EMail == "" || s.Skola == "" || s.Meno == "")
            {
                MessageBox.Show(@"Prosím, vyplň všetky políčka.", @"Y U DO THIS?", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }

            if (!MailDaemon.IsEmailAddrValid(s.EMail))
            {
                MessageBox.Show(@"Prosím, zadaj reálnu e-mailovú adresu.", @"Y U DO THIS?", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }
#endif

            string photo = MailDaemon.SendEMail(s, _settings.GetImage());
            s.Photo = photo;
            DatabaseController.LogStudent(s);
        }
示例#2
0
 public Settings()
 {
     InitializeComponent();
     DatabaseController.InitDatabaseController();
 }