コード例 #1
0
        public ShellController(ShellViewModel shellViewModel, ISyncService syncService,
                               ISettingsSerializationService settingsSerializationService,
                               ISummarySerializationService summarySerializationService,
                               SystemTrayNotifierViewModel systemTrayNotifierViewModel,
                               ApplicationLogger applicationLogger)
        {
            _shellViewModel = shellViewModel;
            _syncService    = syncService;
            _settingsSerializationService = settingsSerializationService;
            _summarySerializationService  = summarySerializationService;

            _systemTrayNotifierViewModel = systemTrayNotifierViewModel;
            _applicationLogger           = applicationLogger;
        }
コード例 #2
0
        public ShellController(ShellViewModel shellViewModel, ISyncService syncService,
            ISettingsSerializationService settingsSerializationService,
            ISummarySerializationService summarySerializationService,
            SystemTrayNotifierViewModel systemTrayNotifierViewModel,
            ApplicationLogger applicationLogger)
        {
            _shellViewModel = shellViewModel;
            _syncService = syncService;
            _settingsSerializationService = settingsSerializationService;
            _summarySerializationService = summarySerializationService;

            _systemTrayNotifierViewModel = systemTrayNotifierViewModel;
            _applicationLogger = applicationLogger;
        }
コード例 #3
0
        public ApplicationController(Lazy <ShellViewModel> shellViewModelLazy,
                                     Lazy <SettingsViewModel> settingsViewModelLazy,
                                     Lazy <AboutViewModel> aboutViewModelLazy, Lazy <HelpViewModel> helpViewModelLazy,
                                     Lazy <LogViewModel> logViewModelLazy,
                                     Lazy <ShellService> shellServiceLazy, CompositionContainer compositionContainer,
                                     Lazy <IAccountAuthenticationService> accountAuthenticationServiceLazy, IShellController shellController,
                                     Lazy <SystemTrayNotifierViewModel> lazySystemTrayNotifierViewModel,
                                     IGuiInteractionService guiInteractionService, ILogController logController)
        {
            //ViewModels
            _shellViewModel              = shellViewModelLazy.Value;
            _settingsViewModel           = settingsViewModelLazy.Value;
            _aboutViewModel              = aboutViewModelLazy.Value;
            _helpViewModel               = helpViewModelLazy.Value;
            _logViewModel                = logViewModelLazy.Value;
            _systemTrayNotifierViewModel = lazySystemTrayNotifierViewModel.Value;
            //Commands
            _shellViewModel.Closing += ShellViewModelClosing;
            _exitCommand             = new DelegateCommand(Close);

            //Services
            AccountAuthenticationService = accountAuthenticationServiceLazy.Value;

            _shellService              = shellServiceLazy.Value;
            _shellService.ShellView    = _shellViewModel.View;
            _shellService.SettingsView = _settingsViewModel.View;
            _shellService.AboutView    = _aboutViewModel.View;
            _shellService.HelpView     = _helpViewModel.View;
            _shellService.LogView      = _logViewModel.View;
            _shellController           = shellController;
            _guiInteractionService     = guiInteractionService;
            _logController             = logController;
            if (_shellViewModel.IsSettingsVisible)
            {
                _settingsViewModel.Load();
            }
        }
コード例 #4
0
        public ApplicationController(Lazy<ShellViewModel> shellViewModelLazy,
            Lazy<SettingsViewModel> settingsViewModelLazy,
            Lazy<AboutViewModel> aboutViewModelLazy, Lazy<HelpViewModel> helpViewModelLazy,
            Lazy<LogViewModel> logViewModelLazy,
            Lazy<ShellService> shellServiceLazy, CompositionContainer compositionContainer,
            Lazy<IAccountAuthenticationService> accountAuthenticationServiceLazy, IShellController shellController,
            Lazy<SystemTrayNotifierViewModel> lazySystemTrayNotifierViewModel,
            IGuiInteractionService guiInteractionService, ILogController logController)
        {
            //ViewModels
            _shellViewModel = shellViewModelLazy.Value;
            _settingsViewModel = settingsViewModelLazy.Value;
            _aboutViewModel = aboutViewModelLazy.Value;
            _helpViewModel = helpViewModelLazy.Value;
            _logViewModel = logViewModelLazy.Value;
            _systemTrayNotifierViewModel = lazySystemTrayNotifierViewModel.Value;
            //Commands
            _shellViewModel.Closing += ShellViewModelClosing;
            _exitCommand = new DelegateCommand(Close);

            //Services
            AccountAuthenticationService = accountAuthenticationServiceLazy.Value;

            _shellService = shellServiceLazy.Value;
            _shellService.ShellView = _shellViewModel.View;
            _shellService.SettingsView = _settingsViewModel.View;
            _shellService.AboutView = _aboutViewModel.View;
            _shellService.HelpView = _helpViewModel.View;
            _shellService.LogView = _logViewModel.View;
            _shellController = shellController;
            _guiInteractionService = guiInteractionService;
            _logController = logController;
            if (_shellViewModel.IsSettingsVisible)
            {
                _settingsViewModel.Load();
            }
        }