📄 frmmainmenu.cs
字号:
this.mnuTellerRptSalesAll.Index = 2;
this.mnuTellerRptSalesAll.Text = "收银员所有帐单";
this.mnuTellerRptSalesAll.Click += new System.EventHandler(this.mnuTellerRptSalesAll_Click);
//
// mnuWindows
//
this.mnuWindows.Index = 5;
this.mnuWindows.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.mnuWindowsArrange,
this.mnuWindowsCascade,
this.mnuWindowsVertical,
this.mnuWindowsHorizontal,
this.mnuWindowsSeparator,
this.mnuWindowsCloseAll});
this.mnuWindows.Text = "窗口";
//
// mnuWindowsArrange
//
this.mnuWindowsArrange.Index = 0;
this.mnuWindowsArrange.Text = "排列";
this.mnuWindowsArrange.Click += new System.EventHandler(this.mnuWindowsArrange_Click);
//
// mnuWindowsCascade
//
this.mnuWindowsCascade.Index = 1;
this.mnuWindowsCascade.Text = "层叠";
this.mnuWindowsCascade.Click += new System.EventHandler(this.mnuWindowsCascade_Click);
//
// mnuWindowsVertical
//
this.mnuWindowsVertical.Index = 2;
this.mnuWindowsVertical.Text = "垂直";
this.mnuWindowsVertical.Click += new System.EventHandler(this.mnuWindowsVertical_Click);
//
// mnuWindowsHorizontal
//
this.mnuWindowsHorizontal.Index = 3;
this.mnuWindowsHorizontal.Text = "水平";
this.mnuWindowsHorizontal.Click += new System.EventHandler(this.mnuWindowsHorizontal_Click);
//
// mnuWindowsSeparator
//
this.mnuWindowsSeparator.Index = 4;
this.mnuWindowsSeparator.Text = "-";
//
// mnuWindowsCloseAll
//
this.mnuWindowsCloseAll.Index = 5;
this.mnuWindowsCloseAll.Text = "关闭所有窗口";
this.mnuWindowsCloseAll.Click += new System.EventHandler(this.mnuWindowsCloseAll_Click);
//
// mnuSystem
//
this.mnuSystem.Index = 6;
this.mnuSystem.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.mnuSystemOption,
this.mnuSystemSeparator,
this.mnuSystemRelogin,
this.mnuSystemExit});
this.mnuSystem.Text = "系统";
//
// mnuSystemOption
//
this.mnuSystemOption.Index = 0;
this.mnuSystemOption.Text = "选项";
this.mnuSystemOption.Click += new System.EventHandler(this.mnuSystemOption_Click);
//
// mnuSystemSeparator
//
this.mnuSystemSeparator.Index = 1;
this.mnuSystemSeparator.Text = "-";
//
// mnuSystemRelogin
//
this.mnuSystemRelogin.Index = 2;
this.mnuSystemRelogin.Text = "重新登录";
this.mnuSystemRelogin.Click += new System.EventHandler(this.mnuSystemRelogin_Click);
//
// mnuSystemExit
//
this.mnuSystemExit.Index = 3;
this.mnuSystemExit.Text = "退出";
this.mnuSystemExit.Click += new System.EventHandler(this.mnuSystemExit_Click);
//
// mnuHelp
//
this.mnuHelp.Index = 7;
this.mnuHelp.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.mnuHelpContents,
this.mnuHelpIndex,
this.mnuHelpSearch,
this.mnuHelpSeparator,
this.mnuHelpAbout});
this.mnuHelp.Text = "帮助";
//
// mnuHelpContents
//
this.mnuHelpContents.Index = 0;
this.mnuHelpContents.Text = "目录";
this.mnuHelpContents.Click += new System.EventHandler(this.mnuHelpContents_Click);
//
// mnuHelpIndex
//
this.mnuHelpIndex.Index = 1;
this.mnuHelpIndex.Text = "索引";
this.mnuHelpIndex.Click += new System.EventHandler(this.mnuHelpIndex_Click);
//
// mnuHelpSearch
//
this.mnuHelpSearch.Index = 2;
this.mnuHelpSearch.Text = "搜索";
this.mnuHelpSearch.Click += new System.EventHandler(this.mnuHelpSearch_Click);
//
// mnuHelpSeparator
//
this.mnuHelpSeparator.Index = 3;
this.mnuHelpSeparator.Text = "-";
//
// mnuHelpAbout
//
this.mnuHelpAbout.Index = 4;
this.mnuHelpAbout.Text = "关于";
this.mnuHelpAbout.Click += new System.EventHandler(this.mnuHelpAbout_Click);
//
// imlList
//
this.imlList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
this.imlList.ImageSize = new System.Drawing.Size(16, 16);
this.imlList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imlList.ImageStream")));
this.imlList.TransparentColor = System.Drawing.Color.IndianRed;
//
// tbrMainTool
//
this.tbrMainTool.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.tbrMainTool.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
this.tbrbtnUsrMgmt,
this.tbrbtnPrdSales,
this.tbrbtnSeparator,
this.tbrbtnPrdMgmt,
this.tbrbtnStkMgmt,
this.tbrbtnBillsMgmt});
this.tbrMainTool.DropDownArrows = true;
this.tbrMainTool.ImageList = this.imlList;
this.tbrMainTool.Location = new System.Drawing.Point(0, 0);
this.tbrMainTool.Name = "tbrMainTool";
this.tbrMainTool.ShowToolTips = true;
this.tbrMainTool.Size = new System.Drawing.Size(802, 30);
this.tbrMainTool.TabIndex = 0;
this.tbrMainTool.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.tbrMainTool_ButtonClick);
//
// tbrbtnUsrMgmt
//
this.tbrbtnUsrMgmt.ImageIndex = 1;
this.tbrbtnUsrMgmt.ToolTipText = "User Management";
//
// tbrbtnPrdSales
//
this.tbrbtnPrdSales.ImageIndex = 0;
this.tbrbtnPrdSales.ToolTipText = "Product Sales";
//
// tbrbtnSeparator
//
this.tbrbtnSeparator.Style = System.Windows.Forms.ToolBarButtonStyle.Separator;
//
// tbrbtnPrdMgmt
//
this.tbrbtnPrdMgmt.ImageIndex = 3;
this.tbrbtnPrdMgmt.ToolTipText = "Product Management";
//
// tbrbtnStkMgmt
//
this.tbrbtnStkMgmt.ImageIndex = 4;
this.tbrbtnStkMgmt.ToolTipText = "Stock Management";
//
// tbrbtnBillsMgmt
//
this.tbrbtnBillsMgmt.ImageIndex = 5;
this.tbrbtnBillsMgmt.ToolTipText = "Bills Management";
//
// nicNotify
//
this.nicNotify.Text = "System is Running......";
this.nicNotify.Visible = true;
//
// tmrMenu
//
this.tmrMenu.Tick += new System.EventHandler(this.tmrMenu_Tick);
//
// pgrReport
//
this.pgrReport.Location = new System.Drawing.Point(344, 288);
this.pgrReport.Maximum = 500;
this.pgrReport.Name = "pgrReport";
this.pgrReport.Size = new System.Drawing.Size(278, 25);
this.pgrReport.TabIndex = 2;
this.pgrReport.Visible = false;
//
// grpReportNotification
//
this.grpReportNotification.BackColor = System.Drawing.SystemColors.Info;
this.grpReportNotification.Location = new System.Drawing.Point(328, 256);
this.grpReportNotification.Name = "grpReportNotification";
this.grpReportNotification.Size = new System.Drawing.Size(317, 77);
this.grpReportNotification.TabIndex = 3;
this.grpReportNotification.TabStop = false;
this.grpReportNotification.Text = "导入报表...";
this.grpReportNotification.Visible = false;
this.grpReportNotification.Enter += new System.EventHandler(this.grpReportNotification_Enter);
//
// frmMainMenu
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(802, 500);
this.Controls.Add(this.pgrReport);
this.Controls.Add(this.tbrMainTool);
this.Controls.Add(this.grpReportNotification);
this.ForeColor = System.Drawing.SystemColors.ControlText;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.IsMdiContainer = true;
this.Menu = this.mnuMain;
this.Name = "frmMainMenu";
this.hlpMainMenu.SetShowHelp(this, true);
this.Text = "祥 龙 超 市";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.MdiChildActivate += new System.EventHandler(this.frmMainMenu_MdiChildActivate);
this.Load += new System.EventHandler(this.frmMainMenu_Load);
this.ResumeLayout(false);
}
#endregion
private void initialLoad(string str)
{
TableLogOnInfo tliCurrent = new CrystalDecisions.Shared.TableLogOnInfo();
repDoc.Load(str);
foreach ( Table tbCurrent in repDoc.Database.Tables)
{
tliCurrent = tbCurrent.LogOnInfo;
tliCurrent.ConnectionInfo.ServerName = "";
tliCurrent.ConnectionInfo.UserID = "";
tliCurrent.ConnectionInfo.Password = "";
tliCurrent.ConnectionInfo.DatabaseName = DataConnection.database;
tbCurrent.ApplyLogOnInfo(tliCurrent);
}
}
private void mnuHelpAbout_Click(object sender, System.EventArgs e)
{
frmAbout fAbt = new frmAbout();
fAbt.Left=this.Left;
fAbt.Top =this.Top ;
fAbt.ShowDialog(this);
}
private void frmMainMenu_Load(object sender, System.EventArgs e)
{
//Filling the Application in the entire window including the task bar
///Starts here
// Prevent form from being resized.
this.FormBorderStyle = FormBorderStyle.FixedSingle;
// Get the screen bounds
Rectangle formrect = Screen.GetBounds(this);
// Set the form's location and size
this.Location = formrect.Location;
this.Size = formrect.Size;
///Ends here
reLogin = false;
frmLogin fLogin = new frmLogin(this.mnuMain,this.tbrMainTool,reLogin);
fLogin.Left=this.Left;
fLogin.Top =this.Top ;
fLogin.ShowDialog();
}
private void mnuSystemExit_Click(object sender, System.EventArgs e)
{
if (!(MessageBox.Show("你确定要关闭程序吗?", "关闭程序", MessageBoxButtons.YesNo) == DialogResult.No))
{
MessageBox.Show("谢谢!!!!!","祥龙超市");
this.Close();
}
}
private void mnuSystemRelogin_Click(object sender, System.EventArgs e)
{
varReLogin++;
if(varReLogin == 1)
{
reLogin = true;
frmLogin fReLog = new frmLogin(this.mnuMain,this.tbrMainTool,reLogin);
fReLog.Left=this.Left;
fReLog.Top =this.Top ;
fReLog.ShowDialog();
}
else
{
MessageBox.Show("重新登录窗体已加载");
}
}
private void mnuSystemOption_Click(object sender, System.EventArgs e)
{
varOption++;
if(varOption == 1)
{
frmOption fOption = new frmOption(this.tbrMainTool);
fOption.MdiParent = this;
fOption.Show();
}
else
{
MessageBox.Show("选项窗体已加载");
}
}
private void mnuSalesMgmtBillsMgmt_Click(object sender, System.EventArgs e)
{
varBillsMgmt++;
if(varBillsMgmt == 1)
{
frmBillsManagement fBillMgmt = new frmBillsManagement();
fBillMgmt.MdiParent=this;
fBillMgmt.Left=this.Left;
fBillMgmt.Top =this.Top ;
fBillMgmt.Show();
}
else
{
MessageBox.Show("帐单管理窗体已加载");
}
}
private void mnuSalesMgmtDisMgmt_Click(object sender, System.EventArgs e)
{
varDisMgmt++;
if(varDisMgmt == 1)
{
frmDiscountMgmt fDisMgmt = new frmDiscountMgmt();
fDisMgmt.MdiParent=this;
fDisMgmt.Left=this.Left;
fDisMgmt.Top =this.Top ;
fDisMgmt.Show();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -