亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? form1.cs

?? 本文件是中國水利水電出版社出版的一《案例開發》配套的光盤
?? CS
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Web.Mail;
namespace ch7_4
{
	/// <summary>
	/// Form1 的摘要說明。
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.TextBox textBox6;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label8;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.Label label11;
		private System.Windows.Forms.Label label12;
		private System.Windows.Forms.TextBox textBox5;
		private System.Windows.Forms.TextBox textBox3;
		private System.Windows.Forms.TextBox textBox2;
		private System.Windows.Forms.TextBox textBox1;
		private System.Windows.Forms.GroupBox 其它;
		private System.Windows.Forms.GroupBox groupBox3;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.ComboBox comboBox1;
		private System.Windows.Forms.RadioButton radioButton2;
		private System.Windows.Forms.RadioButton radioButton1;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.TextBox textBox4;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.GroupBox groupBox4;
		private System.Windows.Forms.RichTextBox richTextBox1;
		/// <summary>
		/// 必需的設計器變量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public Form1()
		{
			//
			// Windows 窗體設計器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 調用后添加任何構造函數代碼
			//
		}

		/// <summary>
		/// 清理所有正在使用的資源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
		/// 此方法的內容。
		/// </summary>
		private void InitializeComponent()
		{
			this.button2 = new System.Windows.Forms.Button();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.textBox6 = new System.Windows.Forms.TextBox();
			this.label7 = new System.Windows.Forms.Label();
			this.label8 = new System.Windows.Forms.Label();
			this.groupBox2 = new System.Windows.Forms.GroupBox();
			this.label9 = new System.Windows.Forms.Label();
			this.label10 = new System.Windows.Forms.Label();
			this.label11 = new System.Windows.Forms.Label();
			this.label12 = new System.Windows.Forms.Label();
			this.textBox5 = new System.Windows.Forms.TextBox();
			this.textBox3 = new System.Windows.Forms.TextBox();
			this.textBox2 = new System.Windows.Forms.TextBox();
			this.textBox1 = new System.Windows.Forms.TextBox();
			this.其它 = new System.Windows.Forms.GroupBox();
			this.groupBox3 = new System.Windows.Forms.GroupBox();
			this.label6 = new System.Windows.Forms.Label();
			this.comboBox1 = new System.Windows.Forms.ComboBox();
			this.radioButton2 = new System.Windows.Forms.RadioButton();
			this.radioButton1 = new System.Windows.Forms.RadioButton();
			this.button1 = new System.Windows.Forms.Button();
			this.textBox4 = new System.Windows.Forms.TextBox();
			this.label4 = new System.Windows.Forms.Label();
			this.groupBox4 = new System.Windows.Forms.GroupBox();
			this.richTextBox1 = new System.Windows.Forms.RichTextBox();
			this.groupBox1.SuspendLayout();
			this.groupBox2.SuspendLayout();
			this.groupBox3.SuspendLayout();
			this.groupBox4.SuspendLayout();
			this.SuspendLayout();
			// 
			// button2
			// 
			this.button2.Location = new System.Drawing.Point(340, 174);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(72, 23);
			this.button2.TabIndex = 10;
			this.button2.Text = "發送郵件";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.label8);
			this.groupBox1.Controls.Add(this.textBox6);
			this.groupBox1.Controls.Add(this.label7);
			this.groupBox1.Location = new System.Drawing.Point(250, 8);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(266, 72);
			this.groupBox1.TabIndex = 17;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "SMTP服務器";
			// 
			// textBox6
			// 
			this.textBox6.Location = new System.Drawing.Point(114, 34);
			this.textBox6.Name = "textBox6";
			this.textBox6.Size = new System.Drawing.Size(142, 21);
			this.textBox6.TabIndex = 3;
			this.textBox6.Text = "";
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(-72, 54);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(56, 16);
			this.label7.TabIndex = 2;
			this.label7.Text = "收件人";
			// 
			// label8
			// 
			this.label8.Location = new System.Drawing.Point(12, 36);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(98, 16);
			this.label8.TabIndex = 4;
			this.label8.Text = "郵件發送服務器:";
			// 
			// groupBox2
			// 
			this.groupBox2.Controls.Add(this.textBox5);
			this.groupBox2.Controls.Add(this.textBox3);
			this.groupBox2.Controls.Add(this.textBox2);
			this.groupBox2.Controls.Add(this.textBox1);
			this.groupBox2.Controls.Add(this.label9);
			this.groupBox2.Controls.Add(this.label10);
			this.groupBox2.Controls.Add(this.label11);
			this.groupBox2.Controls.Add(this.label12);
			this.groupBox2.Location = new System.Drawing.Point(10, 6);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new System.Drawing.Size(230, 188);
			this.groupBox2.TabIndex = 18;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "郵件頭";
			// 
			// label9
			// 
			this.label9.Location = new System.Drawing.Point(12, 146);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(56, 16);
			this.label9.TabIndex = 17;
			this.label9.Text = "發件人";
			// 
			// label10
			// 
			this.label10.Location = new System.Drawing.Point(12, 106);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(72, 16);
			this.label10.TabIndex = 16;
			this.label10.Text = "主題";
			// 
			// label11
			// 
			this.label11.Location = new System.Drawing.Point(12, 66);
			this.label11.Name = "label11";
			this.label11.Size = new System.Drawing.Size(56, 16);
			this.label11.TabIndex = 15;
			this.label11.Text = "抄送";
			// 
			// label12
			// 
			this.label12.Location = new System.Drawing.Point(12, 26);
			this.label12.Name = "label12";
			this.label12.Size = new System.Drawing.Size(56, 16);
			this.label12.TabIndex = 14;
			this.label12.Text = "收件人";
			// 
			// textBox5
			// 
			this.textBox5.Location = new System.Drawing.Point(60, 141);
			this.textBox5.Name = "textBox5";
			this.textBox5.Size = new System.Drawing.Size(158, 21);
			this.textBox5.TabIndex = 21;
			this.textBox5.Text = "";
			// 
			// textBox3
			// 
			this.textBox3.Location = new System.Drawing.Point(60, 102);
			this.textBox3.Name = "textBox3";
			this.textBox3.Size = new System.Drawing.Size(158, 21);
			this.textBox3.TabIndex = 20;
			this.textBox3.Text = "";
			// 
			// textBox2
			// 
			this.textBox2.Location = new System.Drawing.Point(60, 63);
			this.textBox2.Name = "textBox2";
			this.textBox2.Size = new System.Drawing.Size(158, 21);
			this.textBox2.TabIndex = 19;
			this.textBox2.Text = "";
			// 
			// textBox1
			// 
			this.textBox1.Location = new System.Drawing.Point(60, 24);
			this.textBox1.Name = "textBox1";
			this.textBox1.Size = new System.Drawing.Size(158, 21);
			this.textBox1.TabIndex = 18;
			this.textBox1.Text = "";
			// 
			// 其它
			// 
			this.其它.Location = new System.Drawing.Point(254, 170);
			this.其它.Name = "其它";
			this.其它.TabIndex = 19;
			this.其它.TabStop = false;
			this.其它.Text = "groupBox3";
			// 
			// groupBox3
			// 
			this.groupBox3.Controls.Add(this.label6);
			this.groupBox3.Controls.Add(this.comboBox1);
			this.groupBox3.Controls.Add(this.radioButton2);
			this.groupBox3.Controls.Add(this.radioButton1);
			this.groupBox3.Controls.Add(this.button1);
			this.groupBox3.Controls.Add(this.textBox4);
			this.groupBox3.Controls.Add(this.label4);
			this.groupBox3.Location = new System.Drawing.Point(252, 88);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new System.Drawing.Size(266, 78);
			this.groupBox3.TabIndex = 19;
			this.groupBox3.TabStop = false;
			this.groupBox3.Text = "其它";
			// 
			// label6
			// 
			this.label6.Location = new System.Drawing.Point(10, 52);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(48, 16);
			this.label6.TabIndex = 23;
			this.label6.Text = "優先級";
			// 
			// comboBox1
			// 
			this.comboBox1.Items.AddRange(new object[] {
														   "正常",
														   "高",
														   "低"});
			this.comboBox1.Location = new System.Drawing.Point(58, 50);
			this.comboBox1.Name = "comboBox1";
			this.comboBox1.Size = new System.Drawing.Size(54, 20);
			this.comboBox1.TabIndex = 22;
			this.comboBox1.Text = "正常";
			// 
			// radioButton2
			// 
			this.radioButton2.Location = new System.Drawing.Point(174, 50);
			this.radioButton2.Name = "radioButton2";
			this.radioButton2.Size = new System.Drawing.Size(72, 24);
			this.radioButton2.TabIndex = 21;
			this.radioButton2.Text = "html";
			// 
			// radioButton1
			// 
			this.radioButton1.Checked = true;
			this.radioButton1.Location = new System.Drawing.Point(122, 50);
			this.radioButton1.Name = "radioButton1";
			this.radioButton1.Size = new System.Drawing.Size(72, 24);
			this.radioButton1.TabIndex = 20;
			this.radioButton1.TabStop = true;
			this.radioButton1.Text = "文本";
			// 
			// button1
			// 
			this.button1.Location = new System.Drawing.Point(200, 16);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(48, 23);
			this.button1.TabIndex = 19;
			this.button1.Text = "添加";
			// 
			// textBox4
			// 
			this.textBox4.Location = new System.Drawing.Point(46, 14);
			this.textBox4.Name = "textBox4";
			this.textBox4.Size = new System.Drawing.Size(148, 21);
			this.textBox4.TabIndex = 18;
			this.textBox4.Text = "";
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(10, 22);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(56, 16);
			this.label4.TabIndex = 17;
			this.label4.Text = "附件";
			// 
			// groupBox4
			// 
			this.groupBox4.Controls.Add(this.richTextBox1);
			this.groupBox4.Location = new System.Drawing.Point(8, 206);
			this.groupBox4.Name = "groupBox4";
			this.groupBox4.Size = new System.Drawing.Size(510, 208);
			this.groupBox4.TabIndex = 20;
			this.groupBox4.TabStop = false;
			this.groupBox4.Text = "信件內容";
			// 
			// richTextBox1
			// 
			this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
			this.richTextBox1.Location = new System.Drawing.Point(3, 17);
			this.richTextBox1.Name = "richTextBox1";
			this.richTextBox1.Size = new System.Drawing.Size(504, 188);
			this.richTextBox1.TabIndex = 10;
			this.richTextBox1.Text = "";
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(532, 421);
			this.Controls.Add(this.groupBox4);
			this.Controls.Add(this.groupBox3);
			this.Controls.Add(this.groupBox2);
			this.Controls.Add(this.groupBox1);
			this.Controls.Add(this.button2);
			this.Name = "Form1";
			this.Text = "發送郵件";
			this.groupBox1.ResumeLayout(false);
			this.groupBox2.ResumeLayout(false);
			this.groupBox3.ResumeLayout(false);
			this.groupBox4.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// 應用程序的主入口點。
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}

		private void button2_Click(object sender, System.EventArgs e)
		{
			try
			{
				MailMessage message=new MailMessage();
				if (this.textBox1.Text!="")
				{
					message.To=this.textBox1.Text;
					//設置正文內容類型
					message.BodyFormat=MailFormat.Text;
					if (this.radioButton2.Checked==true)
					{
						message.BodyFormat=MailFormat.Html;
					}
					//設置郵件征文的編碼類型
					message.BodyEncoding=System.Text.Encoding.UTF8;
					//設置郵件主題
					message.Subject=this.textBox3.Text;
					//設置郵件正文
					message.Body=this.richTextBox1.Text;

					//判斷是否有附件
					if (this.textBox4.Text!="")
					{
						//構造一個附件對象
						MailAttachment attach=new MailAttachment(this.textBox4.Text);
						//添加附件
						message.Attachments.Add(attach);
					}
					//判斷是否有抄送
					if (this.textBox3.Text!="")
					{
						message.Cc=this.textBox3.Text;
					}
					//設置發件人
					message.From=this.textBox5.Text;
					//設置優先級
					int i=this.comboBox1.SelectedIndex;
					if (i==0)
					{
						message.Priority=MailPriority.Normal;
					}
					if (i==1)
					{
						message.Priority=MailPriority.High;
					}
					if (i==2)
					{
						message.Priority=MailPriority.Low;
					}

					//設置郵件發送服務器
					SmtpMail.SmtpServer=this.textBox6.Text;
					//發送郵件
					SmtpMail.Send(message);
					MessageBox.Show("郵件發送已經成功","恭喜"
						,MessageBoxButtons.OK,MessageBoxIcon.Information);
				}
				else
				{
				    MessageBox.Show("未指定收件人地址","警告",
					MessageBoxButtons.OK,MessageBoxIcon.Warning);
				}
			}
			catch( Exception error)
			{
				MessageBox.Show("郵件發送失敗信息:"+error.Message,"失敗"
					,MessageBoxButtons.OK,MessageBoxIcon.Information);
			}
		}

		private void button1_Click(object sender, System.EventArgs e)
		{
			OpenFileDialog oFileDialog=new OpenFileDialog();
			if (oFileDialog.ShowDialog()==DialogResult.OK)
			{
			this.textBox4.Text=oFileDialog.FileName;		
			}
		}

		private void radioButton1_CheckedChanged(object sender, System.EventArgs e)
		{
			if (this.radioButton1.Checked==true)
			{
			//是兩個單選按鈕狀態不同
			this.radioButton2.Checked=false;
			}
		}

		private void radioButton2_CheckedChanged(object sender, System.EventArgs e)
		{
			if (this.radioButton2.Checked==true)
			{
			//使兩個單選按鈕狀態不同
			this.radioButton1.Checked=false;
			}
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
丝袜亚洲另类欧美综合| 不卡一区中文字幕| 福利视频网站一区二区三区| 一本大道久久a久久精二百| 日韩一区二区三区免费看| 中文字幕一区二区三区在线播放 | 激情亚洲综合在线| 91九色最新地址| 国产欧美一二三区| 蜜桃视频在线一区| 欧美网站大全在线观看| 一区二区三区四区亚洲| 国产91精品一区二区麻豆网站 | 中文字幕巨乱亚洲| 日本不卡视频在线| 欧美亚洲高清一区| 自拍偷拍亚洲激情| 大胆亚洲人体视频| 国产色综合久久| 狠狠色丁香九九婷婷综合五月| 欧美亚洲日本一区| 亚洲激情第一区| 91小视频免费观看| 亚洲欧洲精品一区二区三区| 国产suv精品一区二区883| 亚洲精品在线一区二区| 久久国产欧美日韩精品| 日韩一级片在线观看| 爽好多水快深点欧美视频| 欧美性一区二区| 一区二区三区蜜桃| 欧美少妇xxx| 亚洲国产欧美日韩另类综合| 色哟哟精品一区| 亚洲精品成人精品456| 97se亚洲国产综合自在线不卡| 国产精品久久久久国产精品日日| 国产不卡免费视频| 日本一区二区免费在线观看视频| 国产一区二区精品久久99| 久久久久亚洲蜜桃| 成人午夜激情影院| 国产精品成人一区二区艾草| 91在线观看免费视频| 亚洲免费高清视频在线| 欧美午夜宅男影院| 日韩在线一二三区| 精品久久久久久综合日本欧美| 久久国产精品99久久人人澡| 久久久久久久久久久久电影| 国产不卡视频在线观看| 一区二区三区资源| 日韩一区二区高清| 国产高清久久久| 亚洲欧美一区二区三区国产精品 | 婷婷久久综合九色国产成人 | 亚洲午夜一区二区三区| 91麻豆精品久久久久蜜臀| 久久99国产乱子伦精品免费| 国产免费成人在线视频| 91丨porny丨户外露出| 无吗不卡中文字幕| 国产欧美一区二区在线观看| 91毛片在线观看| 视频一区二区欧美| 中文字幕精品一区二区三区精品| 91黄色激情网站| 蜜臀久久99精品久久久画质超高清| 欧美精品一区二区三区蜜桃| 91蜜桃视频在线| 九色综合狠狠综合久久| 亚洲精品欧美专区| 精品国产免费人成在线观看| 91丨porny丨在线| 老色鬼精品视频在线观看播放| 国产精品乱码久久久久久| 欧美喷潮久久久xxxxx| 国产福利一区二区三区视频在线| 亚洲亚洲人成综合网络| 久久一二三国产| 欧美日韩国产另类一区| 成人开心网精品视频| 午夜精品久久久久久| 午夜成人免费视频| 国产精品成人在线观看| 精品国产一区二区在线观看| 欧美在线啊v一区| 国产成人超碰人人澡人人澡| 奇米精品一区二区三区在线观看 | 国产在线一区二区| 午夜激情一区二区三区| 综合网在线视频| 久久久久97国产精华液好用吗| 欧美日韩国产123区| 粉嫩欧美一区二区三区高清影视| 日韩国产一二三区| 一区二区国产视频| 亚洲欧洲韩国日本视频| 国产日产欧产精品推荐色| 欧美一级高清片| 欧美色区777第一页| 一本久久a久久免费精品不卡| 成人永久aaa| 国产高清无密码一区二区三区| 麻豆91免费看| 免费成人在线播放| 日韩高清在线一区| 视频一区视频二区在线观看| 午夜视频在线观看一区二区| 亚洲香肠在线观看| 亚洲一区视频在线观看视频| 亚洲欧洲一区二区在线播放| 国产精品亲子伦对白| 国产欧美视频在线观看| 国产欧美一区在线| 国产精品国产三级国产普通话99 | 麻豆久久久久久| 日本午夜一区二区| 日本欧美一区二区三区| 日韩av在线发布| 久久国产精品99精品国产| 久久精品国产网站| 国产麻豆精品在线| 懂色一区二区三区免费观看| 成人av网址在线| 99久久精品免费| 日韩三级精品电影久久久| 欧美成人猛片aaaaaaa| 久久综合久久综合九色| 国产欧美一区二区在线| 亚洲欧美视频在线观看视频| 亚洲自拍欧美精品| 性做久久久久久免费观看| 日本女人一区二区三区| 国产一区二区按摩在线观看| 国产精品一二三四| 91丨porny丨中文| 欧美久久久久久久久中文字幕| 欧美一级艳片视频免费观看| 精品少妇一区二区三区日产乱码| 国产日韩亚洲欧美综合| 有码一区二区三区| 日本亚洲三级在线| 成人污污视频在线观看| 欧洲精品中文字幕| 日韩欧美中文字幕精品| 国产免费观看久久| 亚洲成人福利片| 国产精品一区二区男女羞羞无遮挡| 成人精品在线视频观看| 欧美日韩不卡一区二区| 久久精品一区二区三区不卡牛牛| 国产精品久久久久影视| 亚洲一二三区在线观看| 国产久卡久卡久卡久卡视频精品| 91网址在线看| 欧美一级午夜免费电影| 亚洲日本中文字幕区| 美女mm1313爽爽久久久蜜臀| 大白屁股一区二区视频| 欧美高清hd18日本| 国产精品不卡视频| 青娱乐精品在线视频| 91亚洲精品久久久蜜桃| 亚洲精品在线观看网站| 亚洲综合久久av| 成人自拍视频在线| 日韩一区二区三区四区五区六区| 中文字幕一区视频| 久久99久久99精品免视看婷婷 | 6080日韩午夜伦伦午夜伦| 国产精品视频免费看| 久久av老司机精品网站导航| 在线视频综合导航| 国产精品麻豆久久久| 久久精品二区亚洲w码| 欧美日韩精品二区第二页| 中文字幕欧美一区| 国产精品一区二区黑丝| 欧美一区午夜精品| 一区二区三区四区不卡在线 | xvideos.蜜桃一区二区| 亚洲五月六月丁香激情| 91一区二区三区在线播放| 欧美激情一区不卡| 国产精品18久久久久久久久| 欧美一区二区三区播放老司机| 一区二区三区四区精品在线视频| 99精品视频一区二区三区| 久久色中文字幕| 久久国产精品第一页| 日韩欧美国产成人一区二区| 亚洲成a人片综合在线| 在线免费观看视频一区| 亚洲精品视频在线观看免费 | 国产高清不卡一区二区| 精品国产乱码久久久久久牛牛 | 狂野欧美性猛交blacked| 欧美日韩高清一区| 午夜影院久久久|