Ejemplo n.º 1
0
 public AddonConfigNodeViewModel(IConfigTranslations configTranslations)
 {
     // automatically update the DisplayName
     configTranslations.CreateDisplayNameBinding(this, nameof(IConfigTranslations.Addons));
     CanActivate = false;
     Id          = nameof(ConfigIds.Addons);
 }
Ejemplo n.º 2
0
 public CaptureConfigViewModel(ICoreConfiguration coreConfiguration,
                               IConfigTranslations configTranslations,
                               IGreenshotLanguage greenshotLanguage)
 {
     CoreConfiguration  = coreConfiguration;
     ConfigTranslations = configTranslations;
     GreenshotLanguage  = greenshotLanguage;
 }
 public ClipboardDestinationConfigViewModel(
     ICoreConfiguration coreConfiguration,
     IConfigTranslations configTranslations,
     IGreenshotLanguage greenshotLanguage
     )
 {
     ConfigTranslations = configTranslations;
     GreenshotLanguage  = greenshotLanguage;
     CoreConfiguration  = coreConfiguration;
 }
Ejemplo n.º 4
0
        public UiConfigNodeViewModel(IConfigTranslations configTranslations)
        {
            ConfigTranslations = configTranslations;

            // automatically update the DisplayName
            ConfigTranslations.CreateDisplayNameBinding(this, nameof(IConfigTranslations.Ui));

            // automatically update the DisplayName
            CanActivate = false;
            Id          = nameof(ConfigIds.Ui);
        }
Ejemplo n.º 5
0
 public ThemeConfigViewModel(
     IDopyUiConfiguration uiConfiguration,
     IConfigTranslations uiTranslations,
     MetroThemeManager metroThemeManager
     )
 {
     UiConfiguration    = uiConfiguration;
     UiTranslations     = uiTranslations;
     _metroThemeManager = metroThemeManager;
     _metroThemeManager.ChangeTheme(UiConfiguration.Theme, UiConfiguration.ThemeColor);
 }
Ejemplo n.º 6
0
 public DestinationPickerConfigViewModel(
     ICoreConfiguration coreConfiguration,
     IConfigTranslations configTranslations,
     IGreenshotLanguage greenshotLanguage,
     DestinationHolder destinationHolder
     )
 {
     _destinationHolder = destinationHolder;
     ConfigTranslations = configTranslations;
     GreenshotLanguage  = greenshotLanguage;
     CoreConfiguration  = coreConfiguration;
 }
Ejemplo n.º 7
0
        public UiConfigViewModel(
            ICoreConfiguration coreConfiguration,
            IGreenshotLanguage greenshotLanguage,
            IConfigTranslations configTranslations,
            IMetroConfiguration metroConfiguration,
            MetroWindowManager metroWindowManager

            )
        {
            CoreConfiguration  = coreConfiguration;
            GreenshotLanguage  = greenshotLanguage;
            ConfigTranslations = configTranslations;
            MetroConfiguration = metroConfiguration;
            MetroWindowManager = metroWindowManager;
        }
Ejemplo n.º 8
0
        public ConfigViewModel(
            [ImportMany] IEnumerable <Lazy <IConfigScreen> > configScreens,
            IGreenshotLanguage greenshotLanguage,
            IConfigTranslations configTranslations)
        {
            ConfigScreens      = configScreens;
            GreenshotLanguage  = greenshotLanguage;
            ConfigTranslations = configTranslations;

            // automatically update the DisplayName
            GreenshotLanguage.CreateDisplayNameBinding(this, nameof(IGreenshotLanguage.SettingsTitle));

            // TODO: Check if we need to 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));
        }
Ejemplo n.º 9
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));
        }