예제 #1
0
		/// <summary>
		/// Create a ButtonItem for the sidebar.
		/// </summary>
		/// <param name="panelItem"></param>
		/// <param name="control"></param>
		protected void MakeButton(SideBarPanelItem panelItem, ChoiceBase control)
		{
			UIItemDisplayProperties display = control.GetDisplayProperties();
			display.Text = display.Text.Replace("_", "");
			ButtonItem button = new ButtonItem(control.Id, display.Text);
			button.Tag = control;
			control.ReferenceWidget = button;

			if(panelItem.ItemImageSize == eBarImageSize.Large)
			{
				if(m_largeImages.ImageList.Images.Count > 0)
					button.ImageIndex = m_largeImages.GetImageIndex(display.ImageLabel);
			}
			else
			{
				if(m_smallImages.ImageList.Images.Count > 0)
					button.ImageIndex = m_smallImages.GetImageIndex(display.ImageLabel);
			}

			button.Text = display.Text;
			button.ButtonStyle = eButtonStyle.ImageAndText;

			if(!display.Enabled)
				button.Text = button.Text + " NA";

			button.Click += new EventHandler(OnClick);
			panelItem.SubItems.Add(button);

			//a button in this framework not really a Control... so I don't know how to use
			//(the same company's) balloon tip control on a sidebar button!
		//	m_mediator.SendMessage("RegisterHelpTarget", button.ContainerControl);
		}
예제 #2
0
		/// <summary>
		/// Create a tree view for the sidebar.
		/// </summary>
		/// <param name="group">The definition for the tree view.</param>
		/// <param name="label"></param>
		/// <param name="panelItem"></param>
		protected void MakeTree(ChoiceGroup group, string label, ref SideBarPanelItem panelItem)
		{
			// TODO: This tree isn't the right size, when the window opens.
			// Figure out how to make it right.
			TreeView tree = new TreeView();
			tree.Tag = group;
			tree.AfterSelect += new TreeViewEventHandler(OnTreeNodeSelected);
			ControlContainerItem containerItem = new ControlContainerItem(group.Id, label);
			containerItem.AllowItemResize = true;
			containerItem.Control = tree;
			panelItem.SubItems.Add(containerItem);
		}
예제 #3
0
		/// <summary>
		/// Returns copy of SideBarPanelItem item.
		/// </summary>
		public override BaseItem Copy()
		{
			SideBarPanelItem objCopy=new SideBarPanelItem();
			this.CopyToItem(objCopy);
			return objCopy;
		}
예제 #4
0
		// Note: The Init method is handled by the superclass.

		/// <summary>
		/// Overrides method to create main elements of the sidebar.
		/// </summary>
		/// <param name="groupCollection">Collection of groups for this sidebar.</param>
		public override void CreateUIForChoiceGroupCollection(ChoiceGroupCollection groupCollection)
		{
			foreach(ChoiceGroup group in groupCollection)
			{
				string label = group.Label;
				label = label.Replace("_", "");
				SideBarPanelItem panelItem = new SideBarPanelItem(group.Id, label);
				if (group.HasSubGroups())
					MakeTree(group, label, ref panelItem);

				panelItem.Tag = group;
				group.ReferenceWidget = panelItem;
				SideBar sidebar = MySideBar;
				sidebar.Panels.Add(panelItem);
				sidebar.Images = m_smallImages.ImageList;
				panelItem.BackgroundStyle.BackColor1.Alpha = ((System.Byte)(255));
				panelItem.BackgroundStyle.BackColor1.Color = System.Drawing.SystemColors.ControlLightLight;
				//
				// sideBarPanelItem1.BackgroundStyle.BackColor2
				//
				panelItem.BackgroundStyle.BackColor2.Alpha = ((System.Byte)(255));
				panelItem.BackgroundStyle.BackColor2.Color = System.Drawing.SystemColors.ControlDark;
				panelItem.BackgroundStyle.BackgroundImageAlpha = ((System.Byte)(255));
				panelItem.BackgroundStyle.Border = DevComponents.DotNetBar.eBorderType.None;
				panelItem.BackgroundStyle.TextTrimming = System.Drawing.StringTrimming.EllipsisCharacter;
				panelItem.ItemImageSize = DevComponents.DotNetBar.eBarImageSize.Default;
			}

			MySideBar.ExpandedChange += new EventHandler(Sidebar_ExpandedChange);

		}
