public TrendManagementViewModel([Import] IEnergyRepository contextRepository) { m_Repository = contextRepository; m_Repository.ContextChanged += (s, e) => Application.Current.Dispatcher.Invoke(Reload); Reload(); }
public HarvesterController(IEnergyRepository energyRepository, IHarvesterFactory harvesterFactory) { this.harvesters = new List <IHarvester>(); this.energyRepository = energyRepository; this.harvesterFactory = harvesterFactory; this.mode = DefaultMode; }
public HarvesterController(IEnergyRepository energyRepository, IHarvesterFactory factory) { this.energyRepository = energyRepository; this.factory = factory; this.mode = Constants.DefaultHarvesterMode; this.harvesters = new List <IHarvester>(); }
public HarvesterController(IEnergyRepository energyRepository) { this.mode = "Full"; this.harvesters = new List <IHarvester>(); this.energyRepository = energyRepository; this.factory = new HarvesterFactory(); }
public HarvesterController(IEnergyRepository energyRepository) { this.harvesters = new List <IHarvester>(); this.harvesterFactory = new HarvesterFactory(); this.workMode = WorkMode.Full; this.energyRepository = energyRepository; }
public HarvesterController(IEnergyRepository energyRepository) { this.energyRepository = energyRepository; this.harvesters = new List <IHarvester>(); this.TotalOreProduced = Constants.InitialOreQuantity; this.harvesterFactory = new HarvesterFactory(); }
public HarvesterController(IEnergyRepository energyRepository) { this.energyRepository = energyRepository; this.Mode = InitialMode; this.harvesters = new List <IHarvester>(); this.factory = new HarvesterFactory(); }
public void ProducesCorrectAmountOfEnergy() { this.energyRepository = new EnergyRepository(); this.providerController = new ProviderController(energyRepository); List <string> provider1 = new List <string>() { "Solar", "1", "100" }; List <string> provider2 = new List <string>() { "Solar", "2", "100" }; providerController.Register(provider1); providerController.Register(provider2); this.providerController.Produce(); Assert.AreEqual(200, providerController.TotalEnergyProduced); }
public ConsumerGroupModifyViewModel(ConsumerGroup model, [Import] IEnergyRepository consumerRepository, [Import] IEnergyViewModelFactory energyViewModelFactory) { m_Repository = consumerRepository; DisplayName = "Verbrauchergruppe bearbeiten..."; m_EnergyViewModelFactory = energyViewModelFactory; m_Model = model; }
public HarvesterController(IEnergyRepository energyRepository) { this.energyRepository = energyRepository; this.harvesters = new List <IHarvester>(); this.mode = WorkingMode.Full; }
public HarvesterController(IEnergyRepository energyRepository) { this.EnergyRepository = energyRepository; this.harvesters = new List<IHarvester>(); this.factory = new HarvesterFactory(); this.EnergyRepository.TakeEnergy(this.harvesters.Select(h => h.EnergyRequirement).Sum()); }
public HarvesterController(IHarvesterFactory factory, IEnergyRepository energyRepository, List <IHarvester> harvesters) { this.mode = ModeConst; this.oreProduced = 0; this.factory = factory; this.energyRepository = energyRepository; this.harvesters = harvesters; }
public void SetProviderController() { this.providerFactory = new ProviderFactory(); this.energyRepository = new EnergyRepository(); this.providers = new List <IProvider>(); this.providerController = new ProviderController(energyRepository, providers, providerFactory); }
public MeasureViewModelFactory([Import] IEnergyRepository energyRepository, [Import] IResponsibleSubjectViewModelFactory responsibleSubjectViewModelFactory, [Import] IViewModelFactory subMeasureViewModelFactory) { m_MeasureRepository = energyRepository; m_ResponsibleSubjectViewModelFactory = responsibleSubjectViewModelFactory; m_SubMeasureViewModelFactory = subMeasureViewModelFactory; }
public HarvesterController(IEnergyRepository energyRepository, IHarvesterFactory factory) { this.energyRepository = energyRepository; this.factory = factory; this.harvesters = new List <IHarvester>(); this.Mode = HarvestMode.Full; }
public HarvesterController(IEnergyRepository energyRepository) { this.harversterFactory = new HarvesterFactory(); this.harvesters = new List <IHarvester>(); this.energyRepository = new EnergyRepository(); this.oreOutput = 0; this.currentMode = FullMode; }
public DistributorModifyViewModel(Distributor model, [Import] IEnergyRepository consumerRepository, [Import] IEnergyViewModelFactory energyViewModelFactory) { DisplayName = "Verteiler bearbeiten..."; m_Model = model; m_EnergyViewModelFactory = energyViewModelFactory; m_Repository = consumerRepository; ReadingAddVm = new ReadingAddViewModel(); }
public ConsumerModifyViewModel(Consumer consumer, [Import] IEnergyRepository consumerRepository, [Import] IEnergyViewModelFactory energyViewModelFactory) { DisplayName = "Verbraucher bearbeiten..."; m_Model = consumer; m_Repository = consumerRepository; m_EnergyViewModelFactory = energyViewModelFactory; ReadingAddVm = new ReadingAddViewModel(); }
public HarvesterController(IEnergyRepository energyRepository) { this.energyRepository = energyRepository; this.harvesters = new List <IHarvester>(); this.harvesterFactory = new HarvesterFactory(); this.mode = FullMode; this.TotalOreProduced = 0; }
public HarvesterController(IEnergyRepository energyRepository) { this.harvesterFactory = new HarvesterFactory(); this.energyRepository = energyRepository; this.allHarvesters = new List <IHarvester>(); this.oreProduced = 0; this.currentMode = FullMode; }
public HarvesterController(IEnergyRepository energyRepository, IList <IHarvester> harvesters, IHarvesterFactory harvesterFactory) { this.energyRepository = energyRepository; this.harvesters = harvesters; this.factory = harvesterFactory; this.mode = "Full"; this.OreProduced = 0; }
public HarvesterController(IEnergyRepository energyRepository) { currentMode = (Mode)Enum.Parse(typeof(Mode), Constants.DefaultMode, true); harvesters = new List <IHarvester>(); harvesterFactory = new HarvesterFactory(); OreProduced = 0; this.energyRepository = energyRepository; }
public EnergyManagementViewModel([Import] IEnergyRepository mRepository, [Import] IEnergyViewModelFactory mEnergyViewModelFactory, [Import] IDialogManager dialogs) { Dialogs = dialogs; m_Repository = mRepository; m_EnergyViewModelFactory = mEnergyViewModelFactory; m_Repository.ContextChanged += (s, e) => Application.Current.Dispatcher.Invoke(Reload); Reload(); }
public DraftManager() { this.mode = Modes.FullMode; this.totalMinedOre = 0; this.totalStoredEnergy = 0; this.energyRepository = new EnergyRepository(); this.harvesterFactory = new HarvesterFactory(); this.providerFactory = new ProviderFactory(); }
public HarvesterController( List <IHarvester> harvesters, IHarvesterFactory factory, IEnergyRepository energyRepository) { this.mode = "Full"; this.harvesters = harvesters; this.factory = factory; this.energyRepository = energyRepository; }
public HarvesterController( IHarvesterFactory harvesterFactory, IEnergyRepository energyRepository) { this.harvesterFactory = harvesterFactory; this.energyRepository = energyRepository; this.workMode = WorkMode.Full; this.OreProduced = 0; this.harvesters = new List <IHarvester>(); }
public ProviderController( IEnergyRepository energyRepository, IList <IProvider> providers, IProviderFactory factory) { this.energyRepository = energyRepository; this.providers = providers; this.factory = factory; this.TotalEnergyProduced = 0; }
public MeasureManagementViewModel([Import] IEnergyRepository contextRepository, [Import] IMeasureViewModelFactory measureViewModelFactory, [Import] IEnergyViewModelFactory energyViewModelFactory) { m_Repository = contextRepository; m_MeasureViewModelFactory = measureViewModelFactory; m_EnergyViewModelFactory = energyViewModelFactory; m_Repository.ContextChanged += (s, e) => Application.Current.Dispatcher.Invoke(Reload); Reload(); FlyoutActivated = true; }
public HarvesterController( IEnergyRepository energyRepository, IList <IHarvester> harvesters, IHarvesterFactory factory, string mode) { this.energyRepository = energyRepository; this.harvesters = harvesters; this.factory = factory; this.mode = mode; this.OreProduced = 0; }
public CommandInterpreter(IEnergyRepository energyRepository, IHarvesterController harvesterController, IProviderController providerController, List <IHarvester> harvesters, List <IProvider> providers) { this.energyRepository = energyRepository; this.ProviderController = providerController; this.HarvesterController = harvesterController; this.harvesters = harvesters; this.providers = providers; }