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

📄 主界面.cs

📁 管理学院机房计费系统,VISUAL STUDIO .NET 2003 c# 语言实现,SQL SERVER 2000数据库. 现运行正常.
💻 CS
📖 第 1 页 / 共 5 页
字号:
			this.menuItem26.Click += new System.EventHandler(this.menuItem26_Click);
			// 
			// menuItem7
			// 
			this.menuItem7.Index = 5;
			this.menuItem7.Text = "消费累积优惠";
			this.menuItem7.Click += new System.EventHandler(this.menuItem7_Click_1);
			// 
			// menuItem4
			// 
			this.menuItem4.Index = 3;
			this.menuItem4.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.menuItem14,
																					  this.menuItem15,
																					  this.menuItem23});
			this.menuItem4.Text = "信息报表";
			// 
			// menuItem14
			// 
			this.menuItem14.Index = 0;
			this.menuItem14.Text = "信息查询";
			this.menuItem14.Click += new System.EventHandler(this.menuItem14_Click);
			// 
			// menuItem15
			// 
			this.menuItem15.Index = 1;
			this.menuItem15.Text = "生成报表";
			this.menuItem15.Click += new System.EventHandler(this.menuItem15_Click);
			// 
			// menuItem23
			// 
			this.menuItem23.Index = 2;
			this.menuItem23.Text = "日统计信息";
			this.menuItem23.Click += new System.EventHandler(this.menuItem23_Click);
			// 
			// menuItem5
			// 
			this.menuItem5.Index = 4;
			this.menuItem5.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.menuItem19,
																					  this.menuItem20});
			this.menuItem5.Text = "帮助";
			// 
			// menuItem19
			// 
			this.menuItem19.Index = 0;
			this.menuItem19.Text = "使用手册";
			this.menuItem19.Click += new System.EventHandler(this.menuItem19_Click);
			// 
			// menuItem20
			// 
			this.menuItem20.Index = 1;
			this.menuItem20.Text = "关于";
			this.menuItem20.Click += new System.EventHandler(this.menuItem20_Click);
			// 
			// groupBox3
			// 
			this.groupBox3.Controls.Add(this.label21);
			this.groupBox3.Controls.Add(this.label20);
			this.groupBox3.Controls.Add(this.label17);
			this.groupBox3.Controls.Add(this.label16);
			this.groupBox3.Controls.Add(this.label22);
			this.groupBox3.Controls.Add(this.label19);
			this.groupBox3.Controls.Add(this.label18);
			this.groupBox3.Controls.Add(this.label15);
			this.groupBox3.Controls.Add(this.label14);
			this.groupBox3.Controls.Add(this.label13);
			this.groupBox3.Controls.Add(this.label12);
			this.groupBox3.Location = new System.Drawing.Point(512, 96);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new System.Drawing.Size(256, 352);
			this.groupBox3.TabIndex = 24;
			this.groupBox3.TabStop = false;
			this.groupBox3.Text = "实时信息";
			this.groupBox3.Enter += new System.EventHandler(this.groupBox3_Enter);
			this.groupBox3.MouseHover += new System.EventHandler(this.groupBox3_MouseHover);
			// 
			// label21
			// 
			this.label21.Location = new System.Drawing.Point(200, 208);
			this.label21.Name = "label21";
			this.label21.Size = new System.Drawing.Size(28, 23);
			this.label21.TabIndex = 14;
			this.label21.Text = "元";
			this.label21.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label20
			// 
			this.label20.Location = new System.Drawing.Point(200, 272);
			this.label20.Name = "label20";
			this.label20.Size = new System.Drawing.Size(24, 23);
			this.label20.TabIndex = 13;
			this.label20.Text = "人";
			this.label20.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label17
			// 
			this.label17.Location = new System.Drawing.Point(200, 144);
			this.label17.Name = "label17";
			this.label17.Size = new System.Drawing.Size(24, 23);
			this.label17.TabIndex = 12;
			this.label17.Text = "人";
			this.label17.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label16
			// 
			this.label16.Location = new System.Drawing.Point(128, 272);
			this.label16.Name = "label16";
			this.label16.Size = new System.Drawing.Size(56, 23);
			this.label16.TabIndex = 11;
			this.label16.Text = "label16";
			this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label22
			// 
			this.label22.Location = new System.Drawing.Point(8, 272);
			this.label22.Name = "label22";
			this.label22.Size = new System.Drawing.Size(112, 23);
			this.label22.TabIndex = 10;
			this.label22.Text = "累计上机人数";
			this.label22.TextAlign = System.Drawing.ContentAlignment.BottomRight;
			// 
			// label19
			// 
			this.label19.Location = new System.Drawing.Point(128, 208);
			this.label19.Name = "label19";
			this.label19.Size = new System.Drawing.Size(56, 23);
			this.label19.TabIndex = 7;
			this.label19.Text = "label19";
			this.label19.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label18
			// 
			this.label18.Location = new System.Drawing.Point(16, 208);
			this.label18.Name = "label18";
			this.label18.Size = new System.Drawing.Size(104, 23);
			this.label18.TabIndex = 6;
			this.label18.Text = "当前充值额";
			this.label18.TextAlign = System.Drawing.ContentAlignment.BottomRight;
			// 
			// label15
			// 
			this.label15.Location = new System.Drawing.Point(128, 144);
			this.label15.Name = "label15";
			this.label15.Size = new System.Drawing.Size(56, 23);
			this.label15.TabIndex = 3;
			this.label15.Text = "label15";
			this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label14
			// 
			this.label14.Location = new System.Drawing.Point(8, 144);
			this.label14.Name = "label14";
			this.label14.Size = new System.Drawing.Size(112, 23);
			this.label14.TabIndex = 2;
			this.label14.Text = "当前上机人数";
			this.label14.TextAlign = System.Drawing.ContentAlignment.BottomRight;
			// 
			// label13
			// 
			this.label13.Location = new System.Drawing.Point(128, 80);
			this.label13.Name = "label13";
			this.label13.Size = new System.Drawing.Size(96, 23);
			this.label13.TabIndex = 1;
			this.label13.Text = "label13";
			this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label12
			// 
			this.label12.Location = new System.Drawing.Point(16, 80);
			this.label12.Name = "label12";
			this.label12.Size = new System.Drawing.Size(104, 23);
			this.label12.TabIndex = 0;
			this.label12.Text = "值班教师";
			this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
			// 
			// timer1
			// 
			this.timer1.Interval = 900000;
			this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
			// 
			// sqlConnection3
			// 
			this.sqlConnection3.ConnectionString = "workstation id=XU;packet size=4096;integrated security=SSPI;data source=XU;persis" +
				"t security info=False;initial catalog=jifei";
			// 
			// sqlConnection4
			// 
			this.sqlConnection4.ConnectionString = "workstation id=XU;packet size=4096;integrated security=SSPI;data source=XU;persis" +
				"t security info=False;initial catalog=jifei";
			// 
			// sqlConnection5
			// 
			this.sqlConnection5.ConnectionString = "workstation id=XU;packet size=4096;integrated security=SSPI;data source=XU;persis" +
				"t security info=False;initial catalog=jifei";
			// 
			// toolBar1
			// 
			this.toolBar1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
			this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
																						this.toolBarButton1,
																						this.toolBarButton3,
																						this.toolBarButton2});
			this.toolBar1.ButtonSize = new System.Drawing.Size(60, 40);
			this.toolBar1.Divider = false;
			this.toolBar1.DropDownArrows = true;
			this.toolBar1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
			this.toolBar1.Location = new System.Drawing.Point(0, 0);
			this.toolBar1.Name = "toolBar1";
			this.toolBar1.ShowToolTips = true;
			this.toolBar1.Size = new System.Drawing.Size(790, 45);
			this.toolBar1.TabIndex = 25;
			this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
			// 
			// toolBarButton1
			// 
			this.toolBarButton1.Text = "充值";
			// 
			// toolBarButton3
			// 
			this.toolBarButton3.Text = "新建账户";
			// 
			// toolBarButton2
			// 
			this.toolBarButton2.Text = "账户信息";
			// 
			// frmMain
			// 
			this.AutoScale = false;
			this.AutoScaleBaseSize = new System.Drawing.Size(8, 19);
			this.ClientSize = new System.Drawing.Size(790, 495);
			this.Controls.Add(this.toolBar1);
			this.Controls.Add(this.groupBox3);
			this.Controls.Add(this.label11);
			this.Controls.Add(this.label10);
			this.Controls.Add(this.groupBox2);
			this.Controls.Add(this.groupBox1);
			this.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(0)));
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
			this.MaximizeBox = false;
			this.Menu = this.mainMenu1;
			this.Name = "frmMain";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "主界面";
			this.Load += new System.EventHandler(this.Form1_Load);
			this.Activated += new System.EventHandler(this.frmMain_Activated);
			this.groupBox1.ResumeLayout(false);
			this.groupBox2.ResumeLayout(false);
			((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).EndInit();
			this.groupBox3.ResumeLayout(false);
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main() 
		{
			//登录 初始化管理员信息
	
			Form 登录;
			登录=new frmLogin();
			登录.ShowDialog();
			if(bolPass)
			Application.Run(new frmMain());
		}

		private void Form1_Load(object sender, System.EventArgs e)
		{
			//初始化系统信息
			timer1.Enabled=true;
			timer1.Start();
			
			
			this.menuItem12.Enabled=true;
			this.menuItem13.Enabled=true;			

			//初始化系统信息
			//初始化值班教师
			this.label13.Text=frmMain.strTeacher;
			
			//动态填充下拉列表框
			DataSet dsSysread=new DataSet();
			this.sqlDataAdapter1.Fill(dsSysread,"系统表");
			this.comboBox1.DataSource=dsSysread.Tables[0];
			this.comboBox1.DisplayMember="机房";
			this.comboBox1.ValueMember="定价";
			this.comboBox1.Refresh();
			//this.comboBox1.SelectedIndex=1;//515-616
			
			//初始化机房机器台数
			string strSql="select 机房,机器数 from 系统表";
			SqlCommand cmd=new SqlCommand(strSql,this.sqlConnection1);
			this.sqlConnection1.Open();
			SqlDataReader rdXt=cmd.ExecuteReader();
			while(rdXt.Read())
			{
				htComputerNum.Add(rdXt.GetString(0),rdXt.GetString(1));
			}
			rdXt.Close();
			this.sqlConnection1.Close();

			//strCurRoom=this.comboBox1.Text;
			//填充实时信息
			this.label15.Text=numDqrs(this.comboBox1.Text);	
			this.label19.Text=monDqcz();
			this.label16.Text=numLjrs(this.comboBox1.Text);
			if(frmMain.strTeacherPower=="操作员")
			{
				this.menuItem12.Enabled=false;
				this.menuItem13.Enabled=false;
				this.menuItem4.Enabled=false;
			}

		}

		private void button1_Click(object sender, System.EventArgs e)
		{
			System.Windows.Forms.Form 添加用户;
			添加用户=new frmAddUser();
			添加用户.Show();
		
		}

		private void button2_Click(object sender, System.EventArgs e)
		{
			System.Windows.Forms.Form 删除用户;
			删除用户=new frmDeleteUser();
			删除用户.Show();
		}

		private void button3_Click(object sender, System.EventArgs e)
		{
			System.Windows.Forms.Form 充值;
			充值=new frmAddMoney();
			充值.Show();
		}

		private void button4_Click(object sender, System.EventArgs e)
		{
			System.Windows.Forms.Form 系统维护;
			系统维护=new frmSystemManagement();
			系统维护.Show();
		}

		private void button5_Click(object sender, System.EventArgs e)
		{
			System.Windows.Forms.Form 统计信息;
			统计信息=new frmStatistic();
			统计信息.Show();
		}

⌨️ 快捷键说明

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