main.cs
上传用户:toshiba_01
上传日期:2007-06-08
资源大小:306k
文件大小:31k
源码类别:

酒店行业

开发平台:

C#

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. using System.IO ;
  7. namespace RoomManage
  8. {
  9. /// <summary>
  10. /// Form1 的摘要说明。
  11. /// </summary>
  12. public class main : System.Windows.Forms.Form
  13. {
  14. private System.Windows.Forms.Button button1;
  15. private System.Windows.Forms.Button button2;
  16. private System.Windows.Forms.Button button3;
  17. private System.Windows.Forms.Button button4;
  18. private System.Windows.Forms.Button button5;
  19. private System.Windows.Forms.Button button7;
  20. private System.Windows.Forms.MainMenu mainMenu1;
  21. private System.Windows.Forms.MenuItem menuItem1;
  22. private System.Windows.Forms.MenuItem menuItem2;
  23. private System.Windows.Forms.MenuItem menuItem3;
  24. private System.Windows.Forms.MenuItem menuItem4;
  25. private System.Windows.Forms.MenuItem menuItem5;
  26. private System.Windows.Forms.MenuItem menuItem6;
  27. private System.Windows.Forms.MenuItem menuItem7;
  28. private System.Windows.Forms.MenuItem menuItem8;
  29. private System.Windows.Forms.MenuItem menuItem9;
  30. private System.Windows.Forms.MenuItem menuItem10;
  31. private System.Windows.Forms.MenuItem menuItem11;
  32. private System.Windows.Forms.MenuItem menuItem12;
  33. private System.Windows.Forms.MenuItem menuItem13;
  34. private System.Windows.Forms.MenuItem menuItem14;
  35. private System.Windows.Forms.MenuItem menuItem23;
  36. private System.Windows.Forms.MenuItem menuItem24;
  37. private System.Windows.Forms.MenuItem menuItem25;
  38. private System.Windows.Forms.MenuItem menuItem29;
  39. private System.Windows.Forms.MenuItem menuItem30;
  40. private System.Windows.Forms.MenuItem menuItem31;
  41. private System.Windows.Forms.MenuItem menuItem32;
  42. private System.Windows.Forms.MenuItem menuItem33;
  43. private System.Windows.Forms.MenuItem menuItem34;
  44. private System.Windows.Forms.MenuItem menuItem37;
  45. private System.Windows.Forms.MenuItem menuItem38;
  46. private System.Windows.Forms.MenuItem menuItem39;
  47. private System.Windows.Forms.MenuItem menuItem42;
  48. private System.Windows.Forms.MenuItem menuItem43;
  49. private System.Windows.Forms.MenuItem menuItem44;
  50. private System.Windows.Forms.MenuItem menuItem45;
  51. private System.Windows.Forms.MenuItem menuItem46;
  52. private System.Windows.Forms.MenuItem menuItem47;
  53. private System.Windows.Forms.Button button8;
  54. private System.Windows.Forms.GroupBox groupBox1;
  55. private System.Windows.Forms.Panel panel1;
  56. private System.Windows.Forms.MenuItem menuItem16;
  57. private System.Windows.Forms.MenuItem menuItem17;
  58. private System.Windows.Forms.MenuItem menuItem36;
  59. private System.Windows.Forms.MenuItem menuItem48;
  60. private System.ComponentModel.IContainer components;
  61. private System.Windows.Forms.GroupBox groupBox2;
  62. private System.Windows.Forms.PictureBox pictureBox1;
  63. private System.Windows.Forms.Label label1;
  64. private System.Windows.Forms.MenuItem menuItem15;
  65. private System.Windows.Forms.MenuItem menuItem20;
  66. private System.Windows.Forms.DateTimePicker dateTimePicker1;
  67. private System.Windows.Forms.Label label2;
  68. private System.Windows.Forms.Timer timer1;
  69. private System.Windows.Forms.Label label3;
  70. private System.Windows.Forms.Button button6;
  71. private System.Diagnostics.Process compro;
  72. DataConn dc=new DataConn();
  73. public static string oper;//传递操作员姓名
  74. char pur;
  75. private System.Diagnostics.Process processhelp;
  76. string nam;
  77. public main(char c,string s)
  78. {
  79. //
  80. // Windows 窗体设计器支持所必需的
  81. //
  82. InitializeComponent();
  83. this.pur =c;
  84. this.nam =s;
  85. //
  86. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  87. //
  88. }
  89. /// <summary>
  90. /// 清理所有正在使用的资源。
  91. /// </summary>
  92. protected override void Dispose( bool disposing )
  93. {
  94. if( disposing )
  95. {
  96. if (components != null) 
  97. {
  98. components.Dispose();
  99. }
  100. }
  101. base.Dispose( disposing );
  102. }
  103. #region Windows 窗体设计器生成的代码
  104. /// <summary>
  105. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  106. /// 此方法的内容。
  107. /// </summary>
  108. private void InitializeComponent()
  109. {
  110. this.components = new System.ComponentModel.Container();
  111. System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(main));
  112. this.button1 = new System.Windows.Forms.Button();
  113. this.button2 = new System.Windows.Forms.Button();
  114. this.button3 = new System.Windows.Forms.Button();
  115. this.button4 = new System.Windows.Forms.Button();
  116. this.button5 = new System.Windows.Forms.Button();
  117. this.button7 = new System.Windows.Forms.Button();
  118. this.mainMenu1 = new System.Windows.Forms.MainMenu();
  119. this.menuItem1 = new System.Windows.Forms.MenuItem();
  120. this.menuItem2 = new System.Windows.Forms.MenuItem();
  121. this.menuItem7 = new System.Windows.Forms.MenuItem();
  122. this.menuItem3 = new System.Windows.Forms.MenuItem();
  123. this.menuItem8 = new System.Windows.Forms.MenuItem();
  124. this.menuItem4 = new System.Windows.Forms.MenuItem();
  125. this.menuItem9 = new System.Windows.Forms.MenuItem();
  126. this.menuItem5 = new System.Windows.Forms.MenuItem();
  127. this.menuItem10 = new System.Windows.Forms.MenuItem();
  128. this.menuItem6 = new System.Windows.Forms.MenuItem();
  129. this.menuItem11 = new System.Windows.Forms.MenuItem();
  130. this.menuItem12 = new System.Windows.Forms.MenuItem();
  131. this.menuItem13 = new System.Windows.Forms.MenuItem();
  132. this.menuItem14 = new System.Windows.Forms.MenuItem();
  133. this.menuItem16 = new System.Windows.Forms.MenuItem();
  134. this.menuItem17 = new System.Windows.Forms.MenuItem();
  135. this.menuItem36 = new System.Windows.Forms.MenuItem();
  136. this.menuItem48 = new System.Windows.Forms.MenuItem();
  137. this.menuItem23 = new System.Windows.Forms.MenuItem();
  138. this.menuItem24 = new System.Windows.Forms.MenuItem();
  139. this.menuItem25 = new System.Windows.Forms.MenuItem();
  140. this.menuItem29 = new System.Windows.Forms.MenuItem();
  141. this.menuItem30 = new System.Windows.Forms.MenuItem();
  142. this.menuItem31 = new System.Windows.Forms.MenuItem();
  143. this.menuItem43 = new System.Windows.Forms.MenuItem();
  144. this.menuItem44 = new System.Windows.Forms.MenuItem();
  145. this.menuItem32 = new System.Windows.Forms.MenuItem();
  146. this.menuItem37 = new System.Windows.Forms.MenuItem();
  147. this.menuItem34 = new System.Windows.Forms.MenuItem();
  148. this.menuItem33 = new System.Windows.Forms.MenuItem();
  149. this.menuItem38 = new System.Windows.Forms.MenuItem();
  150. this.menuItem39 = new System.Windows.Forms.MenuItem();
  151. this.menuItem42 = new System.Windows.Forms.MenuItem();
  152. this.menuItem45 = new System.Windows.Forms.MenuItem();
  153. this.menuItem15 = new System.Windows.Forms.MenuItem();
  154. this.menuItem20 = new System.Windows.Forms.MenuItem();
  155. this.menuItem46 = new System.Windows.Forms.MenuItem();
  156. this.menuItem47 = new System.Windows.Forms.MenuItem();
  157. this.button8 = new System.Windows.Forms.Button();
  158. this.groupBox1 = new System.Windows.Forms.GroupBox();
  159. this.button6 = new System.Windows.Forms.Button();
  160. this.label3 = new System.Windows.Forms.Label();
  161. this.label2 = new System.Windows.Forms.Label();
  162. this.dateTimePicker1 = new System.Windows.Forms.DateTimePicker();
  163. this.panel1 = new System.Windows.Forms.Panel();
  164. this.groupBox2 = new System.Windows.Forms.GroupBox();
  165. this.label1 = new System.Windows.Forms.Label();
  166. this.pictureBox1 = new System.Windows.Forms.PictureBox();
  167. this.timer1 = new System.Windows.Forms.Timer(this.components);
  168. this.compro = new System.Diagnostics.Process();
  169. this.processhelp = new System.Diagnostics.Process();
  170. this.groupBox1.SuspendLayout();
  171. this.groupBox2.SuspendLayout();
  172. this.SuspendLayout();
  173. // 
  174. // button1
  175. // 
  176. this.button1.BackColor = System.Drawing.Color.Transparent;
  177. this.button1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
  178. this.button1.ForeColor = System.Drawing.Color.Black;
  179. this.button1.Image = ((System.Drawing.Image)(resources.GetObject("button1.Image")));
  180. this.button1.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
  181. this.button1.Location = new System.Drawing.Point(10, 9);
  182. this.button1.Name = "button1";
  183. this.button1.Size = new System.Drawing.Size(62, 52);
  184. this.button1.TabIndex = 1;
  185. this.button1.Text = "客房预定";
  186. this.button1.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
  187. this.button1.Click += new System.EventHandler(this.button1_Click);
  188. // 
  189. // button2
  190. // 
  191. this.button2.BackColor = System.Drawing.Color.Transparent;
  192. this.button2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
  193. this.button2.ForeColor = System.Drawing.Color.Black;
  194. this.button2.Image = ((System.Drawing.Image)(resources.GetObject("button2.Image")));
  195. this.button2.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
  196. this.button2.Location = new System.Drawing.Point(73, 9);
  197. this.button2.Name = "button2";
  198. this.button2.Size = new System.Drawing.Size(62, 52);
  199. this.button2.TabIndex = 2;
  200. this.button2.Text = "住宿登记";
  201. this.button2.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
  202. this.button2.Click += new System.EventHandler(this.button2_Click);
  203. // 
  204. // button3
  205. // 
  206. this.button3.BackColor = System.Drawing.Color.Transparent;
  207. this.button3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
  208. this.button3.ForeColor = System.Drawing.Color.Black;
  209. this.button3.Image = ((System.Drawing.Image)(resources.GetObject("button3.Image")));
  210. this.button3.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
  211. this.button3.Location = new System.Drawing.Point(136, 9);
  212. this.button3.Name = "button3";
  213. this.button3.Size = new System.Drawing.Size(62, 52);
  214. this.button3.TabIndex = 3;
  215. this.button3.Text = "退宿结帐";
  216. this.button3.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
  217. this.button3.Click += new System.EventHandler(this.button3_Click);
  218. // 
  219. // button4
  220. // 
  221. this.button4.BackColor = System.Drawing.Color.Transparent;
  222. this.button4.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
  223. this.button4.ForeColor = System.Drawing.Color.Black;
  224. this.button4.Image = ((System.Drawing.Image)(resources.GetObject("button4.Image")));
  225. this.button4.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
  226. this.button4.Location = new System.Drawing.Point(199, 9);
  227. this.button4.Name = "button4";
  228. this.button4.Size = new System.Drawing.Size(62, 52);
  229. this.button4.TabIndex = 4;
  230. this.button4.Text = "住宿查询";
  231. this.button4.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
  232. this.button4.Click += new System.EventHandler(this.button4_Click);
  233. // 
  234. // button5
  235. // 
  236. this.button5.BackColor = System.Drawing.Color.Transparent;
  237. this.button5.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
  238. this.button5.ForeColor = System.Drawing.Color.Black;
  239. this.button5.Image = ((System.Drawing.Image)(resources.GetObject("button5.Image")));
  240. this.button5.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
  241. this.button5.Location = new System.Drawing.Point(262, 9);
  242. this.button5.Name = "button5";
  243. this.button5.Size = new System.Drawing.Size(62, 52);
  244. this.button5.TabIndex = 5;
  245. this.button5.Text = "客房查询";
  246. this.button5.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
  247. this.button5.Click += new System.EventHandler(this.button5_Click);
  248. // 
  249. // button7
  250. // 
  251. this.button7.BackColor = System.Drawing.Color.Transparent;
  252. this.button7.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
  253. this.button7.ForeColor = System.Drawing.Color.Black;
  254. this.button7.Image = ((System.Drawing.Image)(resources.GetObject("button7.Image")));
  255. this.button7.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
  256. this.button7.Location = new System.Drawing.Point(325, 9);
  257. this.button7.Name = "button7";
  258. this.button7.Size = new System.Drawing.Size(62, 52);
  259. this.button7.TabIndex = 7;
  260. this.button7.Text = "宿费提醒";
  261. this.button7.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
  262. this.button7.Click += new System.EventHandler(this.button7_Click);
  263. // 
  264. // mainMenu1
  265. // 
  266. this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  267.   this.menuItem1,
  268.   this.menuItem11,
  269.   this.menuItem23,
  270.   this.menuItem32,
  271.   this.menuItem42});
  272. // 
  273. // menuItem1
  274. // 
  275. this.menuItem1.Index = 0;
  276. this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  277.   this.menuItem2,
  278.   this.menuItem7,
  279.   this.menuItem3,
  280.   this.menuItem8,
  281.   this.menuItem4,
  282.   this.menuItem9,
  283.   this.menuItem5,
  284.   this.menuItem10,
  285.   this.menuItem6});
  286. this.menuItem1.Text = "前台管理(&F)";
  287. // 
  288. // menuItem2
  289. // 
  290. this.menuItem2.Index = 0;
  291. this.menuItem2.Text = "客房预定(&Y)";
  292. this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
  293. // 
  294. // menuItem7
  295. // 
  296. this.menuItem7.Index = 1;
  297. this.menuItem7.Text = "-";
  298. // 
  299. // menuItem3
  300. // 
  301. this.menuItem3.Index = 2;
  302. this.menuItem3.Text = "住宿登记(&D)";
  303. this.menuItem3.Click += new System.EventHandler(this.menuItem3_Click);
  304. // 
  305. // menuItem8
  306. // 
  307. this.menuItem8.Index = 3;
  308. this.menuItem8.Text = "-";
  309. // 
  310. // menuItem4
  311. // 
  312. this.menuItem4.Index = 4;
  313. this.menuItem4.Text = "追加押金(&Z)";
  314. this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
  315. // 
  316. // menuItem9
  317. // 
  318. this.menuItem9.Index = 5;
  319. this.menuItem9.Text = "-";
  320. // 
  321. // menuItem5
  322. // 
  323. this.menuItem5.Index = 6;
  324. this.menuItem5.Text = "退宿结帐(&T)";
  325. this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click);
  326. // 
  327. // menuItem10
  328. // 
  329. this.menuItem10.Index = 7;
  330. this.menuItem10.Text = "-";
  331. // 
  332. // menuItem6
  333. // 
  334. this.menuItem6.Index = 8;
  335. this.menuItem6.Text = "退出(&E)";
  336. this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
  337. // 
  338. // menuItem11
  339. // 
  340. this.menuItem11.Index = 1;
  341. this.menuItem11.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  342.    this.menuItem12,
  343.    this.menuItem13,
  344.    this.menuItem14,
  345.    this.menuItem16,
  346.    this.menuItem17,
  347.    this.menuItem36,
  348.    this.menuItem48});
  349. this.menuItem11.Text = "查询统计(&C)";
  350. // 
  351. // menuItem12
  352. // 
  353. this.menuItem12.Index = 0;
  354. this.menuItem12.Text = "住宿查询(&Z)";
  355. this.menuItem12.Click += new System.EventHandler(this.menuItem12_Click);
  356. // 
  357. // menuItem13
  358. // 
  359. this.menuItem13.Index = 1;
  360. this.menuItem13.Text = "-";
  361. // 
  362. // menuItem14
  363. // 
  364. this.menuItem14.Index = 2;
  365. this.menuItem14.Text = "退宿查询(&T)";
  366. this.menuItem14.Click += new System.EventHandler(this.menuItem14_Click);
  367. // 
  368. // menuItem16
  369. // 
  370. this.menuItem16.Index = 3;
  371. this.menuItem16.Text = "-";
  372. // 
  373. // menuItem17
  374. // 
  375. this.menuItem17.Index = 4;
  376. this.menuItem17.Text = "客房查询(&K)";
  377. this.menuItem17.Click += new System.EventHandler(this.menuItem17_Click);
  378. // 
  379. // menuItem36
  380. // 
  381. this.menuItem36.Index = 5;
  382. this.menuItem36.Text = "-";
  383. // 
  384. // menuItem48
  385. // 
  386. this.menuItem48.Index = 6;
  387. this.menuItem48.Text = "宿费提醒(&S)";
  388. this.menuItem48.Click += new System.EventHandler(this.menuItem48_Click);
  389. // 
  390. // menuItem23
  391. // 
  392. this.menuItem23.Index = 2;
  393. this.menuItem23.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  394.    this.menuItem24,
  395.    this.menuItem25,
  396.    this.menuItem29,
  397.    this.menuItem30,
  398.    this.menuItem31,
  399.    this.menuItem43,
  400.    this.menuItem44});
  401. this.menuItem23.Text = "基础信息维护(&B)";
  402. // 
  403. // menuItem24
  404. // 
  405. this.menuItem24.Index = 0;
  406. this.menuItem24.Text = "客房信息维护(&K)";
  407. this.menuItem24.Click += new System.EventHandler(this.menuItem24_Click);
  408. // 
  409. // menuItem25
  410. // 
  411. this.menuItem25.Index = 1;
  412. this.menuItem25.Text = "-";
  413. // 
  414. // menuItem29
  415. // 
  416. this.menuItem29.Index = 2;
  417. this.menuItem29.Text = "员工信息维护(&G)";
  418. this.menuItem29.Click += new System.EventHandler(this.menuItem29_Click);
  419. // 
  420. // menuItem30
  421. // 
  422. this.menuItem30.Index = 3;
  423. this.menuItem30.Text = "-";
  424. // 
  425. // menuItem31
  426. // 
  427. this.menuItem31.Index = 4;
  428. this.menuItem31.Text = "部门信息维护(&B)";
  429. this.menuItem31.Click += new System.EventHandler(this.menuItem31_Click);
  430. // 
  431. // menuItem43
  432. // 
  433. this.menuItem43.Index = 5;
  434. this.menuItem43.Text = "-";
  435. // 
  436. // menuItem44
  437. // 
  438. this.menuItem44.Index = 6;
  439. this.menuItem44.Text = "单位信息维护(&D)";
  440. this.menuItem44.Click += new System.EventHandler(this.menuItem44_Click);
  441. // 
  442. // menuItem32
  443. // 
  444. this.menuItem32.Index = 3;
  445. this.menuItem32.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  446.    this.menuItem37,
  447.    this.menuItem34,
  448.    this.menuItem33,
  449.    this.menuItem38,
  450.    this.menuItem39});
  451. this.menuItem32.Text = "系统维护(&S)";
  452. // 
  453. // menuItem37
  454. // 
  455. this.menuItem37.Index = 0;
  456. this.menuItem37.Text = "系统初始化(&X)";
  457. this.menuItem37.Click += new System.EventHandler(this.menuItem37_Click);
  458. // 
  459. // menuItem34
  460. // 
  461. this.menuItem34.Index = 1;
  462. this.menuItem34.Text = "-";
  463. // 
  464. // menuItem33
  465. // 
  466. this.menuItem33.Index = 2;
  467. this.menuItem33.Text = "操作员管理(&C)";
  468. this.menuItem33.Click += new System.EventHandler(this.menuItem33_Click);
  469. // 
  470. // menuItem38
  471. // 
  472. this.menuItem38.Index = 3;
  473. this.menuItem38.Text = "-";
  474. // 
  475. // menuItem39
  476. // 
  477. this.menuItem39.Index = 4;
  478. this.menuItem39.Text = "数据备份(&B)";
  479. this.menuItem39.Click += new System.EventHandler(this.menuItem39_Click);
  480. // 
  481. // menuItem42
  482. // 
  483. this.menuItem42.Index = 4;
  484. this.menuItem42.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  485.    this.menuItem45,
  486.    this.menuItem15,
  487.    this.menuItem20,
  488.    this.menuItem46,
  489.    this.menuItem47});
  490. this.menuItem42.Text = "帮助(&H)";
  491. // 
  492. // menuItem45
  493. // 
  494. this.menuItem45.Index = 0;
  495. this.menuItem45.Text = "帮助(&H)";
  496. this.menuItem45.Click += new System.EventHandler(this.menuItem45_Click);
  497. // 
  498. // menuItem15
  499. // 
  500. this.menuItem15.Index = 1;
  501. this.menuItem15.Text = "-";
  502. // 
  503. // menuItem20
  504. // 
  505. this.menuItem20.Index = 2;
  506. this.menuItem20.Text = "每日一帖(&M)";
  507. this.menuItem20.Click += new System.EventHandler(this.menuItem20_Click);
  508. // 
  509. // menuItem46
  510. // 
  511. this.menuItem46.Index = 3;
  512. this.menuItem46.Text = "-";
  513. // 
  514. // menuItem47
  515. // 
  516. this.menuItem47.Index = 4;
  517. this.menuItem47.Text = "关于本软件(&G)";
  518. this.menuItem47.Click += new System.EventHandler(this.menuItem47_Click);
  519. // 
  520. // button8
  521. // 
  522. this.button8.BackColor = System.Drawing.Color.Transparent;
  523. this.button8.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
  524. this.button8.ForeColor = System.Drawing.Color.Black;
  525. this.button8.Image = ((System.Drawing.Image)(resources.GetObject("button8.Image")));
  526. this.button8.ImageAlign = System.Drawing.ContentAlignment.TopCenter;
  527. this.button8.Location = new System.Drawing.Point(388, 9);
  528. this.button8.Name = "button8";
  529. this.button8.Size = new System.Drawing.Size(62, 52);
  530. this.button8.TabIndex = 8;
  531. this.button8.Text = "退出";
  532. this.button8.TextAlign = System.Drawing.ContentAlignment.BottomCenter;
  533. this.button8.Click += new System.EventHandler(this.button8_Click);
  534. // 
  535. // groupBox1
  536. // 
  537. this.groupBox1.Controls.Add(this.button6);
  538. this.groupBox1.Controls.Add(this.label3);
  539. this.groupBox1.Controls.Add(this.label2);
  540. this.groupBox1.Controls.Add(this.button1);
  541. this.groupBox1.Controls.Add(this.button7);
  542. this.groupBox1.Controls.Add(this.button2);
  543. this.groupBox1.Controls.Add(this.button4);
  544. this.groupBox1.Controls.Add(this.button3);
  545. this.groupBox1.Controls.Add(this.button8);
  546. this.groupBox1.Controls.Add(this.button5);
  547. this.groupBox1.Controls.Add(this.dateTimePicker1);
  548. this.groupBox1.Location = new System.Drawing.Point(-8, 0);
  549. this.groupBox1.Name = "groupBox1";
  550. this.groupBox1.Size = new System.Drawing.Size(672, 65);
  551. this.groupBox1.TabIndex = 8;
  552. this.groupBox1.TabStop = false;
  553. // 
  554. // button6
  555. // 
  556. this.button6.Location = new System.Drawing.Point(540, 38);
  557. this.button6.Name = "button6";
  558. this.button6.Size = new System.Drawing.Size(56, 23);
  559. this.button6.TabIndex = 11;
  560. this.button6.Text = "计算器";
  561. this.button6.Click += new System.EventHandler(this.button6_Click);
  562. // 
  563. // label3
  564. // 
  565. this.label3.Location = new System.Drawing.Point(482, 40);
  566. this.label3.Name = "label3";
  567. this.label3.Size = new System.Drawing.Size(56, 18);
  568. this.label3.TabIndex = 10;
  569. this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
  570. // 
  571. // label2
  572. // 
  573. this.label2.BackColor = System.Drawing.Color.Transparent;
  574. this.label2.Location = new System.Drawing.Point(456, 16);
  575. this.label2.Name = "label2";
  576. this.label2.Size = new System.Drawing.Size(24, 39);
  577. this.label2.TabIndex = 9;
  578. this.label2.Text = "万年历";
  579. // 
  580. // dateTimePicker1
  581. // 
  582. this.dateTimePicker1.CalendarTrailingForeColor = System.Drawing.Color.LightGray;
  583. this.dateTimePicker1.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right;
  584. this.dateTimePicker1.Location = new System.Drawing.Point(480, 14);
  585. this.dateTimePicker1.Name = "dateTimePicker1";
  586. this.dateTimePicker1.Size = new System.Drawing.Size(120, 21);
  587. this.dateTimePicker1.TabIndex = 0;
  588. // 
  589. // panel1
  590. // 
  591. this.panel1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("panel1.BackgroundImage")));
  592. this.panel1.Location = new System.Drawing.Point(0, 72);
  593. this.panel1.Name = "panel1";
  594. this.panel1.Size = new System.Drawing.Size(600, 352);
  595. this.panel1.TabIndex = 9;
  596. // 
  597. // groupBox2
  598. // 
  599. this.groupBox2.BackColor = System.Drawing.Color.MintCream;
  600. this.groupBox2.Controls.Add(this.label1);
  601. this.groupBox2.Controls.Add(this.pictureBox1);
  602. this.groupBox2.Location = new System.Drawing.Point(0, 416);
  603. this.groupBox2.Name = "groupBox2";
  604. this.groupBox2.Size = new System.Drawing.Size(592, 56);
  605. this.groupBox2.TabIndex = 10;
  606. this.groupBox2.TabStop = false;
  607. // 
  608. // label1
  609. // 
  610. this.label1.BackColor = System.Drawing.Color.Transparent;
  611. this.label1.Font = new System.Drawing.Font("楷体_GB2312", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
  612. this.label1.ForeColor = System.Drawing.Color.Maroon;
  613. this.label1.Location = new System.Drawing.Point(472, 32);
  614. this.label1.Name = "label1";
  615. this.label1.Size = new System.Drawing.Size(112, 16);
  616. this.label1.TabIndex = 1;
  617. this.label1.Text = "Version1.0 ";
  618. // 
  619. // pictureBox1
  620. // 
  621. this.pictureBox1.BackColor = System.Drawing.Color.Transparent;
  622. this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
  623. this.pictureBox1.Location = new System.Drawing.Point(8, 19);
  624. this.pictureBox1.Name = "pictureBox1";
  625. this.pictureBox1.Size = new System.Drawing.Size(352, 24);
  626. this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
  627. this.pictureBox1.TabIndex = 0;
  628. this.pictureBox1.TabStop = false;
  629. // 
  630. // timer1
  631. // 
  632. this.timer1.Enabled = true;
  633. this.timer1.Interval = 1000;
  634. this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
  635. // 
  636. // compro
  637. // 
  638. this.compro.StartInfo.FileName = "calc.exe";
  639. this.compro.SynchronizingObject = this;
  640. // 
  641. // processhelp
  642. // 
  643. this.processhelp.StartInfo.FileName = "happybook.exe";
  644. this.processhelp.SynchronizingObject = this;
  645. // 
  646. // main
  647. // 
  648. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  649. this.ClientSize = new System.Drawing.Size(592, 493);
  650. this.Controls.Add(this.groupBox2);
  651. this.Controls.Add(this.panel1);
  652. this.Controls.Add(this.groupBox1);
  653. this.Cursor = System.Windows.Forms.Cursors.Hand;
  654. this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
  655. this.MaximizeBox = false;
  656. this.MaximumSize = new System.Drawing.Size(600, 520);
  657. this.Menu = this.mainMenu1;
  658. this.MinimizeBox = false;
  659. this.MinimumSize = new System.Drawing.Size(600, 520);
  660. this.Name = "main";
  661. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  662. this.Text = "客房管理系统";
  663. this.Closing += new System.ComponentModel.CancelEventHandler(this.main_Closing);
  664. this.Load += new System.EventHandler(this.main_Load);
  665. this.groupBox1.ResumeLayout(false);
  666. this.groupBox2.ResumeLayout(false);
  667. this.ResumeLayout(false);
  668. }
  669. #endregion
  670. /// <summary>
  671. /// 应用程序的主入口点。
  672. /// </summary>
  673. ///[STAThread]
  674. private void main_Load(object sender, System.EventArgs e)
  675. {
  676. StreamReader sr=new StreamReader("start.txt",System.Text .Encoding.Default);
  677. oper=this.nam ;
  678. switch(this.pur )
  679. {
  680. case '0':
  681. this.chushi1 ();
  682. this.chushi2 ();
  683. break;
  684. case '1':
  685. this.huifu1 ();
  686. this.huifu2 ();
  687. break;
  688. case '2':
  689. this.chushi1 ();
  690. this.huifu2 ();
  691. break;
  692. case '3':
  693. this.huifu1 ();
  694. this.chushi2 ();
  695. break;
  696. }
  697. //启动每日一帖
  698. if(sr.ReadLine ()=="1")
  699. {
  700. sr.Close ();
  701. tips t=new tips ();
  702. t.ShowDialog ();
  703. }
  704. }
  705. private void button8_Click(object sender, System.EventArgs e)
  706. {
  707. dc.exit();
  708. }
  709. private void menuItem6_Click(object sender, System.EventArgs e)
  710. {
  711. dc.exit();
  712. }
  713. private void button1_Click(object sender, System.EventArgs e)
  714. {
  715. this.kfyd ();
  716. }
  717. private void chushi1()
  718. {
  719. this.button1 .Enabled =false;
  720. this.button2 .Enabled =false;
  721. this.button3 .Enabled =false;
  722. this.button4 .Enabled =false;
  723. this.button5 .Enabled =false;
  724. this.button7 .Enabled =false;
  725. this.menuItem2.Enabled =false;
  726. this.menuItem3 .Enabled =false;
  727. this.menuItem4 .Enabled =false;
  728. this.menuItem5 .Enabled =false;
  729. this.menuItem11 .Enabled =false;
  730. }
  731. private void chushi2()
  732. {
  733. this.menuItem23 .Enabled =false;
  734. this.menuItem32 .Enabled =false;
  735. }
  736. private void huifu1()
  737. {
  738. this.button1 .Enabled =true;
  739. this.button2 .Enabled =true;
  740. this.button3 .Enabled =true;
  741. this.button4 .Enabled =true;
  742. this.button5 .Enabled =true;
  743. this.button7 .Enabled =true;
  744. this.menuItem2.Enabled =true;
  745. this.menuItem3 .Enabled =true;
  746. this.menuItem4 .Enabled =true;
  747. this.menuItem5 .Enabled =true;
  748. this.menuItem11 .Enabled =true;
  749. }
  750. private void huifu2()
  751. {
  752. this.menuItem23 .Enabled =true;
  753. this.menuItem32 .Enabled =true;
  754. }
  755. private void kfyd()
  756. {
  757. kfyd kfyd1=new kfyd (oper);
  758. kfyd1.ShowDialog ();
  759. }
  760. private void zsdj()
  761. {
  762. zsdj zsdj1=new zsdj (oper);
  763. zsdj1.ShowDialog ();
  764. }
  765. private void tsjz()
  766. {
  767. tsjz tsjz1=new tsjz (oper);
  768. tsjz1.ShowDialog ();
  769. }
  770. private void zscx()
  771. {
  772. zscx zscx1=new zscx (oper);
  773. zscx1.ShowDialog ();
  774. }
  775. private void kfcx()
  776. {
  777. kfcx kfcx1=new kfcx (oper);
  778. kfcx1.ShowDialog ();
  779. }
  780. private void sftx()
  781. {
  782. sftx sftx1=new sftx (oper);
  783. sftx1.ShowDialog ();
  784. }
  785. private void button5_Click(object sender, System.EventArgs e)
  786. {
  787. this.kfcx ();
  788. }
  789. private void menuItem33_Click(object sender, System.EventArgs e)
  790. {
  791. opermana op=new opermana (pur,nam);
  792. op.ShowDialog ();
  793. }
  794. private void menuItem2_Click(object sender, System.EventArgs e)
  795. {
  796. this.kfyd ();
  797. }
  798. private void menuItem3_Click(object sender, System.EventArgs e)
  799. {
  800. this.zsdj ();
  801. }
  802. private void button2_Click(object sender, System.EventArgs e)
  803. {
  804. this.zsdj ();
  805. }
  806. private void menuItem4_Click(object sender, System.EventArgs e)
  807. {
  808. zjyj zjyj1=new zjyj (oper);
  809. zjyj1.ShowDialog ();
  810. }
  811. private void menuItem5_Click(object sender, System.EventArgs e)
  812. {
  813. this.tsjz ();
  814. }
  815. private void button3_Click(object sender, System.EventArgs e)
  816. {
  817. this.tsjz ();
  818. }
  819. private void menuItem12_Click(object sender, System.EventArgs e)
  820. {
  821. this.zscx ();
  822. }
  823. private void button4_Click(object sender, System.EventArgs e)
  824. {
  825. this.zscx ();
  826. }
  827. private void menuItem17_Click(object sender, System.EventArgs e)
  828. {
  829. this.kfcx ();
  830. }
  831. private void menuItem48_Click(object sender, System.EventArgs e)
  832. {
  833. this.sftx ();
  834. }
  835. private void button7_Click(object sender, System.EventArgs e)
  836. {
  837. this.sftx ();
  838. }
  839. private void menuItem14_Click(object sender, System.EventArgs e)
  840. {
  841. tscx tscx1=new tscx (oper);
  842. tscx1.ShowDialog ();
  843. }
  844. private void main_Closing(object sender, System.ComponentModel.CancelEventArgs e)
  845. {
  846. dc.exit ();
  847. }
  848. private void menuItem20_Click(object sender, System.EventArgs e)
  849. {
  850. tips t=new tips ();
  851. t.ShowDialog ();
  852. }
  853. private void timer1_Tick(object sender, System.EventArgs e)
  854. {
  855. this.label3 .Text =System.DateTime.Now .ToLongTimeString();
  856. }
  857. private void button6_Click(object sender, System.EventArgs e)
  858. {
  859. compro.Start ();
  860. }
  861. private void menuItem24_Click(object sender, System.EventArgs e)
  862. {
  863. kfinfo kk=new kfinfo ();
  864. kk.ShowDialog ();
  865. }
  866. private void menuItem29_Click(object sender, System.EventArgs e)
  867. {
  868. yginfo yg=new yginfo ();
  869. yg.ShowDialog ();
  870. }
  871. private void menuItem39_Click(object sender, System.EventArgs e)
  872. {
  873. backup bk=new backup ();
  874. bk.ShowDialog ();
  875. }
  876. private void menuItem45_Click(object sender, System.EventArgs e)
  877. {
  878. this.processhelp.Start();
  879. }
  880. private void menuItem44_Click(object sender, System.EventArgs e)
  881. {
  882. dwinfo di=new dwinfo (oper);
  883. di.ShowDialog ();
  884. }
  885. private void menuItem31_Click(object sender, System.EventArgs e)
  886. {
  887. bminfo bm=new bminfo ();
  888. bm.ShowDialog ();
  889. }
  890. private void menuItem37_Click(object sender, System.EventArgs e)
  891. {
  892. sysivn sys=new sysivn ();
  893. sys.ShowDialog ();
  894. }
  895. private void menuItem47_Click(object sender, System.EventArgs e)
  896. {
  897. about ab=new about ();
  898. ab.ShowDialog ();
  899. }
  900. }
  901. }