⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mdifrm_main.cs

📁 汽车销售管理系统,进销存系统典范,值得初学者多多学习
💻 CS
📖 第 1 页 / 共 4 页
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.IO;
using System.Threading;
using System.Windows.Forms;
using System.Runtime.InteropServices;
using MainPrj_CarShop;
using car;
using Indispost;
using CarStorehouse;
using SALE;
using frmCarInfo = car.frmCarInfo;
using Client;

namespace MainPrj_CarShop
{
	
	/// <summary>
	/// Form1 的摘要说明。
	/// </summary>
	public class MdiFrm_Main : System.Windows.Forms.Form
	{
		#region 控件变量定义
		private System.Windows.Forms.ContextMenu contextMenu1;
		private System.Windows.Forms.MainMenu mainMenu1;
		private System.Windows.Forms.MenuItem mnuSysMag;
		private System.Windows.Forms.MenuItem mnuRLog;
		private System.Windows.Forms.MenuItem mnuPwd;
		private System.Windows.Forms.MenuItem mnuDataBack;
		private System.Windows.Forms.MenuItem mnuDataRestore;
		private System.Windows.Forms.MenuItem mnuSysIni;
		private System.Windows.Forms.MenuItem mnuSysOpt;
		private System.Windows.Forms.MenuItem mnuExit;
		private System.Windows.Forms.MenuItem mnuCar;
		private System.Windows.Forms.MenuItem menuItem14;
		private System.Windows.Forms.MenuItem menuItem17;
		private System.Windows.Forms.MenuItem mnuBase;
		private System.Windows.Forms.MenuItem mnuFac;
		private System.Windows.Forms.MenuItem mnuBuyer;
		private System.Windows.Forms.MenuItem menuItem42;
		private System.Windows.Forms.MenuItem mnuDepInfo;
		private System.Windows.Forms.MenuItem mnuMoneyQ;
		private System.Windows.Forms.MenuItem mnuBuy;
		private System.Windows.Forms.MenuItem mnuBook;
		private System.Windows.Forms.MenuItem mnuInDep;
		private System.Windows.Forms.MenuItem mnuBuyPay;
		private System.Windows.Forms.MenuItem mnuSell;
		private System.Windows.Forms.MenuItem mnuReady;
		private System.Windows.Forms.MenuItem mnuSelling;
		private System.Windows.Forms.MenuItem mnuSellTake;
		private System.Windows.Forms.MenuItem menuItem23;
		private System.Windows.Forms.MenuItem menuItem30;
		private System.Windows.Forms.MenuItem menuItem35;
		private System.Windows.Forms.MenuItem mnuDepot;
		private System.Windows.Forms.MenuItem mnuDepCar;
		private System.Windows.Forms.MenuItem mnuMoveCar;
		private System.Windows.Forms.MenuItem mnuReport;
		private System.Windows.Forms.MenuItem menuItem11;
		private System.Windows.Forms.MenuItem mnuHelp;
		private System.Windows.Forms.MenuItem mnuDirHelp;
		private System.Windows.Forms.MenuItem mnuAbout;
		private System.Windows.Forms.ToolBar toolBar1;
		private System.Windows.Forms.ImageList imageList1;
		private System.Windows.Forms.ToolBarButton toolBarButton1;
		private System.Windows.Forms.ToolBarButton tbn;
		private System.Windows.Forms.ToolBarButton tbnStock_m;
		private System.Windows.Forms.ToolBarButton tbnInDep_m;
		private System.Windows.Forms.ToolBarButton tbnPay_m;
		private System.Windows.Forms.ToolBarButton toolBarButton7;
		private System.Windows.Forms.ToolBarButton tbnSell_m;
		private System.Windows.Forms.ToolBarButton tbnSellMon_m;
		private System.Windows.Forms.ToolBarButton tb;
		private System.Windows.Forms.ToolBarButton tbnExit_m;
		private System.Windows.Forms.StatusBarPanel sbplabel;
		private System.Windows.Forms.StatusBarPanel tbpUserName_m;
		private System.Windows.Forms.StatusBarPanel tbpLabel2;
		private System.Windows.Forms.StatusBarPanel sbpNowTime_m;
		private System.ComponentModel.IContainer components;
		private System.Windows.Forms.Button Dir;
		private System.Windows.Forms.Panel pnlLeft;
		#endregion

		public static string UserID;
		public static string UserName;
		public static string UserJob;
		private System.Windows.Forms.StatusBar _stuBar;
		private System.Windows.Forms.MenuItem menuItem1;
		private System.Windows.Forms.MenuItem menuItem2;
		private System.Windows.Forms.MenuItem menuItem3;
		private System.Windows.Forms.ToolBarButton tbnSelPre;
		private System.Windows.Forms.MenuItem mnuVerti;
		private System.Windows.Forms.MenuItem mnuHort;
		private System.Windows.Forms.MenuItem mnuCascade;
		private System.Windows.Forms.MenuItem mnuMaxChd;
		private System.Windows.Forms.MenuItem mnuMinChd;
		private System.Windows.Forms.MenuItem mnuLayout;
		private System.Windows.Forms.MenuItem menuItem4;
		private System.Timers.Timer _timer;
		private System.Windows.Forms.MenuItem menuItem5;
		private System.Windows.Forms.MenuItem menuItem6;
		private System.Windows.Forms.FontDialog fontDialog1;
		private System.Windows.Forms.MenuItem menuItem7;
		private System.Windows.Forms.ColorDialog colorDialog1;
		private System.Windows.Forms.MenuItem mnuContextDep;
		private System.Windows.Forms.MenuItem mnuContextCar;
		private System.Windows.Forms.MenuItem mnuContextFac;
		private System.Windows.Forms.MenuItem mnuContextBuy;
		private System.Windows.Forms.StatusBarPanel sbpCompany;
		private System.Windows.Forms.StatusBarPanel sbpCompany_m;
		private System.Windows.Forms.MenuItem mnuEmployee;
		private System.Windows.Forms.MenuItem mmuComm;
		private bool isLogExit;
		public MdiFrm_Main()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			try
			{
				InitializeComponent();
			}
			catch(Exception ex)
			{
				MessageBox.Show("系统发生一个异常的错误!请与管理员联系。\n"+ex.Message,"系统错误",MessageBoxButtons.OK,MessageBoxIcon.Error);
			}
			//log.Close();
			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			try
			{
				if( disposing )
				{
					if(components != null)
					{
						components.Dispose();
					}
				}
				base.Dispose( disposing );
			}
			catch(Exception ex)
			{
				MessageBox.Show("系统发生一个异常的错误!请与管理员联系。\n"+ex.Message,"系统错误",MessageBoxButtons.OK,MessageBoxIcon.Error);
			}
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.contextMenu1 = new System.Windows.Forms.ContextMenu();
			this.mnuContextCar = new System.Windows.Forms.MenuItem();
			this.mnuContextBuy = new System.Windows.Forms.MenuItem();
			this.mnuContextFac = new System.Windows.Forms.MenuItem();
			this.mnuContextDep = new System.Windows.Forms.MenuItem();
			this.mainMenu1 = new System.Windows.Forms.MainMenu();
			this.mnuSysMag = new System.Windows.Forms.MenuItem();
			this.mnuRLog = new System.Windows.Forms.MenuItem();
			this.mnuPwd = new System.Windows.Forms.MenuItem();
			this.mnuEmployee = new System.Windows.Forms.MenuItem();
			this.menuItem14 = new System.Windows.Forms.MenuItem();
			this.mnuLayout = new System.Windows.Forms.MenuItem();
			this.mnuVerti = new System.Windows.Forms.MenuItem();
			this.mnuHort = new System.Windows.Forms.MenuItem();
			this.mnuCascade = new System.Windows.Forms.MenuItem();
			this.mnuMaxChd = new System.Windows.Forms.MenuItem();
			this.mnuMinChd = new System.Windows.Forms.MenuItem();
			this.menuItem11 = new System.Windows.Forms.MenuItem();
			this.mnuDataBack = new System.Windows.Forms.MenuItem();
			this.mnuDataRestore = new System.Windows.Forms.MenuItem();
			this.menuItem4 = new System.Windows.Forms.MenuItem();
			this.mnuSysIni = new System.Windows.Forms.MenuItem();
			this.mnuSysOpt = 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.menuItem17 = new System.Windows.Forms.MenuItem();
			this.mnuExit = new System.Windows.Forms.MenuItem();
			this.mnuBase = new System.Windows.Forms.MenuItem();
			this.mnuFac = new System.Windows.Forms.MenuItem();
			this.mnuBuyer = new System.Windows.Forms.MenuItem();
			this.mnuCar = new System.Windows.Forms.MenuItem();
			this.mnuDepInfo = new System.Windows.Forms.MenuItem();
			this.menuItem3 = new System.Windows.Forms.MenuItem();
			this.menuItem2 = new System.Windows.Forms.MenuItem();
			this.menuItem1 = new System.Windows.Forms.MenuItem();
			this.menuItem23 = new System.Windows.Forms.MenuItem();
			this.mnuMoneyQ = new System.Windows.Forms.MenuItem();
			this.mnuBuy = new System.Windows.Forms.MenuItem();
			this.mnuBook = new System.Windows.Forms.MenuItem();
			this.mnuInDep = new System.Windows.Forms.MenuItem();
			this.menuItem30 = new System.Windows.Forms.MenuItem();
			this.mnuBuyPay = new System.Windows.Forms.MenuItem();
			this.mnuSell = new System.Windows.Forms.MenuItem();
			this.mnuReady = new System.Windows.Forms.MenuItem();
			this.mnuSelling = new System.Windows.Forms.MenuItem();
			this.menuItem35 = new System.Windows.Forms.MenuItem();
			this.mnuSellTake = new System.Windows.Forms.MenuItem();
			this.mnuDepot = new System.Windows.Forms.MenuItem();
			this.mnuDepCar = new System.Windows.Forms.MenuItem();
			this.mnuMoveCar = new System.Windows.Forms.MenuItem();
			this.mnuReport = new System.Windows.Forms.MenuItem();
			this.mnuHelp = new System.Windows.Forms.MenuItem();
			this.mnuDirHelp = new System.Windows.Forms.MenuItem();
			this.menuItem42 = new System.Windows.Forms.MenuItem();
			this.mnuAbout = new System.Windows.Forms.MenuItem();
			this.toolBar1 = new System.Windows.Forms.ToolBar();
			this.toolBarButton1 = new System.Windows.Forms.ToolBarButton();
			this.tbn = new System.Windows.Forms.ToolBarButton();
			this.tbnStock_m = new System.Windows.Forms.ToolBarButton();
			this.tbnInDep_m = new System.Windows.Forms.ToolBarButton();
			this.tbnPay_m = new System.Windows.Forms.ToolBarButton();
			this.toolBarButton7 = new System.Windows.Forms.ToolBarButton();
			this.tbnSelPre = new System.Windows.Forms.ToolBarButton();
			this.tbnSell_m = new System.Windows.Forms.ToolBarButton();
			this.tbnSellMon_m = new System.Windows.Forms.ToolBarButton();
			this.tb = new System.Windows.Forms.ToolBarButton();
			this.tbnExit_m = new System.Windows.Forms.ToolBarButton();
			this.imageList1 = new System.Windows.Forms.ImageList(this.components);
			this._stuBar = new System.Windows.Forms.StatusBar();
			this.sbplabel = new System.Windows.Forms.StatusBarPanel();
			this.tbpUserName_m = new System.Windows.Forms.StatusBarPanel();
			this.tbpLabel2 = new System.Windows.Forms.StatusBarPanel();
			this.sbpNowTime_m = new System.Windows.Forms.StatusBarPanel();
			this.sbpCompany = new System.Windows.Forms.StatusBarPanel();
			this.sbpCompany_m = new System.Windows.Forms.StatusBarPanel();
			this.pnlLeft = new System.Windows.Forms.Panel();
			this.Dir = new System.Windows.Forms.Button();
			this._timer = new System.Timers.Timer();
			this.fontDialog1 = new System.Windows.Forms.FontDialog();
			this.colorDialog1 = new System.Windows.Forms.ColorDialog();
			this.mmuComm = new System.Windows.Forms.MenuItem();
			((System.ComponentModel.ISupportInitialize)(this.sbplabel)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.tbpUserName_m)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.tbpLabel2)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.sbpNowTime_m)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.sbpCompany)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.sbpCompany_m)).BeginInit();
			this.pnlLeft.SuspendLayout();
			((System.ComponentModel.ISupportInitialize)(this._timer)).BeginInit();
			this.SuspendLayout();
			// 
			// contextMenu1
			// 
			this.contextMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																						 this.mnuContextCar,
																						 this.mnuContextBuy,
																						 this.mnuContextFac,
																						 this.mnuContextDep});
			// 
			// mnuContextCar
			// 
			this.mnuContextCar.Index = 0;
			this.mnuContextCar.Text = "车型信息";
			this.mnuContextCar.Click += new System.EventHandler(this.ContextMenu_Click);
			// 
			// mnuContextBuy
			// 
			this.mnuContextBuy.Index = 1;
			this.mnuContextBuy.Text = "客户信息";
			this.mnuContextBuy.Click += new System.EventHandler(this.ContextMenu_Click);
			// 
			// mnuContextFac
			// 
			this.mnuContextFac.Index = 2;
			this.mnuContextFac.Text = "厂商信息";
			this.mnuContextFac.Click += new System.EventHandler(this.ContextMenu_Click);
			// 
			// mnuContextDep
			// 
			this.mnuContextDep.Index = 3;
			this.mnuContextDep.Text = "仓库信息";
			this.mnuContextDep.Click += new System.EventHandler(this.ContextMenu_Click);
			// 
			// mainMenu1
			// 
			this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.mnuSysMag,
																					  this.mnuBase,
																					  this.mnuBuy,
																					  this.mnuSell,
																					  this.mnuDepot,
																					  this.mnuReport,
																					  this.mnuHelp});
			// 
			// mnuSysMag
			// 
			this.mnuSysMag.Index = 0;
			this.mnuSysMag.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.mnuRLog,
																					  this.mnuPwd,
																					  this.mnuEmployee,
																					  this.menuItem14,
																					  this.mnuLayout,
																					  this.menuItem11,
																					  this.mnuDataBack,
																					  this.mnuDataRestore,
																					  this.menuItem4,
																					  this.mnuSysIni,
																					  this.mnuSysOpt,
																					  this.menuItem17,
																					  this.mnuExit});
			this.mnuSysMag.Shortcut = System.Windows.Forms.Shortcut.CtrlS;
			this.mnuSysMag.Text = "系统管理(&S)";
			// 
			// mnuRLog
			// 
			this.mnuRLog.Index = 0;
			this.mnuRLog.Text = "重新登陆";
			this.mnuRLog.Click += new System.EventHandler(this.mnuRLog_Click);
			// 
			// mnuPwd
			// 
			this.mnuPwd.Index = 1;
			this.mnuPwd.Text = "更改密码";
			this.mnuPwd.Click += new System.EventHandler(this.mnuPwd_Click);
			// 
			// mnuEmployee
			// 
			this.mnuEmployee.Index = 2;
			this.mnuEmployee.Text = "添加员工";
			// 
			// menuItem14
			// 
			this.menuItem14.Index = 3;
			this.menuItem14.Text = "-";
			// 
			// mnuLayout
			// 
			this.mnuLayout.Index = 4;
			this.mnuLayout.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.mnuVerti,
																					  this.mnuHort,
																					  this.mnuCascade,
																					  this.mnuMaxChd,
																					  this.mnuMinChd});
			this.mnuLayout.Text = "窗体布局";
			// 
			// mnuVerti
			// 
			this.mnuVerti.Index = 0;
			this.mnuVerti.Text = "垂直";
			this.mnuVerti.Click += new System.EventHandler(this.mnuLayoutForms_Click);
			// 
			// mnuHort
			// 
			this.mnuHort.Index = 1;
			this.mnuHort.Text = "水平";
			this.mnuHort.Click += new System.EventHandler(this.mnuLayoutForms_Click);
			// 
			// mnuCascade
			// 
			this.mnuCascade.Index = 2;
			this.mnuCascade.Text = "层叠";
			this.mnuCascade.Click += new System.EventHandler(this.mnuLayoutForms_Click);
			// 
			// mnuMaxChd
			// 
			this.mnuMaxChd.Checked = true;
			this.mnuMaxChd.Index = 3;
			this.mnuMaxChd.Text = "最大化";
			this.mnuMaxChd.Click += new System.EventHandler(this.mnuLayoutForms_Click);
			// 
			// mnuMinChd
			// 
			this.mnuMinChd.Index = 4;
			this.mnuMinChd.Text = "最小化";
			this.mnuMinChd.Click += new System.EventHandler(this.mnuLayoutForms_Click);
			// 
			// menuItem11
			// 
			this.menuItem11.Index = 5;
			this.menuItem11.Text = "-";
			// 
			// mnuDataBack
			// 
			this.mnuDataBack.Index = 6;
			this.mnuDataBack.Text = "数据备份";
			this.mnuDataBack.Click += new System.EventHandler(this.mnuDataBack_Click);
			// 
			// mnuDataRestore
			// 
			this.mnuDataRestore.Index = 7;
			this.mnuDataRestore.Text = "数据恢复";
			this.mnuDataRestore.Click += new System.EventHandler(this.mnuDataRestore_Click);
			// 
			// menuItem4
			// 
			this.menuItem4.Index = 8;
			this.menuItem4.Text = "-";
			// 
			// mnuSysIni
			// 
			this.mnuSysIni.Index = 9;
			this.mnuSysIni.Text = "系统初始化";
			this.mnuSysIni.Click += new System.EventHandler(this.mnuSysIni_Click);
			// 
			// mnuSysOpt
			// 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -