private void OnOutlookBarItemClicked(OutlookBarBand band, OutlookBarItem item) { switch (item.Text) { #region 销售管理 case "订单管理": Portal.gc.MainDialog.ShowContent("订单管理", typeof(BaseForm)); break; case "客户管理": Portal.gc.MainDialog.ShowContent("客户管理", typeof(BaseForm)); break; case "水票管理": Portal.gc.MainDialog.ShowContent("水票管理", typeof(BaseForm)); break; case "套餐管理": BaseForm dlg = new BaseForm(); dlg.ShowDialog(); break; case "来电记录": Portal.gc.MainDialog.ShowContent("来电记录", typeof(BaseForm)); break; case "送货记录": Portal.gc.MainDialog.ShowContent("送货记录", typeof(BaseForm)); break; #endregion #region 产品库存管理 case "产品管理": Portal.gc.MainDialog.ShowContent("产品管理", typeof(BaseForm)); break; case "库存管理": Portal.gc.MainDialog.ShowContent("库存管理", typeof(BaseForm)); break; #endregion default: break; } }
/// <summary> /// 根据user_id加载菜单项 /// </summary> /// <param name="user_id">登陆的用户ID</param> public void LoadMenuInfo() { foreach (AuthorManager.User.MenuParent parent in AuthorManager.LoginUser.MenuParentList) { OutlookBarBand outlookShortcutsBand = new OutlookBarBand(parent.MenuName); outlookShortcutsBand.LargeImageList = this.mf.imageList; outlookShortcutsBand.SmallImageList = this.mf.imageList; outlookShortcutsBand.Background = Color.White; foreach (AuthorManager.User.MenuParent.MenuChild child in parent.MenuChildList) { OutlookBarItem item = new OutlookBarItem(); item.Text = child.MenuName; item.Tag = child.MenuWindow; item.ImageIndex = child.MenuBmp; outlookShortcutsBand.Items.Add(item); } this.outlookBar.Bands.Add(outlookShortcutsBand); } }
public int Add( OutlookBarItem item ) { if( Contains( item ) == true ) return -1; return List.Add( item ); }
public OutlookBarItemEventArgs( OutlookBarItem item ) { m_item = item; }
protected void RaiseOnItemSetEvent( OutlookBarItem item ) { if( OnItemSet != null ) { OnItemSet( this, new OutlookBarItemEventArgs( item ) ); } RaiseChangedEvent( item ); }
protected void RaiseChangedEvent( OutlookBarItem item ) { if( Changed != null ) { Changed( this, new OutlookBarItemEventArgs( item ) ); } }
void outlookBar_ItemClicked(OutlookBarBand band, OutlookBarItem item) { if (item.Tag != null) { TreeNodeInfo tNodeInfo = null; tNodeInfo = item.Tag as TreeNodeInfo; if (tNodeInfo != null) { if (tNodeInfo.Remark == "EXE") { RuningEXE(tNodeInfo.FileName, tNodeInfo.WorkingDirectory); } else { MenuToolForm_ItemClicked(tNodeInfo.Tag); } } } }
private void OnOutlookBarItemClicked(OutlookBarBand band, OutlookBarItem item) { Frm_Main.GetMainForm().ShowContent(item.Text); }
public void Insert( int index, OutlookBarItem item ) { List.Insert( index, item ); }
private void OnOutlookBarItemDropped(OutlookBarBand band, OutlookBarItem item) { // string message = "Item : " + item.Text + " was dropped"; // MessageBox.Show(message); }
public void UnCheckItem ( OutlookBarItem item ) { item.Checked = false; Invalidate(); }
public void CheckItem ( OutlookBarItem item ) { if ( m_checkStyle == OutlookBarCheckStyle.ItemsAsRadioButtons ) foreach ( OutlookBarItem tempItem in Bands[currentBandIndex].Items ) { tempItem.Checked = false; } item.Checked = true; Invalidate(); }
private void OnOutlookBarItemDropped(OutlookBarBand band, OutlookBarItem item) { }
public bool Contains( OutlookBarItem item ) { return InnerList.Contains( item ); }
private void outlookBar_ItemClicked(OutlookBarBand band, OutlookBarItem item) { this.mf.OpenWindows(item.Tag as string); }
public int IndexOf( OutlookBarItem item ) { return InnerList.IndexOf(item); }
private void InitializeOutlookbar(Sys_UserMaster_usm_Info userInfo) { this._outlookBar = new OutlookBar(); _outlookBar.AnimationSpeed = 0; TreeNodeInfo rootNodeInfo = _parentNode; if (rootNodeInfo == null || rootNodeInfo.TreeNodeInfos == null || rootNodeInfo.TreeNodeInfos.Length == 0) { return; } OutlookBarBand outlookBarBand; OutlookBarItem outlookBarItem; TreeNodeInfo tNodeInfo; for (int i = 0; i < rootNodeInfo.TreeNodeInfos.Length; i++) { tNodeInfo = rootNodeInfo.TreeNodeInfos[i]; outlookBarBand = new OutlookBarBand(tNodeInfo.Text); outlookBarBand.SmallImageList = this.imgLW; outlookBarBand.LargeImageList = this.imgLW; if (tNodeInfo.TreeNodeInfos != null && tNodeInfo.TreeNodeInfos.Length > 0) { for (int j = 0; j < tNodeInfo.TreeNodeInfos.Length; j++) { outlookBarItem = new OutlookBarItem(); outlookBarItem.Text = tNodeInfo.TreeNodeInfos[j].Text; outlookBarItem.Tag = tNodeInfo.TreeNodeInfos[j]; outlookBarItem.ImageIndex = tNodeInfo.TreeNodeInfos[j].ImageIndex; outlookBarBand.Items.Add(outlookBarItem); } } outlookBarBand.Background = this.BackColor; outlookBarBand.TextColor = this.ForeColor; this._outlookBar.Bands.Add(outlookBarBand); } this._outlookBar.Dock = DockStyle.Fill; this._outlookBar.SetCurrentBand(0); this._outlookBar.ItemClicked += new OutlookBarItemClickedHandler(outlookBar_ItemClicked); this.pnlContainer.Controls.AddRange(new Control[] { this._outlookBar }); }
public void Remove( OutlookBarItem item ) { List.Remove( item ); }
private void OnOutlookBarItemClicked(OutlookBarBand band, OutlookBarItem item) { switch (item.Text) { //case "备件入库": // Portal.gc.MainDialog.ShowContent("备件入库", typeof(FrmPurchase)); // break; //case "备件出库": // Portal.gc.MainDialog.ShowContent("备件出库", typeof(FrmTakeOut)); // break; //case "库存查询": // Portal.gc.MainDialog.ShowContent("库存查询", typeof(FrmStockSearch)); // break; //case "备件信息": // Portal.gc.MainDialog.ShowContent("备件信息", typeof(FrmItemDetail)); // break; //case "数据字典": // new FrmDictionary().Show(); // break; //case "业务报表": // new FrmReports().ShowDialog(); // break; //case "库房管理": // new FrmWareHouse().ShowDialog(); // break; } }