Esempio n. 1
0
        public MainViewModel(BarcodeLabel label, ApplicationPrinter printer, IEventAggregator eventAggregator)
        {
            this.Label      = label;
            this.AppPrinter = printer;
            string printerName;

            if (BarcodePrinter.Properties.Settings.Default.DefaultPrinterName == null || BarcodePrinter.Properties.Settings.Default.DefaultPrinterName.Length == 0)
            {
                printerName = printer.DefaultZebraPrinter;
            }
            else
            {
                printerName = BarcodePrinter.Properties.Settings.Default.DefaultPrinterName;
            }
            this.SelectedPrinter = printerName;
            this.eventAggregator = eventAggregator;
            logger = LogManager.GetLog(GetType());
        }