示例#1
0
        void InitializeOutlookBar()
        {
            outlookBar1 = new OutlookBar();

            /*
             * //样式设定《Begin》
             * outlookBar1.BackgroundBitmap = (Bitmap)imageList1.Images[4];
             * outlookBar1.BackgroundImage = imageList1.Images[4];
             * //样式设定《End》
             */

            //增加选项卡《Begin》
            //将MenuStrip中的一级菜单加到outlookBar1中[遍历menuStrip中的一级菜单项]

            int i = 0;

            foreach (ToolStripDropDownItem m1 in sp1.Items)
            {
                //循环添加一级菜单
                if (m1.Enabled == true)
                {
                    outlookBar1.Bands.Add(new OutlookBarBand(m1.Text, treeView[i]));//, treeView1
                    i++;
                }
            }
            //增加选项卡《End》
            outlookBar1.Dock = DockStyle.Fill;
            outlookBar1.SetCurrentBand(0);
            outlookBar1.AnimationSpeed = 5;
            this.Controls.AddRange(new Control[] { outlookBar1 });
        }
示例#2
0
        public void Remove(OutlookBarBand band)
        {
            // Make sure currentBandIndex is always valid
            int  currentBandIndex   = parentBar.GetCurrentBand();
            bool updateCurrentIndex = currentBandIndex != -1 && currentBandIndex == Count - 1;

            InnerList.Remove(band);
            if (updateCurrentIndex)
            {
                // Since we just removed the currently selected band,
                // set the new selected band to last band
                if (Count > 0)
                {
                    parentBar.SetCurrentBand(Count - 1);
                }
            }

            RaiseChanged();
        }
示例#3
0
文件: MainForm.cs 项目: demonzhq/Mine
        private void InitializeOutlookbar()
        {
            outlookBar1 = new OutlookBar();

            #region 业务管理
            OutlookBarBand businessBand = new OutlookBarBand("业务管理");
            businessBand.SmallImageList = this.imageList;
            businessBand.LargeImageList = this.imageList;
            businessBand.Items.Add(new OutlookBarItem("建当处理", 0));
            businessBand.Items.Add(new OutlookBarItem("赎当处理", 1));
            businessBand.Items.Add(new OutlookBarItem("续当处理", 2));
            businessBand.Items.Add(new OutlookBarItem("绝当处理", 3));
            businessBand.Items.Add(new OutlookBarItem("清算处理", 4));
            //businessBand.Background = SystemColors.AppWorkspace;
            businessBand.TextColor  = Color.SandyBrown;
            businessBand.Background = Color.White;
            outlookBar1.Bands.Add(businessBand);

            #endregion

            #region 统计查询
            OutlookBarBand searchBand = new OutlookBarBand("统计查询");
            searchBand.SmallImageList = this.imageList;
            searchBand.LargeImageList = this.imageList;
            searchBand.Items.Add(new OutlookBarItem("资金统计查询", 5));
            searchBand.Items.Add(new OutlookBarItem("当日业务监控", 6));
            searchBand.Items.Add(new OutlookBarItem("当品标准分类统计", 7));
            searchBand.Items.Add(new OutlookBarItem("当品统计分类统计", 8));
            searchBand.Items.Add(new OutlookBarItem("营收标准分类统计", 9));
            searchBand.Items.Add(new OutlookBarItem("营收统计分类统计", 10));
            //searchBand.Background = SystemColors.AppWorkspace;
            searchBand.TextColor  = Color.SandyBrown;
            searchBand.Background = Color.White;
            outlookBar1.Bands.Add(searchBand);
            #endregion

            outlookBar1.Dock = DockStyle.Fill;
            outlookBar1.SetCurrentBand(0);
            outlookBar1.ItemClicked += new OutlookBarItemClickedHandler(OnOutlookBarItemClicked);

            this.panelToolBox.Controls.AddRange(new Control[] { outlookBar1 });
        }
