viewmodel ins wpf gepackt, build failed
This commit is contained in:
@@ -0,0 +1,92 @@
|
||||
using DaSaSo.Domain.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DaSaSo.Wpf.ViewModel.Controls
|
||||
{
|
||||
public class SewerRhebalationControllViewModel : BaseViewModel
|
||||
{
|
||||
public string Bediener
|
||||
{
|
||||
get => model.Operator;
|
||||
set
|
||||
{
|
||||
if(model.Operator != value)
|
||||
{
|
||||
model.Operator = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal TemperaturAussen
|
||||
{
|
||||
get => model.TemperatureOutdoors;
|
||||
set
|
||||
{
|
||||
if(model.TemperatureOutdoors != value)
|
||||
{
|
||||
model.TemperatureOutdoors = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal TemperaturSewer
|
||||
{
|
||||
get => model.TemperatureSewer;
|
||||
set
|
||||
{
|
||||
if(model.TemperatureSewer != value)
|
||||
{
|
||||
model.TemperatureSewer = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public string Weather
|
||||
{
|
||||
get => model.Weather;
|
||||
set
|
||||
{
|
||||
if(model.Weather != value)
|
||||
{
|
||||
model.Weather = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
private DateTime _date;
|
||||
public DateTime Datum
|
||||
{
|
||||
get => _date;
|
||||
set
|
||||
{
|
||||
if(_date != value)
|
||||
{
|
||||
_date = value;
|
||||
model.Date = DateOnly.FromDateTime(_date);
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public SewerPreperationControllViewModel SewerPreperationControllViewModel { get; set; }
|
||||
|
||||
private PipeLiner model;
|
||||
|
||||
public SewerRhebalationControllViewModel(PipeLiner model)
|
||||
{
|
||||
this.model = model;
|
||||
SewerPreperationControllViewModel = new SewerPreperationControllViewModel(model.PreparationType);
|
||||
_date = model.Date.ToDateTime(new TimeOnly(0));
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
model.PreparationType = SewerPreperationControllViewModel.CalculatePreparationFlags();
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user