Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        public NotifyIconViewModel(
            IWindowManager windowManager,
            IFocusWindowProvider focusWindowProvider,
            ISyncthingManager syncthingManager,
            Func <SettingsViewModel> settingsViewModelFactory,
            IProcessStartProvider processStartProvider,
            IAlertsManager alertsManager,
            FileTransfersTrayViewModel fileTransfersViewModel,
            IConfigurationProvider configurationProvider)
        {
            this.windowManager            = windowManager;
            this.focusWindowProvider      = focusWindowProvider;
            this.syncthingManager         = syncthingManager;
            this.settingsViewModelFactory = settingsViewModelFactory;
            this.processStartProvider     = processStartProvider;
            this.alertsManager            = alertsManager;
            this.FileTransfersViewModel   = fileTransfersViewModel;
            this.configurationProvider    = configurationProvider;

            this.syncthingManager.StateChanged += this.StateChanged;
            this.SyncthingState = this.syncthingManager.State;

            this.syncthingManager.TotalConnectionStatsChanged += this.TotalConnectionStatsChanged;
            this.syncthingManager.Folders.FoldersChanged      += this.FoldersChanged;
            this.syncthingManager.Folders.SyncStateChanged    += this.FolderSyncStateChanged;


            this.alertsManager.AlertsStateChanged += this.AlertsStateChanged;

            this.configurationProvider.ConfigurationChanged += this.ConfigurationChanged;
            this.iconAnimationmode = this.configurationProvider.Load().IconAnimationMode;
        }
Ejemplo n.º 3
0
        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;
        }
Ejemplo n.º 4
0
 public BarAlertsViewModel(
     IAlertsManager alertsManager,
     ISyncthingManager syncthingManager,
     Func <ConflictResolutionViewModel> conflictResolutionViewModelFactory,
     IWindowManager windowManager)
 {
     this.alertsManager    = alertsManager;
     this.syncthingManager = syncthingManager;
     this.conflictResolutionViewModelFactory = conflictResolutionViewModelFactory;
     this.windowManager = windowManager;
 }
Ejemplo n.º 5
0
 public BarAlertsViewModel(
     IAlertsManager alertsManager,
     ISyncthingManager syncthingManager,
     Func <ConflictResolutionViewModel> conflictResolutionViewModelFactory,
     Func <IntelXeGraphicsAlertViewModel> intelXeGraphicsAlertViewModelFactory,
     IWindowManager windowManager,
     IConfigurationProvider configurationProvider,
     GraphicsCardDetector graphicsCardDetector)
 {
     this.alertsManager    = alertsManager;
     this.syncthingManager = syncthingManager;
     this.conflictResolutionViewModelFactory   = conflictResolutionViewModelFactory;
     this.intelXeGraphicsAlertViewModelFactory = intelXeGraphicsAlertViewModelFactory;
     this.windowManager         = windowManager;
     this.configurationProvider = configurationProvider;
     this.graphicsCardDetector  = graphicsCardDetector;
 }
Ejemplo n.º 6
0
        public NotifyIconViewModel(
            IWindowManager windowManager,
            ISyncthingManager syncthingManager,
            Func<SettingsViewModel> settingsViewModelFactory,
            IProcessStartProvider processStartProvider,
            IAlertsManager alertsManager,
            FileTransfersTrayViewModel fileTransfersViewModel)
        {
            this.windowManager = windowManager;
            this.syncthingManager = syncthingManager;
            this.settingsViewModelFactory = settingsViewModelFactory;
            this.processStartProvider = processStartProvider;
            this.alertsManager = alertsManager;
            this.FileTransfersViewModel = fileTransfersViewModel;

            this.syncthingManager.StateChanged += this.StateChanged;
            this.SyncthingState = this.syncthingManager.State;

            this.syncthingManager.TotalConnectionStatsChanged += this.TotalConnectionStatsChanged;
            this.syncthingManager.DataLoaded += this.DataLoaded;

            this.alertsManager.AlertsStateChanged += this.AlertsStateChanged;
        }