Esempio n. 1
0
        public static int GetChoice(string[] items, string cue = "Please choose an item from the list", string title = "Choose Item", string label = "Items", EnumPresentationStyle style = EnumPresentationStyle.RadioBox)
        {
            BlockForm   form        = new BlockForm(cue, title);
            Enumeration enumeration = new Enumeration(label, style)
            {
                Items = items
            };

            form.AddBlocks(new General[] { enumeration });
            form.Show(DialogMode.Edit);
            return(enumeration.SelectedIndex);
        }
Esempio n. 2
0
 public Enumeration(string label, EnumPresentationStyle style = 0)
 {
     this.Initialize();
     this.Label             = label;
     this.PresentationStyle = style;
 }