Beispiel #1
0
 public LanguageConfigViewModel(
     ICoreTranslations coreTranslations,
     IDemoConfiguration demoConfiguration,
     IEventAggregator eventAggregator)
 {
     _eventAggregator  = eventAggregator;
     DemoConfiguration = demoConfiguration;
     CoreTranslations  = coreTranslations;
 }
Beispiel #2
0
        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));
        }
Beispiel #3
0
 public Demo(IDemoConfiguration configuration = null)
 {
     _configuration  = configuration;
     _updateReceiver = configuration as IUpdateReceiver;
     Clock           = new Clock();
 }