예제 #1
0
        public MainCheckerWindowVM(UpdateCheckerSettings updateCheckerSettings,
                                   IMessageBroadcastClient messageBroadcastListener,
                                   SharedLogListVM commonLogListVM,
                                   StateRequestBroadcastHandler stateRequestBroadcastHandler,
                                   CfgEditorHubEventHandler cfgEditorHubEventHandler,
                                   TrayContextMenuItems trayContextMenuItems,
                                   JobOrderWatcher jobOrderWatcher,
                                   NewVersionWatcher newVersionWatcher)
        {
            _client        = messageBroadcastListener;
            _reqHandlr     = stateRequestBroadcastHandler;
            _cfgEditHandlr = cfgEditorHubEventHandler;
            _trayMenu      = trayContextMenuItems;
            _jobWatchr     = jobOrderWatcher;
            _verWatchr     = newVersionWatcher;
            Config         = updateCheckerSettings;
            CommonLogs     = commonLogListVM;

            _client.StateChanged += (s, e)
                                    => AppendToCaption(e);

            _client.BroadcastReceived += (s, e)
                                         => CommonLogs.Add($"[{e.Key}]  {e.Value}");

            if (Config.CanExitApp != true)
            {
                ExitCmd.OverrideEnabled = false;
            }
        }
예제 #2
0
 public VersionKeeperHub1(VersionKeeperSettings versionKeeperSettings,
                          SharedLogListVM sharedLogListVM,
                          AuthorizeHelperV1 authorizeHelperV1)
 {
     _cfg     = versionKeeperSettings;
     _logs    = sharedLogListVM;
     _clients = authorizeHelperV1;
     _clients.TargetHubName = VersionKeeperHub.Name;
 }
예제 #3
0
        public FileWatcherVMBase(IThrottledFileWatcher throttledFileWatcher,
                                 SharedLogListVM commonLogListVM)
        {
            _log                 = commonLogListVM;
            _watchr              = throttledFileWatcher;
            _watchr.FileChanged += _watchr_FileChanged;

            StartWatchingCmd = R2Command.Relay(StartWatchingFile);
            StopWatchingCmd  = R2Command.Relay(StopWatchingFile);
        }
예제 #4
0
        public SignalrServerToggleVM(ISignalRServerSettings signalRServerSettings,
                                     SharedLogListVM commonLogListVM)
        {
            _cfg = signalRServerSettings;
            _log = commonLogListVM;

            StartServerCmd = R2Command.Relay(StartServer);
            StopServerCmd  = R2Command.Async(StopServer);

            StatusChanged += (s, e) => _log.Add(e);
        }
        public MainVersionKeeperWindowVM(SignalrServerToggleVM signalRServerToggleVM,
                                         CurrentHubClientsVM currentHubClientsVM,
                                         SharedLogListVM commonLogListVM,
                                         VersionKeeperSettings versionKeeperSettings,
                                         ClonedCopyExeUpdater clonedCopyExeUpdater,
                                         AppUpdateNotifierVM appUpdateNotifierVM)
        {
            Config       = versionKeeperSettings;
            Clients      = currentHubClientsVM;
            CommonLogs   = commonLogListVM;
            Updater      = appUpdateNotifierVM;
            _cloneUpdatr = clonedCopyExeUpdater;

            ServerToggle = signalRServerToggleVM;
            ServerToggle.StartServerCmd.ExecuteIfItCan();

            TestSend1Cmd = R2Command.Async(TestSend1, null, "Request States");
            TestSend2Cmd = R2Command.Async(TestSend2, null, "Test Broadcast");
        }
예제 #6
0
 public MessageBroadcastHubProxy1(IHubClientSettings hubClientSettings, SharedLogListVM sharedLogListVM)
 {
     _cfg = hubClientSettings;
     _log = sharedLogListVM;
 }
예제 #7
0
 public AppendOnlyDbWatcherVM(IThrottledFileWatcher throttledFileWatcher,
                              SharedLogListVM commonLogListVM)
     : base(throttledFileWatcher, commonLogListVM)
 {
 }
예제 #8
0
 public ClientStatusHubProxy1(IHubClientSettings hubClientSettings,
                              SharedLogListVM sharedLogListVM)
 {
     _cfg = hubClientSettings;
     _log = sharedLogListVM;
 }
예제 #9
0
 public LoggerPipeline1(SharedLogListVM commonLogListVM,
                        CurrentHubClientsVM currentHubClientsVM)
 {
     _log     = commonLogListVM;
     _clients = currentHubClientsVM;
 }
예제 #10
0
 public BinaryFileWatcherVM(IThrottledFileWatcher throttledFileWatcher,
                            SharedLogListVM commonLogListVM)
     : base(throttledFileWatcher, commonLogListVM)
 {
 }