예제 #5
0
 internal static BaseItem CreateItemFromXml(System.Xml.XmlElement xmlItem)
 {
     string cl = xmlItem.GetAttribute("class");
     BaseItem returnItem = null;
     switch (cl)
     {
         case "DevComponents.DotNetBar.ButtonItem":
             returnItem = new ButtonItem();
             break;
         case "DevComponents.DotNetBar.TextBoxItem":
             returnItem = new TextBoxItem();
             break;
         case "DevComponents.DotNetBar.ComboBoxItem":
             returnItem = new ComboBoxItem();
             break;
         case "DevComponents.DotNetBar.LabelItem":
             returnItem = new LabelItem();
             break;
         case "DevComponents.DotNetBar.CustomizeItem":
             returnItem = new CustomizeItem();
             break;
         case "DevComponents.DotNetBar.ControlContainerItem":
             returnItem = new ControlContainerItem();
             break;
         case "DevComponents.DotNetBar.DockContainerItem":
             returnItem = new DockContainerItem();
             break;
         case "DevComponents.DotNetBar.MdiWindowListItem":
             returnItem = new MdiWindowListItem();
             break;
         case "DevComponents.DotNetBar.SideBarContainerItem":
             returnItem = new SideBarContainerItem();
             break;
         case "DevComponents.DotNetBar.SideBarPanelItem":
             returnItem = new SideBarPanelItem();
             break;
         case "DevComponents.DotNetBar.ExplorerBarGroupItem":
             returnItem = new ExplorerBarGroupItem();
             break;
         case "DevComponents.DotNetBar.ExplorerBarContainerItem":
             returnItem = new ExplorerBarContainerItem();
             break;
         case "DevComponents.DotNetBar.ProgressBarItem":
             returnItem = new ProgressBarItem();
             break;
         case "DevComponents.DotNetBar.ColorPickerDropDown":
             returnItem = new ColorPickerDropDown();
             break;
         default:
             {
                 try
                 {
                     //System.Windows.Forms.MessageBox.Show("Loading custom: "+xmlItem.GetAttribute("assembly")+"   "+xmlItem.GetAttribute("class"));
                     System.Reflection.Assembly a = System.Reflection.Assembly.Load(xmlItem.GetAttribute("assembly"));
                     if (a == null)
                         return null;
                     BaseItem item = a.CreateInstance(xmlItem.GetAttribute("class")) as BaseItem;
                     returnItem = item;
                 }
                 catch (Exception e)
                 {
                     throw new ArgumentException("Could not create item from XML. Assembly=" + xmlItem.GetAttribute("assembly") + ", Class=" + xmlItem.GetAttribute("class") + ", Inner Exception: " + e.Message + ", Source=" + e.Source);
                 }
                 break;
             }
     }
     return returnItem;
 }
 /// <summary>
 /// Initializes a new instance of the SideBarPanelItemRendererEventArgs class.
 /// </summary>
 /// <param name="sideBarPanelItem"></param>
 /// <param name="graphics"></param>
 public SideBarPanelItemRendererEventArgs(SideBarPanelItem sideBarPanelItem, Graphics graphics)
 {
     SideBarPanelItem = sideBarPanelItem;
     Graphics = graphics;
 }
