private static void SetSourceTypeEnums() { sourceType = new MyEnum(); List <MyEnum.Item> items = new List <MyEnum.Item>(3) { }; items.Add(new MyEnum.Item("MOVIE", 0, "Movie")); items.Add(new MyEnum.Item("TVSERIES", 1, "TV Series")); sourceType.AddItems(items); sourceType.defaultText = "Movie"; sourceType.defaultValue = sourceType.GetValueByKey("MOVIE"); }
private static void SetWatchedEnums() { watched = new MyEnum(); List <MyEnum.Item> items = new List <MyEnum.Item>(3) { }; items.Add(new MyEnum.Item("ANY", -1, "Any")); items.Add(new MyEnum.Item("NO", 0, "No")); items.Add(new MyEnum.Item("YES", 1, "Yes")); watched.AddItems(items); watched.defaultText = "{DEFAULT_TO_PARAMETER}"; watched.defaultValue = watched.GetValueByKey("ANY"); }
private static void SetSortColumnEnums() { sortColumn = new MyEnum(); List <MyEnum.Item> items = new List <MyEnum.Item>(5) { }; items.Add(new MyEnum.Item("TITLE", 0, "Title")); items.Add(new MyEnum.Item("YEAR", 1, "Year")); items.Add(new MyEnum.Item("LAST_PLAYED", 2, "Last Played")); items.Add(new MyEnum.Item("NUMBER_FILES", 3, "Number Files", "Files")); items.Add(new MyEnum.Item("PLAY_COUNT", 4, "Play Count", "Played")); sortColumn.AddItems(items); sortColumn.defaultText = sortColumn.GetTextByKey("TITLE"); sortColumn.defaultValue = sortColumn.GetValueByKey("TITLE"); }