public RibbonButtonList(IEnumerable <RibbonButton> buttons, IEnumerable <RibbonItem> dropDownItems)
            : this()
        {
            if (buttons != null)
            {
                List <RibbonButton> items = new List <RibbonButton>(buttons);

                Buttons.AddRange(items.ToArray());

                //add the handlers
                foreach (RibbonItem item in buttons)
                {
                    item.Click += item_Click;
                }
            }

            if (dropDownItems != null)
            {
                DropDownItems.AddRange(dropDownItems);

                //add the handlers
                foreach (RibbonItem item in dropDownItems)
                {
                    item.Click += item_Click;
                }
            }
        }
 public override void CreateDefaultButton()
 {
     Buttons.AddRange(new[]
     {
         new EditorButton(ButtonPredefines.Combo),
         new EditorButton(ButtonPredefines.Ellipsis)
     });
 }
Example #3
0
 public override void CreateDefaultButton()
 {
     Buttons.AddRange(new[]
     {
         new DevExpress.XtraEditors.Controls.EditorButton(
             DevExpress.XtraEditors.Controls.ButtonPredefines.Combo),
         new DevExpress.XtraEditors.Controls.EditorButton(
             DevExpress.XtraEditors.Controls.ButtonPredefines.Redo),
         new DevExpress.XtraEditors.Controls.EditorButton(
             DevExpress.XtraEditors.Controls.ButtonPredefines.Plus)
     });
 }
        public Message(string message, string title, params string[] buttons)
        {
            TitleString = title;
            Title       = title;

            MessageString = message;

            Buttons.AddRange(buttons);
            if (Buttons.Count == 0)
            {
                Buttons.Add("Ok");
            }

            DataContext = this;

            InitializeComponent();

            this.Closing += OnClosing;
        }
Example #5
0
 public void SetButtons(IEnumerable <string> buttons)
 {
     Buttons.Clear();
     Buttons.AddRange(buttons.Select((b, i) => new Indexed <string>(i, b)));
     HasButtons = Buttons.Any();
 }
Example #6
0
 public ControllerState(List <int> axes, List <bool> buttons, List <Hat> hats)
 {
     Axes.AddRange(axes);
     Buttons.AddRange(buttons);
     Hats.AddRange(hats);
 }