Exemple #1
0
        public static ThemeType ConvertToThemeType(Common.Models.ThemeType themeType)
        {
            switch (themeType.Name)
            {
            case "Test": return(ThemeType.Test);

            case "Theory": return(ThemeType.Theory);

            case "TestWithoutCourse": return(ThemeType.TestWithoutCourse);

            default: throw new ArgumentOutOfRangeException();
            }
        }
Exemple #2
0
        public static string ConvertToString(Common.Models.ThemeType themeType)
        {
            ThemeType enumThemeType = ConvertToThemeType(themeType);

            switch (enumThemeType)
            {
            case ThemeType.Test: return(Localization.getMessage("ThemeType.Test"));

            case ThemeType.Theory: return(Localization.getMessage("ThemeType.Theory"));

            case ThemeType.TestWithoutCourse: return(Localization.getMessage("ThemeType.TestWithoutCourse"));

            default: throw new ArgumentOutOfRangeException();
            }
        }