viewmodel ins wpf gepackt, build failed
This commit is contained in:
124
DaSaSo.Wpf/ViewModel/SewerPipeLinerViewModel.cs
Normal file
124
DaSaSo.Wpf/ViewModel/SewerPipeLinerViewModel.cs
Normal file
@@ -0,0 +1,124 @@
|
||||
using DaSaSo.Domain.Model;
|
||||
using DaSaSo.Wpf.ViewModel.Controls;
|
||||
using DaSaSo.Wpf.ViewModel.Interface;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DaSaSo.Wpf.ViewModel
|
||||
{
|
||||
public class SewerPipeLinerViewModel : BaseViewModel
|
||||
{
|
||||
private SewerRhebalationControllViewModel _sewerRhebalationControllViewModel;
|
||||
private PipeLiner _model;
|
||||
|
||||
public PipeLiner Model
|
||||
{
|
||||
get => _model;
|
||||
set => _model = value;
|
||||
}
|
||||
|
||||
public string Operator
|
||||
{
|
||||
get => Model.Operator;
|
||||
set
|
||||
{
|
||||
if(Model.Operator != value)
|
||||
{
|
||||
Model.Operator = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool ClosedEnd
|
||||
{
|
||||
get => Model.ClosedEnd;
|
||||
set
|
||||
{
|
||||
if(Model.ClosedEnd != value)
|
||||
{
|
||||
Model.ClosedEnd = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public bool Preliner
|
||||
{
|
||||
get => Model.Preliner;
|
||||
set
|
||||
{
|
||||
if(Model.Preliner != value)
|
||||
{
|
||||
Model.Preliner = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal EinbauTemperatur
|
||||
{
|
||||
get => Model.TemperaturAssembly;
|
||||
set
|
||||
{
|
||||
if(Model.TemperaturAssembly != value)
|
||||
{
|
||||
Model.TemperaturAssembly = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal LagerungTemperatur
|
||||
{
|
||||
get => Model.TemperaturStorage;
|
||||
set
|
||||
{
|
||||
if (Model.TemperaturStorage != value)
|
||||
{
|
||||
Model.TemperaturStorage = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public decimal EinbauDruck
|
||||
{
|
||||
get => Model.InversionPressure;
|
||||
set
|
||||
{
|
||||
if(Model.InversionPressure != value)
|
||||
{
|
||||
Model.InversionPressure = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public SewerRhebalationControllViewModel SewerRhebalationControllViewModel
|
||||
{
|
||||
get => _sewerRhebalationControllViewModel;
|
||||
set => _sewerRhebalationControllViewModel = value;
|
||||
}
|
||||
|
||||
public SewerPipeLinerViewModel(IActualProject actualProject)
|
||||
{
|
||||
|
||||
if(actualProject.AktuellSewerObject.PipeLiner == null)
|
||||
{
|
||||
actualProject.AktuellSewerObject.PipeLiner = new PipeLiner();
|
||||
}
|
||||
Model = actualProject.AktuellSewerObject.PipeLiner;
|
||||
SewerRhebalationControllViewModel = new SewerRhebalationControllViewModel(Model);
|
||||
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
// Todo Calculate SewerPreperation
|
||||
//EPreparationType preparationFlags = SewerPreperationControllViewModel.CalculatePreparationFlags();
|
||||
//Model.PreparationType = preparationFlags;
|
||||
//SewerPreperationControllViewModel.Dispose();
|
||||
//Debugger.Break();
|
||||
SewerRhebalationControllViewModel.Dispose();
|
||||
base.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user