public MainWindowViewModel(IMainWindow view, IExportLifetimeService exportLifetimeService, ExportFactory <NetworkSettingsPageViewModel> networkSettingsPageFactory, ExportFactory <ActionsPageViewModel> actionsPageFactory) : base(view) { _exportLifetimeService = exportLifetimeService; _networkSettingsPage = _exportLifetimeService.GetValue(networkSettingsPageFactory); _actionsPage = _exportLifetimeService.GetValue(actionsPageFactory); }
public ApplicationController(IExportLifetimeService exportLifetimeService, ITrayController trayController, IAsyncEventSource eventSource, IBatteryController batteryController, ExportFactory <MainWindowViewModel> mainWindowFactory) { _eventSource = eventSource; _trayController = trayController; _batteryController = batteryController; _exportLifetimeService = exportLifetimeService; _mainWindowFactory = mainWindowFactory; _trayController.OpenNetworkSettingsRequested += OnOpenNetworkSettingsRequested; _trayController.OpenActionsRequested += OnOpenActionsRequested; }
public NetworkSettingsPageViewModel(INetworkSettingsPage view, ISettingsProvider settingsService, IExportLifetimeService exportLifetimeService, ExportFactory <ServerSettingsViewModel> serverSettingsViewModelFactory, ExportFactory <ClientSettingsViewModel> clientSettingsViewModelFactory) : base(view) { _settingsService = settingsService; _exportLifetimeService = exportLifetimeService; _serverSettingsViewModel = _exportLifetimeService.GetValue(serverSettingsViewModelFactory); _clientSettingsViewModel = _exportLifetimeService.GetValue(clientSettingsViewModelFactory); SetNetTypeCommand = new DelegateCommand((obj) => SetNetType((NetType)obj)); _settingsService.SettingsChanged += _settingsServiceSettingsChanged; LoadSettings(); ViewCore.PageLeft += (sender, args) => LoadSettings(); }