Exemplo n.º 1
0
        public void Print_AnyState_PdfDocOnExit()
        {
            var printer = new ImagePrinter();

            const string filePath =
                @"C:\Users\phantomer\Documents\Visual Studio 2013\Projects\ImageMaker\Test\5_ozer.png";

            byte[] fileContent = new byte[0];
            if (File.Exists(filePath))
                fileContent = File.ReadAllBytes(filePath);

            printer.Print(fileContent);
        }
 public AppSettingsExplorerViewModel(
     IViewModelNavigator navigator,
     SettingsProvider settingsProvider,
     IMappingEngine mappingEngine,
     SchedulerService schedulerService,
     ImagePrinter imagePrinter)
 {
     _navigator = navigator;
     _settingsProvider = settingsProvider;
     _mappingEngine = mappingEngine;
     _schedulerService = schedulerService;
     _imagePrinter = imagePrinter;
     _maxAvailableCopies = 255;
 }
Exemplo n.º 3
0
 public CurrentSessionViewModel(
     IViewModelNavigator navigator,
     SessionService sessionService,
     ImagePrinter printer,
     SettingsProvider settings
     )
 {
     _navigator = navigator;
     _sessionService = sessionService;
     _printer = printer;
     AppSettingsDto appSettings = settings.GetAppSettings();
     if (appSettings != null)
         _printerName = appSettings.PrinterName;
 }
Exemplo n.º 4
0
 public MessageAdapter(
     IMappingEngine mappingEngine,
     QueueUtilizerFactory queueUtilizerFactory,
     ImagePrinter imagePrinter,
     ImageService imageService,
     PatternViewModelProvider patternViewModelProvider,
      ImageUtils imageUtils)
 {
     _mappingEngine = mappingEngine;
     _queueUtilizer = queueUtilizerFactory.CreateQueue<InstagramMessageDto>();
     _imagePrinter = imagePrinter;
     _imageService = imageService;
     _patternVmProvider = patternViewModelProvider;
     _imageUtils = imageUtils;
 }
 public PrinterActivityViewerViewModel(
     IViewModelNavigator navigator,
     PrinterMessageProvider messageProvider,
     ImagePrinter imagePrinter,
     SettingsProvider settingsProvider
     )
 {
     _navigator = navigator;
     _messageProvider = messageProvider;
     _imagePrinter = imagePrinter;
     _copiesCount = 1;
     AppSettingsDto appSettings = settingsProvider.GetAppSettings();
     if (appSettings != null)
     {
         HashTag = appSettings.HashTag;
         _printerName = appSettings.PrinterName;
     }
 }
Exemplo n.º 6
0
 public CameraResultViewModel(
     IViewModelNavigator navigator, 
     ImagePrinter printer, 
     SettingsProvider settingsProvider,
     ImageService imageService,
     CompositionProcessingResult result)
 {
     _navigator = navigator;
     _printer = printer;
     _imageService = imageService;
     Image = result.ImageResult;
     _copiesCount = 1;
     var appSettings = settingsProvider.GetAppSettings();
     if (appSettings != null)
     {
         _maxCopies = appSettings.MaxPrinterCopies;
         _printerName = appSettings.PrinterName;
     }
 }
        public InstagramExplorerViewModel(
            IViewModelNavigator navigator,
            InstagramExplorer instagramExplorer,
            SettingsProvider settings,
            ImagePrinter printer, PatternViewModelProvider patternVMProvider,
            ImageUtils imageUtils, IMappingEngine mappingEngine)
        {
            _navigator = navigator;
            _printer = printer;
            _patternVmProvider = patternVMProvider;
            _imageUtils = imageUtils;
            _mappingEngine = mappingEngine;
            _instagramExplorer = instagramExplorer;
            AppSettingsDto appSettings = settings.GetAppSettings();
            if (appSettings != null)
                _printerName = appSettings.PrinterName;

            IsHashTag = true;
            SearchAsyncOperation= new NotifyTaskCompletion<ImageResponse>(Task.FromResult(default(ImageResponse)));
            _searchTokenSource= new CancellationTokenSource();
        }