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

📄 welcome.cs

📁 独立完成考勤管理软件加打卡系统(C#) 是打卡加管理系统软件 
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace WindowsApplication.WelCome
{
	/// <summary>
	/// Welcome 的摘要说明。
	/// </summary>
	public class Welcome : System.Windows.Forms.Form
	{
		private System.Windows.Forms.PictureBox lowsImage;
		private System.Windows.Forms.PictureBox topImage;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label TitleLabel;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Timer timer;
		private System.Windows.Forms.Label dataLabel;
		private System.ComponentModel.IContainer components;

		public Welcome()
		{
			//
			// 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()
		{
			this.components = new System.ComponentModel.Container();
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Welcome));
			this.lowsImage = new System.Windows.Forms.PictureBox();
			this.topImage = new System.Windows.Forms.PictureBox();
			this.label1 = new System.Windows.Forms.Label();
			this.label2 = new System.Windows.Forms.Label();
			this.label3 = new System.Windows.Forms.Label();
			this.dataLabel = new System.Windows.Forms.Label();
			this.TitleLabel = new System.Windows.Forms.Label();
			this.label4 = new System.Windows.Forms.Label();
			this.timer = new System.Windows.Forms.Timer(this.components);
			this.SuspendLayout();
			// 
			// lowsImage
			// 
			this.lowsImage.Image = ((System.Drawing.Image)(resources.GetObject("lowsImage.Image")));
			this.lowsImage.Location = new System.Drawing.Point(0, 160);
			this.lowsImage.Name = "lowsImage";
			this.lowsImage.Size = new System.Drawing.Size(456, 120);
			this.lowsImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
			this.lowsImage.TabIndex = 0;
			this.lowsImage.TabStop = false;
			// 
			// topImage
			// 
			this.topImage.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
			this.topImage.Image = ((System.Drawing.Image)(resources.GetObject("topImage.Image")));
			this.topImage.Location = new System.Drawing.Point(0, 40);
			this.topImage.Name = "topImage";
			this.topImage.Size = new System.Drawing.Size(184, 120);
			this.topImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
			this.topImage.TabIndex = 1;
			this.topImage.TabStop = false;
			// 
			// label1
			// 
			this.label1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
			this.label1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label1.Font = new System.Drawing.Font("MV Boli", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label1.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(255)), ((System.Byte)(192)));
			this.label1.Location = new System.Drawing.Point(0, 280);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(424, 32);
			this.label1.TabIndex = 2;
			this.label1.Text = "2006 China check on work attendance";
			this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label2
			// 
			this.label2.BackColor = System.Drawing.Color.White;
			this.label2.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label2.ForeColor = System.Drawing.Color.Blue;
			this.label2.Location = new System.Drawing.Point(152, 40);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(272, 120);
			this.label2.TabIndex = 3;
			// 
			// label3
			// 
			this.label3.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label3.Font = new System.Drawing.Font("宋体", 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.label3.ForeColor = System.Drawing.Color.Blue;
			this.label3.Location = new System.Drawing.Point(144, 56);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(272, 32);
			this.label3.TabIndex = 4;
			this.label3.Text = "考勤管理软件";
			this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// dataLabel
			// 
			this.dataLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.dataLabel.Font = new System.Drawing.Font("宋体", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.dataLabel.ForeColor = System.Drawing.Color.Blue;
			this.dataLabel.Location = new System.Drawing.Point(136, 104);
			this.dataLabel.Name = "dataLabel";
			this.dataLabel.Size = new System.Drawing.Size(272, 32);
			this.dataLabel.TabIndex = 5;
			this.dataLabel.Text = "数据库正在加载...";
			this.dataLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// TitleLabel
			// 
			this.TitleLabel.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
			this.TitleLabel.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.TitleLabel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.TitleLabel.ForeColor = System.Drawing.Color.Lime;
			this.TitleLabel.Location = new System.Drawing.Point(0, 0);
			this.TitleLabel.Name = "TitleLabel";
			this.TitleLabel.Size = new System.Drawing.Size(424, 40);
			this.TitleLabel.TabIndex = 6;
			this.TitleLabel.Text = "-------------------------------------------------------------------";
			this.TitleLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// label4
			// 
			this.label4.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
			this.label4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
			this.label4.ForeColor = System.Drawing.Color.Aqua;
			this.label4.Location = new System.Drawing.Point(160, 8);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(104, 16);
			this.label4.TabIndex = 7;
			this.label4.Text = "www.haohaizi.com";
			this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
			// 
			// timer
			// 
			this.timer.Enabled = true;
			this.timer.Interval = 500;
			this.timer.Tick += new System.EventHandler(this.timer_Tick);
			// 
			// Welcome
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.BackColor = System.Drawing.SystemColors.ControlLightLight;
			this.ClientSize = new System.Drawing.Size(424, 312);
			this.Controls.Add(this.label4);
			this.Controls.Add(this.topImage);
			this.Controls.Add(this.TitleLabel);
			this.Controls.Add(this.dataLabel);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.label1);
			this.Controls.Add(this.lowsImage);
			this.Cursor = System.Windows.Forms.Cursors.Hand;
			this.ForeColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(128)), ((System.Byte)(255)));
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.MaximizeBox = false;
			this.MinimizeBox = false;
			this.Name = "Welcome";
			this.ShowInTaskbar = false;
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "Welcome";
			this.Load += new System.EventHandler(this.Welcome_Load);
			this.ResumeLayout(false);

		}
		#endregion

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

		private void timer_Tick(object sender, System.EventArgs e)
		{
			try
			{
//				if(this.Opacity==1)
//				{
//					//this.dataLabel.Text+="...";
//					this.dataLabel.TextAlign=System.Drawing.ContentAlignment.MiddleCenter;
//				}
				if(this.dataLabel.Text.Trim().Equals("数据库正在加载..."))
				{
					this.dataLabel.Text="数据已经初始化完成...!";
					System.Threading.Thread.Sleep(1000);
				}
				if(this.dataLabel.Text.Equals("数据已经初始化完成...!"))
				{
					this.Opacity=-0.1;
					if(this.Opacity<0.2)
					{
						this.Visible=false;
						this.Dispose();
					}
				}
			}
			catch(Exception exe)
			{
				exe.ToString();
			}
		}
	}
}

⌨️ 快捷键说明

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