main.cs
上传用户:toshiba_01
上传日期:2007-06-08
资源大小:306k
文件大小:31k
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using System.IO ;
- namespace RoomManage
- {
- /// <summary>
- /// Form1 的摘要说明。
- /// </summary>
- public class main : System.Windows.Forms.Form
- {
- private System.Windows.Forms.Button button1;
- private System.Windows.Forms.Button button2;
- private System.Windows.Forms.Button button3;
- private System.Windows.Forms.Button button4;
- private System.Windows.Forms.Button button5;
- private System.Windows.Forms.Button button7;
- private System.Windows.Forms.MainMenu mainMenu1;
- private System.Windows.Forms.MenuItem menuItem1;
- private System.Windows.Forms.MenuItem menuItem2;
- private System.Windows.Forms.MenuItem menuItem3;
- private System.Windows.Forms.MenuItem menuItem4;
- private System.Windows.Forms.MenuItem menuItem5;
- private System.Windows.Forms.MenuItem menuItem6;
- private System.Windows.Forms.MenuItem menuItem7;
- private System.Windows.Forms.MenuItem menuItem8;
- private System.Windows.Forms.MenuItem menuItem9;
- private System.Windows.Forms.MenuItem menuItem10;
- private System.Windows.Forms.MenuItem menuItem11;
- private System.Windows.Forms.MenuItem menuItem12;
- private System.Windows.Forms.MenuItem menuItem13;
- private System.Windows.Forms.MenuItem menuItem14;
- private System.Windows.Forms.MenuItem menuItem23;
- private System.Windows.Forms.MenuItem menuItem24;
- private System.Windows.Forms.MenuItem menuItem25;
- private System.Windows.Forms.MenuItem menuItem29;
- private System.Windows.Forms.MenuItem menuItem30;
- private System.Windows.Forms.MenuItem menuItem31;
- private System.Windows.Forms.MenuItem menuItem32;
- private System.Windows.Forms.MenuItem menuItem33;
- private System.Windows.Forms.MenuItem menuItem34;
- private System.Windows.Forms.MenuItem menuItem37;
- private System.Windows.Forms.MenuItem menuItem38;
- private System.Windows.Forms.MenuItem menuItem39;
- private System.Windows.Forms.MenuItem menuItem42;
- private System.Windows.Forms.MenuItem menuItem43;
- private System.Windows.Forms.MenuItem menuItem44;
- private System.Windows.Forms.MenuItem menuItem45;
- private System.Windows.Forms.MenuItem menuItem46;
- private System.Windows.Forms.MenuItem menuItem47;
- private System.Windows.Forms.Button button8;
- private System.Windows.Forms.GroupBox groupBox1;
- private System.Windows.Forms.Panel panel1;
- private System.Windows.Forms.MenuItem menuItem16;
- private System.Windows.Forms.MenuItem menuItem17;
- private System.Windows.Forms.MenuItem menuItem36;
- private System.Windows.Forms.MenuItem menuItem48;
- private System.ComponentModel.IContainer components;
- private System.Windows.Forms.GroupBox groupBox2;
- private System.Windows.Forms.PictureBox pictureBox1;
- private System.Windows.Forms.Label label1;
-
-
- private System.Windows.Forms.MenuItem menuItem15;
- private System.Windows.Forms.MenuItem menuItem20;
- private System.Windows.Forms.DateTimePicker dateTimePicker1;
- private System.Windows.Forms.Label label2;
- private System.Windows.Forms.Timer timer1;
- private System.Windows.Forms.Label label3;
- private System.Windows.Forms.Button button6;
- private System.Diagnostics.Process compro;
-
- DataConn dc=new DataConn();
- public static string oper;//传递操作员姓名
- char pur;
- private System.Diagnostics.Process processhelp;
- string nam;
- public main(char c,string s)
- {
- //
- // Windows 窗体设计器支持所必需的
- //
- InitializeComponent();
- this.pur =c;
- this.nam =s;
- //
- // 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(main));
- this.button1 = new System.Windows.Forms.Button();
- this.button2 = new System.Windows.Forms.Button();
- this.button3 = new System.Windows.Forms.Button();
- this.button4 = new System.Windows.Forms.Button();
- this.button5 = new System.Windows.Forms.Button();
- this.button7 = new System.Windows.Forms.Button();
- this.mainMenu1 = new System.Windows.Forms.MainMenu();
- this.menuItem1 = new System.Windows.Forms.MenuItem();
- this.menuItem2 = new System.Windows.Forms.MenuItem();
- this.menuItem7 = new System.Windows.Forms.MenuItem();
- this.menuItem3 = new System.Windows.Forms.MenuItem();
- this.menuItem8 = new System.Windows.Forms.MenuItem();
- this.menuItem4 = new System.Windows.Forms.MenuItem();
- this.menuItem9 = new System.Windows.Forms.MenuItem();
- this.menuItem5 = new System.Windows.Forms.MenuItem();
- this.menuItem10 = new System.Windows.Forms.MenuItem();
- this.menuItem6 = new System.Windows.Forms.MenuItem();
- this.menuItem11 = new System.Windows.Forms.MenuItem();
- this.menuItem12 = new System.Windows.Forms.MenuItem();
- this.menuItem13 = new System.Windows.Forms.MenuItem();
- this.menuItem14 = new System.Windows.Forms.MenuItem();
- this.menuItem16 = new System.Windows.Forms.MenuItem();
- this.menuItem17 = new System.Windows.Forms.MenuItem();
- this.menuItem36 = new System.Windows.Forms.MenuItem();
- this.menuItem48 = new System.Windows.Forms.MenuItem();
- this.menuItem23 = new System.Windows.Forms.MenuItem();
- this.menuItem24 = new System.Windows.Forms.MenuItem();
- this.menuItem25 = new System.Windows.Forms.MenuItem();
- this.menuItem29 = new System.Windows.Forms.MenuItem();
- this.menuItem30 = new System.Windows.Forms.MenuItem();
- this.menuItem31 = new System.Windows.Forms.MenuItem();
- this.menuItem43 = new System.Windows.Forms.MenuItem();
- this.menuItem44 = new System.Windows.Forms.MenuItem();
- this.menuItem32 = new System.Windows.Forms.MenuItem();
- this.menuItem37 = new System.Windows.Forms.MenuItem();
- this.menuItem34 = new System.Windows.Forms.MenuItem();
- this.menuItem33 = new System.Windows.Forms.MenuItem();
- this.menuItem38 = new System.Windows.Forms.MenuItem();
- this.menuItem39 = new System.Windows.Forms.MenuItem();
- this.menuItem42 = new System.Windows.Forms.MenuItem();
- this.menuItem45 = new System.Windows.Forms.MenuItem();
- this.menuItem15 = new System.Windows.Forms.MenuItem();
- this.menuItem20 = new System.Windows.Forms.MenuItem();
- this.menuItem46 = new System.Windows.Forms.MenuItem();
- this.menuItem47 = new System.Windows.Forms.MenuItem();
- this.button8 = new System.Windows.Forms.Button();
- this.groupBox1 = new System.Windows.Forms.GroupBox();
- this.button6 = new System.Windows.Forms.Button();
- this.label3 = new System.Windows.Forms.Label();
- this.label2 = new System.Windows.Forms.Label();
- this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
- this.panel1 = new System.Windows.Forms.Panel();
- this.groupBox2 = new System.Windows.Forms.GroupBox();
- this.label1 = new System.Windows.Forms.Label();
- this.pictureBox1 = new System.Windows.Forms.PictureBox();
- this.timer1 = new System.Windows.Forms.Timer(this.components);
- this.compro = new System.Diagnostics.Process();
- this.processhelp = new System.Diagnostics.Process();
- this.groupBox1.SuspendLayout();
- this.groupBox2.SuspendLayout();
- this.SuspendLayout();
- //
- // button1
- //
- this.button1.BackColor = System.Drawing.Color.Transparent;
- this.button1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
- this.button1.ForeColor = System.Drawing.Color.Black;
- this.button1.Image = ((System.Drawing.Image)(resources.GetObject("button1.Image")));
- this.button1.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
- this.button1.Location = new System.Drawing.Point(10, 9);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(62, 52);
- this.button1.TabIndex = 1;
- this.button1.Text = "客房预定";
- this.button1.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
- this.button1.Click += new System.EventHandler(this.button1_Click);
- //
- // button2
- //
- this.button2.BackColor = System.Drawing.Color.Transparent;
- this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
- this.button2.ForeColor = System.Drawing.Color.Black;
- this.button2.Image = ((System.Drawing.Image)(resources.GetObject("button2.Image")));
- this.button2.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
- this.button2.Location = new System.Drawing.Point(73, 9);
- this.button2.Name = "button2";
- this.button2.Size = new System.Drawing.Size(62, 52);
- this.button2.TabIndex = 2;
- this.button2.Text = "住宿登记";
- this.button2.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
- this.button2.Click += new System.EventHandler(this.button2_Click);
- //
- // button3
- //
- this.button3.BackColor = System.Drawing.Color.Transparent;
- this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
- this.button3.ForeColor = System.Drawing.Color.Black;
- this.button3.Image = ((System.Drawing.Image)(resources.GetObject("button3.Image")));
- this.button3.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
- this.button3.Location = new System.Drawing.Point(136, 9);
- this.button3.Name = "button3";
- this.button3.Size = new System.Drawing.Size(62, 52);
- this.button3.TabIndex = 3;
- this.button3.Text = "退宿结帐";
- this.button3.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
- this.button3.Click += new System.EventHandler(this.button3_Click);
- //
- // button4
- //
- this.button4.BackColor = System.Drawing.Color.Transparent;
- this.button4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
- this.button4.ForeColor = System.Drawing.Color.Black;
- this.button4.Image = ((System.Drawing.Image)(resources.GetObject("button4.Image")));
- this.button4.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
- this.button4.Location = new System.Drawing.Point(199, 9);
- this.button4.Name = "button4";
- this.button4.Size = new System.Drawing.Size(62, 52);
- this.button4.TabIndex = 4;
- this.button4.Text = "住宿查询";
- this.button4.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
- this.button4.Click += new System.EventHandler(this.button4_Click);
- //
- // button5
- //
- this.button5.BackColor = System.Drawing.Color.Transparent;
- this.button5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
- this.button5.ForeColor = System.Drawing.Color.Black;
- this.button5.Image = ((System.Drawing.Image)(resources.GetObject("button5.Image")));
- this.button5.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
- this.button5.Location = new System.Drawing.Point(262, 9);
- this.button5.Name = "button5";
- this.button5.Size = new System.Drawing.Size(62, 52);
- this.button5.TabIndex = 5;
- this.button5.Text = "客房查询";
- this.button5.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
- this.button5.Click += new System.EventHandler(this.button5_Click);
- //
- // button7
- //
- this.button7.BackColor = System.Drawing.Color.Transparent;
- this.button7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
- this.button7.ForeColor = System.Drawing.Color.Black;
- this.button7.Image = ((System.Drawing.Image)(resources.GetObject("button7.Image")));
- this.button7.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
- this.button7.Location = new System.Drawing.Point(325, 9);
- this.button7.Name = "button7";
- this.button7.Size = new System.Drawing.Size(62, 52);
- this.button7.TabIndex = 7;
- this.button7.Text = "宿费提醒";
- this.button7.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
- this.button7.Click += new System.EventHandler(this.button7_Click);
- //
- // mainMenu1
- //
- this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
- this.menuItem1,
- this.menuItem11,
- this.menuItem23,
- this.menuItem32,
- this.menuItem42});
- //
- // menuItem1
- //
- this.menuItem1.Index = 0;
- this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
- this.menuItem2,
- this.menuItem7,
- this.menuItem3,
- this.menuItem8,
- this.menuItem4,
- this.menuItem9,
- this.menuItem5,
- this.menuItem10,
- this.menuItem6});
- this.menuItem1.Text = "前台管理(&F)";
- //
- // menuItem2
- //
- this.menuItem2.Index = 0;
- this.menuItem2.Text = "客房预定(&Y)";
- this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
- //
- // menuItem7
- //
- this.menuItem7.Index = 1;
- this.menuItem7.Text = "-";
- //
- // menuItem3
- //
- this.menuItem3.Index = 2;
- this.menuItem3.Text = "住宿登记(&D)";
- this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
- //
- // menuItem8
- //
- this.menuItem8.Index = 3;
- this.menuItem8.Text = "-";
- //
- // menuItem4
- //
- this.menuItem4.Index = 4;
- this.menuItem4.Text = "追加押金(&Z)";
- this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
- //
- // menuItem9
- //
- this.menuItem9.Index = 5;
- this.menuItem9.Text = "-";
- //
- // menuItem5
- //
- this.menuItem5.Index = 6;
- this.menuItem5.Text = "退宿结帐(&T)";
- this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click);
- //
- // menuItem10
- //
- this.menuItem10.Index = 7;
- this.menuItem10.Text = "-";
- //
- // menuItem6
- //
- this.menuItem6.Index = 8;
- this.menuItem6.Text = "退出(&E)";
- this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
- //
- // menuItem11
- //
- this.menuItem11.Index = 1;
- this.menuItem11.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
- this.menuItem12,
- this.menuItem13,
- this.menuItem14,
- this.menuItem16,
- this.menuItem17,
- this.menuItem36,
- this.menuItem48});
- this.menuItem11.Text = "查询统计(&C)";
- //
- // menuItem12
- //
- this.menuItem12.Index = 0;
- this.menuItem12.Text = "住宿查询(&Z)";
- this.menuItem12.Click += new System.EventHandler(this.menuItem12_Click);
- //
- // menuItem13
- //
- this.menuItem13.Index = 1;
- this.menuItem13.Text = "-";
- //
- // menuItem14
- //
- this.menuItem14.Index = 2;
- this.menuItem14.Text = "退宿查询(&T)";
- this.menuItem14.Click += new System.EventHandler(this.menuItem14_Click);
- //
- // menuItem16
- //
- this.menuItem16.Index = 3;
- this.menuItem16.Text = "-";
- //
- // menuItem17
- //
- this.menuItem17.Index = 4;
- this.menuItem17.Text = "客房查询(&K)";
- this.menuItem17.Click += new System.EventHandler(this.menuItem17_Click);
- //
- // menuItem36
- //
- this.menuItem36.Index = 5;
- this.menuItem36.Text = "-";
- //
- // menuItem48
- //
- this.menuItem48.Index = 6;
- this.menuItem48.Text = "宿费提醒(&S)";
- this.menuItem48.Click += new System.EventHandler(this.menuItem48_Click);
- //
- // menuItem23
- //
- this.menuItem23.Index = 2;
- this.menuItem23.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
- this.menuItem24,
- this.menuItem25,
- this.menuItem29,
- this.menuItem30,
- this.menuItem31,
- this.menuItem43,
- this.menuItem44});
- this.menuItem23.Text = "基础信息维护(&B)";
- //
- // menuItem24
- //
- this.menuItem24.Index = 0;
- this.menuItem24.Text = "客房信息维护(&K)";
- this.menuItem24.Click += new System.EventHandler(this.menuItem24_Click);
- //
- // menuItem25
- //
- this.menuItem25.Index = 1;
- this.menuItem25.Text = "-";
- //
- // menuItem29
- //
- this.menuItem29.Index = 2;
- this.menuItem29.Text = "员工信息维护(&G)";
- this.menuItem29.Click += new System.EventHandler(this.menuItem29_Click);
- //
- // menuItem30
- //
- this.menuItem30.Index = 3;
- this.menuItem30.Text = "-";
- //
- // menuItem31
- //
- this.menuItem31.Index = 4;
- this.menuItem31.Text = "部门信息维护(&B)";
- this.menuItem31.Click += new System.EventHandler(this.menuItem31_Click);
- //
- // menuItem43
- //
- this.menuItem43.Index = 5;
- this.menuItem43.Text = "-";
- //
- // menuItem44
- //
- this.menuItem44.Index = 6;
- this.menuItem44.Text = "单位信息维护(&D)";
- this.menuItem44.Click += new System.EventHandler(this.menuItem44_Click);
- //
- // menuItem32
- //
- this.menuItem32.Index = 3;
- this.menuItem32.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
- this.menuItem37,
- this.menuItem34,
- this.menuItem33,
- this.menuItem38,
- this.menuItem39});
- this.menuItem32.Text = "系统维护(&S)";
- //
- // menuItem37
- //
- this.menuItem37.Index = 0;
- this.menuItem37.Text = "系统初始化(&X)";
- this.menuItem37.Click += new System.EventHandler(this.menuItem37_Click);
- //
- // menuItem34
- //
- this.menuItem34.Index = 1;
- this.menuItem34.Text = "-";
- //
- // menuItem33
- //
- this.menuItem33.Index = 2;
- this.menuItem33.Text = "操作员管理(&C)";
- this.menuItem33.Click += new System.EventHandler(this.menuItem33_Click);
- //
- // menuItem38
- //
- this.menuItem38.Index = 3;
- this.menuItem38.Text = "-";
- //
- // menuItem39
- //
- this.menuItem39.Index = 4;
- this.menuItem39.Text = "数据备份(&B)";
- this.menuItem39.Click += new System.EventHandler(this.menuItem39_Click);
- //
- // menuItem42
- //
- this.menuItem42.Index = 4;
- this.menuItem42.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
- this.menuItem45,
- this.menuItem15,
- this.menuItem20,
- this.menuItem46,
- this.menuItem47});
- this.menuItem42.Text = "帮助(&H)";
- //
- // menuItem45
- //
- this.menuItem45.Index = 0;
- this.menuItem45.Text = "帮助(&H)";
- this.menuItem45.Click += new System.EventHandler(this.menuItem45_Click);
- //
- // menuItem15
- //
- this.menuItem15.Index = 1;
- this.menuItem15.Text = "-";
- //
- // menuItem20
- //
- this.menuItem20.Index = 2;
- this.menuItem20.Text = "每日一帖(&M)";
- this.menuItem20.Click += new System.EventHandler(this.menuItem20_Click);
- //
- // menuItem46
- //
- this.menuItem46.Index = 3;
- this.menuItem46.Text = "-";
- //
- // menuItem47
- //
- this.menuItem47.Index = 4;
- this.menuItem47.Text = "关于本软件(&G)";
- this.menuItem47.Click += new System.EventHandler(this.menuItem47_Click);
- //
- // button8
- //
- this.button8.BackColor = System.Drawing.Color.Transparent;
- this.button8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
- this.button8.ForeColor = System.Drawing.Color.Black;
- this.button8.Image = ((System.Drawing.Image)(resources.GetObject("button8.Image")));
- this.button8.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
- this.button8.Location = new System.Drawing.Point(388, 9);
- this.button8.Name = "button8";
- this.button8.Size = new System.Drawing.Size(62, 52);
- this.button8.TabIndex = 8;
- this.button8.Text = "退出";
- this.button8.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
- this.button8.Click += new System.EventHandler(this.button8_Click);
- //
- // groupBox1
- //
- this.groupBox1.Controls.Add(this.button6);
- this.groupBox1.Controls.Add(this.label3);
- this.groupBox1.Controls.Add(this.label2);
- this.groupBox1.Controls.Add(this.button1);
- this.groupBox1.Controls.Add(this.button7);
- this.groupBox1.Controls.Add(this.button2);
- this.groupBox1.Controls.Add(this.button4);
- this.groupBox1.Controls.Add(this.button3);
- this.groupBox1.Controls.Add(this.button8);
- this.groupBox1.Controls.Add(this.button5);
- this.groupBox1.Controls.Add(this.dateTimePicker1);
- this.groupBox1.Location = new System.Drawing.Point(-8, 0);
- this.groupBox1.Name = "groupBox1";
- this.groupBox1.Size = new System.Drawing.Size(672, 65);
- this.groupBox1.TabIndex = 8;
- this.groupBox1.TabStop = false;
- //
- // button6
- //
- this.button6.Location = new System.Drawing.Point(540, 38);
- this.button6.Name = "button6";
- this.button6.Size = new System.Drawing.Size(56, 23);
- this.button6.TabIndex = 11;
- this.button6.Text = "计算器";
- this.button6.Click += new System.EventHandler(this.button6_Click);
- //
- // label3
- //
- this.label3.Location = new System.Drawing.Point(482, 40);
- this.label3.Name = "label3";
- this.label3.Size = new System.Drawing.Size(56, 18);
- this.label3.TabIndex = 10;
- this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
- //
- // label2
- //
- this.label2.BackColor = System.Drawing.Color.Transparent;
- this.label2.Location = new System.Drawing.Point(456, 16);
- this.label2.Name = "label2";
- this.label2.Size = new System.Drawing.Size(24, 39);
- this.label2.TabIndex = 9;
- this.label2.Text = "万年历";
- //
- // dateTimePicker1
- //
- this.dateTimePicker1.CalendarTrailingForeColor = System.Drawing.Color.LightGray;
- this.dateTimePicker1.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right;
- this.dateTimePicker1.Location = new System.Drawing.Point(480, 14);
- this.dateTimePicker1.Name = "dateTimePicker1";
- this.dateTimePicker1.Size = new System.Drawing.Size(120, 21);
- this.dateTimePicker1.TabIndex = 0;
- //
- // panel1
- //
- this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage")));
- this.panel1.Location = new System.Drawing.Point(0, 72);
- this.panel1.Name = "panel1";
- this.panel1.Size = new System.Drawing.Size(600, 352);
- this.panel1.TabIndex = 9;
- //
- // groupBox2
- //
- this.groupBox2.BackColor = System.Drawing.Color.MintCream;
- this.groupBox2.Controls.Add(this.label1);
- this.groupBox2.Controls.Add(this.pictureBox1);
- this.groupBox2.Location = new System.Drawing.Point(0, 416);
- this.groupBox2.Name = "groupBox2";
- this.groupBox2.Size = new System.Drawing.Size(592, 56);
- this.groupBox2.TabIndex = 10;
- this.groupBox2.TabStop = false;
- //
- // label1
- //
- this.label1.BackColor = System.Drawing.Color.Transparent;
- this.label1.Font = new System.Drawing.Font("楷体_GB2312", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
- this.label1.ForeColor = System.Drawing.Color.Maroon;
- this.label1.Location = new System.Drawing.Point(472, 32);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(112, 16);
- this.label1.TabIndex = 1;
- this.label1.Text = "Version1.0 ";
- //
- // pictureBox1
- //
- this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
- this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
- this.pictureBox1.Location = new System.Drawing.Point(8, 19);
- this.pictureBox1.Name = "pictureBox1";
- this.pictureBox1.Size = new System.Drawing.Size(352, 24);
- this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
- this.pictureBox1.TabIndex = 0;
- this.pictureBox1.TabStop = false;
- //
- // timer1
- //
- this.timer1.Enabled = true;
- this.timer1.Interval = 1000;
- this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
- //
- // compro
- //
- this.compro.StartInfo.FileName = "calc.exe";
- this.compro.SynchronizingObject = this;
- //
- // processhelp
- //
- this.processhelp.StartInfo.FileName = "happybook.exe";
- this.processhelp.SynchronizingObject = this;
- //
- // main
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
- this.ClientSize = new System.Drawing.Size(592, 493);
- this.Controls.Add(this.groupBox2);
- this.Controls.Add(this.panel1);
- this.Controls.Add(this.groupBox1);
- this.Cursor = System.Windows.Forms.Cursors.Hand;
- this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
- this.MaximizeBox = false;
- this.MaximumSize = new System.Drawing.Size(600, 520);
- this.Menu = this.mainMenu1;
- this.MinimizeBox = false;
- this.MinimumSize = new System.Drawing.Size(600, 520);
- this.Name = "main";
- this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
- this.Text = "客房管理系统";
- this.Closing += new System.ComponentModel.CancelEventHandler(this.main_Closing);
- this.Load += new System.EventHandler(this.main_Load);
- this.groupBox1.ResumeLayout(false);
- this.groupBox2.ResumeLayout(false);
- this.ResumeLayout(false);
- }
- #endregion
- /// <summary>
- /// 应用程序的主入口点。
- /// </summary>
- ///[STAThread]
-
- private void main_Load(object sender, System.EventArgs e)
- {
- StreamReader sr=new StreamReader("start.txt",System.Text .Encoding.Default);
- oper=this.nam ;
- switch(this.pur )
- {
- case '0':
- this.chushi1 ();
- this.chushi2 ();
- break;
- case '1':
- this.huifu1 ();
- this.huifu2 ();
- break;
- case '2':
- this.chushi1 ();
- this.huifu2 ();
- break;
- case '3':
- this.huifu1 ();
- this.chushi2 ();
- break;
- }
- //启动每日一帖
- if(sr.ReadLine ()=="1")
- {
- sr.Close ();
- tips t=new tips ();
- t.ShowDialog ();
- }
-
- }
- private void button8_Click(object sender, System.EventArgs e)
- {
- dc.exit();
- }
- private void menuItem6_Click(object sender, System.EventArgs e)
- {
- dc.exit();
- }
- private void button1_Click(object sender, System.EventArgs e)
- {
- this.kfyd ();
- }
- private void chushi1()
- {
- this.button1 .Enabled =false;
- this.button2 .Enabled =false;
- this.button3 .Enabled =false;
- this.button4 .Enabled =false;
- this.button5 .Enabled =false;
- this.button7 .Enabled =false;
- this.menuItem2.Enabled =false;
- this.menuItem3 .Enabled =false;
- this.menuItem4 .Enabled =false;
- this.menuItem5 .Enabled =false;
- this.menuItem11 .Enabled =false;
- }
- private void chushi2()
- {
- this.menuItem23 .Enabled =false;
- this.menuItem32 .Enabled =false;
- }
- private void huifu1()
- {
- this.button1 .Enabled =true;
- this.button2 .Enabled =true;
- this.button3 .Enabled =true;
- this.button4 .Enabled =true;
- this.button5 .Enabled =true;
- this.button7 .Enabled =true;
- this.menuItem2.Enabled =true;
- this.menuItem3 .Enabled =true;
- this.menuItem4 .Enabled =true;
- this.menuItem5 .Enabled =true;
- this.menuItem11 .Enabled =true;
- }
- private void huifu2()
- {
- this.menuItem23 .Enabled =true;
- this.menuItem32 .Enabled =true;
- }
- private void kfyd()
- {
- kfyd kfyd1=new kfyd (oper);
- kfyd1.ShowDialog ();
- }
- private void zsdj()
- {
- zsdj zsdj1=new zsdj (oper);
- zsdj1.ShowDialog ();
- }
- private void tsjz()
- {
- tsjz tsjz1=new tsjz (oper);
- tsjz1.ShowDialog ();
- }
- private void zscx()
- {
- zscx zscx1=new zscx (oper);
- zscx1.ShowDialog ();
- }
- private void kfcx()
- {
- kfcx kfcx1=new kfcx (oper);
- kfcx1.ShowDialog ();
- }
- private void sftx()
- {
- sftx sftx1=new sftx (oper);
- sftx1.ShowDialog ();
- }
- private void button5_Click(object sender, System.EventArgs e)
- {
- this.kfcx ();
- }
- private void menuItem33_Click(object sender, System.EventArgs e)
- {
- opermana op=new opermana (pur,nam);
- op.ShowDialog ();
- }
- private void menuItem2_Click(object sender, System.EventArgs e)
- {
- this.kfyd ();
- }
- private void menuItem3_Click(object sender, System.EventArgs e)
- {
- this.zsdj ();
- }
- private void button2_Click(object sender, System.EventArgs e)
- {
- this.zsdj ();
- }
- private void menuItem4_Click(object sender, System.EventArgs e)
- {
- zjyj zjyj1=new zjyj (oper);
- zjyj1.ShowDialog ();
- }
- private void menuItem5_Click(object sender, System.EventArgs e)
- {
- this.tsjz ();
- }
- private void button3_Click(object sender, System.EventArgs e)
- {
- this.tsjz ();
- }
- private void menuItem12_Click(object sender, System.EventArgs e)
- {
- this.zscx ();
- }
- private void button4_Click(object sender, System.EventArgs e)
- {
- this.zscx ();
- }
- private void menuItem17_Click(object sender, System.EventArgs e)
- {
- this.kfcx ();
- }
- private void menuItem48_Click(object sender, System.EventArgs e)
- {
- this.sftx ();
- }
- private void button7_Click(object sender, System.EventArgs e)
- {
- this.sftx ();
- }
- private void menuItem14_Click(object sender, System.EventArgs e)
- {
- tscx tscx1=new tscx (oper);
- tscx1.ShowDialog ();
- }
- private void main_Closing(object sender, System.ComponentModel.CancelEventArgs e)
- {
- dc.exit ();
- }
- private void menuItem20_Click(object sender, System.EventArgs e)
- {
- tips t=new tips ();
- t.ShowDialog ();
- }
- private void timer1_Tick(object sender, System.EventArgs e)
- {
- this.label3 .Text =System.DateTime.Now .ToLongTimeString();
- }
- private void button6_Click(object sender, System.EventArgs e)
- {
- compro.Start ();
- }
- private void menuItem24_Click(object sender, System.EventArgs e)
- {
- kfinfo kk=new kfinfo ();
- kk.ShowDialog ();
- }
- private void menuItem29_Click(object sender, System.EventArgs e)
- {
- yginfo yg=new yginfo ();
- yg.ShowDialog ();
- }
- private void menuItem39_Click(object sender, System.EventArgs e)
- {
- backup bk=new backup ();
- bk.ShowDialog ();
- }
- private void menuItem45_Click(object sender, System.EventArgs e)
- {
- this.processhelp.Start();
- }
- private void menuItem44_Click(object sender, System.EventArgs e)
- {
- dwinfo di=new dwinfo (oper);
- di.ShowDialog ();
- }
- private void menuItem31_Click(object sender, System.EventArgs e)
- {
- bminfo bm=new bminfo ();
- bm.ShowDialog ();
- }
- private void menuItem37_Click(object sender, System.EventArgs e)
- {
- sysivn sys=new sysivn ();
- sys.ShowDialog ();
- }
- private void menuItem47_Click(object sender, System.EventArgs e)
- {
- about ab=new about ();
- ab.ShowDialog ();
- }
- }
- }