Пример #1
0
 public OutlookBarItem( OutlookBar bar, string text, int imageIndex, object tag )
 {
   m_bar = bar;
   m_strText = text;
   m_iImageIndex = imageIndex;
   m_tag = tag;
 }
        private void InitializeOutlookbar()
        {
            outlookBar1 = new OutlookBar();

            #region 销售管理
            OutlookBarBand outlookShortcutsBand = new OutlookBarBand("销售管理");
            outlookShortcutsBand.SmallImageList = this.imageList;
            outlookShortcutsBand.LargeImageList = this.imageList;
            outlookShortcutsBand.Items.Add(new OutlookBarItem(outlookBar1, "订单管理", 0));
            outlookShortcutsBand.Items.Add(new OutlookBarItem(outlookBar1, "客户管理", 1));
            outlookShortcutsBand.Items.Add(new OutlookBarItem(outlookBar1, "水票管理", 2));
            outlookShortcutsBand.Items.Add(new OutlookBarItem(outlookBar1, "套餐管理", 3));
            outlookShortcutsBand.Items.Add(new OutlookBarItem(outlookBar1, "今日盘点", 5));
            outlookShortcutsBand.Items.Add(new OutlookBarItem(outlookBar1, "来电记录", 6));
            outlookShortcutsBand.Items.Add(new OutlookBarItem(outlookBar1, "送货记录", 7));
            outlookShortcutsBand.Background = SystemColors.AppWorkspace;
            outlookShortcutsBand.TextColor = Color.White;
            outlookBar1.Bands.Add(outlookShortcutsBand);

            #endregion

            #region 产品库存管理
            OutlookBarBand mystorageBand = new OutlookBarBand("产品库存管理");
            mystorageBand.SmallImageList = this.imageList;
            mystorageBand.LargeImageList = this.imageList;
            mystorageBand.Items.Add(new OutlookBarItem(outlookBar1, "产品管理", 2));
            mystorageBand.Items.Add(new OutlookBarItem(outlookBar1, "库存管理", 3));
            mystorageBand.Background = SystemColors.AppWorkspace;
            mystorageBand.TextColor = Color.White;
            outlookBar1.Bands.Add(mystorageBand);
            #endregion

            outlookBar1.Dock = DockStyle.Fill;
            outlookBar1.CurrentBand = 1;
            outlookBar1.ItemClicked += new OutlookBarItemClickedHandler(OnOutlookBarItemClicked);
            outlookBar1.ItemDropped += new OutlookBarItemDroppedHandler(OnOutlookBarItemDropped);

            //outlookBar1.FlatArrowButtons = true;
            this.panel1.Controls.AddRange(new Control[] { outlookBar1 });
        }
Пример #3
0
 public OutlookBarItem( )
 {
   m_bar = null;
   // To support designer
   m_iImageIndex = -1;
 }
Пример #4
0
 public OutlookBarItem( OutlookBar bar, string text, int ImageIndex )
 {
   m_bar = bar;
   m_strText = text;
   m_iImageIndex = ImageIndex;
 }
Пример #5
0
        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 });
        }
Пример #6
0
        private void InitializeOutlookbar()
        {
            this.outlookBar1 = new OutlookBar();
            //if (Portal.gc.HasFunction("WareMis"))
            //{
               OutlookBarBand band = new OutlookBarBand("仓库管理");
                band.SmallImageList = this.imageList1;
                band.LargeImageList = this.imageList1;

                band.Items.Add(new OutlookBarItem("备件入库", 0));

                band.Items.Add(new OutlookBarItem("备件出库", 1));

                band.Items.Add(new OutlookBarItem("库存查询", 2));

                band.Items.Add(new OutlookBarItem("备件信息", 3));

                band.Items.Add(new OutlookBarItem("数据字典", 4));

                band.Items.Add(new OutlookBarItem("业务报表", 5));

                    band.Items.Add(new OutlookBarItem("库房管理", 6));

                band.Background = SystemColors.AppWorkspace;
                band.TextColor = Color.White;
                this.outlookBar1.Bands.Add(band);

            this.outlookBar1.Dock = DockStyle.Fill;
               // this.outlookBar1.SetCurrentBand(0);
            this.outlookBar1.ItemClicked += new OutlookBarItemClickedHandler(this.OnOutlookBarItemClicked);
            this.outlookBar1.ItemDropped += new OutlookBarItemDroppedHandler(this.OnOutlookBarItemDropped);
            this.panel1.Controls.AddRange(new Control[] { this.outlookBar1 });
        }