示例#4
0
        private void InitializeOutlookbar()
        {
            outlookBar1 = new OutlookBar();

            #region 仓库管理
            OutlookBarBand outlookShortcutsBand = new OutlookBarBand("仓库管理");
            outlookShortcutsBand.SmallImageList = this.imageList;
            outlookShortcutsBand.LargeImageList = this.imageList;
            outlookShortcutsBand.Items.Add(new OutlookBarItem("备件入库", 0));
            outlookShortcutsBand.Items.Add(new OutlookBarItem("备件出库", 1));
            outlookShortcutsBand.Items.Add(new OutlookBarItem("备件信息", 2));
            outlookShortcutsBand.Items.Add(new OutlookBarItem("库存查询", 3));
            outlookShortcutsBand.Items.Add(new OutlookBarItem("业务报表", 5));

            //outlookShortcutsBand.Background = SystemColors.AppWorkspace;
            outlookShortcutsBand.TextColor = Color.DarkSlateGray;//
            outlookBar1.Bands.Add(outlookShortcutsBand);

            #endregion

            #region 产品库存管理
            OutlookBarBand mystorageBand = new OutlookBarBand("产品库存管理");
            mystorageBand.SmallImageList = this.imageList;
            mystorageBand.LargeImageList = this.imageList;
            mystorageBand.Items.Add(new OutlookBarItem("产品管理", 6));
            mystorageBand.Items.Add(new OutlookBarItem("库存管理", 7));
            //mystorageBand.Background = SystemColors.AppWorkspace;
            mystorageBand.TextColor = Color.DarkSlateGray;
            outlookBar1.Bands.Add(mystorageBand);
            #endregion
            outlookBar1.Dock = DockStyle.Fill;
            outlookBar1.SetCurrentBand(0);
            outlookBar1.ItemClicked += new OutlookBarItemClickedHandler(OnOutlookBarItemClicked);
            outlookBar1.ItemDropped += new OutlookBarItemDroppedHandler(OnOutlookBarItemDropped);

            //outlookBar1.FlatArrowButtons = true;
            //outlookBar1.BackgroundBitmap = Resources.BmpToolWindow;
            this.panel1.Controls.AddRange(new Control[] { outlookBar1 });//
        }
示例#5
0
        private void InitializeOutlookbar()
        {
            outlookBar1 = new OutlookBar();
            #region 导航条设计
            OutlookBarBand outlookShortcutsBand = new OutlookBarBand("备件仪表管理");

            outlookShortcutsBand.SmallImageList = this.imageList1;
            outlookShortcutsBand.LargeImageList = this.imageList1;
            outlookShortcutsBand.Items.Add(new OutlookBarItem("备件仪表出入库", 0));
            outlookShortcutsBand.Items.Add(new OutlookBarItem("备件仪表信息与查询", 1));
            outlookShortcutsBand.Items.Add(new OutlookBarItem("备件仪表综合管理", 2));
            #endregion

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

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

            this.panel1.Controls.AddRange(new Control[] { outlookBar1 });
        }
        public static Control[] InitializeOutlookbar(ImageList imageList)
        {
            outlookBar1 = new OutlookBar();


            #region 页面管理
            OutlookBarBand outlookShortcutsBand = new OutlookBarBand("功能管理");

            outlookShortcutsBand.SmallImageList = imageList;

            outlookShortcutsBand.LargeImageList = imageList;


            outlookShortcutsBand.Items.Add(new OutlookBarItem("运行温度", 0));

            outlookShortcutsBand.Items.Add(new OutlookBarItem("运行时间", 1));

            outlookShortcutsBand.Items.Add(new OutlookBarItem("运行真空", 2));

            //outlookShortcutsBand.Items.Add(new OutlookBarItem("运行配置", 3));

            outlookShortcutsBand.Items.Add(new OutlookBarItem("运行日志", 4));


            outlookShortcutsBand.Items.Add(new OutlookBarItem("温度查询", 5));

            outlookShortcutsBand.Items.Add(new OutlookBarItem("报警查询", 6));

            //outlookShortcutsBand.Items.Add(new OutlookBarItem("日志查询", 7));

            outlookShortcutsBand.Background = Color.LightSteelBlue;

            outlookShortcutsBand.TextColor = Color.Black;



            outlookBar1.Bands.Add(outlookShortcutsBand);

            #endregion

            //#region 页面展示
            //OutlookBarBand mystorageBand = new OutlookBarBand("查询管理");

            //mystorageBand.SmallImageList = imageList;

            //mystorageBand.LargeImageList = imageList;

            //mystorageBand.Items.Add(new OutlookBarItem("温度查询", 5));

            //mystorageBand.Items.Add(new OutlookBarItem("报警查询", 6));

            //mystorageBand.Items.Add(new OutlookBarItem("日志查询", 7));

            //mystorageBand.Background = Color.White;

            //mystorageBand.TextColor = Color.Black;

            //outlookBar1.Bands.Add(mystorageBand);
            //#endregion
            #region 系统管理
            OutlookBarBand system = new OutlookBarBand("系统管理");

            system.SmallImageList = imageList;

            system.LargeImageList = imageList;

            system.Items.Add(new OutlookBarItem("最小化", 8));

            system.Items.Add(new OutlookBarItem("切换登录", 9));

            system.Items.Add(new OutlookBarItem("退出系统", 10));

            system.Background = Color.LightSteelBlue;

            system.TextColor = Color.Black;

            outlookBar1.Bands.Add(system);
            #endregion



            outlookBar1.Dock = DockStyle.Fill;

            outlookBar1.SetCurrentBand(0);

            outlookBar1.ItemClicked += new OutlookBarItemClickedHandler(OnOutlookBarItemClicked);

            outlookBar1.ItemDropped += new OutlookBarItemDroppedHandler(OnOutlookBarItemDropped);

            return(new Control[] { outlookBar1 });
        }