public ThemesController (IThemesService themes, IArticleService articles) { this.themes = themes; this.articles = articles; }
public static EmbeddedFileProvider GetProvider(IConfiguration config) { // load the theme from the options. string ui = config["Hood:UI"]; IThemesService themeService = Engine.Services.Resolve <IThemesService>(); Theme theme = themeService.Current; if (theme != null) { ui = theme.UI; } switch (ui) { case "Bootstrap3": var bs3Assembly = Engine.ResolveUI("Hood.UI.Bootstrap3"); if (bs3Assembly == null) { return(null); } return(new EmbeddedFileProvider(bs3Assembly, "Hood.UI.Bootstrap3")); case "Bootstrap4": var bs4Assembly = Engine.ResolveUI("Hood.UI.Bootstrap4"); if (bs4Assembly == null) { return(null); } return(new EmbeddedFileProvider(bs4Assembly, "Hood.UI.Bootstrap4")); } return(null); }
/// <summary> /// Initializes a new instance of the FactsController class. /// It's being called by the StartUp class. /// </summary> /// <param name="factsService">A required service for the class.</param> /// <param name="tagsService">A required service for the class.</param> /// <param name="usersService">A required service for the class.</param> public FactsController(IFactsService factsService, ITagsService tagsService, IUsersService usersService, IThemesService themesService) { this.factsService = factsService; this.tagsService = tagsService; this.usersService = usersService; this.themesService = themesService; }
public HomeworksController( IThemesService themesService, IHomeworksService homeworksService) { this.themesService = themesService; this.homeworksService = homeworksService; }
public SectionsController (ISectionsService sections, IThemesService themes, UserManager <User> userManager) { this.sections = sections; this.themes = themes; this.userManager = userManager; }
public ExamsController( IExamsService examsService, IThemesService themesService, UserManager <ApplicationUser> userManager) { this.examsService = examsService; this.themesService = themesService; this.userManager = userManager; }
private static void OnPropertyChanged(BindableObject bindable, object oldValue, object newValue) { IThemesService themesService = DependencyService.Get <IThemesService>(); var resourceTypeName = themesService.CurrentTheme.ResourceTypeName; var xfView = ((View)bindable); if (!string.IsNullOrEmpty(resourceTypeName)) { xfView.StyleClass = new List <string>() { (string)newValue }; } else { xfView.StyleClass = new List <string>(); } }
/// <summary> /// Initializes a new instance of the HomeController class. /// It's being called by the StartUp class. /// </summary> /// <param name="themesService">A required service for the class.</param> /// <param name="factsService">A required service for the class.</param> public HomeController(IThemesService themesService, IFactsService factsService) { this.themesService = themesService; this.factsService = factsService; }
public ThemesController(IThemesService themesService) { this.themesService = themesService; }
/// <summary> /// Initializes a new instance of the ThemesController class. /// It's being called by the StartUp class. /// </summary> /// <param name="service">A required service for the class.</param> public ThemesController(IThemesService service) { this.service = service; }