Schädenlist angefangen

This commit is contained in:
Husky
2020-03-28 14:51:28 +01:00
parent 38a22e3803
commit 58764bc307
13 changed files with 827 additions and 6 deletions

View File

@@ -0,0 +1,12 @@
using KanSan.Base.Models;
using System;
using System.Collections.Generic;
using System.Text;
namespace KanSan.Base.Interfaces.UI
{
public interface ISchaedenListViewModel
{
List<Schaeden> Schaeden { get; set; }
}
}

View File

@@ -0,0 +1,592 @@
// <auto-generated />
using System;
using KanSan.Base;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
namespace KanSan.Base.Migrations
{
[DbContext(typeof(KanSanContext))]
[Migration("20200323133037_PropertyChange")]
partial class PropertyChange
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn)
.HasAnnotation("ProductVersion", "3.1.2")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
modelBuilder.Entity("KanSan.Base.Models.Baustelle", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<string>("BaustelleNummer")
.HasColumnType("text");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("OrtTeil")
.HasColumnType("text");
b.Property<int?>("ProjektID")
.HasColumnType("integer");
b.HasKey("ID");
b.HasIndex("ProjektID");
b.ToTable("Baustelle");
});
modelBuilder.Entity("KanSan.Base.Models.Fahrzeug", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("Kennzeichen")
.HasColumnType("text");
b.HasKey("ID");
b.ToTable("Fahrzeuge");
});
modelBuilder.Entity("KanSan.Base.Models.GueteschutzProtokoll", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<int>("AussenTemp")
.HasColumnType("integer");
b.Property<bool>("Bericht")
.HasColumnType("boolean");
b.Property<bool>("Dichtheit")
.HasColumnType("boolean");
b.Property<string>("Discriminator")
.IsRequired()
.HasColumnType("text");
b.Property<bool>("Film")
.HasColumnType("boolean");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<int>("KanalTemp")
.HasColumnType("integer");
b.Property<int?>("SchadPositionID")
.HasColumnType("integer");
b.Property<bool>("Sichtkontrolle")
.HasColumnType("boolean");
b.Property<bool>("Video")
.HasColumnType("boolean");
b.Property<int>("Wetter")
.HasColumnType("integer");
b.HasKey("ID");
b.HasIndex("SchadPositionID");
b.ToTable("GueteschutzProtokoll");
b.HasDiscriminator<string>("Discriminator").HasValue("GueteschutzProtokoll");
});
modelBuilder.Entity("KanSan.Base.Models.Kunde", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("Nachname")
.HasColumnType("text");
b.Property<string>("Ort")
.HasColumnType("text");
b.Property<string>("PLZ")
.HasColumnType("text");
b.Property<string>("Strasse")
.HasColumnType("text");
b.Property<string>("Vorname")
.HasColumnType("text");
b.HasKey("ID");
b.ToTable("Kunden");
});
modelBuilder.Entity("KanSan.Base.Models.LeitungsverzeichnisPosition", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<string>("Beschreibung")
.HasColumnType("text");
b.Property<string>("Einheit")
.HasColumnType("text");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("Positionsnummer")
.HasColumnType("text");
b.HasKey("ID");
b.ToTable("LeitungsverzeichnisPositionen");
});
modelBuilder.Entity("KanSan.Base.Models.Projekt", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<int?>("KundeID")
.HasColumnType("integer");
b.Property<string>("Ort")
.HasColumnType("text");
b.Property<string>("Projektnummer")
.HasColumnType("text");
b.HasKey("ID");
b.HasIndex("KundeID");
b.ToTable("Projekte");
});
modelBuilder.Entity("KanSan.Base.Models.Sanierungskonzept", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<int>("SanierungsTyp")
.HasColumnType("integer");
b.HasKey("ID");
b.ToTable("Sanierungskonzept");
});
modelBuilder.Entity("KanSan.Base.Models.Schaeden", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<decimal>("Entfernung")
.HasColumnType("numeric");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<bool>("Infiltration")
.HasColumnType("boolean");
b.Property<bool>("RissBruchScherbe")
.HasColumnType("boolean");
b.Property<int>("SanierungsTyp")
.HasColumnType("integer");
b.Property<int?>("SanierungskonzeptID")
.HasColumnType("integer");
b.Property<bool>("SchadstelleFaekalienFrei")
.HasColumnType("boolean");
b.Property<int?>("SewerID")
.HasColumnType("integer");
b.Property<bool>("StutzenEinragend")
.HasColumnType("boolean");
b.Property<bool>("VorbehandeltFraeser")
.HasColumnType("boolean");
b.Property<bool>("VorbehandeltHD")
.HasColumnType("boolean");
b.Property<bool>("VorbehandeltMech")
.HasColumnType("boolean");
b.Property<bool>("WurzelInkrustationAblagerungen")
.HasColumnType("boolean");
b.HasKey("ID");
b.HasIndex("SanierungskonzeptID");
b.HasIndex("SewerID");
b.ToTable("Schaeden");
});
modelBuilder.Entity("KanSan.Base.Models.Sewer", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<int?>("BaustelleID")
.HasColumnType("integer");
b.Property<bool>("BaustellensicherungErforderlich")
.HasColumnType("boolean");
b.Property<int>("DN")
.HasColumnType("integer");
b.Property<bool>("GenehmigungErforderlich")
.HasColumnType("boolean");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<bool>("HaltungGespuelt")
.HasColumnType("boolean");
b.Property<int>("Material")
.HasColumnType("integer");
b.Property<string>("ObjektNummer")
.HasColumnType("text");
b.Property<int?>("PunktObenID")
.HasColumnType("integer");
b.Property<int>("PunktTypeOben")
.HasColumnType("integer");
b.Property<int>("PunktTypeUnten")
.HasColumnType("integer");
b.Property<int?>("PunktUntenID")
.HasColumnType("integer");
b.Property<bool>("RohrleitungInBetrieb")
.HasColumnType("boolean");
b.Property<int>("SewerType")
.HasColumnType("integer");
b.Property<string>("StrasseName")
.HasColumnType("text");
b.Property<bool>("WasserHaltungDurchgefuehrt")
.HasColumnType("boolean");
b.HasKey("ID");
b.HasIndex("BaustelleID");
b.HasIndex("PunktObenID");
b.HasIndex("PunktUntenID");
b.ToTable("Kanaele");
});
modelBuilder.Entity("KanSan.Base.Models.SewerPoint", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<string>("Objektnummer")
.HasColumnType("text");
b.HasKey("ID");
b.ToTable("SewerPoints");
});
modelBuilder.Entity("KanSan.Base.Models.Taetigkeiten", b =>
{
b.Property<int>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<decimal>("Anzahl")
.HasColumnType("numeric");
b.Property<int?>("FahrzeugID")
.HasColumnType("integer");
b.Property<int?>("GueteschutzProtokolID")
.HasColumnType("integer");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<int?>("LeitungsverzeichnisPositionID")
.HasColumnType("integer");
b.Property<string>("Mitarbeiter")
.HasColumnType("text");
b.Property<int?>("SanierungskonzeptID")
.HasColumnType("integer");
b.Property<DateTime>("ZeitStempel")
.HasColumnType("timestamp without time zone");
b.HasKey("ID");
b.HasIndex("FahrzeugID");
b.HasIndex("GueteschutzProtokolID");
b.HasIndex("LeitungsverzeichnisPositionID");
b.HasIndex("SanierungskonzeptID");
b.ToTable("Taetigkeiten");
});
modelBuilder.Entity("KanSan.Base.Models.HutprofilSan", b =>
{
b.HasBaseType("KanSan.Base.Models.GueteschutzProtokoll");
b.Property<DateTime>("AnpressenPacker")
.HasColumnType("timestamp without time zone");
b.Property<bool>("Auffaelligkeit")
.HasColumnType("boolean");
b.Property<DateTime>("EntlueftenPacker")
.HasColumnType("timestamp without time zone");
b.Property<bool>("FixierungAufPacker")
.HasColumnType("boolean");
b.Property<int>("Flaechengewicht")
.HasColumnType("integer");
b.Property<string>("HarzMaterialArt")
.HasColumnType("text");
b.Property<string>("HarzmaterialHersteller")
.HasColumnType("text");
b.Property<bool>("InnenBeschichtung")
.HasColumnType("boolean");
b.Property<string>("KompACharge")
.HasColumnType("text");
b.Property<string>("KompBCharge")
.HasColumnType("text");
b.Property<DateTime>("MischZeit")
.HasColumnType("timestamp without time zone");
b.Property<double>("PackerDruckAnfang")
.HasColumnType("double precision");
b.Property<double>("PackerDruckEnde")
.HasColumnType("double precision");
b.Property<string>("RohrDN")
.HasColumnType("text");
b.Property<double>("SeitenKanalDruckAnfang")
.HasColumnType("double precision");
b.Property<double>("SeitenKanalDruckEnde")
.HasColumnType("double precision");
b.Property<string>("TraegerCharge")
.HasColumnType("text");
b.Property<string>("TraegerHersteller")
.HasColumnType("text");
b.Property<string>("TraegerKurzliner")
.HasColumnType("text");
b.Property<string>("Winkel")
.HasColumnType("text");
b.HasDiscriminator().HasValue("HutprofilSan");
});
modelBuilder.Entity("KanSan.Base.Models.KurzlinerSan", b =>
{
b.HasBaseType("KanSan.Base.Models.GueteschutzProtokoll");
b.Property<DateTime>("AnpressenPacker")
.HasColumnType("timestamp without time zone");
b.Property<bool>("Auffaelligkeit")
.HasColumnType("boolean");
b.Property<double>("Breit")
.HasColumnType("double precision");
b.Property<DateTime>("EntlueftenPacker")
.HasColumnType("timestamp without time zone");
b.Property<bool>("FixierungAufPacker")
.HasColumnType("boolean");
b.Property<int>("Flaechengewicht")
.HasColumnType("integer");
b.Property<string>("HarzMaterialArt")
.HasColumnType("text");
b.Property<string>("HarzmaterialHersteller")
.HasColumnType("text");
b.Property<string>("KompACharge")
.HasColumnType("text");
b.Property<string>("KompBCharge")
.HasColumnType("text");
b.Property<double>("Lang")
.HasColumnType("double precision");
b.Property<DateTime>("MischZeit")
.HasColumnType("timestamp without time zone");
b.Property<double>("PackerDruckAnfang")
.HasColumnType("double precision");
b.Property<double>("PackerDruckEnde")
.HasColumnType("double precision");
b.Property<string>("TraegerCharge")
.HasColumnType("text");
b.Property<string>("TraegerHersteller")
.HasColumnType("text");
b.Property<string>("TraegerKurzliner")
.HasColumnType("text");
b.HasDiscriminator().HasValue("KurzlinerSan");
});
modelBuilder.Entity("KanSan.Base.Models.Baustelle", b =>
{
b.HasOne("KanSan.Base.Models.Projekt", "Projekt")
.WithMany()
.HasForeignKey("ProjektID");
});
modelBuilder.Entity("KanSan.Base.Models.GueteschutzProtokoll", b =>
{
b.HasOne("KanSan.Base.Models.Schaeden", "SchadPosition")
.WithMany()
.HasForeignKey("SchadPositionID");
});
modelBuilder.Entity("KanSan.Base.Models.Projekt", b =>
{
b.HasOne("KanSan.Base.Models.Kunde", "Kunde")
.WithMany("Baustellen")
.HasForeignKey("KundeID");
});
modelBuilder.Entity("KanSan.Base.Models.Schaeden", b =>
{
b.HasOne("KanSan.Base.Models.Sanierungskonzept", "Sanierungskonzept")
.WithMany()
.HasForeignKey("SanierungskonzeptID");
b.HasOne("KanSan.Base.Models.Sewer", "Sewer")
.WithMany("Schaeden")
.HasForeignKey("SewerID");
});
modelBuilder.Entity("KanSan.Base.Models.Sewer", b =>
{
b.HasOne("KanSan.Base.Models.Baustelle", "Baustelle")
.WithMany("Kanaele")
.HasForeignKey("BaustelleID");
b.HasOne("KanSan.Base.Models.SewerPoint", "PunktOben")
.WithMany()
.HasForeignKey("PunktObenID");
b.HasOne("KanSan.Base.Models.SewerPoint", "PunktUnten")
.WithMany()
.HasForeignKey("PunktUntenID");
});
modelBuilder.Entity("KanSan.Base.Models.Taetigkeiten", b =>
{
b.HasOne("KanSan.Base.Models.Fahrzeug", "Fahrzeug")
.WithMany()
.HasForeignKey("FahrzeugID");
b.HasOne("KanSan.Base.Models.GueteschutzProtokoll", "GueteschutzProtokol")
.WithMany()
.HasForeignKey("GueteschutzProtokolID");
b.HasOne("KanSan.Base.Models.LeitungsverzeichnisPosition", "LeitungsverzeichnisPosition")
.WithMany()
.HasForeignKey("LeitungsverzeichnisPositionID");
b.HasOne("KanSan.Base.Models.Sanierungskonzept", "Sanierungskonzept")
.WithMany("Taetigkeiten")
.HasForeignKey("SanierungskonzeptID");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,55 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace KanSan.Base.Migrations
{
public partial class PropertyChange : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Position",
table: "Taetigkeiten");
migrationBuilder.DropColumn(
name: "Infiltation",
table: "Schaeden");
migrationBuilder.AddColumn<decimal>(
name: "Entfernung",
table: "Schaeden",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<bool>(
name: "Infiltration",
table: "Schaeden",
nullable: false,
defaultValue: false);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "Entfernung",
table: "Schaeden");
migrationBuilder.DropColumn(
name: "Infiltration",
table: "Schaeden");
migrationBuilder.AddColumn<decimal>(
name: "Position",
table: "Taetigkeiten",
type: "numeric",
nullable: false,
defaultValue: 0m);
migrationBuilder.AddColumn<bool>(
name: "Infiltation",
table: "Schaeden",
type: "boolean",
nullable: false,
defaultValue: false);
}
}
}