예제 #7
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.sideBar1            = new DevComponents.DotNetBar.SideBar();
     this.sideBarPanelItem1   = new DevComponents.DotNetBar.SideBarPanelItem();
     this.bInbox              = new DevComponents.DotNetBar.ButtonItem();
     this.bCalendar           = new DevComponents.DotNetBar.ButtonItem();
     this.bContacts           = new DevComponents.DotNetBar.ButtonItem();
     this.bTasks              = new DevComponents.DotNetBar.ButtonItem();
     this.bNotes              = new DevComponents.DotNetBar.ButtonItem();
     this.bDeletedItems       = new DevComponents.DotNetBar.ButtonItem();
     this.imagesSmall         = new System.Windows.Forms.ImageList(this.components);
     this.imagesMedium        = new System.Windows.Forms.ImageList(this.components);
     this.sideBarPanelItem2   = new DevComponents.DotNetBar.SideBarPanelItem();
     this.bDrafts             = new DevComponents.DotNetBar.ButtonItem();
     this.bOutbox             = new DevComponents.DotNetBar.ButtonItem();
     this.bSentItems          = new DevComponents.DotNetBar.ButtonItem();
     this.bJournal            = new DevComponents.DotNetBar.ButtonItem();
     this.bUpdate             = new DevComponents.DotNetBar.ButtonItem();
     this.panel1              = new System.Windows.Forms.Panel();
     this.label2              = new System.Windows.Forms.Label();
     this.listView1           = new System.Windows.Forms.ListView();
     this.textBox1            = new DevComponents.DotNetBar.Controls.TextBoxX();
     this.label1              = new System.Windows.Forms.Label();
     this.checkBox1           = new System.Windows.Forms.CheckBox();
     this.contextMenuBar1     = new DevComponents.DotNetBar.ContextMenuBar();
     this.bContextMenu        = new DevComponents.DotNetBar.ButtonItem();
     this.bLargeIcons         = new DevComponents.DotNetBar.ButtonItem();
     this.bSmallIcons         = new DevComponents.DotNetBar.ButtonItem();
     this.bRemoveItem         = new DevComponents.DotNetBar.ButtonItem();
     this.expandableSplitter1 = new DevComponents.DotNetBar.ExpandableSplitter();
     this.panel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).BeginInit();
     this.SuspendLayout();
     //
     // sideBar1
     //
     this.sideBar1.AccessibleRole    = System.Windows.Forms.AccessibleRole.ToolBar;
     this.sideBar1.AllowDrop         = true;
     this.sideBar1.AllowExternalDrop = true;
     this.sideBar1.BorderStyle       = DevComponents.DotNetBar.eBorderType.None;
     this.contextMenuBar1.SetContextMenuEx(this.sideBar1, this.bContextMenu);
     this.sideBar1.Dock          = System.Windows.Forms.DockStyle.Left;
     this.sideBar1.ExpandedPanel = this.sideBarPanelItem1;
     this.sideBar1.Font          = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.World);
     this.sideBar1.Images        = this.imagesSmall;
     this.sideBar1.ImagesMedium  = this.imagesMedium;
     this.sideBar1.Name          = "sideBar1";
     this.sideBar1.Panels.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.sideBarPanelItem1,
         this.sideBarPanelItem2
     });
     this.sideBar1.Size              = new System.Drawing.Size(112, 254);
     this.sideBar1.Style             = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.sideBar1.TabIndex          = 0;
     this.sideBar1.TabStop           = false;
     this.sideBar1.UseNativeDragDrop = true;
     this.sideBar1.ItemClick        += new System.EventHandler(this.sideBar1_ItemClick);
     this.sideBar1.MouseDown        += new System.Windows.Forms.MouseEventHandler(this.sideBar1_MouseDown);
     //
     // sideBarPanelItem1
     //
     this.sideBarPanelItem1.FontBold      = true;
     this.sideBarPanelItem1.ItemImageSize = DevComponents.DotNetBar.eBarImageSize.Medium;
     this.sideBarPanelItem1.Name          = "sideBarPanelItem1";
     this.sideBarPanelItem1.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.bInbox,
         this.bCalendar,
         this.bContacts,
         this.bTasks,
         this.bNotes,
         this.bDeletedItems
     });
     this.sideBarPanelItem1.Text = "SideBar Panel";
     //
     // bInbox
     //
     this.bInbox.ButtonStyle            = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.bInbox.ImageIndex             = 0;
     this.bInbox.ImagePaddingHorizontal = 8;
     this.bInbox.ImagePosition          = DevComponents.DotNetBar.eImagePosition.Top;
     this.bInbox.Name      = "bInbox";
     this.bInbox.PopupSide = DevComponents.DotNetBar.ePopupSide.Left;
     this.bInbox.Text      = "Inbox";
     this.bInbox.Tooltip   = "Opens your Inbox";
     //
     // bCalendar
     //
     this.bCalendar.ButtonStyle            = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.bCalendar.ImageIndex             = 1;
     this.bCalendar.ImagePaddingHorizontal = 8;
     this.bCalendar.ImagePosition          = DevComponents.DotNetBar.eImagePosition.Top;
     this.bCalendar.Name      = "bCalendar";
     this.bCalendar.PopupSide = DevComponents.DotNetBar.ePopupSide.Left;
     this.bCalendar.Text      = "Calendar";
     this.bCalendar.Tooltip   = "Shows your Calendar";
     //
     // bContacts
     //
     this.bContacts.ButtonStyle            = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.bContacts.ImageIndex             = 2;
     this.bContacts.ImagePaddingHorizontal = 8;
     this.bContacts.ImagePosition          = DevComponents.DotNetBar.eImagePosition.Top;
     this.bContacts.Name      = "bContacts";
     this.bContacts.PopupSide = DevComponents.DotNetBar.ePopupSide.Left;
     this.bContacts.Text      = "Contacts";
     this.bContacts.Tooltip   = "Opens your Contacts";
     //
     // bTasks
     //
     this.bTasks.ButtonStyle            = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.bTasks.ImageIndex             = 3;
     this.bTasks.ImagePaddingHorizontal = 8;
     this.bTasks.ImagePosition          = DevComponents.DotNetBar.eImagePosition.Top;
     this.bTasks.Name      = "bTasks";
     this.bTasks.PopupSide = DevComponents.DotNetBar.ePopupSide.Left;
     this.bTasks.Text      = "Tasks";
     this.bTasks.Tooltip   = "Shows your Tasks";
     //
     // bNotes
     //
     this.bNotes.ButtonStyle            = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.bNotes.ImageIndex             = 4;
     this.bNotes.ImagePaddingHorizontal = 8;
     this.bNotes.ImagePosition          = DevComponents.DotNetBar.eImagePosition.Top;
     this.bNotes.Name      = "bNotes";
     this.bNotes.PopupSide = DevComponents.DotNetBar.ePopupSide.Left;
     this.bNotes.Text      = "Notes";
     this.bNotes.Tooltip   = "Shows your Notes";
     //
     // bDeletedItems
     //
     this.bDeletedItems.ButtonStyle            = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.bDeletedItems.ImageIndex             = 5;
     this.bDeletedItems.ImagePaddingHorizontal = 8;
     this.bDeletedItems.ImagePosition          = DevComponents.DotNetBar.eImagePosition.Top;
     this.bDeletedItems.Name      = "bDeletedItems";
     this.bDeletedItems.PopupSide = DevComponents.DotNetBar.ePopupSide.Left;
     this.bDeletedItems.Text      = "Deleted Items";
     this.bDeletedItems.Tooltip   = "Shows Deleted Items";
     //
     // imagesSmall
     //
     this.imagesSmall.ColorDepth       = System.Windows.Forms.ColorDepth.Depth8Bit;
     this.imagesSmall.ImageSize        = new System.Drawing.Size(16, 16);
     this.imagesSmall.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imagesSmall.ImageStream")));
     this.imagesSmall.TransparentColor = System.Drawing.Color.Transparent;
     //
     // imagesMedium
     //
     this.imagesMedium.ColorDepth       = System.Windows.Forms.ColorDepth.Depth8Bit;
     this.imagesMedium.ImageSize        = new System.Drawing.Size(32, 32);
     this.imagesMedium.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imagesMedium.ImageStream")));
     this.imagesMedium.TransparentColor = System.Drawing.Color.Transparent;
     //
     // sideBarPanelItem2
     //
     this.sideBarPanelItem2.FontBold = true;
     this.sideBarPanelItem2.Name     = "sideBarPanelItem2";
     this.sideBarPanelItem2.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.bDrafts,
         this.bOutbox,
         this.bSentItems,
         this.bJournal,
         this.bUpdate
     });
     this.sideBarPanelItem2.Text = "My Shortcuts";
     //
     // bDrafts
     //
     this.bDrafts.ButtonStyle            = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.bDrafts.ImageIndex             = 6;
     this.bDrafts.ImagePaddingHorizontal = 8;
     this.bDrafts.Name      = "bDrafts";
     this.bDrafts.PopupSide = DevComponents.DotNetBar.ePopupSide.Left;
     this.bDrafts.Text      = "Drafts";
     this.bDrafts.Tooltip   = "Shows Document Drafts ";
     //
     // bOutbox
     //
     this.bOutbox.ButtonStyle            = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.bOutbox.ImageIndex             = 7;
     this.bOutbox.ImagePaddingHorizontal = 8;
     this.bOutbox.Name      = "bOutbox";
     this.bOutbox.PopupSide = DevComponents.DotNetBar.ePopupSide.Left;
     this.bOutbox.Text      = "Outbox";
     this.bOutbox.Tooltip   = "Open Outbox Folder";
     //
     // bSentItems
     //
     this.bSentItems.ButtonStyle            = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.bSentItems.ImageIndex             = 8;
     this.bSentItems.ImagePaddingHorizontal = 8;
     this.bSentItems.Name      = "bSentItems";
     this.bSentItems.PopupSide = DevComponents.DotNetBar.ePopupSide.Left;
     this.bSentItems.Text      = "Sent Items";
     this.bSentItems.Tooltip   = "Open Sent Items Folder";
     //
     // bJournal
     //
     this.bJournal.ButtonStyle            = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.bJournal.ImageIndex             = 9;
     this.bJournal.ImagePaddingHorizontal = 8;
     this.bJournal.Name      = "bJournal";
     this.bJournal.PopupSide = DevComponents.DotNetBar.ePopupSide.Left;
     this.bJournal.Text      = "Journal";
     this.bJournal.Tooltip   = "Open the Journal";
     //
     // bUpdate
     //
     this.bUpdate.ButtonStyle            = DevComponents.DotNetBar.eButtonStyle.ImageAndText;
     this.bUpdate.ImageIndex             = 10;
     this.bUpdate.ImagePaddingHorizontal = 8;
     this.bUpdate.Name      = "bUpdate";
     this.bUpdate.PopupSide = DevComponents.DotNetBar.ePopupSide.Left;
     this.bUpdate.Text      = "Update";
     this.bUpdate.Tooltip   = "Download software update...";
     //
     // panel1
     //
     this.panel1.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.label2,
         this.listView1,
         this.textBox1,
         this.label1,
         this.checkBox1,
         this.contextMenuBar1
     });
     this.panel1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.panel1.Location = new System.Drawing.Point(112, 0);
     this.panel1.Name     = "panel1";
     this.panel1.Size     = new System.Drawing.Size(265, 254);
     this.panel1.TabIndex = 3;
     //
     // label2
     //
     this.label2.Location = new System.Drawing.Point(72, 64);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(176, 24);
     this.label2.TabIndex = 4;
     this.label2.Text     = "You can drag && drop items from and to the ListView";
     //
     // listView1
     //
     this.listView1.AllowDrop      = true;
     this.listView1.BorderStyle    = System.Windows.Forms.BorderStyle.None;
     this.listView1.HideSelection  = false;
     this.listView1.LabelEdit      = true;
     this.listView1.LargeImageList = this.imagesMedium;
     this.listView1.Location       = new System.Drawing.Point(72, 96);
     this.listView1.Name           = "listView1";
     this.listView1.Size           = new System.Drawing.Size(176, 112);
     this.listView1.SmallImageList = this.imagesSmall;
     this.listView1.TabIndex       = 3;
     this.listView1.DragDrop      += new System.Windows.Forms.DragEventHandler(this.listView1_DragDrop);
     this.listView1.DragEnter     += new System.Windows.Forms.DragEventHandler(this.listView1_DragEnter);
     this.listView1.MouseMove     += new System.Windows.Forms.MouseEventHandler(this.listView1_MouseMove);
     //
     // textBox1
     //
     this.textBox1.Anchor = ((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                             | System.Windows.Forms.AnchorStyles.Right);
     this.textBox1.AutoSize = false;
     //
     // textBox1.Border
     //
     this.textBox1.Border.Class = "TextBoxBorder";
     this.textBox1.Location     = new System.Drawing.Point(12, 30);
     this.textBox1.Name         = "textBox1";
     this.textBox1.Size         = new System.Drawing.Size(235, 20);
     this.textBox1.TabIndex     = 1;
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(10, 13);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(81, 14);
     this.label1.TabIndex = 0;
     this.label1.Text     = "Item Clicked:";
     //
     // checkBox1
     //
     this.checkBox1.Location        = new System.Drawing.Point(8, 224);
     this.checkBox1.Name            = "checkBox1";
     this.checkBox1.Size            = new System.Drawing.Size(128, 24);
     this.checkBox1.TabIndex        = 8;
     this.checkBox1.Text            = "Multi-Column Layout";
     this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
     //
     // contextMenuBar1
     //
     this.contextMenuBar1.DockSide = DevComponents.DotNetBar.eDockSide.Document;
     this.contextMenuBar1.Items.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.bContextMenu
     });
     this.contextMenuBar1.Location   = new System.Drawing.Point(136, 224);
     this.contextMenuBar1.Name       = "contextMenuBar1";
     this.contextMenuBar1.Size       = new System.Drawing.Size(96, 25);
     this.contextMenuBar1.Style      = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
     this.contextMenuBar1.TabIndex   = 12;
     this.contextMenuBar1.TabStop    = false;
     this.contextMenuBar1.PopupOpen += new DevComponents.DotNetBar.DotNetBarManager.PopupOpenEventHandler(this.contextMenuBar1_PopupOpen);
     //
     // bContextMenu
     //
     this.bContextMenu.AutoExpandOnClick      = true;
     this.bContextMenu.GlobalName             = "bContextMenu";
     this.bContextMenu.ImagePaddingHorizontal = 8;
     this.bContextMenu.Name = "bContextMenu";
     this.bContextMenu.SubItems.AddRange(new DevComponents.DotNetBar.BaseItem[] {
         this.bLargeIcons,
         this.bSmallIcons,
         this.bRemoveItem
     });
     this.bContextMenu.Text = "bContextMenu";
     //
     // bLargeIcons
     //
     this.bLargeIcons.GlobalName             = "bLargeIcons";
     this.bLargeIcons.Image                  = ((System.Drawing.Bitmap)(resources.GetObject("bLargeIcons.Image")));
     this.bLargeIcons.ImagePaddingHorizontal = 8;
     this.bLargeIcons.Name   = "bLargeIcons";
     this.bLargeIcons.Text   = "Large Icons";
     this.bLargeIcons.Click += new System.EventHandler(this.bLargeIcons_Click);
     //
     // bSmallIcons
     //
     this.bSmallIcons.GlobalName             = "bSmallIcons";
     this.bSmallIcons.Image                  = ((System.Drawing.Bitmap)(resources.GetObject("bSmallIcons.Image")));
     this.bSmallIcons.ImagePaddingHorizontal = 8;
     this.bSmallIcons.Name   = "bSmallIcons";
     this.bSmallIcons.Text   = "Small Icons";
     this.bSmallIcons.Click += new System.EventHandler(this.bSmallIcons_Click);
     //
     // bRemoveItem
     //
     this.bRemoveItem.GlobalName             = "bRemoveItem";
     this.bRemoveItem.ImagePaddingHorizontal = 8;
     this.bRemoveItem.Name   = "bRemoveItem";
     this.bRemoveItem.Text   = "Remove Item";
     this.bRemoveItem.Click += new System.EventHandler(this.bRemoveItem_Click);
     //
     // expandableSplitter1
     //
     this.expandableSplitter1.BackColor2                   = System.Drawing.Color.FromArgb(((System.Byte)(101)), ((System.Byte)(147)), ((System.Byte)(207)));
     this.expandableSplitter1.BackColor2SchemePart         = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
     this.expandableSplitter1.BackColorSchemePart          = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
     this.expandableSplitter1.ExpandableControl            = this.sideBar1;
     this.expandableSplitter1.ExpandFillColor              = System.Drawing.Color.FromArgb(((System.Byte)(101)), ((System.Byte)(147)), ((System.Byte)(207)));
     this.expandableSplitter1.ExpandFillColorSchemePart    = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
     this.expandableSplitter1.ExpandLineColor              = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(0)));
     this.expandableSplitter1.ExpandLineColorSchemePart    = DevComponents.DotNetBar.eColorSchemePart.ItemText;
     this.expandableSplitter1.GripDarkColor                = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(0)));
     this.expandableSplitter1.GripDarkColorSchemePart      = DevComponents.DotNetBar.eColorSchemePart.ItemText;
     this.expandableSplitter1.GripLightColor               = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(239)), ((System.Byte)(255)));
     this.expandableSplitter1.GripLightColorSchemePart     = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
     this.expandableSplitter1.HotBackColor                 = System.Drawing.Color.FromArgb(((System.Byte)(252)), ((System.Byte)(151)), ((System.Byte)(61)));
     this.expandableSplitter1.HotBackColor2                = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(184)), ((System.Byte)(94)));
     this.expandableSplitter1.HotBackColor2SchemePart      = DevComponents.DotNetBar.eColorSchemePart.ItemPressedBackground2;
     this.expandableSplitter1.HotBackColorSchemePart       = DevComponents.DotNetBar.eColorSchemePart.ItemPressedBackground;
     this.expandableSplitter1.HotExpandFillColor           = System.Drawing.Color.FromArgb(((System.Byte)(101)), ((System.Byte)(147)), ((System.Byte)(207)));
     this.expandableSplitter1.HotExpandFillColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
     this.expandableSplitter1.HotExpandLineColor           = System.Drawing.Color.FromArgb(((System.Byte)(0)), ((System.Byte)(0)), ((System.Byte)(0)));
     this.expandableSplitter1.HotExpandLineColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.ItemText;
     this.expandableSplitter1.HotGripDarkColor             = System.Drawing.Color.FromArgb(((System.Byte)(101)), ((System.Byte)(147)), ((System.Byte)(207)));
     this.expandableSplitter1.HotGripDarkColorSchemePart   = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
     this.expandableSplitter1.HotGripLightColor            = System.Drawing.Color.FromArgb(((System.Byte)(227)), ((System.Byte)(239)), ((System.Byte)(255)));
     this.expandableSplitter1.HotGripLightColorSchemePart  = DevComponents.DotNetBar.eColorSchemePart.BarBackground;
     this.expandableSplitter1.Location = new System.Drawing.Point(112, 0);
     this.expandableSplitter1.Name     = "expandableSplitter1";
     this.expandableSplitter1.Size     = new System.Drawing.Size(8, 254);
     this.expandableSplitter1.Style    = DevComponents.DotNetBar.eSplitterStyle.Office2007;
     this.expandableSplitter1.TabIndex = 14;
     this.expandableSplitter1.TabStop  = false;
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.BackColor         = System.Drawing.Color.FromArgb(((System.Byte)(194)), ((System.Byte)(217)), ((System.Byte)(247)));
     this.ClientSize        = new System.Drawing.Size(377, 254);
     this.Controls.AddRange(new System.Windows.Forms.Control[] {
         this.expandableSplitter1,
         this.panel1,
         this.sideBar1
     });
     this.Name = "Form1";
     this.Text = "Form1";
     this.panel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.contextMenuBar1)).EndInit();
     this.ResumeLayout(false);
 }
