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

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

?? form1.cs

?? 簡單的郵件提醒
?? CS
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Net;
using System.Net.Sockets;
using System.IO;
using System.Text;


namespace EmailNotofier
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.NotifyIcon notifyIcon1;
		private System.Windows.Forms.Timer timer1;
		private System.Windows.Forms.ContextMenu contextMenu1;
		private System.Windows.Forms.MenuItem menuItem1;
		private System.Windows.Forms.MenuItem menuItem2;
		private System.Windows.Forms.TextBox txtPopServer;
		private System.Windows.Forms.TextBox txtPopPort;
		private System.Windows.Forms.TextBox txtUserName;
		private System.Windows.Forms.TextBox txtPassword;
		private System.ComponentModel.IContainer components;
		NetworkStream netStream;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.TextBox txtTimer;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Button btnHide;
        private System.Windows.Forms.Button btnCheckMail;
		EmailNotify emailnot;
		public Form1()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			timer1.Interval=Int32.Parse(txtTimer.Text) * 60 * 1000;
			this.Opacity=0;
			this.WindowState=FormWindowState.Minimized;
			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.components = new System.ComponentModel.Container();
            System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
            this.label4 = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.label6 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.txtPopServer = new System.Windows.Forms.TextBox();
            this.label3 = new System.Windows.Forms.Label();
            this.contextMenu1 = new System.Windows.Forms.ContextMenu();
            this.menuItem1 = new System.Windows.Forms.MenuItem();
            this.menuItem2 = new System.Windows.Forms.MenuItem();
            this.btnCheckMail = new System.Windows.Forms.Button();
            this.label2 = new System.Windows.Forms.Label();
            this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
            this.txtPopPort = new System.Windows.Forms.TextBox();
            this.txtUserName = new System.Windows.Forms.TextBox();
            this.timer1 = new System.Windows.Forms.Timer(this.components);
            this.btnHide = new System.Windows.Forms.Button();
            this.txtPassword = new System.Windows.Forms.TextBox();
            this.txtTimer = new System.Windows.Forms.TextBox();
            this.SuspendLayout();
            // 
            // label4
            // 
            this.label4.Location = new System.Drawing.Point(10, 111);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(128, 19);
            this.label4.TabIndex = 7;
            this.label4.Text = "口令";
            // 
            // label5
            // 
            this.label5.Location = new System.Drawing.Point(10, 139);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(128, 26);
            this.label5.TabIndex = 9;
            this.label5.Text = "檢測時間";
            // 
            // label6
            // 
            this.label6.Location = new System.Drawing.Point(288, 144);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(51, 19);
            this.label6.TabIndex = 11;
            this.label6.Text = "分鐘";
            // 
            // label1
            // 
            this.label1.Location = new System.Drawing.Point(10, 28);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(128, 26);
            this.label1.TabIndex = 1;
            this.label1.Text = "Email服務器";
            // 
            // txtPopServer
            // 
            this.txtPopServer.Location = new System.Drawing.Point(154, 28);
            this.txtPopServer.Name = "txtPopServer";
            this.txtPopServer.Size = new System.Drawing.Size(128, 21);
            this.txtPopServer.TabIndex = 0;
            this.txtPopServer.Text = "";
            // 
            // label3
            // 
            this.label3.Location = new System.Drawing.Point(10, 83);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(128, 19);
            this.label3.TabIndex = 4;
            this.label3.Text = "用戶名";
            // 
            // contextMenu1
            // 
            this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
                                                                                         this.menuItem1,
                                                                                         this.menuItem2});
            // 
            // menuItem1
            // 
            this.menuItem1.Index = 0;
            this.menuItem1.Text = "Configure";
            this.menuItem1.Click += new System.EventHandler(this.menuItem1_Click);
            // 
            // menuItem2
            // 
            this.menuItem2.Index = 1;
            this.menuItem2.Text = "Check Email";
            this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
            // 
            // btnCheckMail
            // 
            this.btnCheckMail.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.btnCheckMail.Location = new System.Drawing.Point(246, 222);
            this.btnCheckMail.Name = "btnCheckMail";
            this.btnCheckMail.Size = new System.Drawing.Size(133, 28);
            this.btnCheckMail.TabIndex = 8;
            this.btnCheckMail.Text = "檢查郵件";
            this.btnCheckMail.Click += new System.EventHandler(this.btnCheckMail_Click);
            // 
            // label2
            // 
            this.label2.Location = new System.Drawing.Point(10, 56);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(128, 26);
            this.label2.TabIndex = 2;
            this.label2.Text = "服務端口";
            // 
            // notifyIcon1
            // 
            this.notifyIcon1.ContextMenu = this.contextMenu1;
            this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
            this.notifyIcon1.Text = "Email Notifier";
            this.notifyIcon1.Visible = true;
            // 
            // txtPopPort
            // 
            this.txtPopPort.Location = new System.Drawing.Point(154, 56);
            this.txtPopPort.Name = "txtPopPort";
            this.txtPopPort.Size = new System.Drawing.Size(128, 21);
            this.txtPopPort.TabIndex = 3;
            this.txtPopPort.Text = "110";
            // 
            // txtUserName
            // 
            this.txtUserName.Location = new System.Drawing.Point(154, 83);
            this.txtUserName.Name = "txtUserName";
            this.txtUserName.Size = new System.Drawing.Size(128, 21);
            this.txtUserName.TabIndex = 5;
            this.txtUserName.Text = "";
            // 
            // timer1
            // 
            this.timer1.Enabled = true;
            this.timer1.Interval = 300000;
            this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
            // 
            // btnHide
            // 
            this.btnHide.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
            this.btnHide.Location = new System.Drawing.Point(133, 222);
            this.btnHide.Name = "btnHide";
            this.btnHide.Size = new System.Drawing.Size(96, 27);
            this.btnHide.TabIndex = 12;
            this.btnHide.Text = "隱  藏";
            this.btnHide.Click += new System.EventHandler(this.btnHide_Click);
            // 
            // txtPassword
            // 
            this.txtPassword.Location = new System.Drawing.Point(154, 111);
            this.txtPassword.Name = "txtPassword";
            this.txtPassword.PasswordChar = '*';
            this.txtPassword.Size = new System.Drawing.Size(128, 21);
            this.txtPassword.TabIndex = 6;
            this.txtPassword.Text = "";
            // 
            // txtTimer
            // 
            this.txtTimer.Location = new System.Drawing.Point(154, 139);
            this.txtTimer.Name = "txtTimer";
            this.txtTimer.Size = new System.Drawing.Size(128, 21);
            this.txtTimer.TabIndex = 10;
            this.txtTimer.Text = "5";
            // 
            // Form1
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
            this.ClientSize = new System.Drawing.Size(389, 255);
            this.Controls.AddRange(new System.Windows.Forms.Control[] {
                                                                          this.btnHide,
                                                                          this.label6,
                                                                          this.txtTimer,
                                                                          this.label5,
                                                                          this.btnCheckMail,
                                                                          this.label4,
                                                                          this.txtPassword,
                                                                          this.txtUserName,
                                                                          this.label3,
                                                                          this.txtPopPort,
                                                                          this.label2,
                                                                          this.label1,
                                                                          this.txtPopServer});
            this.Name = "Form1";
            this.ShowInTaskbar = false;
            this.Text = "郵件提示器";
            this.ResumeLayout(false);

        }
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}

		private void timer1_Tick(object sender, System.EventArgs e)
		{
			EmailCheck();
		}

		private void btnCheckMail_Click(object sender, System.EventArgs e)
		{
			EmailCheck();			
		}

		private void EmailCheck()
		{
			TcpClient tcpClient = new TcpClient();
			try
			{
				tcpClient.Connect(txtPopServer.Text,Int32.Parse(txtPopPort.Text));
			}
			catch
			{
				MessageBox.Show("Cannot connect to target host "+txtPopServer.Text +" and port "+txtPopPort.Text);
			}
			
			///get the response of pop3 mail server
			netStream = tcpClient.GetStream();
			if(netStream == null)
			{
				throw new Exception("GetStream is null");
			}

			string returnMsg=ReadFromNetStream(ref netStream);
			
			checkForError(returnMsg);

			///send username information
			WriteToNetStream(ref netStream, "USER " + this.txtUserName.Text);

			returnMsg=ReadFromNetStream(ref netStream);
			checkForError(returnMsg);

			///send password information
			WriteToNetStream(ref netStream, "PASS " + this.txtPassword.Text);

			returnMsg=ReadFromNetStream(ref netStream);
			checkForError(returnMsg);
			
			Stat();

			netStream.Close();
			tcpClient.Close();
			
		}
		public void Stat()
		{
			
			WriteToNetStream(ref netStream, "STAT");

			string returnMsg=ReadFromNetStream(ref netStream);
			checkForError(returnMsg);
			
			///split the information of total message and total size
			string[] TotalStat= returnMsg.Split(new char[] {' '});
			
			int count=Int32.Parse(TotalStat[1]);
			int totalSize=Int32.Parse(TotalStat[2]);
				emailnot= new EmailNotify(count);
			
				
                emailnot.Show();
			
		}
		private void WriteToNetStream(ref NetworkStream NetStream, string Command)
		{
			string stringToSend = Command + "\r\n";

			Byte[] arrayToSend = Encoding.ASCII.GetBytes(stringToSend.ToCharArray());
			NetStream.Write(arrayToSend, 0, arrayToSend.Length);
		}

		/// <summary>
		/// this function reads from  Network Stream
		/// </summary>
		/// <param name="NetStream"></param>
		/// <returns></returns>
		private String ReadFromNetStream(ref NetworkStream NetStream)
		{
			StringBuilder strReceived= new StringBuilder();
			StreamReader sr= new StreamReader(NetStream);
			String strLine = sr.ReadLine();

			while(strLine==null || strLine.Length==0)
			{
				strLine = sr.ReadLine();
			}
			strReceived.Append(strLine);

			if(sr.Peek()!=-1)
			{
				while ((strLine=sr.ReadLine())!=null) 
				{	
					strReceived.Append(strLine);
				}
			}
			return strReceived.ToString();
		}
		/// <summary>
		/// this function checks the error in the stream;
		/// </summary>
		/// <param name="s"></param>
		private void checkForError(String strMessage)
		{
			if (strMessage.IndexOf("+OK") == -1)
				throw new Exception("ERROR - . Recieved: " + strMessage);
		}

		private void menuItem2_Click(object sender, System.EventArgs e)
		{
			EmailCheck();
		}

		private void menuItem1_Click(object sender, System.EventArgs e)
		{
			this.Opacity=100;
			this.WindowState=FormWindowState.Normal;
		}

		private void btnHide_Click(object sender, System.EventArgs e)
		{
			this.Opacity=0;
			this.WindowState=FormWindowState.Minimized;
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品伊人色| 日本丰满少妇一区二区三区| 成人激情电影免费在线观看| 99re成人在线| 欧美岛国在线观看| 亚洲免费视频中文字幕| 久久99蜜桃精品| 一道本成人在线| 国产日韩欧美精品电影三级在线| 麻豆精品视频在线观看免费| 波多野结衣一区二区三区| 91.麻豆视频| 亚洲自拍欧美精品| 99精品国产99久久久久久白柏| 69成人精品免费视频| 亚洲永久免费视频| 成人天堂资源www在线| 日韩精品一区二区三区老鸭窝 | 亚洲天堂中文字幕| 精品在线一区二区| 日韩一区二区在线看| 伊人婷婷欧美激情| 99久久免费精品高清特色大片| 精品国产99国产精品| 日本不卡一区二区| 欧美精选一区二区| 午夜电影一区二区| 欧美日韩精品免费观看视频| 一区二区三区国产精华| 99视频在线精品| 最近日韩中文字幕| 91色porny蝌蚪| 一区二区三区四区精品在线视频| 成人黄色一级视频| 亚洲视频一二三区| 色香蕉久久蜜桃| 亚洲在线中文字幕| 欧美日韩另类一区| 天天综合色天天| 在线观看91av| 精品伊人久久久久7777人| 精品免费日韩av| 91丨九色porny丨蝌蚪| 中文字幕在线不卡| av一区二区不卡| 亚洲国产日产av| 制服丝袜亚洲精品中文字幕| 青青国产91久久久久久| 欧美成人精品3d动漫h| 国产自产高清不卡| 欧美国产精品专区| 色婷婷久久久久swag精品| 亚洲成精国产精品女| 欧美一区二区日韩| 国产一区二区不卡| 亚洲老妇xxxxxx| 欧美久久一二区| 狠狠色丁香久久婷婷综合丁香| 中文乱码免费一区二区| 日本黄色一区二区| 麻豆国产精品777777在线| 国产欧美视频在线观看| 色女孩综合影院| 蜜桃av噜噜一区二区三区小说| 精品国产露脸精彩对白| 91免费国产视频网站| 欧美aaaaa成人免费观看视频| 久久免费午夜影院| 欧美自拍偷拍一区| 国产一区二区免费视频| 亚洲精品国久久99热| 日韩三级在线观看| 成人av网站免费观看| 偷拍一区二区三区| 日本一区二区三区dvd视频在线| 99国产精品久久久久久久久久| 天堂午夜影视日韩欧美一区二区| 久久精品人人做人人综合 | 国产精品主播直播| 亚洲第一主播视频| 欧美国产一区二区| 欧美一区二区三级| 色诱亚洲精品久久久久久| 狠狠色丁香久久婷婷综| 亚洲444eee在线观看| 国产精品久久久久一区二区三区| 日韩一区二区三区视频| 91国产精品成人| 国产成人综合自拍| 免费在线观看视频一区| 亚洲黄一区二区三区| 国产午夜精品美女毛片视频| 91精品国产综合久久久久久久| 色综合色综合色综合| 国产精品一区二区免费不卡| 蜜臀a∨国产成人精品| 亚洲一区国产视频| 亚洲视频在线观看一区| 亚洲国产成人午夜在线一区| 欧美精品一区二区三区一线天视频 | 伊人婷婷欧美激情| 国产精品国产三级国产a| 2019国产精品| 欧美麻豆精品久久久久久| 色婷婷久久久综合中文字幕| 成人黄色软件下载| 国产成人精品三级麻豆| 久久不见久久见免费视频7| 日韩国产一二三区| 天堂影院一区二区| 日韩av一区二区三区| 国产精品自拍毛片| 国产综合久久久久影院| 韩国成人福利片在线播放| 麻豆一区二区三区| 日本不卡不码高清免费观看| 午夜成人在线视频| 午夜国产不卡在线观看视频| 午夜精品福利在线| 婷婷中文字幕一区三区| 日韩精品一区第一页| 奇米精品一区二区三区四区| 蜜臀精品一区二区三区在线观看 | 国产日韩欧美电影| 久久久久久久性| 国产欧美日韩麻豆91| 国产精品女上位| 亚洲欧美视频在线观看视频| 一区二区在线观看av| 亚洲综合一二区| 三级一区在线视频先锋| 免费国产亚洲视频| 韩日精品视频一区| www.性欧美| 精品视频一区二区三区免费| 日韩一级片网址| 久久久精品中文字幕麻豆发布| 中文字幕免费不卡在线| 亚洲精品日日夜夜| 偷拍日韩校园综合在线| 激情综合色播激情啊| 丁香网亚洲国际| 色94色欧美sute亚洲线路一久| 欧美视频一区二| 精品国产乱码久久久久久夜甘婷婷 | 欧美精品一区二| 国产精品看片你懂得| 亚洲大片在线观看| 久久99国产精品免费网站| 成人国产在线观看| 欧美日韩国产高清一区二区三区| 日韩免费成人网| 综合久久久久综合| 六月丁香综合在线视频| 成人h动漫精品| 91精品欧美一区二区三区综合在| 亚洲第一在线综合网站| 久久国产综合精品| 91天堂素人约啪| 久久午夜国产精品| 五月综合激情网| 国产成人精品一区二区三区网站观看 | 欧美色成人综合| www久久精品| 亚洲综合一区二区| 国产福利一区二区三区在线视频| 91丨porny丨首页| 精品国产一区二区亚洲人成毛片| 中文字幕在线观看一区二区| 亚洲一卡二卡三卡四卡 | 天堂在线亚洲视频| 成人黄色在线看| 日韩一区二区三| 亚洲猫色日本管| 国产精品一区二区男女羞羞无遮挡| 欧美亚洲日本国产| 中文字幕在线一区| 国产专区欧美精品| 欧美日韩国产天堂| 一区二区三区中文字幕电影 | 日韩理论在线观看| 国产风韵犹存在线视精品| 欧美一级高清片在线观看| 亚洲一区二区在线免费观看视频| 国产盗摄精品一区二区三区在线 | 亚洲电影一级黄| 色综合久久99| 国产精品女人毛片| 国产精品主播直播| 欧美精品一区二区三| 日本不卡123| 欧美日韩不卡一区二区| 一区二区三区产品免费精品久久75| 丁香亚洲综合激情啪啪综合| 久久久久久9999| 美国毛片一区二区| 日韩一卡二卡三卡| 久久国产精品区| 精品福利av导航| 韩国v欧美v日本v亚洲v|