⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.cs

📁 一个WINCE下用ado.net连接数据库的例子 作者:tanis
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;


namespace AutoRefresh
{
	/// <summary>
	/// Form1 的摘要说明。
	/// </summary>
	/// 

	public class Form1 : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Panel panel1;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Button btnLog;
		private System.Windows.Forms.Button btnRefreshPgm;
		private System.Windows.Forms.Button btnExit;
		public  LogDlg logdlg = null;
        private Form3  downloaddlg = null;
        public static  Para static_Para = new Para();      

		//
		Form1()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
			logdlg = new LogDlg ();
			logdlg.Hide();
			downloaddlg = new Form3()  ;
			downloaddlg.Hide();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}
		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			base.Dispose( disposing );
		}
		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			
		this.panel1 = new System.Windows.Forms.Panel();
		this.btnLog = new System.Windows.Forms.Button();
		this.btnRefreshPgm = new System.Windows.Forms.Button();
		this.btnExit = new System.Windows.Forms.Button();
		this.label1 = new System.Windows.Forms.Label();
		// 
		// panel1
		// 
		this.panel1.BackColor = System.Drawing.Color.AntiqueWhite;
		this.panel1.Controls.Add(this.btnLog);
		this.panel1.Controls.Add(this.btnRefreshPgm);
		this.panel1.Controls.Add(this.btnExit);
		this.panel1.Location = new System.Drawing.Point(16, 48);
		this.panel1.Size = new System.Drawing.Size(208, 176);
		this.panel1.GotFocus += new System.EventHandler(this.panel1_GotFocus);
		// 
		// btnLog
		// 
		this.btnLog.Location = new System.Drawing.Point(16, 16);
		this.btnLog.Size = new System.Drawing.Size(88, 32);
		this.btnLog.Text = "用户配置";
		this.btnLog.Click += new System.EventHandler(this.btnLog_Click_1);
		// 
		// btnRefreshPgm
		// 
		this.btnRefreshPgm.Location = new System.Drawing.Point(16, 64);
		this.btnRefreshPgm.Size = new System.Drawing.Size(88, 32);
		this.btnRefreshPgm.Text = "代码更新";
		this.btnRefreshPgm.Click += new System.EventHandler(this.btnRefreshPgm_Click);
		// 
		// btnExit
		// 
		this.btnExit.Location = new System.Drawing.Point(16, 112);
		this.btnExit.Size = new System.Drawing.Size(88, 32);
		this.btnExit.Text = "程序退出";
		this.btnExit.Click += new System.EventHandler(this.btnExit_Click_1);
		// 
		// label1
		// 
		this.label1.ForeColor = System.Drawing.SystemColors.WindowText;
		this.label1.Location = new System.Drawing.Point(8, 16);
		this.label1.Size = new System.Drawing.Size(208, 20);
		this.label1.Text = "葵花餐饮系统:简明控制台";
		// 
		// Form1
		// 
		this.ClientSize = new System.Drawing.Size(250, 311);
		this.Controls.Add(this.label1);
		this.Controls.Add(this.panel1);
		this.Text = "程序自动更新程序";
		this.Load += new System.EventHandler(this.Form1_Load);

	}
	#endregion

	/// <summary>
	/// 应用程序的主入口点。
	/// </summary>

	   public static void Main() 
        {
			Application.Run(new Form1());
		}

		private void Form1_Load(object sender, System.EventArgs e)
		{
		
		}

	

		private void btnLog_Click_1(object sender, System.EventArgs e)
		{
			try
			{
				logdlg.Show();
			}
			catch(Exception)
			{
			  logdlg = new LogDlg();
			  logdlg.Show();
			}
		}
			

		void btnRefreshPgm_Click(object sender, System.EventArgs e)
		{
			try
			{
				downloaddlg.Show();
			}
			catch(Exception)
			{
			  downloaddlg = new Form3();
			  downloaddlg.Show();
			}


		     
		}

		private void btnExit_Click_1(object sender, System.EventArgs e)
		{
	     	 this.Close();
		}

		private void logdlg_Load(object sender, System.EventArgs e)
		{
		
		}

		private void panel1_GotFocus(object sender, System.EventArgs e)
		{
		
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -