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

📄 form1.cs

📁 网上购物中介
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace _3Dmanager
{
	/// <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.MenuItem menuItem12;
		private System.Windows.Forms.MenuItem menuItem17;
		private System.Windows.Forms.MenuItem menuItem19;
		private System.Windows.Forms.MenuItem menuItem20;
		private System.Windows.Forms.ToolBar toolBar1;
		private System.Windows.Forms.ImageList imageList1;
		private System.Windows.Forms.ToolBarButton tBB1;
		private System.Windows.Forms.ToolBarButton tBB2;
		private System.Windows.Forms.ToolBarButton tBB3;
		private System.Windows.Forms.ToolBarButton s1;
		private System.Windows.Forms.ToolBarButton tBB4;
		private System.Windows.Forms.ToolBarButton tBB5;
		private System.Windows.Forms.ToolBarButton tBB6;
		private System.Windows.Forms.ToolBarButton tBB7;
		private System.Windows.Forms.ToolBarButton s2;
		private System.Windows.Forms.ToolBarButton tBB8;
		private System.Windows.Forms.ToolBarButton tBB9;
		private System.Windows.Forms.ToolBarButton tBB10;
		private System.Windows.Forms.ToolBarButton tBB11;
		private System.Windows.Forms.MenuItem menuItem24;
		private System.Windows.Forms.MenuItem menuItem25;
		private System.Windows.Forms.MenuItem menuItem26;
		private System.Windows.Forms.MenuItem menuItem11;
		private System.Windows.Forms.MenuItem menuItem27;
		private System.Windows.Forms.MenuItem menuItem28;
		private System.Windows.Forms.MenuItem menuItem8;
		private System.Windows.Forms.MenuItem menuItem9;
		private System.Windows.Forms.MenuItem menuItem10;
		private System.Windows.Forms.MenuItem menuItem13;
		private System.ComponentModel.IContainer components;

		public Form1()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();
            this.GetContainerControl();
			//
			// 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.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
			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.menuItem11 = new System.Windows.Forms.MenuItem();
			this.menuItem13 = new System.Windows.Forms.MenuItem();
			this.menuItem28 = new System.Windows.Forms.MenuItem();
			this.menuItem12 = new System.Windows.Forms.MenuItem();
			this.menuItem9 = new System.Windows.Forms.MenuItem();
			this.menuItem10 = new System.Windows.Forms.MenuItem();
			this.menuItem17 = new System.Windows.Forms.MenuItem();
			this.menuItem19 = new System.Windows.Forms.MenuItem();
			this.menuItem8 = new System.Windows.Forms.MenuItem();
			this.menuItem20 = new System.Windows.Forms.MenuItem();
			this.menuItem27 = new System.Windows.Forms.MenuItem();
			this.menuItem24 = new System.Windows.Forms.MenuItem();
			this.menuItem25 = new System.Windows.Forms.MenuItem();
			this.menuItem26 = new System.Windows.Forms.MenuItem();
			this.toolBar1 = new System.Windows.Forms.ToolBar();
			this.tBB1 = new System.Windows.Forms.ToolBarButton();
			this.tBB2 = new System.Windows.Forms.ToolBarButton();
			this.tBB3 = new System.Windows.Forms.ToolBarButton();
			this.tBB5 = new System.Windows.Forms.ToolBarButton();
			this.s1 = new System.Windows.Forms.ToolBarButton();
			this.tBB4 = new System.Windows.Forms.ToolBarButton();
			this.tBB6 = new System.Windows.Forms.ToolBarButton();
			this.tBB7 = new System.Windows.Forms.ToolBarButton();
			this.s2 = new System.Windows.Forms.ToolBarButton();
			this.tBB8 = new System.Windows.Forms.ToolBarButton();
			this.tBB9 = new System.Windows.Forms.ToolBarButton();
			this.tBB10 = new System.Windows.Forms.ToolBarButton();
			this.tBB11 = new System.Windows.Forms.ToolBarButton();
			this.imageList1 = new System.Windows.Forms.ImageList(this.components);
			this.SuspendLayout();
			// 
			// mainMenu1
			// 
			this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.menuItem1,
																					  this.menuItem7,
																					  this.menuItem12,
																					  this.menuItem17,
																					  this.menuItem24});
			// 
			// menuItem1
			// 
			this.menuItem1.Index = 0;
			this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.menuItem2,
																					  this.menuItem3,
																					  this.menuItem4,
																					  this.menuItem5,
																					  this.menuItem6});
			this.menuItem1.Text = "系统";
			// 
			// menuItem2
			// 
			this.menuItem2.Index = 0;
			this.menuItem2.Text = "重新登录";
			this.menuItem2.Click += new System.EventHandler(this.menuItem2_Click);
			// 
			// menuItem3
			// 
			this.menuItem3.Index = 1;
			this.menuItem3.Text = "-";
			// 
			// menuItem4
			// 
			this.menuItem4.Index = 2;
			this.menuItem4.Text = "修改密码";
			this.menuItem4.Click += new System.EventHandler(this.menuItem4_Click);
			// 
			// menuItem5
			// 
			this.menuItem5.Index = 3;
			this.menuItem5.Text = "-";
			// 
			// menuItem6
			// 
			this.menuItem6.Index = 4;
			this.menuItem6.Text = "退出";
			this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
			// 
			// menuItem7
			// 
			this.menuItem7.Index = 1;
			this.menuItem7.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.menuItem11,
																					  this.menuItem13,
																					  this.menuItem28});
			this.menuItem7.Text = "系统设置";
			// 
			// menuItem11
			// 
			this.menuItem11.Index = 0;
			this.menuItem11.Text = "添加类别";
			// 
			// menuItem13
			// 
			this.menuItem13.Index = 1;
			this.menuItem13.Text = "添加提供商";
			// 
			// menuItem28
			// 
			this.menuItem28.Index = 2;
			this.menuItem28.Text = "会员提示信息";
			this.menuItem28.Click += new System.EventHandler(this.menuItem28_Click);
			// 
			// menuItem12
			// 
			this.menuItem12.Index = 2;
			this.menuItem12.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					   this.menuItem9,
																					   this.menuItem10});
			this.menuItem12.Text = "管理员";
			// 
			// menuItem9
			// 
			this.menuItem9.Index = 0;
			this.menuItem9.Text = "管理日志";
			this.menuItem9.Click += new System.EventHandler(this.menuItem9_Click);
			// 
			// menuItem10
			// 
			this.menuItem10.Index = 1;
			this.menuItem10.Text = "经理设置";
			// 
			// menuItem17
			// 
			this.menuItem17.Index = 3;
			this.menuItem17.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					   this.menuItem19,
																					   this.menuItem8,
																					   this.menuItem20,
																					   this.menuItem27});
			this.menuItem17.Text = "业务-报表";
			// 
			// menuItem19
			// 
			this.menuItem19.Index = 0;
			this.menuItem19.Text = "会员业务";
			this.menuItem19.Click += new System.EventHandler(this.menuItem19_Click);
			// 
			// menuItem8
			// 
			this.menuItem8.Index = 1;
			this.menuItem8.Text = "订单信息";
			// 
			// menuItem20
			// 
			this.menuItem20.Index = 2;
			this.menuItem20.Text = "商家业务";
			this.menuItem20.Click += new System.EventHandler(this.menuItem20_Click);
			// 
			// menuItem27
			// 
			this.menuItem27.Index = 3;
			this.menuItem27.Text = "-";
			// 
			// menuItem24
			// 
			this.menuItem24.Index = 4;
			this.menuItem24.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					   this.menuItem25,
																					   this.menuItem26});
			this.menuItem24.Text = "关于";
			// 
			// menuItem25
			// 
			this.menuItem25.Index = 0;
			this.menuItem25.Text = "系统";
			// 
			// menuItem26
			// 
			this.menuItem26.Index = 1;
			this.menuItem26.Text = "帮助";
			// 
			// toolBar1
			// 
			this.toolBar1.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
																						this.tBB1,
																						this.tBB2,
																						this.tBB3,
																						this.tBB5,
																						this.s1,
																						this.tBB4,
																						this.tBB6,
																						this.tBB7,
																						this.s2,
																						this.tBB8,
																						this.tBB9,
																						this.tBB10,
																						this.tBB11});
			this.toolBar1.ButtonSize = new System.Drawing.Size(55, 45);
			this.toolBar1.DropDownArrows = true;
			this.toolBar1.ImageList = this.imageList1;
			this.toolBar1.Location = new System.Drawing.Point(0, 0);
			this.toolBar1.Name = "toolBar1";
			this.toolBar1.ShowToolTips = true;
			this.toolBar1.Size = new System.Drawing.Size(792, 51);
			this.toolBar1.TabIndex = 0;
			this.toolBar1.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.toolBar1_ButtonClick);
			// 
			// tBB1
			// 
			this.tBB1.ImageIndex = 0;
			this.tBB1.Text = "添加商品";
			// 
			// tBB2
			// 
			this.tBB2.ImageIndex = 1;
			this.tBB2.Text = "修改商品";
			// 
			// tBB3
			// 
			this.tBB3.ImageIndex = 2;
			this.tBB3.Text = "删除商品";
			// 
			// tBB5
			// 
			this.tBB5.ImageIndex = 5;
			this.tBB5.Text = "浏览商品";
			// 
			// s1
			// 
			this.s1.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
			// 
			// tBB4
			// 
			this.tBB4.ImageIndex = 6;
			this.tBB4.Text = "添加商家";
			// 
			// tBB6
			// 
			this.tBB6.ImageIndex = 1;
			this.tBB6.Text = "修改商家";
			// 
			// tBB7
			// 
			this.tBB7.ImageIndex = 2;
			this.tBB7.Text = "删除商家";
			// 
			// s2
			// 
			this.s2.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
			// 
			// tBB8
			// 
			this.tBB8.ImageIndex = 8;
			this.tBB8.Text = "业务管理";
			// 
			// tBB9
			// 
			this.tBB9.ImageIndex = 3;
			this.tBB9.Text = "商家业务";
			// 
			// tBB10
			// 
			this.tBB10.ImageIndex = 7;
			this.tBB10.Text = "网站业绩";
			// 
			// tBB11
			// 
			this.tBB11.ImageIndex = 10;
			this.tBB11.Text = "修改新闻";
			// 
			// imageList1
			// 
			this.imageList1.ImageSize = new System.Drawing.Size(16, 16);
			this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
			this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
			// 
			// Form1
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
			this.ClientSize = new System.Drawing.Size(792, 563);
			this.Controls.Add(this.toolBar1);
			this.IsMdiContainer = true;
			this.Menu = this.mainMenu1;
			this.Name = "Form1";
			this.Text = "当当当购物中介管理系统";
			this.Load += new System.EventHandler(this.Form1_Load);
			this.ResumeLayout(false);

		}
		#endregion

		/// <summary>
		/// 应用程序的主入口点。
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new Form1());
		}

		private void Form1_Load(object sender, System.EventArgs e)
		{
			relogin loginmain=new relogin();
			loginmain.ShowDialog();
			if(relogin.count<3)
			{
				this.Show();
			}
			else
				this.Dispose();
		}
		private void menuItem2_Click(object sender, System.EventArgs e)
		{
			relogin rl=new relogin();
			rl.MdiParent=this;
			rl.Show();
		}

		private void toolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
		{
			if(e.Button==tBB1)
			{
				addShangpin asp=new addShangpin();
				asp.MdiParent=this;
				asp.Show();
			}
			if(e.Button==tBB5)
			{
				AllInfo ai=new AllInfo();
				ai.MdiParent=this;
				ai.Show();
			}
			if(e.Button==tBB2)
			{
				UpdateInfo ui=new UpdateInfo();
				ui.MdiParent=this;
				ui.Show();
			}
			if(e.Button==tBB4)
			{
				AddSuper as1=new AddSuper();
				as1.MdiParent=this;
				as1.Show();
			}
			if(e.Button==tBB3)
			{
				DeleteInfo di=new DeleteInfo();
				di.MdiParent=this;
				di.Show();
			}
			if(e.Button==tBB6)
			{
				Updatesuper us=new Updatesuper();
				us.MdiParent=this;
				us.Show();
			}
			if(e.Button==tBB7)
			{
				Deletesuper ds=new Deletesuper();
				ds.MdiParent=this;
				ds.Show();
			}
			if(e.Button==tBB8)
			{
				user user1=new user();
				user1.MdiParent=this;
				user1.Show();
			}
			if(e.Button==tBB11)
			{
				AddNews an=new AddNews();
				an.MdiParent=this;
				an.Show();
			}
		}

		private void menuItem4_Click(object sender, System.EventArgs e)
		{
			ChangePassword cp=new ChangePassword();
			cp.ShowDialog();
		}

		private void menuItem8_Click(object sender, System.EventArgs e)
		{
		    addShangpin asp=new addShangpin();
			asp.Show();
		}

		private void menuItem6_Click(object sender, System.EventArgs e)
		{
			//this.ShowDialog(this,"您是否真要退出本系统?");
		}

		private void menuItem28_Click(object sender, System.EventArgs e)
		{
			AddTips uit=new AddTips();
			uit.MdiParent=this;
			uit.Show();
		}

		private void menuItem19_Click(object sender, System.EventArgs e)
		{
			Yewu yw=new Yewu();
			yw.MdiParent=this;
			yw.Show();
		}

		private void menuItem20_Click(object sender, System.EventArgs e)
		{
			SuperYw syw=new SuperYw();
			syw.MdiParent=this;
			syw.Show();
		}

		private void menuItem9_Click(object sender, System.EventArgs e)
		{
			AdminYw ayw=new AdminYw();
			ayw.MdiParent=this;
			ayw.Show();
		}
	}
}

⌨️ 快捷键说明

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