public ConfigurationApplicator( IConfigurationProvider configurationProvider, IApplicationPathsProvider pathsProvider, INotifyIconManager notifyIconManager, ISyncthingManager syncthingManager, IAutostartProvider autostartProvider, IWatchedFolderMonitor watchedFolderMonitor, IUpdateManager updateManager, IConflictFileWatcher conflictFileWatcher, IAlertsManager alertsManager, IMeteredNetworkManager meteredNetworkManager, IPathTransformer pathTransformer) { this.configurationProvider = configurationProvider; this.configurationProvider.ConfigurationChanged += this.ConfigurationChanged; this.pathsProvider = pathsProvider; this.notifyIconManager = notifyIconManager; this.syncthingManager = syncthingManager; this.autostartProvider = autostartProvider; this.watchedFolderMonitor = watchedFolderMonitor; this.updateManager = updateManager; this.conflictFileWatcher = conflictFileWatcher; this.alertsManager = alertsManager; this.meteredNetworkManager = meteredNetworkManager; this.pathTransformer = pathTransformer; this.syncthingManager.Folders.FoldersChanged += this.FoldersChanged; this.updateManager.VersionIgnored += this.VersionIgnored; }
public ApplicationManager(IMessengerManager messenger, ITranslationManager translation, IConfigurationManager configuration, IUserManager user, INotifyIconManager notifyIcon, IEventLogManager logger, IControllerConfigurationManager controller, IThemeManager theme) { Messenger = messenger; Translation = translation; Configuration = configuration; User = user; NotifyIcon = notifyIcon; Logger = logger; Controller = controller; Theme = theme; Logger.Initialize(Constants.SERVICE_NAME); Logger.Subscribe(param => Messenger.NotifyColleagues(AppMessages.NEW_LOG_MESSAGE, param.Entry)); string a = Configuration.GetData(ConfOptions.OPTION_ACCENT); string t = Configuration.GetData(ConfOptions.OPTION_THEME); Theme.SetTheme(a, t); Translation.ChangeLanguage(Configuration.GetData(ConfOptions.OPTION_LANGUAGE)); DuplexChannelFactory<ISubscribingService> pipeFactory = new DuplexChannelFactory<ISubscribingService>(new ServiceCommand(Messenger), new NetNamedPipeBinding(), new EndpointAddress(Constants.PIPE_ADDRESS + Constants.SERVICE_NAME)); Service = pipeFactory.CreateChannel(); Service.Subscribe(); }
public ConfigurationApplicator( IConfigurationProvider configurationProvider, IApplicationPathsProvider pathsProvider, INotifyIconManager notifyIconManager, ISyncthingManager syncthingManager, IAutostartProvider autostartProvider, IWatchedFolderMonitor watchedFolderMonitor, IUpdateManager updateManager, IConflictFileWatcher conflictFileWatcher, IAlertsManager alertsManager, IMeteredNetworkManager meteredNetworkManager) { this.configurationProvider = configurationProvider; this.configurationProvider.ConfigurationChanged += this.ConfigurationChanged; this.pathsProvider = pathsProvider; this.notifyIconManager = notifyIconManager; this.syncthingManager = syncthingManager; this.autostartProvider = autostartProvider; this.watchedFolderMonitor = watchedFolderMonitor; this.updateManager = updateManager; this.conflictFileWatcher = conflictFileWatcher; this.alertsManager = alertsManager; this.meteredNetworkManager = meteredNetworkManager; this.syncthingManager.DataLoaded += this.OnDataLoaded; this.updateManager.VersionIgnored += this.VersionIgnored; }
public ControllerViewModel(INotifyIconManager iconManager, IControllerConfigurationManager controllerConfigurationManager, ControllerContract controller) { IconManager = iconManager; ControllerConfigurationManager = controllerConfigurationManager; Id = controller.Id; Name = controller.Name; ChangeStatus(controller); }
public UpdatePromptProvider( IWindowManager windowManager, Func <NewVersionAlertViewModel> newVersionAlertViewModelFactory, INotifyIconManager notifyIconManager, Func <NewVersionAlertToastViewModel> upgradeAvailableToastViewModelFactory) { this.windowManager = windowManager; this.newVersionAlertViewModelFactory = newVersionAlertViewModelFactory; this.notifyIconManager = notifyIconManager; this.upgradeAvailableToastViewModelFactory = upgradeAvailableToastViewModelFactory; }
public UpdatePromptProvider( IWindowManager windowManager, Func<NewVersionAlertViewModel> newVersionAlertViewModelFactory, INotifyIconManager notifyIconManager, Func<NewVersionAlertToastViewModel> upgradeAvailableToastViewModelFactory) { this.windowManager = windowManager; this.newVersionAlertViewModelFactory = newVersionAlertViewModelFactory; this.notifyIconManager = notifyIconManager; this.upgradeAvailableToastViewModelFactory = upgradeAvailableToastViewModelFactory; }
public MainWindowViewModel(IUserManager userManager, IConfigurationManager configurationManager, ITranslationManager translationManager, INotifyIconManager iconManager, IControllerConfigurationManager controllerConfigurationManager, IThemeManager themeManager, IMessengerManager messengerManager) { UserManager = userManager; ConfigurationManager = configurationManager; TranslationManager = translationManager; IconManager = iconManager; ControllerConfigurationManager = controllerConfigurationManager; ThemeManager = themeManager; MessengerManager = messengerManager; MessengerManager.Register<ControllerContract>(AppMessages.CONTROLLER_CHANGE_STATUS, param => ControllerChangeStatus(param)); MessengerManager.Register<EventLogEntry>(AppMessages.NEW_LOG_MESSAGE, param => AddLogMessage(param)); //App.AppManager.RegisterControllerChange(param => ControllerChangeStatus(param)); //App.AppManager.RegisterNewLogMessage(param => AddLogMessage(param)); }
public ConfigurationApplicator( IConfigurationProvider configurationProvider, IApplicationPathsProvider pathsProvider, INotifyIconManager notifyIconManager, ISyncThingManager syncThingManager, IAutostartProvider autostartProvider, IWatchedFolderMonitor watchedFolderMonitor, IUpdateManager updateManager) { this.configurationProvider = configurationProvider; this.configurationProvider.ConfigurationChanged += (o, e) => this.ApplyNewConfiguration(e.NewConfiguration); this.pathsProvider = pathsProvider; this.notifyIconManager = notifyIconManager; this.syncThingManager = syncThingManager; this.autostartProvider = autostartProvider; this.watchedFolderMonitor = watchedFolderMonitor; this.updateManager = updateManager; this.syncThingManager.DataLoaded += (o, e) => this.LoadFolders(); this.updateManager.VersionIgnored += (o, e) => this.configurationProvider.AtomicLoadAndSave(config => config.LatestNotifiedVersion = e.IgnoredVersion); }