View File

@@ -218,10 +218,13 @@ namespace KanSan.Base.Migrations
.HasColumnType("integer")
.HasAnnotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn);
b.Property<decimal>("Entfernung")
.HasColumnType("numeric");
b.Property<Guid>("GuidNr")
.HasColumnType("uuid");
b.Property<bool>("Infiltation")
b.Property<bool>("Infiltration")
.HasColumnType("boolean");
b.Property<bool>("RissBruchScherbe")
@@ -372,9 +375,6 @@ namespace KanSan.Base.Migrations
b.Property<string>("Mitarbeiter")
.HasColumnType("text");
b.Property<decimal>("Position")
.HasColumnType("numeric");
b.Property<int?>("SanierungskonzeptID")
.HasColumnType("integer");

View File

@@ -9,12 +9,13 @@ namespace KanSan.Base.Models
public int ID { get; set; }
public Guid GuidNr { get; set; }
public Sewer Sewer { get; set; }
public decimal Entfernung { get; set; }
public ESanierung SanierungsTyp { get; set; }
public Sanierungskonzept Sanierungskonzept { get; set; }
public bool RissBruchScherbe { get; set; }
public bool WurzelInkrustationAblagerungen { get; set; }
public bool StutzenEinragend { get; set; }
public bool Infiltation { get; set; }
public bool Infiltration { get; set; }
public bool VorbehandeltHD { get; set; }
public bool VorbehandeltMech { get; set; }
public bool VorbehandeltFraeser { get; set; }

