public LanguageConfigViewModel( ICoreTranslations coreTranslations, IDemoConfiguration demoConfiguration, IEventAggregator eventAggregator) { _eventAggregator = eventAggregator; DemoConfiguration = demoConfiguration; CoreTranslations = coreTranslations; }
public ConfigViewModel( IEnumerable <Lazy <IConfigScreen> > configScreens, IConfigTranslations configTranslations, ICoreTranslations coreTranslations, IDemoConfiguration demoConfiguration) { ConfigScreens = configScreens; ConfigTranslations = configTranslations; CoreTranslations = coreTranslations; // automatically update the DisplayName CoreTranslations.CreateDisplayNameBinding(this, nameof(ICoreTranslations.Settings)); // Set the current language (this should update all registered OnPropertyChanged anyway, so it can run in the background var lang = demoConfiguration.Language; Task.Run(async() => await LanguageLoader.Current.ChangeLanguageAsync(lang).ConfigureAwait(false)); }
public Demo(IDemoConfiguration configuration = null) { _configuration = configuration; _updateReceiver = configuration as IUpdateReceiver; Clock = new Clock(); }