Esempio n. 1
0
            /// <summary>
            /// Creates the default BubbleTab for the control
            /// </summary>
            /// <param name="imageListSmall"></param>
            /// <param name="imageListLarge"></param>
            private void SetupBubbleTab(
                ImageList imageListSmall, ImageList imageListLarge)
            {
                Images      = imageListSmall;
                ImagesLarge = imageListLarge;

                ImageSizeNormal = new Size(32, 32);
                ImageSizeLarge  = new Size(64, 64);

                BubbleBarTab tab = new BubbleBarTab();

                Tabs.Add(tab);

                for (int i = 0; i < imageListSmall.Images.Count; i++)
                {
                    BubbleButton bb = new BubbleButton();
                    tab.Buttons.Add(bb);

                    bb.ImageIndex      = i;
                    bb.ImageIndexLarge = i;
                }
            }
Esempio n. 2
0
		private void GetTabComponents(BubbleBarTab tab, ArrayList c)
		{
			foreach(BubbleButton b in tab.Buttons)
				c.Add(b);
		}
Esempio n. 3
0
		private BubbleButton CreateButton(BubbleBarTab tab)
		{
			BubbleBar bar=this.Control as BubbleBar;
			if(bar==null)
				return null;
			
			IDesignerHost dh=(IDesignerHost)GetService(typeof(IDesignerHost));
			if(dh==null)
				return null;

			IComponentChangeService change=this.GetService(typeof(IComponentChangeService)) as IComponentChangeService;
			if(change!=null)
				change.OnComponentChanging(this.Component,TypeDescriptor.GetProperties(tab).Find("Buttons",true));

			BubbleButton button=dh.CreateComponent(typeof(BubbleButton)) as BubbleButton;
			if(button==null)
				return null;
            button.Image=Helpers.LoadBitmap("SystemImages.Note24.png");
            button.ImageLarge = Helpers.LoadBitmap("SystemImages.Note64.png");
			tab.Buttons.Add(button);

			if(change!=null)
				change.OnComponentChanged(this.Component,TypeDescriptor.GetProperties(tab).Find("Buttons",true),null,null);

			return button;
		}