/// <summary> /// Initializes a new instance of the <see cref="ToolbarBase"/> class with default settings. /// </summary> /// <param name="designer">The report designer.</param> /// <remarks> /// You don't need to call this constructor. The designer will do this automatically. /// </remarks> public ToolbarBase(Designer designer) : base() { FDesigner = designer as DesignerControl; Font = DrawUtils.Default96Font; GrabHandleStyle = eGrabHandleStyle.Office2003; FCustomizeItem = new CustomizeItem(); FCustomizeItem.CustomizeItemVisible = false; }
/// <summary> /// Instantiates the MainWindow /// </summary> public MainWindow() { InitializeComponent(); selectionMenu = new SelectionMenu(this); entreeSelection = new EntreeSelection(this); sideSelection = new SideSelection(this); drinkSelection = new DrinkSelection(this); customizeMenu = new CustomizeItem(this); windowControl.Content = selectionMenu; }
private void CreateBar() { // Create a new Bar Bar bar = new Bar("Standard"); bar.CanHide = true; bar.Style = eDotNetBarStyle.Office2003; bar.GrabHandleStyle = eGrabHandleStyle.StripeFlat; bar.WrapItemsDock = true; bar.WrapItemsFloat = false; // Add Items to it ButtonItem item, fileItem; // New item = new ButtonItem("bNew"); item.ImageIndex = 0; item.Text = "&New"; item.Shortcuts.Add(eShortcut.CtrlN); item.Category = "Standard"; bar.Items.Add(item); m_DotNetBar.Items.Add(item.Copy()); // This will create Category Entry // Open item = new ButtonItem("bOpen"); item.ImageIndex = 1; item.Text = "&Open"; item.Shortcuts.Add(eShortcut.CtrlO); item.Category = "Standard"; bar.Items.Add(item); m_DotNetBar.Items.Add(item.Copy()); // Add Sub items to the Open, something like recently used files... fileItem = new ButtonItem("file1"); fileItem.Text = "&1. File1.txt"; item.SubItems.Add(fileItem); fileItem = new ButtonItem("file2"); fileItem.Text = "&2. File2.txt"; item.SubItems.Add(fileItem); fileItem = new ButtonItem("file3"); fileItem.Text = "&3. File3.txt"; item.SubItems.Add(fileItem); fileItem = new ButtonItem("file4"); fileItem.Text = "&4. File4.txt"; item.SubItems.Add(fileItem); fileItem = new ButtonItem("file5"); fileItem.Text = "&5. File5.txt"; item.SubItems.Add(fileItem); // Close item = new ButtonItem("bClose"); item.ImageIndex = 2; item.Text = "&Close"; item.Shortcuts.Add(eShortcut.CtrlX); item.Category = "Standard"; bar.Items.Add(item); m_DotNetBar.Items.Add(item.Copy()); // Save item = new ButtonItem("bSave"); item.ImageIndex = 3; item.Text = "&Save"; item.Shortcuts.Add(eShortcut.CtrlS); item.Category = "Standard"; bar.Items.Add(item); m_DotNetBar.Items.Add(item.Copy()); // Print Preview item = new ButtonItem("bPrintPreview"); item.ImageIndex = 6; item.Text = "Print Pre&view"; item.Category = "Standard"; item.BeginGroup = true; bar.Items.Add(item); m_DotNetBar.Items.Add(item.Copy()); // Print item = new ButtonItem("bPrint"); item.ImageIndex = 5; item.Text = "&Print"; item.Category = "Standard"; item.Shortcuts.Add(eShortcut.CtrlP); bar.Items.Add(item); m_DotNetBar.Items.Add(item.Copy()); // E-Mail item = new ButtonItem("bEmail"); item.ImageIndex = 4; item.Text = "&Email"; item.Category = "Standard"; item.BeginGroup = true; bar.Items.Add(item); m_DotNetBar.Items.Add(item.Copy()); // Customize Item CustomizeItem citem = new CustomizeItem(); bar.Items.Add(citem); // Since we will be using ImageList bar have to be added to the DotNetBar Manager m_DotNetBar.Bars.Add(bar); bar.DockSide = eDockSide.Top; }