Exemple #1
0
        public QuickGeneratorViewModel(IServicesAggregator services, AppViewModel appViewModel)
        {
            this.services     = services;
            this.appViewModel = appViewModel;

            services.AppEvents.OnQuickBarcodeUpdate += AppEvents_QuickBarcodeUpdate;

            generationData = new GenerationDataViewModel(services.AppDialogsService, services.AppWindowsService, services.GeneratorService,
                                                         services.SysService, services.AppSettingsService)
            {
                ParentViewModel = this
            };
            LoadSettings();
            LoadQuickBarcodes();
        }
Exemple #2
0
        public GenerationViewModel(IAppDialogsService appDialogsService, IAppWindowsService appWindowsService, ISystemService sysService,
                                   IAppSettingsService appSettingsService, IGeneratorService generatorService)
        {
            this.appDialogsService  = appDialogsService;
            this.appSettingsService = appSettingsService;

            generationData = new GenerationDataViewModel(appDialogsService, appWindowsService, generatorService, sysService, appSettingsService)
            {
                ParentViewModel = this
            };
            LoadSettings();

            AddNewCommand = new DelegateCommand(() => GenerateBarcode(true));
            EditCommand   = new DelegateCommand(() => GenerateBarcode(false), () => Edit);
        }