📄 mainform.cs
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using System.Diagnostics;
using Eboer.MIS.License;
using Eboer.MIS.MF.Business;
using Eboer.MIS.PublicClass;
using Eboer.MIS.MF.WinForm.DataAccount;
using Eboer.MIS.MF.WinForm.Stock;
using Eboer.MIS.MF.WinForm.Sell;
using vbAccelerator.Components.Win32;
namespace Eboer.MIS.MF.WinForm
{
/// <summary>
/// MainForm 的摘要说明。
/// </summary>
public class MainForm : System.Windows.Forms.Form,IMDIClientNotify
{
private LoginForm login = null;
private System.Windows.Forms.MainMenu mainMenu;
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 menuItem11;
private System.Windows.Forms.MenuItem menuItem12;
private System.Windows.Forms.MenuItem menuItem13;
private System.Windows.Forms.MenuItem menuItem14;
private System.Windows.Forms.MenuItem menuItem15;
private System.Windows.Forms.MenuItem menuItem16;
private System.Windows.Forms.MenuItem menuItem18;
private System.Windows.Forms.MenuItem menuItem19;
private System.Windows.Forms.MenuItem menuItem20;
private System.Windows.Forms.MenuItem menuItem21;
private System.Windows.Forms.MenuItem menuItem22;
private System.Windows.Forms.MenuItem menuItem23;
private System.Windows.Forms.MenuItem menuItem26;
private System.Windows.Forms.StatusBar statusBar;
private System.Windows.Forms.StatusBarPanel sbDefault;
private System.Windows.Forms.MenuItem toAboutForm;
private System.Windows.Forms.MenuItem toExitApp;
private System.Windows.Forms.MenuItem menuItem10;
private System.Windows.Forms.MenuItem menuItem27;
private System.Windows.Forms.MenuItem menuItem28;
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 menuItem35;
private System.Windows.Forms.MenuItem menuItem36;
private System.Windows.Forms.MenuItem menuItem37;
private System.Windows.Forms.MenuItem menuItem38;
private System.Windows.Forms.MenuItem menuItem39;
private System.Windows.Forms.MenuItem menuItem41;
private System.Windows.Forms.MenuItem menuItem40;
private System.Windows.Forms.MenuItem menuItem42;
private System.Windows.Forms.MenuItem selectDA;
private System.Windows.Forms.MenuItem newDA;
private System.Windows.Forms.MenuItem DAList;
private System.Windows.Forms.MenuItem menuItem17;
private System.Windows.Forms.MenuItem menuItem24;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.StatusBarPanel loginInfo;
private System.Windows.Forms.MenuItem menuItem25;
private System.Windows.Forms.MenuItem menuItem43;
private System.Windows.Forms.MenuItem menuItem44;
private System.Windows.Forms.SaveFileDialog saveFileDialog;
private System.Windows.Forms.OpenFileDialog openFileDialog;
private System.Windows.Forms.ToolBar toolBar;
private System.Windows.Forms.ImageList imageList;
private System.Windows.Forms.ToolBarButton _stockList;
private System.Windows.Forms.ToolBarButton _sellList;
private System.Windows.Forms.ToolBarButton _spaces1;
private System.Windows.Forms.ToolBarButton _spaces2;
private System.Windows.Forms.ToolBarButton _new;
private System.Windows.Forms.ToolBarButton _search;
private System.Windows.Forms.ToolBarButton _spaces3;
private System.Windows.Forms.ToolBarButton _systemSet;
private System.Windows.Forms.ToolBarButton _exitSystem;
private System.Windows.Forms.ContextMenu _newMenu;
private System.Windows.Forms.MenuItem menuItem45;
private System.Windows.Forms.MenuItem menuItem46;
private System.Windows.Forms.MenuItem menuItem47;
private System.Windows.Forms.MenuItem menuItem48;
private System.Windows.Forms.MenuItem menuItem49;
private System.Windows.Forms.ContextMenu _searchMenu;
private System.Windows.Forms.MenuItem menuItem54;
private System.Windows.Forms.MenuItem menuItem50;
private System.Windows.Forms.ContextMenu _systemSetMenu;
private System.Windows.Forms.MenuItem menuItem52;
private System.Windows.Forms.MenuItem menuItem51;
private System.Windows.Forms.MenuItem menuItem53;
private System.Windows.Forms.ToolBarButton _stocker;
private System.Windows.Forms.ToolBarButton _seller;
private System.Windows.Forms.MenuItem menuItem55;
private System.Windows.Forms.MenuItem menuItem56;
private System.Windows.Forms.MenuItem menuItem57;
private System.Windows.Forms.MenuItem menuItem58;
private System.Windows.Forms.MenuItem menuItem59;
private System.Windows.Forms.ToolBarButton _spaces0;
private System.Windows.Forms.ToolBarButton _sellItem;
private System.Windows.Forms.ToolBarButton _stockItem;
private System.Windows.Forms.ToolBarButton _space00;
private MDIClientWindow mdiClient = null;
public MainForm(LoginForm login)
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.login = login;
Public.mainForm = this;
this.loginInfo.Text = "当前用户:" + Public.userID + ",登录时间:" + DateTime.Now.ToString();
}
/// <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(MainForm));
this.mainMenu = new System.Windows.Forms.MainMenu();
this.menuItem1 = new System.Windows.Forms.MenuItem();
this.selectDA = new System.Windows.Forms.MenuItem();
this.newDA = new System.Windows.Forms.MenuItem();
this.DAList = 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.menuItem17 = new System.Windows.Forms.MenuItem();
this.menuItem24 = new System.Windows.Forms.MenuItem();
this.menuItem21 = new System.Windows.Forms.MenuItem();
this.menuItem22 = new System.Windows.Forms.MenuItem();
this.menuItem23 = new System.Windows.Forms.MenuItem();
this.menuItem26 = new System.Windows.Forms.MenuItem();
this.toExitApp = new System.Windows.Forms.MenuItem();
this.menuItem2 = new System.Windows.Forms.MenuItem();
this.menuItem10 = new System.Windows.Forms.MenuItem();
this.menuItem27 = new System.Windows.Forms.MenuItem();
this.menuItem32 = new System.Windows.Forms.MenuItem();
this.menuItem28 = new System.Windows.Forms.MenuItem();
this.menuItem29 = new System.Windows.Forms.MenuItem();
this.menuItem33 = new System.Windows.Forms.MenuItem();
this.menuItem30 = new System.Windows.Forms.MenuItem();
this.menuItem31 = new System.Windows.Forms.MenuItem();
this.menuItem40 = new System.Windows.Forms.MenuItem();
this.menuItem42 = new System.Windows.Forms.MenuItem();
this.menuItem3 = new System.Windows.Forms.MenuItem();
this.menuItem34 = new System.Windows.Forms.MenuItem();
this.menuItem35 = new System.Windows.Forms.MenuItem();
this.menuItem36 = new System.Windows.Forms.MenuItem();
this.menuItem37 = new System.Windows.Forms.MenuItem();
this.menuItem38 = new System.Windows.Forms.MenuItem();
this.menuItem39 = new System.Windows.Forms.MenuItem();
this.menuItem41 = new System.Windows.Forms.MenuItem();
this.menuItem4 = new System.Windows.Forms.MenuItem();
this.menuItem11 = new System.Windows.Forms.MenuItem();
this.menuItem25 = new System.Windows.Forms.MenuItem();
this.menuItem57 = new System.Windows.Forms.MenuItem();
this.menuItem43 = new System.Windows.Forms.MenuItem();
this.menuItem44 = new System.Windows.Forms.MenuItem();
this.menuItem58 = new System.Windows.Forms.MenuItem();
this.menuItem59 = new System.Windows.Forms.MenuItem();
this.menuItem12 = new System.Windows.Forms.MenuItem();
this.menuItem13 = new System.Windows.Forms.MenuItem();
this.menuItem15 = new System.Windows.Forms.MenuItem();
this.menuItem14 = new System.Windows.Forms.MenuItem();
this.menuItem16 = 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.toAboutForm = new System.Windows.Forms.MenuItem();
this.statusBar = new System.Windows.Forms.StatusBar();
this.sbDefault = new System.Windows.Forms.StatusBarPanel();
this.loginInfo = new System.Windows.Forms.StatusBarPanel();
this.saveFileDialog = new System.Windows.Forms.SaveFileDialog();
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
this.toolBar = new System.Windows.Forms.ToolBar();
this._stockList = new System.Windows.Forms.ToolBarButton();
this._sellList = new System.Windows.Forms.ToolBarButton();
this._spaces0 = new System.Windows.Forms.ToolBarButton();
this._sellItem = new System.Windows.Forms.ToolBarButton();
this._stockItem = new System.Windows.Forms.ToolBarButton();
this._space00 = new System.Windows.Forms.ToolBarButton();
this._stocker = new System.Windows.Forms.ToolBarButton();
this._seller = new System.Windows.Forms.ToolBarButton();
this._spaces1 = new System.Windows.Forms.ToolBarButton();
this._new = new System.Windows.Forms.ToolBarButton();
this._newMenu = new System.Windows.Forms.ContextMenu();
this.menuItem45 = new System.Windows.Forms.MenuItem();
this.menuItem46 = new System.Windows.Forms.MenuItem();
this.menuItem47 = new System.Windows.Forms.MenuItem();
this.menuItem48 = new System.Windows.Forms.MenuItem();
this.menuItem49 = new System.Windows.Forms.MenuItem();
this._spaces2 = new System.Windows.Forms.ToolBarButton();
this._search = new System.Windows.Forms.ToolBarButton();
this._searchMenu = new System.Windows.Forms.ContextMenu();
this.menuItem54 = new System.Windows.Forms.MenuItem();
this.menuItem50 = new System.Windows.Forms.MenuItem();
this._spaces3 = new System.Windows.Forms.ToolBarButton();
this._systemSet = new System.Windows.Forms.ToolBarButton();
this._systemSetMenu = new System.Windows.Forms.ContextMenu();
this.menuItem52 = new System.Windows.Forms.MenuItem();
this.menuItem55 = new System.Windows.Forms.MenuItem();
this.menuItem51 = new System.Windows.Forms.MenuItem();
this.menuItem56 = new System.Windows.Forms.MenuItem();
this.menuItem53 = new System.Windows.Forms.MenuItem();
this._exitSystem = new System.Windows.Forms.ToolBarButton();
this.imageList = new System.Windows.Forms.ImageList(this.components);
((System.ComponentModel.ISupportInitialize)(this.sbDefault)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.loginInfo)).BeginInit();
this.SuspendLayout();
//
// mainMenu
//
this.mainMenu.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem1,
this.menuItem2,
this.menuItem3,
this.menuItem4,
this.menuItem5});
//
// menuItem1
//
this.menuItem1.Index = 0;
this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.selectDA,
this.newDA,
this.DAList,
this.menuItem18,
this.menuItem19,
this.menuItem20,
this.menuItem17,
this.menuItem24,
this.menuItem21,
this.menuItem22,
this.menuItem23,
this.menuItem26,
this.toExitApp});
this.menuItem1.Text = "文件(&F)";
//
// selectDA
//
this.selectDA.Index = 0;
this.selectDA.Text = "选择帐套(&R)";
this.selectDA.Visible = false;
this.selectDA.Click += new System.EventHandler(this.selectDA_Click);
//
// newDA
//
this.newDA.Index = 1;
this.newDA.Text = "新建帐套(&D)";
this.newDA.Visible = false;
//
// DAList
//
this.DAList.Index = 2;
this.DAList.Text = "帐套管理(&L)";
this.DAList.Visible = false;
//
// menuItem18
//
this.menuItem18.Index = 3;
this.menuItem18.Text = "-";
this.menuItem18.Visible = false;
//
// menuItem19
//
this.menuItem19.Index = 4;
this.menuItem19.Text = "备份数据(&B)";
this.menuItem19.Click += new System.EventHandler(this.menuItem19_Click);
//
// menuItem20
//
this.menuItem20.Index = 5;
this.menuItem20.Text = "恢复数据(&U)";
this.menuItem20.Click += new System.EventHandler(this.menuItem20_Click);
//
// menuItem17
//
this.menuItem17.Index = 6;
this.menuItem17.Text = "-";
//
// menuItem24
//
this.menuItem24.Index = 7;
this.menuItem24.Text = "修改密码(&C)";
this.menuItem24.Click += new System.EventHandler(this.menuItem24_Click);
//
// menuItem21
//
this.menuItem21.Index = 8;
this.menuItem21.Text = "-";
//
// menuItem22
//
this.menuItem22.Index = 9;
this.menuItem22.Text = "打印(&P)";
this.menuItem22.Visible = false;
this.menuItem22.Click += new System.EventHandler(this.menuItem22_Click);
//
// menuItem23
//
this.menuItem23.Index = 10;
this.menuItem23.Text = "打印设置(&S)";
this.menuItem23.Click += new System.EventHandler(this.menuItem23_Click);
//
// menuItem26
//
this.menuItem26.Index = 11;
this.menuItem26.Text = "-";
//
// toExitApp
//
this.toExitApp.Index = 12;
this.toExitApp.Text = "退出系统(&E)";
this.toExitApp.Click += new System.EventHandler(this.toExitApp_Click);
//
// menuItem2
//
this.menuItem2.Index = 1;
this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem10,
this.menuItem27,
this.menuItem32,
this.menuItem28,
this.menuItem29,
this.menuItem33,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -