using AIStudio.Settings; namespace AIStudio.Components; /// /// A data structure to map a name to a value. /// /// The name of the value, to be displayed in the UI. /// The value to be stored. /// The type of the value to store. public readonly record struct ConfigurationSelectData(string Name, T Value); /// /// A static factory class to get the lists of selectable values. /// public static class ConfigurationSelectDataFactory { public static IEnumerable> GetSendBehaviorData() { yield return new("No key is sending the input", SendBehavior.NO_KEY_IS_SENDING); yield return new("Modifier key + enter is sending the input", SendBehavior.MODIFER_ENTER_IS_SENDING); yield return new("Enter is sending the input", SendBehavior.ENTER_IS_SENDING); } public static IEnumerable> GetUpdateBehaviorData() { yield return new("No automatic update checks", UpdateBehavior.NO_CHECK); yield return new("Once at startup", UpdateBehavior.ONCE_STARTUP); yield return new("Check every hour", UpdateBehavior.HOURLY); yield return new("Check every day", UpdateBehavior.DAILY); yield return new ("Check every week", UpdateBehavior.WEEKLY); } }