Example #1
0
        protected override void OnInitialActivate()
        {
            base.OnInitialActivate();

            StoreReceivedViewModel.Parent           = this;
            ServerConfigViewModel.Parent            = this;
            ServerConfigViewModel.ServerIP          = SystemHelper.LocalIPAddress;
            ServerConfigViewModel.ServerPort        = "104";
            ServerConfigViewModel.LocalAET          = ServerConfigViewModel.ServerAET = "STORE-SCP";
            ServerConfigViewModel.IsServerIPEnabled = ServerConfigViewModel.IsServerAETEnabled = ServerConfigViewModel.IsModalityEnabled = false;
            ServerConfigViewModel.RequestAction     = () => ServerConfigViewModel.PublishServerRequest(nameof(ViewModels.StoreReceivedViewModel));
            eventAggregator.Subscribe(ServerConfigViewModel, nameof(ViewModels.StoreReceivedViewModel));
        }
Example #2
0
        protected override void OnInitialActivate()
        {
            base.OnInitialActivate();

            PatientsViewModel.Parent = this;
            PatientsViewModel.UpdateData();
            ServerConfigViewModel.Parent            = this;
            ServerConfigViewModel.RequestAction     = () => ServerConfigViewModel.PublishServerRequest(nameof(ViewModels.PatientsViewModel));
            ServerConfigViewModel.ServerIP          = SystemHelper.LocalIPAddress;
            ServerConfigViewModel.ServerPort        = "6104";
            ServerConfigViewModel.LocalAET          = ServerConfigViewModel.ServerAET = "RIS";
            ServerConfigViewModel.IsServerIPEnabled = ServerConfigViewModel.IsServerAETEnabled = ServerConfigViewModel.IsModalityEnabled = false;
            eventAggregator.Subscribe(ServerConfigViewModel, nameof(ViewModels.PatientsViewModel));
        }
        protected override async void OnInitialActivate()
        {
            base.OnInitialActivate();

            PrintJobsViewModel.Parent               = this;
            ServerConfigViewModel.Parent            = this;
            ServerConfigViewModel.ServerIP          = SystemHelper.LocalIPAddress;
            ServerConfigViewModel.ServerPort        = "7104";
            ServerConfigViewModel.LocalAET          = ServerConfigViewModel.ServerAET = "PRINT-SCP";
            ServerConfigViewModel.IsServerIPEnabled = ServerConfigViewModel.IsServerAETEnabled = ServerConfigViewModel.IsModalityEnabled = false;
            ServerConfigViewModel.RequestAction     = () => ServerConfigViewModel.PublishServerRequest(nameof(ViewModels.PrintJobsViewModel));
            eventAggregator.Subscribe(ServerConfigViewModel, nameof(ViewModels.PrintJobsViewModel));
            PrintServer.Default.PrinterName = configurationService.GetConfiguration <string>("PrinterSettings");
            await messenger.SubscribeAsync(this, "Config", ReloadPrinterSettings);
        }