📄 mainfrom.cs
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
namespace Sale.UILevel
{
/// <summary>
/// Form1 的摘要说明。
/// </summary>
public class MainForm : System.Windows.Forms.Form
{
private DevExpress.XtraNavBar.NavBarControl navBarControl1;
private System.Windows.Forms.Splitter splitter1;
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 menuItem13;
private System.Windows.Forms.MenuItem menuItem14;
private System.Windows.Forms.MenuItem menuItem17;
private System.Windows.Forms.MenuItem menuItem18;
private System.Windows.Forms.MenuItem menuItem19;
private System.Windows.Forms.MenuItem menuItem20;
private System.Windows.Forms.MenuItem menuItem10;
private System.Windows.Forms.MenuItem menuItem11;
private DevExpress.XtraNavBar.NavBarItem Provider;
private DevExpress.XtraNavBar.NavBarItem Client;
private DevExpress.XtraNavBar.NavBarItem Product;
private DevExpress.XtraNavBar.NavBarItem ProBuy;
private DevExpress.XtraNavBar.NavBarItem ProSell;
private DevExpress.XtraNavBar.NavBarItem ProCheck;
private DevExpress.XtraNavBar.NavBarItem ProfitAnalyse;
private DevExpress.XtraNavBar.NavBarItem Search;
private DevExpress.XtraNavBar.NavBarItem Reprot;
private DevExpress.XtraNavBar.NavBarItem User;
private DevExpress.XtraNavBar.NavBarItem Help;
private DevExpress.XtraNavBar.NavBarItem Exit;
private string usersort;
private DevExpress.XtraNavBar.NavBarGroup DataManage;
private DevExpress.XtraNavBar.NavBarGroup ProductOperation;
private DevExpress.XtraNavBar.NavBarGroup GerneralOperation;
private DevExpress.XtraNavBar.NavBarGroup SystemOperation;
private System.Windows.Forms.MenuItem menuItemSysManage;
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.Container components = null;
public MainForm(string usersort)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.usersort=usersort;
//
// 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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(MainForm));
this.navBarControl1 = new DevExpress.XtraNavBar.NavBarControl();
this.DataManage = new DevExpress.XtraNavBar.NavBarGroup();
this.Provider = new DevExpress.XtraNavBar.NavBarItem();
this.Client = new DevExpress.XtraNavBar.NavBarItem();
this.Product = new DevExpress.XtraNavBar.NavBarItem();
this.ProductOperation = new DevExpress.XtraNavBar.NavBarGroup();
this.ProBuy = new DevExpress.XtraNavBar.NavBarItem();
this.ProSell = new DevExpress.XtraNavBar.NavBarItem();
this.ProCheck = new DevExpress.XtraNavBar.NavBarItem();
this.GerneralOperation = new DevExpress.XtraNavBar.NavBarGroup();
this.ProfitAnalyse = new DevExpress.XtraNavBar.NavBarItem();
this.Search = new DevExpress.XtraNavBar.NavBarItem();
this.Reprot = new DevExpress.XtraNavBar.NavBarItem();
this.SystemOperation = new DevExpress.XtraNavBar.NavBarGroup();
this.User = new DevExpress.XtraNavBar.NavBarItem();
this.Help = new DevExpress.XtraNavBar.NavBarItem();
this.Exit = new DevExpress.XtraNavBar.NavBarItem();
this.splitter1 = new System.Windows.Forms.Splitter();
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.menuItem2 = 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.menuItem6 = new System.Windows.Forms.MenuItem();
this.menuItem7 = new System.Windows.Forms.MenuItem();
this.menuItem8 = new System.Windows.Forms.MenuItem();
this.menuItem9 = new System.Windows.Forms.MenuItem();
this.menuItem17 = new System.Windows.Forms.MenuItem();
this.menuItem18 = new System.Windows.Forms.MenuItem();
this.menuItem19 = new System.Windows.Forms.MenuItem();
this.menuItem20 = new System.Windows.Forms.MenuItem();
this.menuItemSysManage = new System.Windows.Forms.MenuItem();
this.menuItem10 = new System.Windows.Forms.MenuItem();
this.menuItem13 = new System.Windows.Forms.MenuItem();
this.menuItem11 = new System.Windows.Forms.MenuItem();
this.menuItem14 = new System.Windows.Forms.MenuItem();
((System.ComponentModel.ISupportInitialize)(this.navBarControl1)).BeginInit();
this.SuspendLayout();
//
// navBarControl1
//
this.navBarControl1.ActiveGroup = this.DataManage;
this.navBarControl1.AllowDrop = true;
this.navBarControl1.Cursor = System.Windows.Forms.Cursors.Hand;
this.navBarControl1.Dock = System.Windows.Forms.DockStyle.Left;
this.navBarControl1.Groups.AddRange(new DevExpress.XtraNavBar.NavBarGroup[] {
this.DataManage,
this.ProductOperation,
this.GerneralOperation,
this.SystemOperation});
this.navBarControl1.Items.AddRange(new DevExpress.XtraNavBar.NavBarItem[] {
this.Provider,
this.Client,
this.Product,
this.ProBuy,
this.ProSell,
this.ProCheck,
this.Exit,
this.Search,
this.Reprot,
this.Help,
this.ProfitAnalyse,
this.User});
this.navBarControl1.Location = new System.Drawing.Point(0, 0);
this.navBarControl1.Name = "navBarControl1";
this.navBarControl1.Size = new System.Drawing.Size(152, 481);
this.navBarControl1.Styles.AddReplace("ItemPressed", new DevExpress.Utils.ViewStyleEx("ItemPressed", "NavBarControl", new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Underline), "Item", ((DevExpress.Utils.StyleOptions)((DevExpress.Utils.StyleOptions.StyleEnabled | DevExpress.Utils.StyleOptions.UseFont))), true, true, false, DevExpress.Utils.HorzAlignment.Center, DevExpress.Utils.VertAlignment.Center, null, System.Drawing.SystemColors.Window, System.Drawing.SystemColors.WindowText, System.Drawing.Color.Empty, System.Drawing.Drawing2D.LinearGradientMode.Horizontal));
this.navBarControl1.Styles.AddReplace("ItemDisabled", new DevExpress.Utils.ViewStyleEx("ItemDisabled", "NavBarControl", "Item", ((DevExpress.Utils.StyleOptions)((DevExpress.Utils.StyleOptions.StyleEnabled | DevExpress.Utils.StyleOptions.UseForeColor))), true, true, false, DevExpress.Utils.HorzAlignment.Center, DevExpress.Utils.VertAlignment.Center, null, System.Drawing.SystemColors.Window, System.Drawing.SystemColors.GrayText, System.Drawing.Color.Empty, System.Drawing.Drawing2D.LinearGradientMode.Horizontal));
this.navBarControl1.Styles.AddReplace("GroupHeaderActive", new DevExpress.Utils.ViewStyleEx("GroupHeaderActive", "NavBarControl", new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold), "GroupHeader", DevExpress.Utils.StyleOptions.StyleEnabled, true, false, false, DevExpress.Utils.HorzAlignment.Near, DevExpress.Utils.VertAlignment.Center, null, System.Drawing.SystemColors.Control, System.Drawing.SystemColors.ControlText, System.Drawing.Color.Empty, System.Drawing.Drawing2D.LinearGradientMode.Horizontal));
this.navBarControl1.Styles.AddReplace("GroupHeaderPressed", new DevExpress.Utils.ViewStyleEx("GroupHeaderPressed", "NavBarControl", new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold), "GroupHeader", DevExpress.Utils.StyleOptions.StyleEnabled, true, false, false, DevExpress.Utils.HorzAlignment.Near, DevExpress.Utils.VertAlignment.Center, null, System.Drawing.SystemColors.Control, System.Drawing.SystemColors.ControlText, System.Drawing.Color.Empty, System.Drawing.Drawing2D.LinearGradientMode.Horizontal));
this.navBarControl1.Styles.AddReplace("GroupHeaderHotTracked", new DevExpress.Utils.ViewStyleEx("GroupHeaderHotTracked", "NavBarControl", new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold), "GroupHeader", DevExpress.Utils.StyleOptions.StyleEnabled, true, false, false, DevExpress.Utils.HorzAlignment.Near, DevExpress.Utils.VertAlignment.Center, null, System.Drawing.SystemColors.Control, System.Drawing.SystemColors.ControlText, System.Drawing.Color.Empty, System.Drawing.Drawing2D.LinearGradientMode.Horizontal));
this.navBarControl1.Styles.AddReplace("ItemHotTracked", new DevExpress.Utils.ViewStyleEx("ItemHotTracked", "NavBarControl", new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Underline), "Item", ((DevExpress.Utils.StyleOptions)((DevExpress.Utils.StyleOptions.StyleEnabled | DevExpress.Utils.StyleOptions.UseFont))), true, true, false, DevExpress.Utils.HorzAlignment.Center, DevExpress.Utils.VertAlignment.Center, null, System.Drawing.SystemColors.Window, System.Drawing.SystemColors.WindowText, System.Drawing.Color.Empty, System.Drawing.Drawing2D.LinearGradientMode.Horizontal));
this.navBarControl1.TabIndex = 10;
this.navBarControl1.Text = "navBarControl1";
this.navBarControl1.View = new DevExpress.XtraNavBar.ViewInfo.XPExplorerBarViewInfoRegistrator();
//
// DataManage
//
this.DataManage.Caption = "数据维护";
this.DataManage.Expanded = true;
this.DataManage.ItemLinks.AddRange(new DevExpress.XtraNavBar.NavBarItemLink[] {
new DevExpress.XtraNavBar.NavBarItemLink(this.Provider),
new DevExpress.XtraNavBar.NavBarItemLink(this.Client),
new DevExpress.XtraNavBar.NavBarItemLink(this.Product)});
this.DataManage.Name = "DataManage";
//
// Provider
//
this.Provider.Caption = "供应商";
this.Provider.LargeImage = ((System.Drawing.Image)(resources.GetObject("Provider.LargeImage")));
this.Provider.Name = "Provider";
//
// Client
//
this.Client.Caption = "客户";
this.Client.LargeImage = ((System.Drawing.Image)(resources.GetObject("Client.LargeImage")));
this.Client.Name = "Client";
//
// Product
//
this.Product.Caption = "商品信息";
this.Product.LargeImage = ((System.Drawing.Image)(resources.GetObject("Product.LargeImage")));
this.Product.Name = "Product";
this.Product.LinkClicked += new DevExpress.XtraNavBar.NavBarLinkEventHandler(this.Product_LinkClicked);
//
// ProductOperation
//
this.ProductOperation.Caption = "商品操作";
this.ProductOperation.Expanded = true;
this.ProductOperation.ItemLinks.AddRange(new DevExpress.XtraNavBar.NavBarItemLink[] {
new DevExpress.XtraNavBar.NavBarItemLink(this.ProBuy),
new DevExpress.XtraNavBar.NavBarItemLink(this.ProSell),
new DevExpress.XtraNavBar.NavBarItemLink(this.ProCheck)});
this.ProductOperation.Name = "ProductOperation";
//
// ProBuy
//
this.ProBuy.Caption = "进货";
this.ProBuy.LargeImage = ((System.Drawing.Image)(resources.GetObject("ProBuy.LargeImage")));
this.ProBuy.Name = "ProBuy";
this.ProBuy.LinkClicked += new DevExpress.XtraNavBar.NavBarLinkEventHandler(this.ProBuy_LinkClicked);
//
// ProSell
//
this.ProSell.Caption = "销售";
this.ProSell.LargeImage = ((System.Drawing.Image)(resources.GetObject("ProSell.LargeImage")));
this.ProSell.Name = "ProSell";
this.ProSell.LinkClicked += new DevExpress.XtraNavBar.NavBarLinkEventHandler(this.ProSell_LinkClicked);
//
// ProCheck
//
this.ProCheck.Caption = "商品盘点";
this.ProCheck.LargeImage = ((System.Drawing.Image)(resources.GetObject("ProCheck.LargeImage")));
this.ProCheck.Name = "ProCheck";
this.ProCheck.LinkClicked += new DevExpress.XtraNavBar.NavBarLinkEventHandler(this.ProCheck_LinkClicked);
//
// GerneralOperation
//
this.GerneralOperation.Caption = "综合操作";
this.GerneralOperation.Expanded = true;
this.GerneralOperation.ItemLinks.AddRange(new DevExpress.XtraNavBar.NavBarItemLink[] {
new DevExpress.XtraNavBar.NavBarItemLink(this.ProfitAnalyse),
new DevExpress.XtraNavBar.NavBarItemLink(this.Search),
new DevExpress.XtraNavBar.NavBarItemLink(this.Reprot)});
this.GerneralOperation.Name = "GerneralOperation";
//
// ProfitAnalyse
//
this.ProfitAnalyse.Caption = "利润分析";
this.ProfitAnalyse.LargeImage = ((System.Drawing.Image)(resources.GetObject("ProfitAnalyse.LargeImage")));
this.ProfitAnalyse.Name = "ProfitAnalyse";
this.ProfitAnalyse.LinkClicked += new DevExpress.XtraNavBar.NavBarLinkEventHandler(this.ProfitAnalyse_LinkClicked);
//
// Search
//
this.Search.Caption = "综合查询";
this.Search.LargeImage = ((System.Drawing.Image)(resources.GetObject("Search.LargeImage")));
this.Search.Name = "Search";
//
// Reprot
//
this.Reprot.Caption = "打印报表";
this.Reprot.LargeImage = ((System.Drawing.Image)(resources.GetObject("Reprot.LargeImage")));
this.Reprot.Name = "Reprot";
this.Reprot.LinkClicked += new DevExpress.XtraNavBar.NavBarLinkEventHandler(this.Reprot_LinkClicked);
//
// SystemOperation
//
this.SystemOperation.Caption = "系统管理";
this.SystemOperation.Expanded = true;
this.SystemOperation.ItemLinks.AddRange(new DevExpress.XtraNavBar.NavBarItemLink[] {
new DevExpress.XtraNavBar.NavBarItemLink(this.User),
new DevExpress.XtraNavBar.NavBarItemLink(this.Help),
new DevExpress.XtraNavBar.NavBarItemLink(this.Exit)});
this.SystemOperation.Name = "SystemOperation";
//
// User
//
this.User.Caption = "用户管理";
this.User.LargeImage = ((System.Drawing.Image)(resources.GetObject("User.LargeImage")));
this.User.Name = "User";
//
// Help
//
this.Help.Caption = "系统帮助";
this.Help.LargeImage = ((System.Drawing.Image)(resources.GetObject("Help.LargeImage")));
this.Help.Name = "Help";
this.Help.LinkClicked += new DevExpress.XtraNavBar.NavBarLinkEventHandler(this.Help_LinkClicked);
//
// Exit
//
this.Exit.Caption = "退出系统";
this.Exit.LargeImage = ((System.Drawing.Image)(resources.GetObject("Exit.LargeImage")));
this.Exit.Name = "Exit";
this.Exit.LinkClicked += new DevExpress.XtraNavBar.NavBarLinkEventHandler(this.Exit_LinkClicked);
//
// splitter1
//
this.splitter1.Location = new System.Drawing.Point(152, 0);
this.splitter1.Name = "splitter1";
this.splitter1.Size = new System.Drawing.Size(1, 481);
this.splitter1.TabIndex = 11;
this.splitter1.TabStop = false;
//
// mainMenu1
//
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -