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

📄 mainform.cs

📁 C#的图书管理系统,用ASP自己开发的系统
💻 CS
📖 第 1 页 / 共 2 页
字号:
            this.menuItem35.Click += new System.EventHandler(this.menuItem35_Click);
            // 
            // menuItem36
            // 
            this.menuItem36.Index = 2;
            this.menuItem36.Text = "-";
            this.menuItem36.Visible = false;
            // 
            // menuItem37
            // 
            this.menuItem37.Index = 3;
            this.menuItem37.Text = "图书遗失(&I)";
            this.menuItem37.Click += new System.EventHandler(this.menuItem37_Click);
            // 
            // menuItem39
            // 
            this.menuItem39.Index = 4;
            this.menuItem39.Text = "-";
            this.menuItem39.Visible = false;
            // 
            // menuItem41
            // 
            this.menuItem41.Index = 5;
            this.menuItem41.Text = "借出查询统计(&R)";
            this.menuItem41.Click += new System.EventHandler(this.menuItem41_Click);
            // 
            // menuItem10
            // 
            this.menuItem10.Index = 6;
            this.menuItem10.Text = "图书存量查询(&P)";
            // 
            // menuItem5
            // 
            this.menuItem5.Index = 4;
            this.menuItem5.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
            this.menuItem6,
            this.menuItem7,
            this.menuItem8,
            this.menuItem9,
            this.toAboutForm});
            this.menuItem5.Text = "关于(&A)";
            // 
            // menuItem6
            // 
            this.menuItem6.Index = 0;
            this.menuItem6.Text = "使用帮助(&H)";
            this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
            // 
            // menuItem7
            // 
            this.menuItem7.Index = 1;
            this.menuItem7.Text = "-";
            // 
            // menuItem8
            // 
            this.menuItem8.Index = 2;
            this.menuItem8.Text = "在线升级(&U)";
            this.menuItem8.Visible = false;
            // 
            // menuItem9
            // 
            this.menuItem9.Index = 3;
            this.menuItem9.Text = "-";
            this.menuItem9.Visible = false;
            // 
            // toAboutForm
            // 
            this.toAboutForm.Index = 4;
            this.toAboutForm.Text = "关于系统(&A)";
            this.toAboutForm.Click += new System.EventHandler(this.toAboutForm_Click);
            // 
            // statusBar
            // 
            this.statusBar.Location = new System.Drawing.Point(0, 186);
            this.statusBar.Name = "statusBar";
            this.statusBar.Panels.AddRange(new System.Windows.Forms.StatusBarPanel[] {
            this.sbDefault,
            this.loginInfo});
            this.statusBar.ShowPanels = true;
            this.statusBar.Size = new System.Drawing.Size(504, 29);
            this.statusBar.SizingGrip = false;
            this.statusBar.TabIndex = 1;
            this.statusBar.Text = "软件处于测试阶段,需要获取帮助请按F1键或与亿博尔公司联系";
            // 
            // sbDefault
            // 
            this.sbDefault.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
            this.sbDefault.Name = "sbDefault";
            this.sbDefault.Text = "需要获取帮助请按F1键";
            this.sbDefault.Width = 252;
            // 
            // loginInfo
            // 
            this.loginInfo.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring;
            this.loginInfo.Name = "loginInfo";
            this.loginInfo.Text = ",2005-9-8 16:52:37";
            this.loginInfo.Width = 252;
            // 
            // saveFileDialog
            // 
            this.saveFileDialog.Filter = "备份文件|*.BAK";
            // 
            // openFileDialog
            // 
            this.openFileDialog.Filter = "备份文件|*.BAK";
            // 
            // MainForm
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(8, 18);
            this.ClientSize = new System.Drawing.Size(504, 215);
            this.Controls.Add(this.statusBar);
            this.IsMdiContainer = true;
            this.Menu = this.mainMenu;
            this.Name = "MainForm";
            this.Text = "主窗口";
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            this.Closing += new System.ComponentModel.CancelEventHandler(this.MainForm_Closing);
            ((System.ComponentModel.ISupportInitialize)(this.sbDefault)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.loginInfo)).EndInit();
            this.ResumeLayout(false);

		}
		#endregion
        #region 新书入库
		private void menuItem28_Click(object sender, System.EventArgs e)
		{
			Newbook bookfrm =new Newbook(1);
			bookfrm.MdiParent                            = this;
			bookfrm.Show();

		}
		#endregion

		private void MainForm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
		{
			if(MessageBox.Show("确定退出吗?","退出确认",MessageBoxButtons.OKCancel,MessageBoxIcon.Question) == DialogResult.Cancel)
			{
				e.Cancel = true;
			}
			else
			{
				Application.Exit();
			}
		}

		private void menuItem29_Click(object sender, System.EventArgs e)
		{
			Newbook bookfrm =new Newbook(0);
			bookfrm.MdiParent                            = this;
			bookfrm.Show();
		}

		private void menuItem42_Click(object sender, System.EventArgs e)
		{
			SearchForm searchfrm =new SearchForm();
              searchfrm.MdiParent=this;
			searchfrm.Show();
		}

		private void menuItem34_Click(object sender, System.EventArgs e)
		{
			lead leadfrm =new lead();
			leadfrm.MdiParent=this;
			leadfrm.Show();
		}

		private void menuItem11_Click(object sender, System.EventArgs e)
		{
			reader readerfrm =new reader();
			readerfrm.MdiParent= this;
			readerfrm.Show();
		}

		private void menuItem35_Click(object sender, System.EventArgs e)
		{
			returnFrm returnfrm = new returnFrm();
			returnfrm.MdiParent= this;
			returnfrm.Show();
		}

		private void menuItem37_Click(object sender, System.EventArgs e)
		{
			booklost booklostfrm = new booklost();
			booklostfrm.MdiParent= this;
			booklostfrm.Show();
		}

		private void menuItem41_Click(object sender, System.EventArgs e)
		{
		    hadlead hadleadfrm =new hadlead();
            hadleadfrm.MdiParent =this;
			hadleadfrm.Show();
		}

		private void toAboutForm_Click(object sender, System.EventArgs e)
		{
			
		}

		private void menuItem19_Click(object sender, System.EventArgs e)
		{
			try
			{
				if(this.saveFileDialog.ShowDialog() == DialogResult.OK)
				{
					string fileName = this.saveFileDialog.FileName.ToString();
					if(fileName != null && fileName.Trim() != "")
					{
						System.IO.File.Copy(Application.StartupPath + "\\DB2006.mdb",fileName,false);
						MessageBox.Show("备份成功,请注意保存备份文件!");
					}
					else
					{
						MessageBox.Show("没有指定目标文件名!");
					}
				}
			}
			catch(Exception ex)
			{
				MessageBox.Show(ex.Message.ToString());
				return;
			}
		}

		private void menuItem20_Click(object sender, System.EventArgs e)
		{
			try
			{
				if(MessageBox.Show("恢复后在此备份后更新的数据会丢失且不可恢复,建议先备份!\n\n继续恢复吗?","确认",MessageBoxButtons.OKCancel,MessageBoxIcon.Question) == DialogResult.OK)
				{
					if(this.openFileDialog.ShowDialog() == DialogResult.OK)
					{
						string fileName = this.openFileDialog.FileName.ToString();
						if(fileName != null && fileName.Trim() != "")
						{
							System.IO.File.Copy(fileName,Application.StartupPath + "\\DB2006.mdb",true);
							MessageBox.Show("恢复成功!");
						}
						else
						{
							MessageBox.Show("没有选定待恢复的文件!");
						}
					}
				}
			}
			catch(Exception ex)
			{
				MessageBox.Show(ex.Message.ToString());
				return;
			}
		}

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

		private void toExitApp_Click(object sender, System.EventArgs e)
		{
			MainForm_Closing(null,null);
		}

		private void menuItem6_Click(object sender, System.EventArgs e)
		{
			Form1 frm1 =new Form1();
			frm1.MdiParent= this;
			frm1.Show();
		}
	}
}

⌨️ 快捷键说明

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