View File

@@ -11,7 +11,7 @@ namespace KanSan.Base.Models
public Fahrzeug Fahrzeug { get; set; }
public string Mitarbeiter { get; set; }
public DateTime ZeitStempel { get; set; }
public decimal Position { get; set; }
//public decimal Position { get; set; }
public LeitungsverzeichnisPosition LeitungsverzeichnisPosition { get; set; }
public decimal Anzahl { get; set; }
public GueteschutzProtokoll GueteschutzProtokol { get; set; }

View File

@@ -0,0 +1,22 @@
using KanSan.Base.Interfaces.UI;
using KanSan.Base.Models;
using System;
using System.Collections.Generic;
using System.Text;
namespace KanSan.ViewModel
{
public class SchaedenListViewModel : ISchaedenListViewModel
{
private Sewer actualSelectedSewer;
public List<Schaeden> Schaeden { get => actualSelectedSewer.Schaeden; set => throw new NotImplementedException(); }
public SchaedenListViewModel(Sewer actualSelectedSewer)
{
this.actualSelectedSewer = actualSelectedSewer;
}
}
}

View File

@@ -37,6 +37,9 @@
<Compile Update="UI\Objekte\UCObjektEdit.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="UI\Schäden\UCSchaedenList.xaml.cs">
<SubType>Code</SubType>
</Compile>
<Compile Update="UI\UCSewerMainMenu.xaml.cs">
<SubType>Code</SubType>
</Compile>
@@ -78,6 +81,9 @@
<Page Update="UI\Objekte\UCObjektEdit.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="UI\Schäden\UCSchaedenList.xaml">
<SubType>Designer</SubType>
</Page>
<Page Update="UI\UCSewerMainMenu.xaml">
<SubType>Designer</SubType>
</Page>

