?? mainfrm.cs
字號(hào):
this.menuItem27.Text = "貨品調(diào)庫";
//
// menuItem28
//
this.menuItem28.Index = 3;
this.menuItem28.Text = "報(bào)損報(bào)溢";
//
// menuItem29
//
this.menuItem29.Index = 4;
this.menuItem29.Text = "下限設(shè)置";
//
// menuItem17
//
this.menuItem17.Index = 4;
this.menuItem17.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem18,
this.menuItem2,
this.menuItem3,
this.menuItem4,
this.menuItem5,
this.menuItem6});
this.menuItem17.Text = "系統(tǒng)維護(hù)";
//
// menuItem18
//
this.menuItem18.Index = 0;
this.menuItem18.Text = "修改密碼";
//
// menuItem2
//
this.menuItem2.Index = 1;
this.menuItem2.Text = "添加用戶";
//
// menuItem3
//
this.menuItem3.Index = 2;
this.menuItem3.Text = "數(shù)據(jù)備份";
//
// menuItem4
//
this.menuItem4.Index = 3;
this.menuItem4.Text = "數(shù)據(jù)恢復(fù)";
//
// menuItem5
//
this.menuItem5.Index = 4;
this.menuItem5.Text = "系統(tǒng)日志";
//
// menuItem6
//
this.menuItem6.Index = 5;
this.menuItem6.Text = "重新登陸";
//
// menuItem19
//
this.menuItem19.Index = 5;
this.menuItem19.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
this.menuItem32,
this.menuItem33,
this.menuItem34,
this.menuItem35});
this.menuItem19.Text = "系統(tǒng)幫助";
//
// menuItem32
//
this.menuItem32.Index = 0;
this.menuItem32.Text = "記事本";
//
// menuItem33
//
this.menuItem33.Index = 1;
this.menuItem33.Text = "計(jì)算器";
//
// menuItem34
//
this.menuItem34.Index = 2;
this.menuItem34.Text = "使用幫助文檔";
//
// menuItem35
//
this.menuItem35.Index = 3;
this.menuItem35.Text = "系統(tǒng)信息";
//
// menuItemQuit
//
this.menuItemQuit.Index = 6;
this.menuItemQuit.Text = "退出系統(tǒng)";
this.menuItemQuit.Click += new System.EventHandler(this.menuItemQuit_Click);
//
// MainFrm
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackColor = System.Drawing.SystemColors.Control;
this.ClientSize = new System.Drawing.Size(552, 313);
this.IsMdiContainer = true;
this.Menu = this.mainMenu;
this.Name = "MainFrm";
this.Text = "進(jìn)銷存管理";
this.Load += new System.EventHandler(this.MainFrm_Load);
}
#endregion
private void DDGuanLi6_Click(object sender, System.EventArgs e)
{
}
private void menuItem7_Click(object sender, System.EventArgs e)
{
ShowOTMany("OTMany");
}
private void ShowOTMany(string formName)
{
if (this.checkChildFrmExist("OTMany") == true)
{
return;
}
// 如果該窗體不存在則新生成一個(gè)進(jìn)貨單窗體
OTMany newFrm = new OTMany();
newFrm.MdiParent = this;
newFrm.Show();
}
//-----------------查詢一個(gè)子窗體是否存在----------------
private bool checkChildFrmExist(string childFrmName)
{
foreach(Form childFrm in this.MdiChildren)
{
//用子窗體的Name進(jìn)行判斷,如果已經(jīng)存在則將他激活
if(childFrm.Name == childFrmName)
{
if(childFrm.WindowState == FormWindowState.Minimized)
childFrm.WindowState = FormWindowState.Normal;
childFrm.Activate();
return true;
}
}
return false;
}
#region Show MDI Background Image
public new bool IsMdiContainer
{
get{ return base.IsMdiContainer; }
set
{
base.IsMdiContainer = value;
if( ! value) return;
for(int i = 0; i < this.Controls.Count; i++)
{
MdiClient mdiClient = this.Controls[i] as MdiClient;
if(mdiClient != null)
{
ControlStyles styles = ControlStyles.DoubleBuffer;
try
{ // Prevent flickering, only if our assembly have reflection permission.
Type mdiType = typeof(MdiClient);
System.Reflection.BindingFlags flags = System.Reflection.BindingFlags.NonPublic|System.Reflection.BindingFlags.Instance;
System.Reflection.MethodInfo method = mdiType.GetMethod("SetStyle",flags);
object[] param= {styles, true};
method.Invoke(mdiClient,param);
}
catch (System.Security.SecurityException)
{/*Don't do anything!!! This code is running under partially trusted context*/}
mdiClient.Paint += new PaintEventHandler(this.MdiClient_Paint);
break;
}
}
}
}
private void MdiClient_Paint(object sender, PaintEventArgs e)
{
PaintBackground(e.Graphics);
}
private void PaintBackground( Graphics g )
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager("OneToMany.pic",System.Reflection.Assembly.GetExecutingAssembly());
Rectangle rect = this.ClientRectangle;
rect.Inflate(2,2);
Brush b = new SolidBrush(Color.White);
g.FillRectangle(b, rect);
Image backgroundImage = (Image)(resources.GetObject("pic"));
g.DrawImage(backgroundImage, 0, 0,backgroundImage.Width, backgroundImage.Height);
}
#endregion
private void mnu_StorageSearch_Click(object sender, System.EventArgs e)
{
if (this.checkChildFrmExist("StorageSearch") == true)
{
return;
}
// 如果該窗體不存在則新生成一個(gè)庫存查詢窗體
StorageSearch newFrm = new StorageSearch();
newFrm.MdiParent = this;
newFrm.Show();
}
//-----------顯示庫存查詢窗口----------
// private void mnu_StorageSearch_Click(object sender, System.EventArgs e)
// {
// if (this.checkChildFrmExist("StorageSearch") == true)
// {
// return;
// }
// // 如果該窗體不存在則新生成一個(gè)庫存查詢窗體
// StorageSearch newFrm = new StorageSearch();
// newFrm.MdiParent = this;
// newFrm.Show();
// }
private void MainFrm_Load(object sender, System.EventArgs e)
{
}
private void mnu_StokerDataManage_Click(object sender, System.EventArgs e)
{
if (this.checkChildFrmExist("StokerDataManage") == true)
{
return;
}
// 如果該窗體不存在則新生成一個(gè)進(jìn)貨單窗體
StokerDataManage newFrm = new StokerDataManage();
newFrm.MdiParent = this;
newFrm.Show();
}
private void mnu_StockTable_Click(object sender, System.EventArgs e)
{
if (this.checkChildFrmExist("OTMany") == true)
{
return;
}
// 如果該窗體不存在則新生成一個(gè)進(jìn)貨單窗體
SupplyLookup newFrm = new SupplyLookup();
newFrm.MdiParent = this;
newFrm.Show();
}
private void menuItemQuit_Click(object sender, System.EventArgs e)
{
this.Close();
}
private void menuItem3_Click(object sender, System.EventArgs e)
{
changePassword newFrm = new changePassword();
newFrm.MdiParent = this;
newFrm.Show();
}
private void menuItem8_Click(object sender, System.EventArgs e)
{
}
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -