public frmSupervisorio() { InitializeComponent(); FlagsEscrita = new FlagsEscrita(); FlagsLeitura = new FlagsLeitura(); if (File.Exists(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "configs.json"))) { Configs = JsonConvert.DeserializeObject <Configs>(File.ReadAllText(Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "configs.json"))); } if (!(Configs is null)) { Credentials = new NetworkCredential(Configs.Username, Configs.Password, Configs.Domain); NetworkPath = Configs.NetworkPath; TimeoutLeitura = Configs.TimeoutRead; } #region Scanner _scannerService = new ScannerService(Configs.ScannerSerialPort, FlagsEscrita, FlagsLeitura); _scannerService.StartListening(out string statusScanner); if (statusScanner != string.Empty) { //GravarLog(statusScanner); } #endregion }
public async Task <HttpResponseMessage> GetWebScanResult([FromUri] string url = null, [FromUri] int threads = 1, [FromUri] string text = null, [FromUri] int pages = 10) { ScannerService scannerService = new ScannerService(); try { if (string.IsNullOrEmpty(url)) { throw new ArgumentNullException(nameof(url)); } if (string.IsNullOrEmpty(text)) { throw new ArgumentNullException(nameof(text)); } if (pages > 100) { throw new ArgumentNullException(nameof(pages)); } var result = await Task.Run(() => scannerService.ScrapSite(url, threads, text, pages)); return(Request.CreateResponse(HttpStatusCode.OK, result)); } catch (ArgumentNullException ex) { return(ex.HandleException(HttpStatusCode.BadRequest)); } catch (Exception ex) { return(ex.HandleException(HttpStatusCode.InternalServerError)); } }
public ScannerServiceTests(ITestOutputHelper testOutputHelper) { _testOutputHelper = testOutputHelper; _scannerService = new ScannerService(_unitOfWork, _logger, _archiveService, _metadataService); _metadataService = Substitute.For <MetadataService>(_unitOfWork, _metadataLogger, _archiveService); _libraryMock = new Library() { Id = 1, Name = "Manga", Folders = new List <FolderPath>() { new FolderPath() { Id = 1, LastScanned = DateTime.Now, LibraryId = 1, Path = "E:/Manga" } }, LastModified = DateTime.Now, Series = new List <Series>() { new Series() { Id = 0, Name = "Darker Than Black" } } }; }
// method to do the actual scanning public void Scan() { var scanner = new ScannerService(); try { ImageFile file = scanner.Scan(); if (file != null) { var converter = new ScannerImageConverter(); ScannedImage = converter.ConvertScannedImage(file); } else { ScannedImage = null; } } catch (ScannerException ex) { // yeah, I know. Showing UI from the VM. Shoot me now. MessageBox.Show(ex.Message, "Unable to Scan Image"); } catch (Exception ex) { MessageBox.Show(ex.Message, "Error"); } }
// method to do the actual scanning public void Scan() { StatusText = "Сканирование..."; var scanner = new ScannerService(); try { ImageFile file = scanner.Scan(); if (file != null) { var converter = new ScannerImageConverter(); _image = converter.ConvertScannedImage(file); } else { _image = null; } ImageBrush = new ImageBrush(_image) { Stretch = Stretch.Uniform }; } catch (ScannerException ex) { // yeah, I know. Showing UI from the VM. Shoot me now. MessageBox.Show(ex.Message, "Не удалось выполнить сканирование изображения", MessageBoxButton.OK, MessageBoxImage.Warning); } catch (Exception ex) { MessageBox.Show(ex.Message, "Ошибка", MessageBoxButton.OK, MessageBoxImage.Error); } StatusText = "Готово."; }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); Scanner = DependencyService.Get <ScannerService>(); var results = EMDKManager.GetEMDKManager(Android.App.Application.Context, Scanner); if (results.StatusCode != EMDKResults.STATUS_CODE.Success) { //statusView.Text = "Status: EMDKManager object creation failed ..."; } else { //statusView.Text = "Status: EMDKManager object creation succeeded ..."; } //App application = new App(); App.Scanner = Scanner; LoadApplication(new App()); }
public void SwitchesCount() { var scanner = new ScannerService(context); var switches = scanner.GetAllSwitches(); Assert.AreEqual(context.NetworkEvents.Select(s => s.Switch_Ip).Distinct().Count(), switches.Count()); }
public void Scan() { var scanner = new ScannerService(); scanner.NativeUI = (bool)NativeUICeckBox.IsChecked; scanner.BitDepth = setBitDepths(); try { //WiaImageIntent.ColorIntent, NativeUICeckBox.IsChecked ImageFile file = scanner.Scan(); if (file != null) { var converter = new ScannerImageConverter(); //ScannedImage = converter.ConvertScannedImage(file); ScannedImage = converter.InMemoryConvertScannedImage(file); } else { ScannedImage = null; } } catch (ScannerException ex) { MessageBox.Show(ex.Message, "Problem z skanowaniem obrazu!"); } catch (Exception ex) { MessageBox.Show(ex.Message, "Błąd!"); } }
public async void Scan() { _model.VisibilityHeader = Visibility.Hidden; var pAsync = await activeWindow.ShowProgressAsync("Status", "Starting...", false, s_without_animation); pAsync.SetIndeterminate(); await Task.Delay(500); var scanner = new ScannerService(); activeWindow.FindChild <WebBrowser>("pdfview").Navigate("about:blank"); if (File.Exists($"{_model.TempFolder}Preview.pdf")) { AcrobatProcess(); await Task.Delay(500); File.Delete($"{_model.TempFolder}Preview.pdf"); } var file = await Task <ImageFile> .Factory.StartNew(() => scanner.Scan(pAsync, _model.ColorSetting)).ContinueWith(async(t) => { try { if (t != null) { var converter = new ScannerImageConverter(_model.TempFolder); _model.OpenedFileName = "Preview"; _model.FileNameToSave = _model.OpenedFileName; _model.OpenedFileFolder = _model.TempFolder; _model.ScannedImage = converter.ConvertScannedImage(t.Result); var saveResult = converter.SaveOnPDF(_model.ScannedImage as BitmapFrame, pAsync); _model.FullPathOpenedFile = $@"{_model.TempFolder}{_model.OpenedFileName}"; await pAsync.CloseAsync(); _model.SaveAsEnable = true; _model.VisibilityHeader = Visibility.Visible; App.Current.Dispatcher.Invoke(() => { activeWindow.FindChild <WebBrowser>("pdfview").Navigate($"{_model.FullPathOpenedFile}.pdf"); }); } else { _model.ScannedImage = null; _model.SaveAsEnable = false; } } catch (Exception ex) { ControlsErrorState(); await pAsync.CloseAsync(); ShowErrorMessage(message: ex.Message); _model.ScannedImage = null; _model.VisibilityHeader = (string.IsNullOrWhiteSpace(_model.OpenedFileName)) ? Visibility.Hidden : Visibility.Visible; } }); }
public void SwitchesEmpty() { context.NetworkEvents.RemoveRange(context.NetworkEvents); context.SaveChanges(); var scanner = new ScannerService(context); var switches = scanner.GetAllSwitches(); Assert.AreEqual(context.NetworkEvents.Select(s => s.Switch_Ip).Distinct().Count(), switches.Count()); }
public void NUmberOfEventsInOneSwitch() { var scanner = new ScannerService(context); var switches = scanner.GetAllSwitches(); var firstSwitch = switches.First(); Assert.AreEqual(context.NetworkEvents.Where(f => f.Switch_Ip == firstSwitch.Switch_Ip).Select(p => p.Event_Id).Count(), firstSwitch.Events.Count()); }
public void PortPerSwitchCount() { var scanner = new ScannerService(context); var switches = scanner.GetAllSwitches(); foreach (var @switch in switches) { Assert.AreEqual(context.NetworkEvents.Where(f => f.Switch_Ip == @switch.Switch_Ip).Select(p => p.Port_Id).Distinct().Count(), @switch.Ports.Count()); } }
public ScannerController(URLContext context, ScannerService scannerService, VirusScanService virusScanService) { // Initializing an in-memory database for saving requests and responses for measuring purposes _context = context; _scannerService = scannerService; _virusScanService = virusScanService; if (_context.URLItems.Count() == 0) { _context.URLItems.Add(new URLItem { Url = "http://foobar.com" }); _context.SaveChanges(); } }
protected override void Dispose(bool disposing) { base.Dispose(disposing); if (ScannerService == null) { return; } ScannerService.BarcodeDetected -= OnBarcodeDetected; ScannerService.OrientationUpdated -= OnOrientationUpdated; ScannerService.Dispose(); BackgroundNotification.Dispose(); this.Write($"Disposed"); }
private void BtnEscanearFoto_Click(object sender, RoutedEventArgs e) { try { var imagen = new ScannerService().Scan(); if (imagen != null) { imgFoto.Source = new ScannerImageConverter().InMemoryConvertScannedImage(imagen); } } catch (Exception ex) { MessageBox.Show("Error al escanear foto, asegúrese que el escaner está encendido:\n" + ex.Message); } }
public ActionResult Scan(string servicename) { if (string.IsNullOrEmpty(servicename)) { return(View("uploadfile")); } else { ScannerService service = new ScannerService(); output = new ScanOutputs(); output.ScanResults = service.Run(servicename, Vault.FilePath); Vault.FileName = null; Vault.FilePath = null; } return(View(output)); }
protected override void OnCreate(Bundle savedInstanceState) { TabLayoutResource = Resource.Layout.Tabbar; ToolbarResource = Resource.Layout.Toolbar; base.OnCreate(savedInstanceState); global::Xamarin.Forms.Forms.Init(this, savedInstanceState); var setup = new Setup(); setup.Initialize(); Scanner = Resolver.Locator.Resolve <ScannerService>(); EMDKManager.GetEMDKManager(Android.App.Application.Context, Scanner); App.Scanner = Scanner; LoadApplication(new App()); }
public void digitalizar() { var scanner = new ScannerService(); try { ImageFile file = scanner.Scan(); if (file != null) { var converter = new ScannerImageConverter(); converter.ConvertScannedImage(file); uriImagem = converter.fileName; } else { uriImagem = null; } } catch (Exception ex) { throw ex; } }
public async void ShowScanAll() { _model.VisibilityHeader = Visibility.Hidden; var pAsync = await activeWindow.ShowProgressAsync("Status", "Scanning...", false, s_without_animation); pAsync.SetIndeterminate(); await Task.Delay(500); if (File.Exists($"{_model.TempFolder}Preview.pdf")) { activeWindow.FindChild <WebBrowser>("pdfview").Navigate("about:blank"); AcrobatProcess(); await Task.Delay(500); File.Delete($"{_model.TempFolder}Preview.pdf"); } var scanner = new ScannerService(); var converter = new ScannerImageConverter(_model.TempFolder); await Task.Factory.StartNew(async() => { try { var file = scanner.ScanAll(pAsync, _model.ColorSetting); if (file.Count == 0) { await pAsync.CloseAsync(); return; } _model.ScannedImage = null; _model.OpenedFileName = "Preview"; _model.FileNameToSave = _model.OpenedFileName; _model.OpenedFileFolder = _model.TempFolder; converter.SavePDFsOn(file, pAsync); if (File.Exists($@"{_model.TempFolder}{_model.OpenedFileName}.pdf")) { _model.FullPathOpenedFile = $@"{_model.TempFolder}{_model.OpenedFileName}"; } else { return; } } catch (Exception ex) { ControlsErrorState(); await pAsync.CloseAsync(); ShowErrorMessage(message: ex.Message); _model.ScannedImage = null; } }); if (File.Exists($@"{_model.FullPathOpenedFile}.pdf")) { activeWindow.FindChild <WebBrowser>("pdfview").Navigate($"{_model.FullPathOpenedFile}.pdf"); _model.SaveAsEnable = true; } else { return; } await pAsync.CloseAsync(); _model.VisibilityHeader = Visibility.Visible; }
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e) { base.OnElementPropertyChanged(sender, e); if (ScannerService == null && Element.Width > 0 && Element.Height > 0) { // ScannerService 생성 ScannerService = ScannerService.Create( Element.BarcodeFormats.ToAVFFormat(), Element.Resolution.ToSessionPreset()); // 스캐너 서비스 미생성 시 반환 if (ScannerService == null) { Element?.OnError(Enums.ScannerError.ServiceNotReady); this.Write("Scanner service is not ready."); return; } // 이벤트 등록 ScannerService.BarcodeDetected += OnBarcodeDetected; ScannerService.OrientationUpdated += OnOrientationUpdated; // 스캔 초기 상태 설정 ScannerService.UpdateScannerState(Element.IsScanning); // Previewer 생성 및 Forms.View에 추가 var previewer = new UIView(CGRect.Empty); previewer.BackgroundColor = UIColor.Black; previewer.Layer.AddSublayer(ScannerService.Previewer); // ScanArea로 사용될 View(Element.Content)가 존재할 경우 Previewer위에 오버레이 if (Element.Content != null) { var g = new Grid(); g.Children.Add(previewer.ToView()); // [0] g.Children.Add(Element.Content); // [1] Element.Content = g; } else { Element.Content = previewer.ToView(); } // 앱이 백그라운드 모드로 전환 시 플래쉬가 자동으로 꺼짐 // 따라서, 'IsTorchOn' 프로퍼티 값을 'false'로 동기화 BackgroundNotification = UIApplication.Notifications.ObserveDidEnterBackground((x, z) => { if (Element?.IsTorchOn == true) { Element.SetValue(BarcodeScanner.IsTorchOnProperty, false); } }); } // 스캐너 서비스 미생성 시 반환 if (ScannerService == null) { return; } // 스캔 영역 설정 if (!ScannerService.IsScanAreaUpdated && (e.PropertyName == "Width" || e.PropertyName == "Height")) { ScannerService.UpdateScanArea(Element); } switch (e.PropertyName) { case "IsTorchOn": { ScannerService.UpdateTorch(Element.IsTorchOn); break; } case "IsScanning": { ScannerService.UpdateScannerState(Element.IsScanning); if (!Element.IsScanning) { Element.SetValue(BarcodeScanner.IsTorchOnProperty, false); } break; } case "IsPreviewing": { ScannerService.ChangeSessionState(Element.IsPreviewing); if (!Element.IsPreviewing) { Element.SetValue(BarcodeScanner.IsTorchOnProperty, false); } break; } } }
/// <summary> /// 장치 회전 시 발생하는 콜백 함수입니다. /// </summary> private void OnOrientationUpdated() => ScannerService?.UpdateScanArea(Element);
public ScannerController(ScannerService scannerService) { _scannerService = scannerService; }
static void Main(string[] args) { var scanner = new ScannerService(); var result = scanner.GetAllSwitches(); }
private List <RmsReportMonitoringRaw> CheckDevice(ClientResult clientResult) { try { if (Convert.ToBoolean(ConfigurationManager.AppSettings["RMS.DebugLogEnable"] ?? "false")) { string log = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss") + " Start CheckDeivce"; new RMSDebugLog(log, true); } List <RmsReportMonitoringRaw> lRmsReportMonitoringRaws = new List <RmsReportMonitoringRaw>(); var listMonitoringProfileDevices = clientResult.ListMonitoringProfileDevices.OrderBy(o => o.DeviceId); foreach (var mpd in listMonitoringProfileDevices) { ClientResult cr = new ClientResult(); cr.Client = clientResult.Client; cr.ListMonitoringProfileDevices = new List <RmsMonitoringProfileDevice>(); cr.ListMonitoringProfileDevices.Add(mpd); // Get DeviceTypeId var device = clientResult.ListDevices.FirstOrDefault(d => d.DeviceId == mpd.DeviceId); cr.ListDevices = new List <RmsDevice>(); cr.ListDevices.Add(device); if (device != null) { int?deviceTypeID = device.DeviceTypeId; var deviceType = clientResult.ListDeviceType.FirstOrDefault(dt => dt.DeviceTypeId == deviceTypeID); cr.ListDeviceType = new List <RmsDeviceType>(); cr.ListDeviceType.Add(deviceType); if (deviceType != null) { string deviceTypeCode = deviceType.DeviceTypeCode; if (Convert.ToBoolean(ConfigurationManager.AppSettings["RMS.DebugLogEnable"] ?? "false")) { string log = DateTime.Now.ToString("dd/MM/yyyy HH:mm:ss") + " Start CheckDeivce - Device Type Code: " + deviceTypeCode; new RMSDebugLog(log, true); } try { if (deviceTypeCode == Models.DeviceCode.Alarm) { var ds = new AlarmService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, mpd.BooleanValue ?? false, mpd.ComPort, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.ATMCardReader) { var ds = new ATMCardReaderService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, mpd.BooleanValue ?? false, mpd.ComPort, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.BasicUSBDevice) { var ds = new BasicUSBDeviceService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.BarcodeReader) { var ds = new BarcodeReaderService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.CardDispenser) { var ds = new CardDispenserService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, mpd.BooleanValue ?? false, mpd.ComPort, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.EncryptedPinPad) { var ds = new EncryptedPinPadService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, mpd.BooleanValue ?? false, mpd.ComPort, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.IDCardScanner) { var ds = new IDCardScannerService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.ElectronicSignaturePad) { var ds = new SignaturePadService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.Keyboard) { var ds = new KeyboardService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.MonitorDisplay) { var ds = new MonitorDisplayService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.Printer) { var ds = new PrinterService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, mpd.DeviceManagerName, mpd.BooleanValue ?? false, mpd.ComPort, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.Scanner) { var ds = new ScannerService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.SmartcardReader) { var ds = new SmartCardReaderService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.ThermalPrinter) { var ds = new ThermalPrinterService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } else if (deviceTypeCode == Models.DeviceCode.WebCamera) { var ds = new WebCameraService(device.Brand, device.Model, mpd.DeviceManagerName, mpd.DeviceManagerId, cr); var rmsReportMonitoringRaws = ds.Monitoring(); lRmsReportMonitoringRaws.AddRange(rmsReportMonitoringRaws); } } catch (Exception ex) { new RMSAppException(this, "0500", "CheckDevice - Each device failed. " + ex.Message, ex, true); } } } } return(lRmsReportMonitoringRaws); } catch (Exception ex) { throw new RMSAppException(this, "0500", "CheckDevice failed. " + ex.Message, ex, false); } }
public async void ShowScanAndAdd() { _model.IsMsgVisible = true; var scanner = new ScannerService(); var pAsync = await activeWindow.ShowProgressAsync("Status", "Starting...", false, s_without_animation); pAsync.SetIndeterminate(); var converter = new ScannerImageConverter(_model.TempFolder); switch (_model.AutoAdd) { case true: await Task.Factory.StartNew(async() => { try { var filee = scanner.ScanAll(pAsync, _model.ColorSetting); if (filee.Count == 0) { await pAsync.CloseAsync(); return; } converter.SavePDFsOn(filee, pAsync); await pAsync.CloseAsync(); _model.IsMsgVisible = false; AcrobatProcess(); await Task.Delay(500); pAsync.SetMessage("Adding pages to file..."); await Task.Factory.StartNew(() => converter.AddToExistingPDF($@"{_model.TempFolder}Preview.pdf", $@"{_model.TempFolder}{_model.FileNameAdded}.pdf")); App.Current.Dispatcher.Invoke(() => { activeWindow.FindChild <WebBrowser>("pdfview").Navigate($@"{_model.TempFolder}{_model.FileNameAdded}.pdf"); }); await pAsync.CloseAsync(); _model.IsMsgVisible = false; } catch (Exception ex) { await pAsync.CloseAsync(); App.Current.Dispatcher.Invoke(() => { ShowErrorMessage(ex.Message); }); } }); break; case false: var file = await Task <ImageFile> .Factory.StartNew(() => scanner.Scan(pAsync, _model.ColorSetting)).ContinueWith(async(t) => { try { if (t != null) { var scannedImage = converter.ConvertScannedImage(t.Result); var saveResult = converter.SaveOnPDF(scannedImage as BitmapFrame, pAsync); AcrobatProcess(); await Task.Delay(500); pAsync.SetMessage("Adding pages to file..."); await Task.Factory.StartNew(() => converter.AddToExistingPDF($@"{_model.TempFolder}Preview.pdf", $@"{_model.TempFolder}{_model.FileNameAdded}.pdf")); App.Current.Dispatcher.Invoke(() => { activeWindow.FindChild <WebBrowser>("pdfview").Navigate($@"{_model.TempFolder}{_model.FileNameAdded}.pdf"); }); await pAsync.CloseAsync(); _model.IsMsgVisible = false; } else { } } catch (Exception ex) { await pAsync.CloseAsync(); App.Current.Dispatcher.Invoke(() => { ShowErrorMessage(ex.Message); }); } }); break; default: break; } // _model.IsMsgVisible = false; }
public void Start() { bus = container.GetInstance<IBusControl>(); bus.Start(); var w = container.WhatDoIHave(); service = container.GetInstance<ScannerService>(); }