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()); }
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()); }