예제 #1
0
        void CreateBarItem(string caption, string filterString)
        {
            BarButtonItem item = new BarButtonItem(this.Manager, caption);

            item.Tag = filterString;
            item.CloseSubMenuOnClick = false;
            ItemLinks.Add(item);
            filterManager.AddBarItem(item, view.Columns["Date"], filterString);
        }
예제 #2
0
 public PriorityMenu(BarManager manager, GridView view, Image lowGlyph, Image highGlyph)
     : base(manager)
 {
     this.view          = view;
     lowPriority        = new BarButtonItem(manager, Properties.Resources.LowPriority);
     lowPriority.Glyph  = lowGlyph;
     mediumPriority     = new BarButtonItem(manager, Properties.Resources.MediumPriority);
     highPriority       = new BarButtonItem(manager, Properties.Resources.HighPriority);
     highPriority.Glyph = highGlyph;
     ItemLinks.AddRange(new BarItem[] { lowPriority, mediumPriority, highPriority });
     lowPriority.ItemClick     += new ItemClickEventHandler(lowPriority_ItemClick);
     mediumPriority.ItemClick  += new ItemClickEventHandler(mediumPriority_ItemClick);
     highPriority.ItemClick    += new ItemClickEventHandler(highPriority_ItemClick);
     lowPriority.ButtonStyle    = BarButtonStyle.Check;
     mediumPriority.ButtonStyle = BarButtonStyle.Check;
     highPriority.ButtonStyle   = BarButtonStyle.Check;
 }
예제 #3
0
 public FakeItem WithItemLinks(ItemLinks links)
 {
     Item.Links.Returns(links);
     return(this);
 }