View File

@@ -131,10 +131,15 @@ namespace KanSan
ContentController.Content = new UI.UCObjektEdit(actualSelectedSewer);
break;
case UI.ESewerMainMenuCommand.SCHAEDEN:
ContentController.Content = new UI.UCSchaedenList(actualSelectedSewer);
break;
case UI.ESewerMainMenuCommand.NONE:
ContentController.Content = "Wird nicht unterstützt";
break;
}
}
private void rbKunden_Checked(object sender, RoutedEventArgs e)

View File

@@ -0,0 +1,28 @@
using KanSan.Base.Interfaces.UI;
using KanSan.Base.Models;
using System;
using System.Collections.Generic;
using System.Text;
namespace KanSan.SampleData
{
class SchaedenListViewModelSampleData : ISchaedenListViewModel
{
List<Schaeden> schaeden = new List<Schaeden>();
public List<Schaeden> Schaeden { get => schaeden; set => throw new NotImplementedException(); }
public SchaedenListViewModelSampleData()
{
for (int i = 0; i < 2; i++)
{
schaeden.Add(new Base.Models.Schaeden()
{
SanierungsTyp = Base.Enums.ESanierung.REPERATUR,
Entfernung = i,
WurzelInkrustationAblagerungen = true
}) ;
}
}
}
}

