?? 主界面.cs
字號:
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 + -