Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the ApplicationSettingsViewModel class.
 /// </summary>
 /// <param name="userService">User service</param>
 /// <param name="subtitlesService">Subtitles service</param>
 /// <param name="traktService">Trakt service</param>
 /// <param name="cacheService">Cache service</param>
 /// <param name="fileAssociationService">File association service</param>
 /// <param name="manager">Notification manager</param>
 public ApplicationSettingsViewModel(IUserService userService, ISubtitlesService subtitlesService, ITraktService traktService, ICacheService cacheService, IFileAssociationService fileAssociationService, NotificationMessageManager manager)
 {
     _fileAssociationService = fileAssociationService;
     _cacheService           = cacheService;
     _traktService           = traktService;
     _manager          = manager;
     _userService      = userService;
     _subtitlesService = subtitlesService;
     Version           = Constants.AppVersion;
     RegisterCommands();
 }
Exemplo n.º 2
0
        public MainViewModel(IApplicationRegistrationService applicationRegistrationService, IFileAssociationService fileAssociationService)
        {
            Argument.IsNotNull(() => applicationRegistrationService);
            Argument.IsNotNull(() => fileAssociationService);

            _applicationRegistrationService = applicationRegistrationService;
            _fileAssociationService = fileAssociationService;

            var entryAssembly = AssemblyHelper.GetEntryAssembly();
            Title = entryAssembly.Title();
            ApplicationInfo = new ApplicationInfo(entryAssembly);
            FileAssociations = "abc;xyz;txt";

            RegisterApplication = new Command(OnRegisterApplicationExecute, OnRegisterApplicationCanExecute);
            UnregisterApplication = new Command(OnUnregisterApplicationExecute, OnUnregisterApplicationCanExecute);
            AssociateFiles = new Command(OnAssociateFilesExecute, OnAssociateFilesCanExecute);
        }
        public MainViewModel(IApplicationRegistrationService applicationRegistrationService, IFileAssociationService fileAssociationService)
        {
            Argument.IsNotNull(() => applicationRegistrationService);
            Argument.IsNotNull(() => fileAssociationService);

            _applicationRegistrationService = applicationRegistrationService;
            _fileAssociationService         = fileAssociationService;

            var entryAssembly = AssemblyHelper.GetEntryAssembly();

            Title            = entryAssembly.Title();
            ApplicationInfo  = new ApplicationInfo(entryAssembly);
            FileAssociations = "abc;xyz;txt";

            RegisterApplication   = new Command(OnRegisterApplicationExecute, OnRegisterApplicationCanExecute);
            UnregisterApplication = new Command(OnUnregisterApplicationExecute, OnUnregisterApplicationCanExecute);
            AssociateFiles        = new Command(OnAssociateFilesExecute, OnAssociateFilesCanExecute);
        }