Form1.cs
上传用户:fuyouda
上传日期:2021-03-17
资源大小:8619k
文件大小:18k
源码类别:

Windows编程

开发平台:

C/C++

  1. using System;
  2. using System.Drawing;
  3. using System.Collections;
  4. using System.ComponentModel;
  5. using System.Windows.Forms;
  6. using System.Data;
  7. namespace WindowsApplication1
  8. {
  9. /// <summary>
  10. /// Form1 的摘要说明。
  11. /// </summary>
  12. public class Form1 : System.Windows.Forms.Form
  13. {
  14. private System.Windows.Forms.MainMenu mainMenu1;
  15. private System.Windows.Forms.MenuItem menuItem1;
  16. private System.Windows.Forms.MenuItem menuItem2;
  17. private System.Windows.Forms.MenuItem menuItem3;
  18. private System.Windows.Forms.MenuItem menuItem4;
  19. private System.Windows.Forms.MenuItem menuItem5;
  20. private System.Windows.Forms.MenuItem menuItem6;
  21. private System.Windows.Forms.MenuItem menuItem7;
  22. private System.Windows.Forms.MenuItem menuItem8;
  23. private System.Windows.Forms.MenuItem menuItem9;
  24. private System.Windows.Forms.MenuItem menuItem10;
  25. private System.Windows.Forms.MenuItem menuItem11;
  26. private System.Windows.Forms.MenuItem menuItem12;
  27. private System.Windows.Forms.MenuItem menuItem13;
  28. private System.Windows.Forms.MenuItem menuItem14;
  29. private System.Windows.Forms.MenuItem menuItem15;
  30. private System.Windows.Forms.MenuItem menuItem16;
  31. private System.Windows.Forms.MenuItem menuItem17;
  32. private System.Windows.Forms.MenuItem menuItem18;
  33. private System.Windows.Forms.StatusBar statusBar1;
  34. private System.Windows.Forms.StatusBarPanel statusBarPanel1;
  35. private System.Windows.Forms.StatusBarPanel statusBarPanel2;
  36. private System.Windows.Forms.StatusBarPanel statusBarPanel3;
  37. private System.Windows.Forms.ToolBar toolBar1;
  38. private System.Windows.Forms.ToolBarButton toolBarButton1;
  39. private System.Windows.Forms.ToolBarButton toolBarButton2;
  40. private System.Windows.Forms.ToolBarButton toolBarButton3;
  41. private System.Windows.Forms.ToolBarButton toolBarButton4;
  42. private System.Windows.Forms.ToolBarButton toolBarButton5;
  43. private System.Windows.Forms.ToolBarButton toolBarButton6;
  44. private System.Windows.Forms.Panel panel1;
  45. private System.Windows.Forms.Button button1;
  46. private System.Windows.Forms.Button button2;
  47. private System.Windows.Forms.Button button3;
  48. private System.Windows.Forms.Button button4;
  49. private System.Windows.Forms.Button button5;
  50. private System.Windows.Forms.Button button6;
  51. private System.Windows.Forms.Button button7;
  52. private System.Windows.Forms.PictureBox pictureBox1;
  53. private System.Windows.Forms.Button button12;
  54. private System.Windows.Forms.Button button13;
  55. private System.Windows.Forms.Button button14;
  56. private System.Windows.Forms.Button button15;
  57. private System.Windows.Forms.PictureBox pictureBox2;
  58. /// <summary>
  59. /// 必需的设计器变量。
  60. /// </summary>
  61. private System.ComponentModel.Container components = null;
  62. public Form1()
  63. {
  64. //
  65. // Windows 窗体设计器支持所必需的
  66. //
  67. InitializeComponent();
  68. //
  69. // TODO: 在 InitializeComponent 调用后添加任何构造函数代码
  70. //
  71. }
  72. /// <summary>
  73. /// 清理所有正在使用的资源。
  74. /// </summary>
  75. protected override void Dispose( bool disposing )
  76. {
  77. if( disposing )
  78. {
  79. if (components != null) 
  80. {
  81. components.Dispose();
  82. }
  83. }
  84. base.Dispose( disposing );
  85. }
  86. #region Windows 窗体设计器生成的代码
  87. /// <summary>
  88. /// 设计器支持所需的方法 - 不要使用代码编辑器修改
  89. /// 此方法的内容。
  90. /// </summary>
  91. private void InitializeComponent()
  92. {
  93. System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
  94. this.mainMenu1 = new System.Windows.Forms.MainMenu();
  95. this.menuItem1 = new System.Windows.Forms.MenuItem();
  96. this.menuItem2 = new System.Windows.Forms.MenuItem();
  97. this.menuItem3 = new System.Windows.Forms.MenuItem();
  98. this.menuItem4 = new System.Windows.Forms.MenuItem();
  99. this.menuItem5 = new System.Windows.Forms.MenuItem();
  100. this.menuItem6 = new System.Windows.Forms.MenuItem();
  101. this.menuItem7 = new System.Windows.Forms.MenuItem();
  102. this.menuItem8 = new System.Windows.Forms.MenuItem();
  103. this.menuItem9 = new System.Windows.Forms.MenuItem();
  104. this.menuItem10 = new System.Windows.Forms.MenuItem();
  105. this.menuItem11 = new System.Windows.Forms.MenuItem();
  106. this.menuItem12 = new System.Windows.Forms.MenuItem();
  107. this.menuItem13 = new System.Windows.Forms.MenuItem();
  108. this.menuItem14 = new System.Windows.Forms.MenuItem();
  109. this.menuItem15 = new System.Windows.Forms.MenuItem();
  110. this.menuItem16 = new System.Windows.Forms.MenuItem();
  111. this.menuItem17 = new System.Windows.Forms.MenuItem();
  112. this.menuItem18 = new System.Windows.Forms.MenuItem();
  113. this.statusBar1 = new System.Windows.Forms.StatusBar();
  114. this.statusBarPanel1 = new System.Windows.Forms.StatusBarPanel();
  115. this.statusBarPanel2 = new System.Windows.Forms.StatusBarPanel();
  116. this.statusBarPanel3 = new System.Windows.Forms.StatusBarPanel();
  117. this.toolBar1 = new System.Windows.Forms.ToolBar();
  118. this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();
  119. this.toolBarButton2 = new System.Windows.Forms.ToolBarButton();
  120. this.toolBarButton3 = new System.Windows.Forms.ToolBarButton();
  121. this.toolBarButton4 = new System.Windows.Forms.ToolBarButton();
  122. this.toolBarButton5 = new System.Windows.Forms.ToolBarButton();
  123. this.toolBarButton6 = new System.Windows.Forms.ToolBarButton();
  124. this.panel1 = new System.Windows.Forms.Panel();
  125. this.button1 = new System.Windows.Forms.Button();
  126. this.button2 = new System.Windows.Forms.Button();
  127. this.button3 = new System.Windows.Forms.Button();
  128. this.button4 = new System.Windows.Forms.Button();
  129. this.button5 = new System.Windows.Forms.Button();
  130. this.button6 = new System.Windows.Forms.Button();
  131. this.button7 = new System.Windows.Forms.Button();
  132. this.pictureBox1 = new System.Windows.Forms.PictureBox();
  133. this.button12 = new System.Windows.Forms.Button();
  134. this.button13 = new System.Windows.Forms.Button();
  135. this.button14 = new System.Windows.Forms.Button();
  136. this.button15 = new System.Windows.Forms.Button();
  137. this.pictureBox2 = new System.Windows.Forms.PictureBox();
  138. ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit();
  139. ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).BeginInit();
  140. ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel3)).BeginInit();
  141. this.panel1.SuspendLayout();
  142. this.SuspendLayout();
  143. // 
  144. // mainMenu1
  145. // 
  146. this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  147.   this.menuItem1,
  148.   this.menuItem3,
  149.   this.menuItem8,
  150.   this.menuItem10,
  151.   this.menuItem13,
  152.   this.menuItem15,
  153.   this.menuItem17});
  154. // 
  155. // menuItem1
  156. // 
  157. this.menuItem1.Index = 0;
  158. this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  159.   this.menuItem2,
  160.   this.menuItem4,
  161.   this.menuItem5,
  162.   this.menuItem6});
  163. this.menuItem1.Text = "系统";
  164. // 
  165. // menuItem2
  166. // 
  167. this.menuItem2.Index = 0;
  168. this.menuItem2.Text = "系统登录";
  169. // 
  170. // menuItem3
  171. // 
  172. this.menuItem3.Index = 1;
  173. this.menuItem3.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  174.   this.menuItem7});
  175. this.menuItem3.Text = "楼盘管理";
  176. // 
  177. // menuItem4
  178. // 
  179. this.menuItem4.Index = 1;
  180. this.menuItem4.Text = "用户管理";
  181. // 
  182. // menuItem5
  183. // 
  184. this.menuItem5.Index = 2;
  185. this.menuItem5.Text = "修改密码";
  186. // 
  187. // menuItem6
  188. // 
  189. this.menuItem6.Index = 3;
  190. this.menuItem6.Text = "关闭系统";
  191. // 
  192. // menuItem7
  193. // 
  194. this.menuItem7.Index = 0;
  195. this.menuItem7.Text = "楼盘管理";
  196. // 
  197. // menuItem8
  198. // 
  199. this.menuItem8.Index = 2;
  200. this.menuItem8.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  201.   this.menuItem9});
  202. this.menuItem8.Text = "住户管理";
  203. // 
  204. // menuItem9
  205. // 
  206. this.menuItem9.Index = 0;
  207. this.menuItem9.Text = "住户管理";
  208. // 
  209. // menuItem10
  210. // 
  211. this.menuItem10.Index = 3;
  212. this.menuItem10.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  213.    this.menuItem11,
  214.    this.menuItem12});
  215. this.menuItem10.Text = "停车管理";
  216. // 
  217. // menuItem11
  218. // 
  219. this.menuItem11.Index = 0;
  220. this.menuItem11.Text = "停车管理";
  221. // 
  222. // menuItem12
  223. // 
  224. this.menuItem12.Index = 1;
  225. this.menuItem12.Text = "统计查询";
  226. // 
  227. // menuItem13
  228. // 
  229. this.menuItem13.Index = 4;
  230. this.menuItem13.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  231.    this.menuItem14});
  232. this.menuItem13.Text = "收费管理";
  233. // 
  234. // menuItem14
  235. // 
  236. this.menuItem14.Index = 0;
  237. this.menuItem14.Text = "收费管理";
  238. // 
  239. // menuItem15
  240. // 
  241. this.menuItem15.Index = 5;
  242. this.menuItem15.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  243.    this.menuItem16});
  244. this.menuItem15.Text = "报修管理";
  245. // 
  246. // menuItem16
  247. // 
  248. this.menuItem16.Index = 0;
  249. this.menuItem16.Text = "报修管理";
  250. // 
  251. // menuItem17
  252. // 
  253. this.menuItem17.Index = 6;
  254. this.menuItem17.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
  255.    this.menuItem18});
  256. this.menuItem17.Text = "投诉管理";
  257. // 
  258. // menuItem18
  259. // 
  260. this.menuItem18.Index = 0;
  261. this.menuItem18.Text = "投诉管理";
  262. // 
  263. // statusBar1
  264. // 
  265. this.statusBar1.Location = new System.Drawing.Point(0, 387);
  266. this.statusBar1.Name = "statusBar1";
  267. this.statusBar1.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
  268.   this.statusBarPanel1,
  269.   this.statusBarPanel2,
  270.   this.statusBarPanel3});
  271. this.statusBar1.ShowPanels = true;
  272. this.statusBar1.Size = new System.Drawing.Size(552, 22);
  273. this.statusBar1.TabIndex = 0;
  274. this.statusBar1.Text = "statusBar1";
  275. // 
  276. // statusBarPanel1
  277. // 
  278. this.statusBarPanel1.Text = "statusBarPanel1";
  279. // 
  280. // statusBarPanel2
  281. // 
  282. this.statusBarPanel2.Text = "statusBarPanel2";
  283. // 
  284. // statusBarPanel3
  285. // 
  286. this.statusBarPanel3.Text = "statusBarPanel3";
  287. // 
  288. // toolBar1
  289. // 
  290. this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
  291. this.toolBarButton1,
  292. this.toolBarButton2,
  293. this.toolBarButton3,
  294. this.toolBarButton4,
  295. this.toolBarButton5,
  296. this.toolBarButton6});
  297. this.toolBar1.DropDownArrows = true;
  298. this.toolBar1.Location = new System.Drawing.Point(0, 0);
  299. this.toolBar1.Name = "toolBar1";
  300. this.toolBar1.ShowToolTips = true;
  301. this.toolBar1.Size = new System.Drawing.Size(552, 28);
  302. this.toolBar1.TabIndex = 1;
  303. // 
  304. // panel1
  305. // 
  306. this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  307. this.panel1.Controls.Add(this.button7);
  308. this.panel1.Controls.Add(this.button6);
  309. this.panel1.Controls.Add(this.button5);
  310. this.panel1.Controls.Add(this.button3);
  311. this.panel1.Controls.Add(this.button2);
  312. this.panel1.Controls.Add(this.button1);
  313. this.panel1.Controls.Add(this.button4);
  314. this.panel1.Controls.Add(this.button15);
  315. this.panel1.Controls.Add(this.button14);
  316. this.panel1.Controls.Add(this.button13);
  317. this.panel1.Controls.Add(this.button12);
  318. this.panel1.Controls.Add(this.pictureBox1);
  319. this.panel1.Location = new System.Drawing.Point(0, 32);
  320. this.panel1.Name = "panel1";
  321. this.panel1.Size = new System.Drawing.Size(103, 356);
  322. this.panel1.TabIndex = 2;
  323. // 
  324. // button1
  325. // 
  326. this.button1.Location = new System.Drawing.Point(0, 0);
  327. this.button1.Name = "button1";
  328. this.button1.Size = new System.Drawing.Size(100, 25);
  329. this.button1.TabIndex = 0;
  330. this.button1.Text = "系统";
  331. // 
  332. // button2
  333. // 
  334. this.button2.Location = new System.Drawing.Point(0, 208);
  335. this.button2.Name = "button2";
  336. this.button2.Size = new System.Drawing.Size(100, 25);
  337. this.button2.TabIndex = 1;
  338. this.button2.Text = "楼盘管理";
  339. this.button2.Click += new System.EventHandler(this.button2_Click);
  340. // 
  341. // button3
  342. // 
  343. this.button3.Location = new System.Drawing.Point(0, 232);
  344. this.button3.Name = "button3";
  345. this.button3.Size = new System.Drawing.Size(100, 25);
  346. this.button3.TabIndex = 2;
  347. this.button3.Text = "住户管理";
  348. // 
  349. // button4
  350. // 
  351. this.button4.Location = new System.Drawing.Point(0, 256);
  352. this.button4.Name = "button4";
  353. this.button4.Size = new System.Drawing.Size(100, 25);
  354. this.button4.TabIndex = 2;
  355. this.button4.Text = "停车管理";
  356. // 
  357. // button5
  358. // 
  359. this.button5.Location = new System.Drawing.Point(0, 280);
  360. this.button5.Name = "button5";
  361. this.button5.Size = new System.Drawing.Size(100, 25);
  362. this.button5.TabIndex = 3;
  363. this.button5.Text = "收费管理";
  364. // 
  365. // button6
  366. // 
  367. this.button6.Location = new System.Drawing.Point(0, 304);
  368. this.button6.Name = "button6";
  369. this.button6.Size = new System.Drawing.Size(100, 25);
  370. this.button6.TabIndex = 4;
  371. this.button6.Text = "报修管理";
  372. // 
  373. // button7
  374. // 
  375. this.button7.Location = new System.Drawing.Point(0, 328);
  376. this.button7.Name = "button7";
  377. this.button7.Size = new System.Drawing.Size(100, 25);
  378. this.button7.TabIndex = 5;
  379. this.button7.Text = "投诉管理";
  380. // 
  381. // pictureBox1
  382. // 
  383. this.pictureBox1.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox1.BackgroundImage")));
  384. this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  385. this.pictureBox1.Location = new System.Drawing.Point(0, 24);
  386. this.pictureBox1.Name = "pictureBox1";
  387. this.pictureBox1.Size = new System.Drawing.Size(100, 184);
  388. this.pictureBox1.TabIndex = 8;
  389. this.pictureBox1.TabStop = false;
  390. // 
  391. // button12
  392. // 
  393. this.button12.Location = new System.Drawing.Point(24, 162);
  394. this.button12.Name = "button12";
  395. this.button12.Size = new System.Drawing.Size(40, 40);
  396. this.button12.TabIndex = 12;
  397. this.button12.Text = "关闭系统";
  398. this.button12.Click += new System.EventHandler(this.button12_Click);
  399. // 
  400. // button13
  401. // 
  402. this.button13.Location = new System.Drawing.Point(24, 118);
  403. this.button13.Name = "button13";
  404. this.button13.Size = new System.Drawing.Size(40, 40);
  405. this.button13.TabIndex = 11;
  406. this.button13.Text = "修改密码";
  407. // 
  408. // button14
  409. // 
  410. this.button14.Location = new System.Drawing.Point(24, 72);
  411. this.button14.Name = "button14";
  412. this.button14.Size = new System.Drawing.Size(40, 40);
  413. this.button14.TabIndex = 10;
  414. this.button14.Text = "用户管理";
  415. // 
  416. // button15
  417. // 
  418. this.button15.Location = new System.Drawing.Point(24, 26);
  419. this.button15.Name = "button15";
  420. this.button15.Size = new System.Drawing.Size(40, 40);
  421. this.button15.TabIndex = 9;
  422. this.button15.Text = "系统登录";
  423. // 
  424. // pictureBox2
  425. // 
  426. this.pictureBox2.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("pictureBox2.BackgroundImage")));
  427. this.pictureBox2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
  428. this.pictureBox2.Location = new System.Drawing.Point(160, 48);
  429. this.pictureBox2.Name = "pictureBox2";
  430. this.pictureBox2.Size = new System.Drawing.Size(100, 184);
  431. this.pictureBox2.TabIndex = 13;
  432. this.pictureBox2.TabStop = false;
  433. // 
  434. // Form1
  435. // 
  436. this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
  437. this.ClientSize = new System.Drawing.Size(552, 409);
  438. this.Controls.Add(this.panel1);
  439. this.Controls.Add(this.toolBar1);
  440. this.Controls.Add(this.statusBar1);
  441. this.Controls.Add(this.pictureBox2);
  442. this.Menu = this.mainMenu1;
  443. this.Name = "Form1";
  444. this.Text = "Form1";
  445. this.Load += new System.EventHandler(this.Form1_Load);
  446. ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).EndInit();
  447. ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).EndInit();
  448. ((System.ComponentModel.ISupportInitialize)(this.statusBarPanel3)).EndInit();
  449. this.panel1.ResumeLayout(false);
  450. this.ResumeLayout(false);
  451. }
  452. #endregion
  453. /// <summary>
  454. /// 应用程序的主入口点。
  455. /// </summary>
  456. [STAThread]
  457. static void Main() 
  458. {
  459. Application.Run(new Form1());
  460. }
  461. private void button2_Click(object sender, System.EventArgs e)
  462. {
  463. this.pictureBox2.Left=0;
  464. //this.pictureBox2.Top=this.pictureBox2.Top;
  465. this.pictureBox1.Height=0;
  466. this.pictureBox1.Hide();
  467.     this.pictureBox2.Top=this.button1.Top+this.button1.Height+this.button2.Height;
  468. this.button12.Height=0;
  469. this.button13.Height=0;
  470. this.button14.Height=0;
  471. this.button15.Height=0;
  472. this.button12.Hide();
  473. this.button13.Hide();
  474. this.button14.Hide();
  475. this.button15.Hide();
  476. }
  477. private void Form1_Load(object sender, System.EventArgs e)
  478. {
  479. //this.button2.Top=this.button1.Top+this.button1.Height+this.pictureBox1.Height;
  480. //this.button3.Top=this.button2.Top+this.button2.Height;
  481. //this.button4.Top=this.button3.Top+this.button3.Height;
  482. //this.button5.Top=this.button4.Top+this.button4.Height;
  483. //this.button6.Top=this.button5.Top+this.button5.Height;
  484.    // this.button7.Top=this.button1.Height+this.button2.Height+this.button3.Height+this.button4.Height+this.button5.Height+this.button6.Height;
  485. }
  486. private void button12_Click(object sender, System.EventArgs e)
  487. {
  488. }
  489. }
  490. }