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

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

?? form1.cs

?? 煤礦信息管理系統是基于SuperMap Object
?? CS
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Threading;






namespace conn
{
	/// <summary>
	/// Form1 的摘要說明。
	/// </summary>
	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Button button1;
		private System.Windows.Forms.Button button2;
		private System.Windows.Forms.Button button3;
		private System.Windows.Forms.TextBox server_ip;
		private System.Windows.Forms.TextBox server_uname;
		private System.Windows.Forms.TextBox server_upass;
		/// <summary>
		/// 必需的設計器變量。
		/// </summary>
		private System.ComponentModel.Container components = null;
		private  string ConnectionString;
		private Thread myt;
		private System.Windows.Forms.PictureBox pictureBox1;


		private SqlConnection myConn = 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 窗體設計器生成的代碼
		/// <summary>
		/// 設計器支持所需的方法 - 不要使用代碼編輯器修改
		/// 此方法的內容。
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
			this.label1 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.button1 = new System.Windows.Forms.Button();
			this.button2 = new System.Windows.Forms.Button();
			this.button3 = new System.Windows.Forms.Button();
			this.server_ip = new System.Windows.Forms.TextBox();
			this.server_uname = new System.Windows.Forms.TextBox();
			this.server_upass = new System.Windows.Forms.TextBox();
			this.pictureBox1 = new System.Windows.Forms.PictureBox();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(32, 16);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(80, 24);
			this.label1.TabIndex = 0;
			this.label1.Text = "服務器IP地址";
			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(24, 48);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(88, 16);
			this.label3.TabIndex = 2;
			this.label3.Text = "數據庫用戶名";
			this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(40, 80);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(72, 23);
			this.label4.TabIndex = 3;
			this.label4.Text = "數據庫密碼";
			this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// button1
			// 
			this.button1.Location = new System.Drawing.Point(88, 128);
			this.button1.Name = "button1";
			this.button1.Size = new System.Drawing.Size(72, 24);
			this.button1.TabIndex = 4;
			this.button1.Text = "測試";
			this.button1.Click += new System.EventHandler(this.button1_Click);
			// 
			// button2
			// 
			this.button2.Location = new System.Drawing.Point(168, 128);
			this.button2.Name = "button2";
			this.button2.Size = new System.Drawing.Size(72, 24);
			this.button2.TabIndex = 5;
			this.button2.Text = "生成文件";
			this.button2.Click += new System.EventHandler(this.button2_Click);
			// 
			// button3
			// 
			this.button3.Location = new System.Drawing.Point(256, 128);
			this.button3.Name = "button3";
			this.button3.Size = new System.Drawing.Size(72, 24);
			this.button3.TabIndex = 6;
			this.button3.Text = "退出";
			this.button3.Click += new System.EventHandler(this.button3_Click);
			// 
			// server_ip
			// 
			this.server_ip.Location = new System.Drawing.Point(128, 15);
			this.server_ip.Name = "server_ip";
			this.server_ip.Size = new System.Drawing.Size(112, 21);
			this.server_ip.TabIndex = 7;
			this.server_ip.Text = "";
			// 
			// server_uname
			// 
			this.server_uname.Location = new System.Drawing.Point(128, 48);
			this.server_uname.Name = "server_uname";
			this.server_uname.Size = new System.Drawing.Size(112, 21);
			this.server_uname.TabIndex = 9;
			this.server_uname.Text = "";
			// 
			// server_upass
			// 
			this.server_upass.Location = new System.Drawing.Point(128, 80);
			this.server_upass.Name = "server_upass";
			this.server_upass.PasswordChar = '*';
			this.server_upass.Size = new System.Drawing.Size(112, 21);
			this.server_upass.TabIndex = 10;
			this.server_upass.Text = "";
			// 
			// pictureBox1
			// 
			this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.pictureBox1.Location = new System.Drawing.Point(13, 112);
			this.pictureBox1.Name = "pictureBox1";
			this.pictureBox1.Size = new System.Drawing.Size(328, 4);
			this.pictureBox1.TabIndex = 11;
			this.pictureBox1.TabStop = false;
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(352, 165);
			this.Controls.Add(this.pictureBox1);
			this.Controls.Add(this.server_upass);
			this.Controls.Add(this.server_uname);
			this.Controls.Add(this.server_ip);
			this.Controls.Add(this.button3);
			this.Controls.Add(this.button2);
			this.Controls.Add(this.button1);
			this.Controls.Add(this.label4);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.label1);
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.MaximizeBox = false;
			this.Name = "Form1";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "煤礦信息管理系統授權文件生成器";
			this.ResumeLayout(false);

		}
		#endregion

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

		private void button1_Click(object sender, System.EventArgs e)
		{
		    string server_ip = this.server_ip.Text.ToString();
			string server_db ="workspace";
			string server_uname = this.server_uname.Text.ToString();
			string server_upass = this.server_upass.Text.ToString();
		    ConnectionString = "Server="+server_ip+";database="+server_db+";UID="+server_uname+";Password="+server_upass+"";
			
			myt = new Thread(new ThreadStart(tryConn));
		     myt.Start();



		}

		private void tryConn()
		{
			string ConnectionString = this.ConnectionString;
			try
			{
				//string ConnectionString = "Server="+server_ip+";database="+server_db+";UID="+server_uname+";Password="+server_upass+"";
				
				myConn = new SqlConnection(ConnectionString);
				SqlCommand myCommand = new SqlCommand();
				myCommand.CommandText = "select id from users";
				myCommand.Connection = myConn;
				myConn.Open();
				SqlDataReader myData = myCommand.ExecuteReader();

				if(myData!= null)
				{
					MessageBox.Show("測試成功!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
					myConn.Close();
					
				}
				else
				{
					MessageBox.Show("連接錯誤,請檢查輸入是否正確!","警告",MessageBoxButtons.OK,MessageBoxIcon.Error);
					
				}
			}
			catch(SqlException e)
			{
				MessageBox.Show("連接錯誤,請檢查輸入是否正確!\n\n錯誤信息:"+e.Message.ToString(),"警告",MessageBoxButtons.OK,MessageBoxIcon.Error);
				
			}
			finally
			{
				myConn.Close();
			}

		}

		private void button2_Click(object sender, System.EventArgs e)
		{
			 FolderBrowserDialog ff = new FolderBrowserDialog();
			
			 string server_ip = this.server_ip.Text.ToString().Trim();
			 string server_db = "workspace";
			 string server_uname = this.server_uname.Text.ToString().Trim();
			 string server_upass = this.server_upass.Text.ToString().Trim();
			 
			
			 server_ip =code_en_de.Encode(server_ip);
			 server_db = code_en_de.Encode(server_db);
			 server_uname = code_en_de.Encode(server_uname);
			 server_upass = code_en_de.Encode(server_upass);
			 string connString = server_ip+"|"+server_db+"|"+server_uname+"|"+server_upass;
			 StreamWriter sr=null;
			if(ff.ShowDialog() == DialogResult.OK)
			{
				try 
				{
					string url= ff.SelectedPath;
					url = url+"\\授權文件.dat";
					sr = File.CreateText(url);
					sr.WriteLine (connString);
					sr.Close();
					MessageBox.Show("在指定目錄下成功生成授權文件","信息");
				}

				catch (Exception ea) 
				{
					MessageBox.Show("錯誤信息: " + ea.Message);
				
				}
				finally                
				{
					sr.Close();
				}
			}


			 		

		}

		private void button3_Click(object sender, System.EventArgs e)
		{
			this.Dispose();
			Application.Exit();
		}
	}
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
最新欧美精品一区二区三区| 国产精品久久久久久久第一福利 | 日本美女视频一区二区| 精品免费99久久| 日本国产一区二区| 成人免费视频一区| 日韩av电影天堂| 中文字幕在线观看一区二区| 日韩一区二区三区在线| 91亚洲精品一区二区乱码| 久久99精品久久久久久动态图 | 久久精品国产久精国产| 亚洲视频在线观看三级| 精品999在线播放| 欧美日韩国产123区| 99久久国产综合色|国产精品| 丝袜美腿亚洲综合| 亚洲专区一二三| 亚洲中国最大av网站| 国产精品国产馆在线真实露脸| 国产欧美日韩在线观看| 精品电影一区二区| 国产婷婷色一区二区三区| 久久婷婷久久一区二区三区| 日韩欧美黄色影院| 日韩精品一区二区三区四区| 久久亚洲一区二区三区四区| 日韩精品一区二区三区蜜臀| 精品国产百合女同互慰| 欧美日韩国产欧美日美国产精品| 91日韩一区二区三区| 成人免费福利片| 欧美日韩综合色| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 成人涩涩免费视频| 成人sese在线| 色婷婷综合久久久久中文| 91国偷自产一区二区使用方法| 91色视频在线| 日韩欧美色电影| 久久综合久久综合九色| 日本一区二区在线不卡| 舔着乳尖日韩一区| 久久狠狠亚洲综合| 一色桃子久久精品亚洲| 精品国产91洋老外米糕| 国产日韩欧美a| 一区二区在线看| 奇米精品一区二区三区在线观看一| 国产九色sp调教91| 老司机免费视频一区二区| 成人手机电影网| 欧美日韩国产一级片| 久久久久免费观看| 亚洲综合色成人| 国产精品99久久久久久似苏梦涵 | 99久久er热在这里只有精品15 | 6080午夜不卡| 国产精品无遮挡| 视频一区二区三区中文字幕| 粉嫩嫩av羞羞动漫久久久| 欧美日韩视频在线观看一区二区三区| 久久综合狠狠综合久久激情 | www.成人在线| 欧美一级久久久| 日韩美女啊v在线免费观看| 久久精品国产第一区二区三区| 中文字幕亚洲电影| 亚洲一区二区三区视频在线| 国产成人亚洲综合a∨猫咪 | 亚洲精品videosex极品| 久久66热re国产| 欧美日韩一本到| 国产精品素人视频| 香蕉影视欧美成人| 99久久综合99久久综合网站| 欧美日本在线观看| 亚洲欧美综合在线精品| 午夜成人免费视频| 成人免费电影视频| 久久综合九色综合97婷婷女人| 亚洲欧美二区三区| 成人午夜电影网站| 日韩一区二区麻豆国产| 亚洲综合色噜噜狠狠| 成人成人成人在线视频| 日韩一区二区高清| 亚洲天天做日日做天天谢日日欢 | 欧美曰成人黄网| 国产精品久久久久久久久免费桃花| 偷拍一区二区三区四区| 欧美在线综合视频| 国产精品久久看| 成人激情午夜影院| 亚洲精品一区二区在线观看| 美女在线一区二区| 欧美亚洲高清一区二区三区不卡| 亚洲三级久久久| 黑人巨大精品欧美一区| 日韩一区和二区| 麻豆成人91精品二区三区| 精品婷婷伊人一区三区三| 亚洲欧美日韩小说| 成人h动漫精品一区二| 国产人伦精品一区二区| 国产在线视频一区二区| 日韩欧美亚洲国产另类| 日韩成人一级片| 制服.丝袜.亚洲.中文.综合| 亚洲一二三级电影| 欧美精品在线观看播放| 亚洲一区二区三区四区五区黄| 欧美亚洲另类激情小说| 亚洲精品国产a| 欧洲国内综合视频| 亚洲黄色小视频| 欧美中文字幕一二三区视频| 国产精品免费视频网站| av爱爱亚洲一区| 亚洲精品日韩一| 91国产福利在线| 日韩二区三区在线观看| 在线欧美小视频| 亚洲不卡一区二区三区| 欧美日韩一区二区在线观看视频| 天堂蜜桃一区二区三区| 6080亚洲精品一区二区| 香蕉久久夜色精品国产使用方法| 欧美性xxxxx极品少妇| 日韩高清一区在线| 日韩欧美国产三级电影视频| 亚洲国产一二三| 国产一区二区三区在线观看免费 | 麻豆精品一区二区av白丝在线| 5858s免费视频成人| 亚洲国产精品久久久久婷婷884 | 欧美韩日一区二区三区四区| 99精品久久只有精品| 亚洲精品国产a| 日韩欧美国产精品一区| 国产福利91精品一区| 一区二区国产视频| 777亚洲妇女| 成人激情av网| 亚洲国产中文字幕在线视频综合 | 精品国偷自产国产一区| 国产在线不卡一区| 亚洲欧美日本在线| 欧美三区在线视频| 国产不卡高清在线观看视频| 中文字幕视频一区二区三区久| 91精品婷婷国产综合久久 | 日韩精品一区二区三区中文不卡| 国产美女在线观看一区| 亚洲国产精品久久人人爱蜜臀| 日韩欧美色综合网站| 91蝌蚪porny成人天涯| 天堂蜜桃一区二区三区| 国产精品美女久久久久久| 欧美日韩一区二区在线观看视频| 国产精品综合一区二区| 日韩一区二区不卡| 国产69精品久久久久777| 日韩高清在线电影| 久久久久国产精品人| 欧美性大战久久| 精品一区二区三区影院在线午夜| 国产无一区二区| 成人综合在线观看| 亚洲一区二区四区蜜桃| 色哦色哦哦色天天综合| 久久疯狂做爰流白浆xx| 国产日本亚洲高清| 久久99久久久久久久久久久| 自拍偷拍亚洲欧美日韩| 色就色 综合激情| 国产在线一区二区综合免费视频| 国产亚洲精品超碰| 欧美人动与zoxxxx乱| 蜜桃精品视频在线观看| 欧美色区777第一页| 精品一区二区三区香蕉蜜桃| 国产欧美日韩亚州综合| www..com久久爱| 久久嫩草精品久久久精品一| 免费成人av资源网| 亚洲影院理伦片| 国产精品超碰97尤物18| 午夜精品久久久久久久久久 | 国产一二精品视频| 欧美人狂配大交3d怪物一区| 欧美一区二区大片| 日本一区二区不卡视频| 精品在线观看视频| 91麻豆精品国产91久久久更新时间| 久久人人97超碰com| 午夜影院久久久| 五月天激情综合| 国产一本一道久久香蕉| 欧美日韩中文字幕一区二区|