Пример #1
0
        public static IEnumerable <T> MultiSelect <T>(string message, int?pageSize = null, int minimum = 1, int maximum = -1, Func <T, string> valueSelector = null) where T : struct, Enum
        {
            var items = (T[])Enum.GetValues(typeof(T));

            using var form = new MultiSelect <T>(message, items, pageSize, minimum, maximum, valueSelector ?? (x => x.GetDisplayName()));

            return(form.Start());
        }
Пример #2
0
        public static IEnumerable <T> MultiSelect <T>(string message, int?pageSize = null, int minimum = 1, int maximum = -1) where T : struct, Enum
        {
            var items = EnumValue <T> .GetValues();

            using var form = new MultiSelect <EnumValue <T> >(message, items, pageSize, minimum, maximum, x => x.DisplayName);

            return(form.Start().Select(x => x.Value));
        }
Пример #3
0
        public static IEnumerable <T> MultiSelect <T>(string message, IEnumerable <T> items, int?pageSize = null, int minimum = 1, int maximum = -1, Func <T, string> valueSelector = null)
        {
            using var form = new MultiSelect <T>(message, items, pageSize, minimum, maximum, valueSelector ?? (x => x.ToString()));

            return(form.Start());
        }
Пример #4
0
        public static IEnumerable <T> MultiSelect <T>(MultiSelectOptions <T> options)
        {
            using var form = new MultiSelect <T>(options);

            return(form.Start());
        }