示例#1
0
 public ACCircuitDiagramViewModel(INavigationService navigationService, ICalculationInput calculationInput, IUnityContainer container, IEventAggregator eventAggregator)
 {
     _navigationService = navigationService;
     _calculationInput  = calculationInput as CalculationInput;
     _container         = container;
     _eventAggregator   = eventAggregator;
     _eventAggregator.GetEvent <CalculationInputUpdated>().Subscribe(HandleCalculationInputUpdated, keepSubscriberReferenceAlive: true);
 }
 public ACInputTwoViewModel(INavigationService navigationService, ICalculationInput calculationInput, IValidator <CalculationInput> validator, IUnityContainer container, IEventAggregator eventAggregator)
 {
     _navigationService = navigationService;
     _calculationInput  = calculationInput as CalculationInput;
     _validator         = validator;
     _container         = container;
     _eventAggregator   = eventAggregator;
     _eventAggregator.GetEvent <CalculationInputUpdated>().Subscribe(HandleCalculationInputUpdated);
 }
示例#3
0
        public ObservablePropertyChangeHandler(ICalculation calculation, ICalculationInput calculationInput)
        {
            if (calculation == null)
            {
                throw new ArgumentNullException(nameof(calculation));
            }

            if (calculationInput == null)
            {
                throw new ArgumentNullException(nameof(calculationInput));
            }

            this.calculation      = calculation;
            this.calculationInput = calculationInput;
        }
 public ParameterSummaryViewModel(INavigationService navigationService, IUnityContainer container, ICalculationInput calculationInput, ICalculationOutput calculationOutput, IEventAggregator eventAggregator)
 {
     _navigationService = navigationService;
     _calculationInput  = calculationInput as CalculationInput;
     _calculationOutput = calculationOutput as CalculationOutput;
     _container         = container;
     _eventAggregator   = eventAggregator;
     _eventAggregator.GetEvent <CalculationInputUpdated>().Subscribe(HandleCalculationInputUpdated);
 }
 public CalculateArcDurationTwoViewModel(INavigationService navigationService, IDataService dataService, IEventAggregator eventAggregator, IUnityContainer container, IArcDuration arcDuration, ICalculatorService calculatorService, ICalculationInput calculationInput, ICalculationOutput calculationOutput)
 {
     _inModal           = true;
     _navigationService = navigationService;
     _dataService       = dataService;
     _arcDuration       = arcDuration as ArcDuration;
     _calculationInput  = calculationInput as CalculationInput;
     _calculationOutput = calculationOutput as CalculationOutput;
     _calculatorService = calculatorService;
     _container         = container;
     _eventAggregator   = eventAggregator;
     _eventAggregator.GetEvent <ArcDurationUpdated>().Subscribe(UpdateArcDuration);
     _eventAggregator.GetEvent <CalculationInputUpdated>().Subscribe(HandleCalculationInputUpdated, ThreadOption.UIThread, false, obj => obj.IsArcDurationCalculated == true);
     _eventAggregator.GetEvent <CalculationOutputUpdated>().Subscribe(HandleCalculationOutputUpdated);
 }
示例#6
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 CommonInputViewModel(INavigationService navigationService, IUnityContainer container, IDataService dataService, ICalculationInput calculationInput, IEventAggregator eventAggregator, ICalculatorService calculatorService)
        {
            _navigationService = navigationService;
            _dataService       = dataService;
            _calculationInput  = calculationInput as CalculationInput;
            _container         = container;
            _calculatorService = calculatorService;
            _eventAggregator   = eventAggregator;
            _eventAggregator.GetEvent <CalculationInputUpdated>().Subscribe(HandleCalculationInputUpdated);

#if DEBUG
            CalculationInput.IsAlternatingCurrent         = false;
            CalculationInput.MaximumShortCircuitAvailable = 15000;
            CalculationInput.VoltageOfBattery             = 123;
            CalculationInput.InCabinet = false;
#endif
        }
示例#8
0
 public ACHasXfmrViewModel(INavigationService navigationService, IDataService dataService, ICalculationInput calculationInput, IValidator <CalculationInput> validator, IUnityContainer container, IEventAggregator eventAggregator)
 {
     _navigationService = navigationService;
     _dataService       = dataService;
     _calculationInput  = calculationInput as CalculationInput;
     _validator         = validator;
     _container         = container;
     _eventAggregator   = eventAggregator;
     _eventAggregator.GetEvent <CalculationInputUpdated>().Subscribe(HandleCalculationInputUpdated, ThreadOption.UIThread, false, obj => obj.HasTransformer == true);
 }
示例#9
0
 public StartOverPopupViewModel(INavigationService navigationService, IUnityContainer container, ICalculationInput calculationInput)
 {
     _navigationService = navigationService;
     _calculationInput  = calculationInput as CalculationInput;
     _container         = container;
 }
示例#10
0
        public FormViewModel(IEventAggregator eventAggregator, IDataService dataService, ICalculationInput calculationInput, ICalculationOutput calculationOutput, ICalculatorService calculatorService)
        {
            _dataService     = dataService;
            _eventAggregator = eventAggregator;
            _eventAggregator.GetEvent <CalculationInputUpdated>().Subscribe(UpdateCalculationInput);
            _eventAggregator.GetEvent <CalculationOutputUpdated>().Subscribe(UpdateCalculationOutput);
            _calculationOutput = calculationOutput as CalculationOutput;
            _calculationInput  = calculationInput as CalculationInput;
            _calculatorService = calculatorService;

//#if DEBUG
//      CalculationInput.Personnel = "Stuart";
//      CalculationInput.Location = "Victoria";
//      CalculationInput.Action = "GIS Inspection";
//      CalculationInput.IsAlternatingCurrent = true;
//      CalculationInput.NominalVoltage = 15000;
//      CalculationInput.IsOpenAir = true;
//      CalculationInput.IsSolidGround = true;
//      CalculationInput.HasTransformer = true;
//      CalculationInput.PrimaryVoltage = 1000;
//      CalculationInput.XfmrImpedance = 5.75m;
//      CalculationInput.HasCable = true;
//      CalculationInput.ConductorLength = 100;
//      CalculationInput.ConductorPerPhase = 2;
//      CalculationInput.ConductorSizeId = 0;
//      CalculationInput.XfmrKVA = 1234;

//      CalculationInput.SourceFaultCurrent = 1000;
//      CalculationInput.EquipmentTypeId = 0;
//      CalculationInput.ArcDurationValue = 2;
//#endif

            FindEquipmentTripCurvesCommand = new DelegateCommand(FindEquipmentTripCurves);
            CalculateArcDurationCommand    = new DelegateCommand(CalculateArcDuration);
        }
示例#11
0
 public ResultViewModel(INavigationService navigationService, IUnityContainer container, IDataService dataService, ICalculationInput calculationInput, IValidator <CalculationInput> validator, ICalculatorService calculatorService)
 {
     _navigationService = navigationService;
     _dataService       = dataService;
     _calculationInput  = calculationInput as CalculationInput;
     _validator         = validator;
     _container         = container;
     _calculatorService = calculatorService;
 }