예제 #8
0
		public SideBarPanelControlHost(SideBarPanelItem parentPanel)
		{
			this.SetStyle(ControlStyles.UserPaint,true);
			this.SetStyle(ControlStyles.AllPaintingInWmPaint,true);
			this.SetStyle(ControlStyles.Opaque,true);
			this.SetStyle(ControlStyles.ResizeRedraw,true);
			this.SetStyle(DisplayHelp.DoubleBufferFlag,true);
			this.TabStop=false;
			
			m_TopScrollButton=new ScrollButton();
			m_TopScrollButton.UseTimer=false;
			m_TopScrollButton.StandardButton=true;
			m_TopScrollButton.Visible=false;
			m_TopScrollButton.Orientation=eOrientation.Vertical;
			m_TopScrollButton.ButtonAlignment=eItemAlignment.Near;
			ColorScheme scheme=null;
			if(parentPanel.Appearance==eSideBarAppearance.Flat)
			{
				m_TopScrollButton.Size=new Size(14,14);
				if(parentPanel.HeaderStyle!=null)
				{
					scheme=new ColorScheme();
					scheme.ItemBackground=Color.Empty;
                    scheme.ItemBackground=Color.Empty;
					scheme.ItemBackground=parentPanel.HeaderStyle.BackColor1.Color;
					scheme.ItemHotBackground=parentPanel.HeaderStyle.BackColor1.Color;
					scheme.ItemHotBackground2=parentPanel.HeaderStyle.BackColor2.Color;
					scheme.ItemHotBorder=parentPanel.HeaderStyle.BorderColor.Color;
					scheme.ItemPressedBorder=parentPanel.HeaderStyle.BorderColor.Color;
					scheme.ItemText=parentPanel.HeaderStyle.ForeColor.Color;
                    scheme.ItemHotText=parentPanel.HeaderStyle.ForeColor.Color;
					scheme.ItemPressedText=parentPanel.HeaderStyle.ForeColor.Color;
					scheme.ItemPressedBackground=ControlPaint.Light(parentPanel.HeaderStyle.BackColor1.Color);
					scheme.ItemPressedBackground2=ControlPaint.Light(parentPanel.HeaderStyle.BackColor2.Color);
					m_TopScrollButton._Scheme=scheme;
					m_TopScrollButton.StandardButton=false;
				}
			}
			else
				m_TopScrollButton.Size=new Size(16,16);
			this.Controls.Add(m_TopScrollButton);
			m_BottomScrollButton=new ScrollButton();
			m_BottomScrollButton.UseTimer=false;
			m_BottomScrollButton.StandardButton=true;
			m_BottomScrollButton.Visible=false;
			m_BottomScrollButton.Orientation=eOrientation.Vertical;
			m_BottomScrollButton.ButtonAlignment=eItemAlignment.Far;
			if(parentPanel.Appearance==eSideBarAppearance.Flat)
			{
				m_BottomScrollButton.Size=new Size(14,14);
				if(scheme!=null)
				{
					m_BottomScrollButton._Scheme=scheme;
					m_BottomScrollButton.StandardButton=false;
				}
			}
			else
				m_BottomScrollButton.Size=new Size(16,16);
			this.Controls.Add(m_BottomScrollButton);

			m_BottomScrollButton.MouseDown+=new MouseEventHandler(ScrollButtonClick);
			m_TopScrollButton.MouseDown+=new MouseEventHandler(ScrollButtonClick);

			m_ParentPanel=parentPanel;
			foreach(BaseItem item in  m_ParentPanel.SubItems)
				item.ContainerControl=this;
		}
