public MeterReadingViewModel(MeterReading model, MeterViewModel meterViewModel, SeriesViewModel relatedSeriesViewModel) { m_Model = model; m_MeterViewModel = meterViewModel; m_RelatedSeriesViewModel = relatedSeriesViewModel; m_AppointmentResponsibleSubject = model.AppointmentResponsibleSubject; m_Model.PropertyChanged += OnModelPropertyChanged; m_Model.RelatedSeries.SeriesColor.PropertyChanged += OnSeriesColorPropertyChanged; m_Model.RelatedSeries.PropertyChanged += OnRelatedSeriesPropertyChanged; m_Model.DueDate.PropertyChanged += OnDueDatePropertyChanged; var color = Color.FromRgb(m_Model.RelatedSeries.SeriesColor.R, m_Model.RelatedSeries.SeriesColor.G, m_Model.RelatedSeries.SeriesColor.B); SeriesColor = new SolidColorBrush(color); m_CalendarEntry = new CalendarEntry(m_Model.DueDate.Begin, m_Model.DueDate.End, m_Model.ReadingMeter.Number, color, m_Model.DueDate.IsAllDay, this); }
public InspectionViewModel(Approval_Inspection model, SeriesViewModel seriesViewModel, IEnumerable <Plant> plants) { m_Model = model; m_RelatedSeriesViewModel = seriesViewModel; m_ResponsibleSubject = model.AppointmentResponsibleSubject; m_Model.PropertyChanged += OnModelPropertyChanged; m_Model.RelatedSeries.SeriesColor.PropertyChanged += OnSeriesColorPropertyChanged; m_Model.RelatedSeries.PropertyChanged += OnRelatedSeriesPropertyChanged; m_Model.DueDate.PropertyChanged += OnDueDatePropertyChanged; var color = Color.FromRgb(m_Model.RelatedSeries.SeriesColor.R, m_Model.RelatedSeries.SeriesColor.G, m_Model.RelatedSeries.SeriesColor.B); SeriesColor = new SolidColorBrush(color); m_CalendarEntry = new CalendarEntry(m_Model.DueDate.Begin, m_Model.DueDate.End, null, color, m_Model.DueDate.IsAllDay, this); m_Plants = plants; }
private AirportBasedFlight CreateAirportBasedFlight(string name, string description, string tag, string iconId, DateTime start, DateTime finish, ICollection <AirportPosition> airports = null, ResponsibleSubject responsibleSubject = null) { return(new AirportBasedFlight { Name = name, Description = description, Tag = tag, IconId = iconId, Start = start, Finish = finish, Airports = airports, ResponsibleSubject = responsibleSubject }); }
public static MeterReading CreateMeterReading(DateTime dueDateBegin, DateTime dueDateEnd, DateTime entryDateBegin, DateTime entryDateEnd, double counterReading, ResponsibleSubject appointmentResponsibleSubject, Meter readingMeter, Series series) { var dueDateAppointment = AppointmentModelFactory.CreateAppointment(dueDateBegin, dueDateEnd, series.IsAllDay); var entryDateAppointment = AppointmentModelFactory.CreateAppointment(entryDateBegin, entryDateEnd, series.IsAllDay); return(new MeterReading { AppointmentResponsibleSubject = appointmentResponsibleSubject, DueDate = dueDateAppointment, EntryDate = entryDateAppointment, CounterReading = counterReading, ReadingMeter = readingMeter, RelatedSeries = series }); }
public static FillLevelReading CreateFillLevelReading(DateTime dueDateBegin, DateTime dueDateEnd, DateTime entryDateBegin, DateTime entryDateEnd, float progress, ResponsibleSubject appointmentResponsibleSubject, ResponsibleSubject entryResponsibleSubject, WasteContainer readingContainer, Series series) { var dueDateAppointment = AppointmentModelFactory.CreateAppointment(dueDateBegin, dueDateEnd, series.IsAllDay); var entryDateAppointment = AppointmentModelFactory.CreateAppointment(entryDateBegin, entryDateEnd, series.IsAllDay); return(new FillLevelReading { AppointmentResponsibleSubject = appointmentResponsibleSubject, DueDate = dueDateAppointment, EntryResponsibleSubject = entryResponsibleSubject, EntryDate = entryDateAppointment, Progress = progress, ReadingContainer = readingContainer, RelatedSeries = series }); }
private Flight CreateFlight(string name, string description, string tag, string iconId, DateTime start, DateTime finish, int kilometrage = 0, FlightRange flightRange = FlightRange.Kurzstrecke, bool radiativeForcing = false, ResponsibleSubject responsibleSubject = null) { return(new Flight { Name = name, Description = description, Tag = tag, IconId = iconId, Start = start, Finish = finish, FlightType = flightRange, Kilometrage = kilometrage, RadiativeForcing = radiativeForcing, ResponsibleSubject = responsibleSubject }); }
public FillLevelReadingViewModel(FillLevelReading model, ContainerViewModel containerViewModel, SeriesViewModel relatedSeriesViewModel) { m_Model = model; m_ContainerViewModel = containerViewModel; m_RelatedSeriesViewModel = relatedSeriesViewModel; m_AppointmentResponsibleSubject = model.AppointmentResponsibleSubject; m_Model.PropertyChanged += OnModelPropertyChanged; m_Model.RelatedSeries.SeriesColor.PropertyChanged += OnSeriesColorPropertyChanged; m_Model.RelatedSeries.PropertyChanged += OnRelatedSeriesPropertyChanged; m_Model.DueDate.PropertyChanged += OnDueDatePropertyChanged; DisplayName = TranslationProvider.Translate("TitleFillLevelReadingViewModel"); var color = Color.FromRgb(m_Model.RelatedSeries.SeriesColor.R, m_Model.RelatedSeries.SeriesColor.G, m_Model.RelatedSeries.SeriesColor.B); SeriesColor = new SolidColorBrush(color); m_CalendarEntry = new CalendarEntry(m_Model.DueDate.Begin, m_Model.DueDate.End, m_Model.ReadingContainer.Name, color, m_Model.DueDate.IsAllDay, this); }
private FullyQualifiedCar CreateFullyQualifiedCar(string name, string description, string tag, string iconId, DateTime start, DateTime finish, int kilometrage = 0, int carId = 1, double consumption = 0, ResponsibleSubject responsibleSubject = null) { return(new FullyQualifiedCar { Name = name, Description = description, Tag = tag, IconId = iconId, Start = start, Finish = finish, Kilometrage = kilometrage, Consumption = consumption, CarId = carId, ResponsibleSubject = responsibleSubject }); }
private Car CreateCar(string name, string description, string tag, string iconId, DateTime start, DateTime finish, int kilometrage = 0, double consumption = 0, double carbonProduction = 0, Fuel fuelType = Fuel.Diesel, ResponsibleSubject responsibleSubject = null) { return(new Car { Name = name, Description = description, Tag = tag, IconId = iconId, Start = start, Finish = finish, Kilometrage = kilometrage, CarbonProduction = carbonProduction, Fuel = fuelType, Consumption = consumption, ResponsibleSubject = responsibleSubject }); }
public static EnergyMeasure CreateMeasure(string name, string description, string evaluation, DateTime?entryDate, DateTime dueDate, ResponsibleSubject responsibleSubject, int status, int priority, DateTime creationDate, double rating, MeasureImageSource imageSource = null, ICollection <Document> attachedDocuments = null) { return(new EnergyMeasure { Name = name, Description = description, Evaluation = evaluation, EntryDate = entryDate, DueDate = dueDate, ResponsibleSubject = responsibleSubject, Status = status, Priority = priority, CreationDate = creationDate, MeasureImageSource = imageSource, AttachedDocuments = attachedDocuments, EvaluationRating = rating }); }
public CarbonFootprintPosition CreatePredefinedPosition(ResponsibleSubject responsibleSubject = null) { return(CreateAirportBasedFlight("Linienflug", "Stellt eine Flugkonfiguration basierend auf Linienflügen bereit.", "Flüge", "CfFlight.png", DateTime.Now, DateTime.Now.AddYears(1), new Collection <AirportPosition> { new AirportPosition { Order = 1, AirportID = 12243 }, new AirportPosition { Order = 2, AirportID = 57 }, new AirportPosition { Order = 3, AirportID = 124 } }, responsibleSubject)); }
public ResponsibleSubjectViewModel(ResponsibleSubject model) { m_Model = model; }
private PublicTransport CreatePublicTransport(string name, string description, string tag, string iconId, DateTime start, DateTime finish, int kilometrage = 0, TransportType transportType = TransportType.Linienbus, ResponsibleSubject responsibleSubject = null) { return(new PublicTransport { Name = name, Description = description, Tag = tag, IconId = iconId, Start = start, Finish = finish, TransportType = transportType, Kilometrage = kilometrage, ResponsibleSubject = responsibleSubject }); }
public IEnumerable <MeterReading> GenerateMeterReadings(DomainModelService.Meter meter, ResponsibleSubject responsibleSubject, Series series, DayOfWeek[] weekDays) { var taskGeneratorConfig = new TaskGeneratorConfig(); taskGeneratorConfig.Meter = meter; taskGeneratorConfig.Series = series; taskGeneratorConfig.ResponsibleSubject = responsibleSubject; taskGeneratorConfig.WeekDays = weekDays; taskGeneratorConfig.Begin = series.Begin; taskGeneratorConfig.End = series.End; taskGeneratorConfig.Repeat = series.Repeat; taskGeneratorConfig.RecurrenceInterval = series.RecurrenceInterval; taskGeneratorConfig.EndsWithDate = series.EndsWithDate; taskGeneratorConfig.RepeatUntilDate = series.RepeatUntilDate; taskGeneratorConfig.NumberOfRecurrences = series.NumberOfRecurrences; taskGeneratorConfig.IsWeekdayRecurrence = series.IsWeekdayRecurrence; taskGeneratorConfig.IsAllDay = series.IsAllDay; taskGeneratorConfig.Cycle = series.Cycle; return(GenerateMeterReadings(taskGeneratorConfig)); }
private MeterReading CreateFillLevelReading(DateTime begin, DateTime end, bool isAllDay, DomainModelService.Meter meter, ResponsibleSubject responsibleSubject, Series relatedSeries) { return(new MeterReading { DueDate = new Appointment { Begin = begin, End = end, IsAllDay = isAllDay }, RelatedSeries = relatedSeries, AppointmentResponsibleSubject = responsibleSubject, ReadingMeter = meter }); }
private FillLevelReading CreateFillLevelReading(DateTime begin, DateTime end, bool isAllDay, WasteContainer container, ResponsibleSubject responsibleSubject, Series relatedSeries) { return(new FillLevelReading { DueDate = new Appointment { Begin = begin, End = end, IsAllDay = isAllDay }, RelatedSeries = relatedSeries, AppointmentResponsibleSubject = responsibleSubject, ReadingContainer = container }); }
ResponsibleSubjectViewModel IResponsibleSubjectViewModelFactory.CreateFromExisting(ResponsibleSubject model) { return(new ResponsibleSubjectViewModel(model)); }
public ResponsibleSubjectViewModel CreateFromExisting(ResponsibleSubject model) { return(new ResponsibleSubjectViewModel(model)); }
public CarbonFootprintPosition CreatePosition(string name, string description, string tag, string iconId, DateTime start, DateTime finish, ResponsibleSubject responsibleSubject = null) { return(CreateMachineEnergyConsumption(name, description, tag, iconId, start, finish)); }
public CarbonFootprintPosition CreatePredefinedPosition(ResponsibleSubject responsibleSubject = null) { return(CreatePublicTransport("Öffentlicher Verkehr", "Stellt den öffentlichen Verkehr bereit.", "Öffentlicher Verkehr", "CfPublicTransport.png", DateTime.Now, DateTime.Now.AddYears(1), 300100, TransportType.Reisebus, responsibleSubject)); }
public InvestmentPlan CreateInvestPlan(string investmentName, string description, ResponsibleSubject responsibleSubject, DateTime startYear, float imputedInterestRate, float otherCostsChangePA, float otherRevenueChangePA, ICollection <Comparison> comparisons, int lifetime, float investmentSum, float recoveryValueToday, float recoveryValueAfterLifetime, float energyCostsAnnual, float energyCostsChangePA, float otherCostsPA, float otherRevenuePA) { return(new InvestmentPlan() { InvestmentName = investmentName, Description = description, ResponsibleSubject = responsibleSubject, StartYear = startYear, ImputedInterestRate = imputedInterestRate, OtherCostsChangePA = otherCostsChangePA, OtherRevenueChangePA = otherRevenueChangePA, Comparisons = comparisons, Lifetime = lifetime, InvestmentSum = investmentSum, RecoveryValueToday = recoveryValueToday, RecoveryValueAfterLifetime = recoveryValueAfterLifetime, EnergyCostsAnnual = energyCostsAnnual, EnergyCostsChangePA = energyCostsChangePA, OtherCostsPA = otherCostsPA, OtherRevenuePA = otherRevenuePA }); }
public Inspection CreateInspection(String name, DateTime productionDate, DateTime inspectionDate, int productionShift, int inspectionShift, int inspectionType, int inspectionFrequencyOrSampleSize, string inspectionFrequencyUnit, int totalAmount, string description, ResponsibleSubject responsibleSubject, ProductionItem productionItem, ICollection <DiscardItem> discardItems, bool finished) { return(new Inspection() { Name = name, ProductionDate = productionDate, InspectionDate = inspectionDate, ProductionShift = productionShift, InspectionShift = inspectionShift, InspectionType = inspectionType, SampleSize = inspectionFrequencyOrSampleSize, Unit = inspectionFrequencyUnit, TotalAmount = totalAmount, Description = description, ResponsibleSubject = responsibleSubject, ProductionItem = productionItem, DiscardItems = discardItems, Finished = finished }); }
public CarbonFootprintPosition CreatePredefinedPosition(ResponsibleSubject responsibleSubject = null) { return(CreateMachineEnergyConsumption("Maschinenverbrauch", "Stellt den Energieverbrauch von Maschinen(-zuständen) dar.", "Energieverbrauch", "CfSite.png", DateTime.Now, DateTime.Now.AddYears(1), EnergySource.Ecostrom, 1000, 100, 2000, 250, 0, responsibleSubject)); }
public CarbonFootprintPosition CreatePosition(string name, string description, string tag, string iconId, DateTime start, DateTime finish, ResponsibleSubject responsibleSubject = null) { return(CreateAirportBasedFlight(name, description, tag, iconId, start, finish)); }
public CarbonFootprintPosition CreatePredefinedPosition(ResponsibleSubject responsibleSubject = null) { return(CreateFlight("Flug", "Stellt einen Flug mit manuellen Eingaben dar.", "Flüge", "CfFlight.png", DateTime.Now, DateTime.Now.AddYears(1), 3000, FlightRange.Mittelstrecke, false, responsibleSubject)); }
public CarbonFootprintPosition CreatePredefinedPosition(ResponsibleSubject responsibleSubject = null) { return(CreateCar("Fahrzeug", "Stellt ein Fahrzeug für die individuelle Personenbeförderung dar.", "Fahrzeuge", "CfCar.png", DateTime.Now, DateTime.Now.AddYears(1), 2000, 10.2, 120, Fuel.Benzin, responsibleSubject)); }
private EnergyConsumption CreateEnergyConsumption(string name, string description, string tag, string iconId, DateTime start, DateTime finish, double consumption = 0, EnergySource energySource = EnergySource.Strommix, double carbonProduction = 0, ResponsibleSubject responsibleSubject = null) { return(new EnergyConsumption { Name = name, Description = description, Tag = tag, IconId = iconId, Start = start, Finish = finish, Consumption = consumption, EnergySource = energySource, CarbonProduction = carbonProduction, ResponsibleSubject = responsibleSubject }); }
private Approval_Inspection CreateInspection(DateTime begin, DateTime end, bool isAllDay, ObservableCollection <ConditionInspection> conditionInspections, ResponsibleSubject responsibleSubject, Series relatedSeries) { Approval_Inspection result = new Approval_Inspection(); foreach (var conditionInspection in conditionInspections) { var ci = new ConditionInspection(); ci.EntryDate = DateTime.Now; ci.AuxillaryConditionId = conditionInspection.AuxillaryConditionId; result.ConditionInspections.Add(ci); } result.DueDate = new Appointment { Begin = begin, End = end, IsAllDay = isAllDay }; result.Progress = 0.0f; result.RelatedSeries = relatedSeries; result.AppointmentResponsibleSubject = responsibleSubject; return(result); }
public IEnumerable <Approval_Inspection> GenerateInspections(ObservableCollection <ConditionInspection> conditionInspections, ResponsibleSubject responsibleSubject, Series series, DayOfWeek[] weekDays) { var taskGeneratorConfig = new TaskGeneratorConfig(); taskGeneratorConfig.ConditionInspections = conditionInspections; taskGeneratorConfig.Series = series; taskGeneratorConfig.ResponsibleSubject = responsibleSubject; taskGeneratorConfig.WeekDays = weekDays; taskGeneratorConfig.Begin = series.Begin; taskGeneratorConfig.End = series.End; taskGeneratorConfig.Repeat = series.Repeat; taskGeneratorConfig.RecurrenceInterval = series.RecurrenceInterval; taskGeneratorConfig.EndsWithDate = series.EndsWithDate; taskGeneratorConfig.RepeatUntilDate = series.RepeatUntilDate; taskGeneratorConfig.NumberOfRecurrences = series.NumberOfRecurrences; taskGeneratorConfig.IsWeekdayRecurrence = series.IsWeekdayRecurrence; taskGeneratorConfig.IsAllDay = series.IsAllDay; taskGeneratorConfig.Cycle = series.Cycle; return(GenerateInspections(taskGeneratorConfig)); }
private MachineEnergyConsumption CreateMachineEnergyConsumption(string name, string description, string tag, string iconId, DateTime start, DateTime finish, EnergySource energySource = EnergySource.Strommix, double hoursInStandbyState = 0, double consumptionPerHourForStandby = 0, double hoursInProcessingState = 0, double consumptionPerHourForProcessing = 0, double carbonProduction = 0, ResponsibleSubject responsibleSubject = null) { return(new MachineEnergyConsumption { Name = name, Description = description, Tag = tag, IconId = iconId, Start = start, Finish = finish, EnergySource = energySource, HoursInStandbyState = hoursInStandbyState, HoursInProcessingState = hoursInProcessingState, ConsumptionPerHourForProcessing = consumptionPerHourForProcessing, ConsumptionPerHourForStandby = consumptionPerHourForStandby, CarbonProduction = carbonProduction, ResponsibleSubject = responsibleSubject }); }