📄 form1.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace WindowsApplication1
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
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.ContextMenu contextMenu1;
private System.Windows.Forms.MenuItem menuItem8;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.ListBox listBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.StatusBar statusBar1;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.StatusBarPanel statusBarPanel1;
private System.Windows.Forms.StatusBarPanel statusBarPanel2;
private System.Windows.Forms.ToolBar toolBar1;
private System.Windows.Forms.ToolBarButton toolBarButton1;
private System.Windows.Forms.ToolBarButton toolBarButton2;
private System.Windows.Forms.ToolBarButton toolBarButton3;
private System.Windows.Forms.ToolBarButton toolBarButton4;
private System.Windows.Forms.ToolBarButton toolBarButton5;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.MenuItem menuItem9;
private static float price;
public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
//
// 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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.mainMenu1 = new System.Windows.Forms.MainMenu(this.components);
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem6 = new System.Windows.Forms.MenuItem();
this.menuItem7 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.menuItem5 = new System.Windows.Forms.MenuItem();
this.contextMenu1 = new System.Windows.Forms.ContextMenu();
this.menuItem8 = new System.Windows.Forms.MenuItem();
this.menuItem9 = new System.Windows.Forms.MenuItem();
this.label1 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.listBox1 = new System.Windows.Forms.ListBox();
this.label2 = new System.Windows.Forms.Label();
this.statusBar1 = new System.Windows.Forms.StatusBar();
this.statusBarPanel1 = new System.Windows.Forms.StatusBarPanel();
this.statusBarPanel2 = new System.Windows.Forms.StatusBarPanel();
this.toolBar1 = new System.Windows.Forms.ToolBar();
this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton2 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton3 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton4 = new System.Windows.Forms.ToolBarButton();
this.toolBarButton5 = new System.Windows.Forms.ToolBarButton();
this.imageList1 = new System.Windows.Forms.ImageList(this.components);
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.statusBarPanel2)).BeginInit();
this.SuspendLayout();
//
// mainMenu1
//
this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1,
this.menuItem3});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem2});
this.menuItem1.Text = "家常菜";
//
// menuItem2
//
this.menuItem2.Index = 0;
this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem6,
this.menuItem7});
this.menuItem2.Text = "青椒土豆丝";
//
// menuItem6
//
this.menuItem6.Index = 0;
this.menuItem6.Shortcut = System.Windows.Forms.Shortcut.CtrlA;
this.menuItem6.Text = "大盘(&B)";
this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
//
// menuItem7
//
this.menuItem7.Index = 1;
this.menuItem7.Shortcut = System.Windows.Forms.Shortcut.CtrlB;
this.menuItem7.Text = "小盘(&S)";
this.menuItem7.Click += new System.EventHandler(this.menuItem7_Click);
//
// menuItem3
//
this.menuItem3.Index = 1;
this.menuItem3.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem4,
this.menuItem5});
this.menuItem3.Text = "宫廷菜";
//
// menuItem4
//
this.menuItem4.Index = 0;
this.menuItem4.Shortcut = System.Windows.Forms.Shortcut.CtrlC;
this.menuItem4.Text = "麻辣鸡丝(&C)";
this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
//
// menuItem5
//
this.menuItem5.Index = 1;
this.menuItem5.Shortcut = System.Windows.Forms.Shortcut.CtrlR;
this.menuItem5.Text = "群英会萃(&R)";
this.menuItem5.Click += new System.EventHandler(this.menuItem5_Click);
//
// contextMenu1
//
this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem8});
//
// menuItem8
//
this.menuItem8.Index = 0;
this.menuItem8.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem9});
this.menuItem8.Text = "今日优惠菜(&E)";
//
// menuItem9
//
this.menuItem9.Index = 0;
this.menuItem9.Text = "京酱肉丝";
this.menuItem9.Click += new System.EventHandler(this.menuItem9_Click);
//
// label1
//
this.label1.AllowDrop = true;
this.label1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label1.ForeColor = System.Drawing.Color.Black;
this.label1.Location = new System.Drawing.Point(11, 62);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(277, 195);
this.label1.TabIndex = 0;
this.label1.Text = " 欢迎光临";
//
// button1
//
this.button1.Location = new System.Drawing.Point(21, 288);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(128, 31);
this.button1.TabIndex = 1;
this.button1.Text = "点菜完毕(&F)";
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Location = new System.Drawing.Point(203, 288);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(117, 31);
this.button2.TabIndex = 2;
this.button2.Text = "重新点菜(&R)";
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// listBox1
//
this.listBox1.ItemHeight = 15;
this.listBox1.Location = new System.Drawing.Point(352, 103);
this.listBox1.Name = "listBox1";
this.listBox1.Size = new System.Drawing.Size(235, 184);
this.listBox1.TabIndex = 3;
//
// label2
//
this.label2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label2.Location = new System.Drawing.Point(363, 62);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(170, 29);
this.label2.TabIndex = 4;
this.label2.Text = "已点的菜";
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -