public ApplicationConverting(IApplicationLibrary <IDocumentMicrostation> applicationMicrostation,
                              IApplicationLibrary <IDocumentWord> applicationWord,
                              IFileSystemOperations fileSystemOperations, IFilePathOperations filePathOperations,
                              IPdfCreatorService pdfCreatorService, IMessagingService messagingService)
 {
     _applicationMicrostation = applicationMicrostation;
     _applicationWord         = applicationWord;
     _fileSystemOperations    = fileSystemOperations;
     _filePathOperations      = filePathOperations;
     _pdfCreatorService       = pdfCreatorService;
     _messagingService        = messagingService;
 }
Exemple #2
0
 public ACResultViewModel(IPdfCreatorService pdfCreator, ISaveAndLoad saveAndLoad, INavigationService navigationService, IUnityContainer container, IDataService dataService, ICalculationOutput calculationOutput, ICalculationInput calculationInput, ICalculatorService calculatorService, IPageDialogService dialogService, IEventAggregator eventAggregator)
 {
     _pdfCreator        = pdfCreator;
     _saveAndLoad       = saveAndLoad;
     _navigationService = navigationService;
     _dataService       = dataService;
     _calculationInput  = calculationInput as CalculationInput;
     _calculationOutput = calculationOutput as CalculationOutput;
     _container         = container;
     _calculatorService = calculatorService;
     _dialogService     = dialogService;
     _eventAggregator   = eventAggregator;
     //_eventAggregator.GetEvent<CalculationOutputUpdated>().Subscribe(HandleCalculationOutputUpdated);
     //_eventAggregator.GetEvent<CalculationInputUpdated>().Subscribe(HandleCalculationInputUpdated);
 }
        public MainWindowViewModel(ISaveAndLoad saveAndLoad, IPdfCreatorService pdfCreatorService, IEventAggregator eventAggregator, IRegionManager regionManager, IUnityContainer container)
        {
            //pdf generation
            _saveAndLoad       = saveAndLoad;
            _pdfCreatorService = pdfCreatorService;

            //setup modal regions
            _regionManager = regionManager;
            _regionManager.RegisterViewWithRegion("ArcDurationCalculationRegion", typeof(ArcDurationCalculationView));
            _regionManager.RegisterViewWithRegion("FindSafeWorkingDistanceRegion", typeof(FindSafeWorkingDistanceView));
            _regionManager.RegisterViewWithRegion("FindEquipmentTripCurvesRegion", typeof(FindEquipmentTripCurvesView));
            _regionManager.RegisterViewWithRegion("StandardWorkingDistanceRegion", typeof(StandardWorkingDistancesView));
            _regionManager.RegisterViewWithRegion("SettingsRegion", typeof(SettingsView));

            //setup main regions
            _regionManager.RegisterViewWithRegion("ContentRegion", typeof(FormView));
            _regionManager.RegisterViewWithRegion("ContentRegion", typeof(ConfirmationView));
            _regionManager.RegisterViewWithRegion("ContentRegion", typeof(ResultsView));

            //container
            _container = container;

            //setup events
            _eventAggregator = eventAggregator;
            _eventAggregator.GetEvent <CalculationInputUpdated>().Subscribe(UpdateCalculationInput);
            _eventAggregator.GetEvent <ArcDurationUpdated>().Subscribe(UpdateArcDuration);
            _eventAggregator.GetEvent <CalculationOutputUpdated>().Subscribe(HandleCalculationOutputUpdated);
            _eventAggregator.GetEvent <OpenModalEvent>().Subscribe(HandleOpenModalEvent);
            _eventAggregator.GetEvent <CloseModalEvent>().Subscribe(HandleCloseModalEvent);
            _eventAggregator.GetEvent <UseForNewCalculationClicked>().Subscribe(HandleUseForNewCalculationClicked);

            //setup commands
            GoBackCommand    = new DelegateCommand(GoBack);
            StartOverCommand = new RelayCommand(ClickStartOver, CanClickStartOver);
            NextCommand      = new RelayCommand(ClickNext, CanClickNext);

            SettingsCommand           = new RelayCommand(ShowSettings);
            CalculationHistoryCommand = new RelayCommand(ShowCalculationHistory);
            ExportCommand             = new RelayCommand(DoExport);

            //defaults
            HasErrors = true;
        }
 public UsersController(UserManager <User> userManager, IProfileService profileService, IPdfCreatorService pdfCreatorService)
 {
     this.pdfCreatorService = pdfCreatorService;
     this.profileService    = profileService;
     this.userManager       = userManager;
 }
Exemple #5
0
 public PdfController(IPdfCreatorService pdfCreatorService, IConverter converter)
 {
     this.pdfCreatorService = pdfCreatorService ?? throw new ArgumentNullException(nameof(pdfCreatorService));
     this.converter         = converter ?? throw new ArgumentNullException(nameof(converter));
 }