예제 #9
0
		public void Apply(SideBarPanelItem item)
		{
			item.SetBackgroundStyle(new ItemStyle());
			
			item.BackgroundStyle.BackColor1.Color=Background;
			item.BackgroundStyle.BackColor2.Color=Background2;
			item.BackgroundStyle.BorderColor.Color=Border;
			item.BackgroundStyle.Border=eBorderType.SingleLine;
			item.BackgroundStyle.BorderSide=eBorderSide.All;
			item.BackgroundStyle.ForeColor.Color=BackgroundText;
			
			item.SetHeaderStyle(new ItemStyle());
			item.HeaderStyle.BackColor1.Color=HeaderBackground;
			item.HeaderStyle.BackColor2.Color=HeaderBackground2;
			item.HeaderStyle.GradientAngle=90;
			item.HeaderStyle.BorderSide=eBorderSide.Right | eBorderSide.Top | eBorderSide.Bottom;
			item.HeaderStyle.Border=eBorderType.SingleLine;
			item.HeaderStyle.BorderColor.Color=Border;
			item.HeaderStyle.ForeColor.Color=HeaderText;
			item.HeaderStyle.Font=new Font("Arial",9,FontStyle.Bold);
			if(!HeaderHotBackground.IsEmpty)
			{
				item.SetHeaderHotStyle(new ItemStyle());
				item.HeaderHotStyle.BackColor1.Color=HeaderHotBackground;
				item.HeaderHotStyle.BackColor2.Color=HeaderHotBackground2;
				item.HeaderHotStyle.GradientAngle=90;
				if(!HeaderHotText.IsEmpty)
					item.HeaderHotStyle.ForeColor.Color=HeaderHotText;
			}
			else
				item.SetHeaderHotStyle(null);
			item.SetHeaderMouseDownStyle(null);
			
			item.SetHeaderSideStyle(new ItemStyle());
			item.HeaderSideStyle.Border=eBorderType.SingleLine;
			item.HeaderSideStyle.BorderColor.Color=Border;
			item.HeaderSideStyle.BorderSide=eBorderSide.Left | eBorderSide.Top | eBorderSide.Bottom;
			item.HeaderSideStyle.BackColor1.Color=HeaderSideBackground;
			item.HeaderSideStyle.BackColor2.Color=HeaderSideBackground2;
			item.HeaderSideStyle.GradientAngle=90;
			if(!HeaderSideHotBackground.IsEmpty)
			{
				item.SetHeaderSideHotStyle(new ItemStyle());
				item.HeaderSideHotStyle.BackColor1.Color=HeaderSideHotBackground;
				item.HeaderSideHotStyle.BackColor2.Color=HeaderSideHotBackground2;
				item.HeaderSideHotStyle.GradientAngle=90;
			}
			else
				item.SetHeaderSideHotStyle(null);
			item.SetHeaderSideMouseDownStyle(null);
		}
예제 #10
0
		public static void ApplyColorScheme(SideBarPanelItem item, eSideBarColorScheme scheme)
		{
			SideBarColors colors=SideBar.GetColorScheme(scheme);
			colors.Apply(item);
		}
예제 #11
0
		protected override void OnParentChanged(EventArgs e)
		{
			base.OnParentChanged(e);
			if(m_DelayedExpandedPanel!=null)
			{
				if(m_ItemContainer.SubItems.Contains(m_DelayedExpandedPanel))
					m_DelayedExpandedPanel.Expanded=true;
				m_DelayedExpandedPanel=null;
			}
			if(this.Parent!=null && (this.Images!=null || this.ImagesLarge!=null || this.ImagesMedium!=null))
			{
				foreach(SideBarPanelItem panel in m_ItemContainer.SubItems)
				{
					foreach(BaseItem item in panel.SubItems)
					{
						if(item is ImageItem)
							((ImageItem)item).OnImageChanged();
					}
				}
			}
		}