View File

@@ -0,0 +1,37 @@
<UserControl x:Class="KanSan.UI.UCSchaedenList"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:KanSan.UI"
xmlns:sd ="clr-namespace:KanSan.SampleData"
mc:Ignorable="d" Background="Gray"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="./../../my_controls.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
<d:UserControl.DataContext>
<sd:SchaedenListViewModelSampleData />
</d:UserControl.DataContext>
<Grid>
<DataGrid ItemsSource="{Binding Schaeden}" Background="Gray" AutoGenerateColumns="False" Margin="0,0,-32,0">
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Setter Property="Background" Value="Gray" />
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTextColumn Header="Entfernung" IsReadOnly="True" Binding="{Binding Entfernung}" Width="auto" />
<DataGridTextColumn Header="Sanierungstyp" IsReadOnly="True" Binding="{Binding SanierungsTyp}" />
<DataGridCheckBoxColumn Header="Riss&#x0a;Bruch&#x0a;Scherbe" IsReadOnly="True" Width="auto" ElementStyle="{StaticResource checkBoxCircleSmall}" Binding="{Binding RissBruchScherbe}" />
<DataGridCheckBoxColumn Header="Wurzeln&#x0a;Inkrustation&#x0a;Ablagerungen" IsReadOnly="True" Width="auto" Binding="{Binding WurzelInkrustationAblagerungen}" ElementStyle="{StaticResource checkBoxCircleSmall}" />
<DataGridCheckBoxColumn Header="Einragende&#x0a;Stutzen" Width="auto" IsReadOnly="True" ElementStyle="{StaticResource checkBoxCircleSmall}" Binding="{Binding StutzenEinragend}" />
</DataGrid.Columns>
</DataGrid>
</Grid>
</UserControl>

View File

@@ -0,0 +1,29 @@
using KanSan.Base.Models;
using KanSan.ViewModel;
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace KanSan.UI
{
/// <summary>
/// Interaktionslogik für UCSchaedenList.xaml
/// </summary>
public partial class UCSchaedenList : UserControl
{
public UCSchaedenList(Sewer actualSelectedSewer)
{
InitializeComponent();
this.DataContext = new SchaedenListViewModel(actualSelectedSewer);
}
}
}

View File

@@ -62,5 +62,39 @@
</Setter.Value>
</Setter>
</Style>
<Style x:Key="checkBoxCircleSmall" TargetType="{x:Type CheckBox}">
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Margin" Value="0" />
<Setter Property="Content" Value="" />
<Setter Property="IsEnabled" Value="{Binding Change}" />
<Setter Property="FrameworkElement.FocusVisualStyle" Value="{x:Null}" />
<Setter Property="Foreground" Value="#FFFFFFFF" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type CheckBox}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Ellipse Name="outerEllipse" Grid.Column="0" Width="30" Height="30" StrokeThickness="2" Stroke="#FFFFFFFF" />
<Ellipse Name="highlightCircle" Grid.Column="0" Width="20" Height="20" Fill="#FFFFFFFF"/>
<ContentPresenter Name="content" Grid.Column="1" Content="{TemplateBinding Content}" Margin="5,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" />
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="ToggleButton.IsChecked" Value="True">
<Setter TargetName="highlightCircle" Property="Shape.Fill" Value="BlueViolet"/>
</Trigger>
<Trigger Property="ToggleButton.IsChecked" Value="False">
<Setter TargetName="highlightCircle" Property="Shape.Fill" Value="#FFFFFFFF" />
</Trigger>
<Trigger Property="UIElement.IsFocused" Value="True">
<Setter TargetName="outerEllipse" Property="Shape.Stroke" Value="BlueViolet" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ResourceDictionary>