Inheritance: Caliburn.Micro.PropertyChangedBase
Esempio n. 1
0
 public ShellViewModel(Services.Settings settings, IDialogManager dialogManager)
 {
     _settings = settings;
     _projectRepository = new ProjectRepositoryViewModel(settings);
     _dialogManager = dialogManager;
     DisplayName = "Solutionizer";
 }
Esempio n. 2
0
 public ShellViewModel(Services.Settings settings, IDialogManager dialogManager)
 {
     _settings          = settings;
     _projectRepository = new ProjectRepositoryViewModel(settings);
     _dialogManager     = dialogManager;
     DisplayName        = "Solutionizer";
 }
Esempio n. 3
0
 public ViewModelFactory(
     Func<SettingsViewModel> getSettingsViewModel,
     Func<AboutViewModel> getAboutViewModel,
     UpdateViewModel.Factory getUpdateViewModel,
     ProjectRepositoryViewModel.Factory getProjectRepositoryViewModel,
     FileScanningViewModel.Factory getFileScanningViewModel,
     SolutionViewModel.Factory getSolutionViewModel)
 {
     _getSettingsViewModel = getSettingsViewModel;
     _getAboutViewModel = getAboutViewModel;
     _getUpdateViewModel = getUpdateViewModel;
     _getProjectRepositoryViewModel = getProjectRepositoryViewModel;
     _getFileScanningViewModel = getFileScanningViewModel;
     _getSolutionViewModel = getSolutionViewModel;
 }
Esempio n. 4
0
        public ShellViewModel(ISettings settings, IDialogManager dialogManager, IFlyoutManager flyoutManager, IUpdateManager updateManager, IViewModelFactory viewModelFactory, IMostRecentUsedFoldersRepository mostRecentUsedFoldersRepository) {
            _settings = settings;
            _dialogManager = dialogManager;
            _flyoutManager = flyoutManager;
            _updateManager = updateManager;
            _viewModelFactory = viewModelFactory;
            _mostRecentUsedFoldersRepository = mostRecentUsedFoldersRepository;

            _projectRepository = _viewModelFactory.CreateProjectRepositoryViewModel(new RelayCommand<ProjectViewModel>(projectViewModel => _solution.AddProject(projectViewModel.Project)));
            _updateManager.UpdatesAvailable +=
                (sender, args) => AreUpdatesAvailable = _updateManager.Releases != null && _updateManager.Releases.Any(r => r.IsNew && (_settings.IncludePrereleaseUpdates || !r.IsPrerelease));

            _showUpdatesCommand = new RelayCommand<bool>(checkForUpdates => _flyoutManager.ShowFlyout(_viewModelFactory.CreateUpdateViewModel(checkForUpdates)));
            _showSettingsCommand = new RelayCommand(OnShowSettings);
            _showAboutCommand = new RelayCommand(() => _flyoutManager.ShowFlyout(_viewModelFactory.CreateAboutViewModel()));
            _selectRootPathCommand = new AsyncRelayCommand(SelectRootPath);
            _setRootPathCommand = new AsyncRelayCommand<string>(LoadProjectsAsync, path => !String.Equals(path, RootPath));

            _updateTimer = new Timer(_ => _updateManager.CheckForUpdatesAsync(), null, -1, -1);
        }
Esempio n. 5
0
        public ShellViewModel(ISettings settings, IDialogManager dialogManager, IFlyoutManager flyoutManager, IUpdateManager updateManager, IViewModelFactory viewModelFactory, IMostRecentUsedFoldersRepository mostRecentUsedFoldersRepository)
        {
            _settings         = settings;
            _dialogManager    = dialogManager;
            _flyoutManager    = flyoutManager;
            _updateManager    = updateManager;
            _viewModelFactory = viewModelFactory;
            _mostRecentUsedFoldersRepository = mostRecentUsedFoldersRepository;

            _projectRepository = _viewModelFactory.CreateProjectRepositoryViewModel(new RelayCommand <ProjectViewModel>(projectViewModel => _solution.AddProject(projectViewModel.Project)));
            _updateManager.UpdatesAvailable          +=
                (sender, args) => AreUpdatesAvailable = _updateManager.Releases != null && _updateManager.Releases.Any(r => r.IsNew && (_settings.IncludePrereleaseUpdates || !r.IsPrerelease));

            ShowUpdatesCommand    = new RelayCommand <bool>(checkForUpdates => _flyoutManager.ShowFlyout(_viewModelFactory.CreateUpdateViewModel(checkForUpdates)));
            ShowSettingsCommand   = new RelayCommand(OnShowSettings);
            ShowAboutCommand      = new RelayCommand(() => _flyoutManager.ShowFlyout(_viewModelFactory.CreateAboutViewModel()));
            SelectRootPathCommand = new AsyncRelayCommand(SelectRootPath);
            SetRootPathCommand    = new AsyncRelayCommand <string>(LoadProjectsAsync, path => !String.Equals(path, RootPath));

            _updateTimer = new Timer(_ => _updateManager.CheckForUpdatesAsync(), null, -1, -1);
        }