コード例 #1
0
        private void emailButtonClick(object sender, EventArgs e)
        {
            // Email Browser implementation
            //Form_Email Test = new Form_Email();
            //Test.Show();
            var formEmail = new Form_Email();

            formEmail.ShowDialog();
        }
コード例 #2
0
        private void btn_Send_Click(object sender, System.EventArgs e)
        {
            /// check to see if the target field has a valid address

            string target = targetTXT.Text;

            if (target.Contains("@") && target.Contains("."))
            {
                if (this.email_subjectTXT.Text == "")
                {
                    const string mes = "Your email should have a subject.";
                    var          res = MessageBox.Show(mes);
                }
                else
                {
                    if (this.email_bodyTXT.Text == "")
                    {
                        const string mes = "Your email should have a body.";
                        var          res = MessageBox.Show(mes);
                    }
                    else
                    {
                        // Valid Address
                        const string message = "Email has been sent.";
                        var          result  = MessageBox.Show(message);

                        this.Dispose();
                        var formEmail = new Form_Email();
                        formEmail.ShowDialog();
                    }
                }
            }

            else
            {
                // Invalid Address
                const string message = "You have entered an invalid email address";
                var          result  = MessageBox.Show(message);
            }
        }