예제 #1
0
 public AddonConfigNodeViewModel(IConfigTranslations configTranslations)
 {
     // automatically update the DisplayName
     configTranslations.CreateDisplayNameBinding(this, nameof(IConfigTranslations.Addons));
     CanActivate = false;
     Id          = nameof(ConfigIds.Addons);
 }
예제 #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;
 }
예제 #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);
        }
예제 #5
0
 public ThemeConfigViewModel(
     IDopyUiConfiguration uiConfiguration,
     IConfigTranslations uiTranslations,
     MetroThemeManager metroThemeManager
     )
 {
     UiConfiguration    = uiConfiguration;
     UiTranslations     = uiTranslations;
     _metroThemeManager = metroThemeManager;
     _metroThemeManager.ChangeTheme(UiConfiguration.Theme, UiConfiguration.ThemeColor);
 }
예제 #6
0
 public DestinationPickerConfigViewModel(
     ICoreConfiguration coreConfiguration,
     IConfigTranslations configTranslations,
     IGreenshotLanguage greenshotLanguage,
     DestinationHolder destinationHolder
     )
 {
     _destinationHolder = destinationHolder;
     ConfigTranslations = configTranslations;
     GreenshotLanguage  = greenshotLanguage;
     CoreConfiguration  = coreConfiguration;
 }
예제 #7
0
        public UiConfigViewModel(
            ICoreConfiguration coreConfiguration,
            IGreenshotLanguage greenshotLanguage,
            IConfigTranslations configTranslations,
            IMetroConfiguration metroConfiguration,
            MetroWindowManager metroWindowManager

            )
        {
            CoreConfiguration  = coreConfiguration;
            GreenshotLanguage  = greenshotLanguage;
            ConfigTranslations = configTranslations;
            MetroConfiguration = metroConfiguration;
            MetroWindowManager = metroWindowManager;
        }
예제 #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));
        }
예제 #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));
        }