Gui neu angelegt

This commit is contained in:
2023-04-20 20:37:39 +02:00
parent 0877d2b308
commit bcbda7622c
83 changed files with 389 additions and 502 deletions

View File

@@ -0,0 +1,63 @@
<UserControl x:Class="StammGenerator.Views.SchachtEditView"
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:viewmodel="clr-namespace:StammGenerator.ViewModel"
xmlns:local="clr-namespace:StammGenerator.Views"
mc:Ignorable="d"
xmlns:converter="clr-namespace:StammGenerator.Converters"
xmlns:stat="clr-namespace:SewerStammGen.Shared.Enum;assembly=SewerStammGen.Shared"
d:DesignHeight="450" d:DesignWidth="800">
<UserControl.Resources>
<converter:ValueToEntConverter x:Key="EqualValueToEntwaesserungConverter" />
</UserControl.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="520" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition />
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0" Content="Bezeichnung" />
<Label Grid.Column="0" Grid.Row="1" Content="Deckel Rechtswert" />
<Label Grid.Column="0" Grid.Row="2" Content="Deckel Hochwert" />
<Label Grid.Column="0" Grid.Row="3" Content="Deckel Höhe" />
<Label Grid.Column="0" Grid.Row="4" Content="Sohl Rechtswert" />
<Label Grid.Column="0" Grid.Row="5" Content="Sohl Hochwert" />
<Label Grid.Column="0" Grid.Row="6" Content="Sohl Höhe" />
<!--<Label Grid.Column="0" Grid.Row="7" Content="Deckelhöhe" />-->
<Label Grid.Column="0" Grid.Row="7" Content="Entwässerungsart" />
<TextBox Margin="2" Grid.Column="1" Grid.Row="0" Text="{Binding Objektbezeichnung}" />
<TextBox Margin="2" Grid.Column="1" Grid.Row="1" Text="{Binding DeckelRechtsWert}" />
<TextBox Margin="2" Grid.Column="1" Grid.Row="2" Text="{Binding DeckelHochWert}" />
<TextBox Margin="2" Grid.Column="1" Grid.Row="3" Text="{Binding DeckelHoehe}" />
<TextBox Margin="2" Grid.Column="1" Grid.Row="4" Text="{Binding SohlRechtsWert}" />
<TextBox Margin="2" Grid.Column="1" Grid.Row="5" Text="{Binding SohlHochWert}" />
<TextBox Margin="2" Grid.Column="1" Grid.Row="6" Text="{Binding SohlHoehe}" />
<DockPanel Grid.Column="1" Grid.Row="7">
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Regenwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToEntwaesserungConverter},ConverterParameter={x:Static stat:EEntwaeserung.Regenwasser}}" />
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Schmutzwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToEntwaesserungConverter},ConverterParameter={x:Static stat:EEntwaeserung.Schmutzwasser}}" />
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Mischwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToEntwaesserungConverter},ConverterParameter={x:Static stat:EEntwaeserung.Mischwasser}}" />
</DockPanel>
<StackPanel Grid.ColumnSpan="2" Grid.Row="8">
<Button Content="Speichern" Command="{Binding Speichern}" />
</StackPanel>
</Grid>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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 StammGenerator.Views
{
/// <summary>
/// Interaktionslogik für SchachtEditView.xaml
/// </summary>
public partial class SchachtEditView : UserControl
{
public SchachtEditView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,24 @@
<UserControl x:Class="StammGenerator.Views.SchachtImportView"
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:StammGenerator.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0" Content="Dateiname" />
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding FileName}" Margin="20,20,20,132" />
<Button Grid.Row="0" Grid.Column="1" Content="Datei wählen" Margin="120,170,200,4" Command="{Binding OpenFileDialogCommand}" />
<Button Grid.Row="1" Grid.ColumnSpan="2" Content="Laden" Command="{Binding LoadFile}" />
</Grid>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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 StammGenerator.Views
{
/// <summary>
/// Interaktionslogik für SchachtImportView.xaml
/// </summary>
public partial class SchachtImportView : UserControl
{
public SchachtImportView()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,32 @@
<UserControl x:Class="StammGenerator.Views.SchachtListView"
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:StammGenerator.Views"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<DataGrid Grid.Row="0" ItemsSource="{Binding Schaechte}" AutoGenerateColumns="False" IsReadOnly="True" SelectionMode="Single" SelectedItem="{Binding SelectedSchacht}">
<DataGrid.Columns>
<DataGridTextColumn Header="Schachtnummer" Binding="{Binding Objektbezeichnung}" />
<!--<DataGridTextColumn Header="Rechtswert" Binding="{Binding RechtsWert}" />-->
<!--<DataGridTextColumn Header="Hochwert" Binding="{Binding HochWert}" />-->
<!--<DataGridTextColumn Header="Sohlhöhe" Binding="{Binding SohlHoehe}" />-->
<!--<DataGridTextColumn Header="Deckelhöhe" Binding="{Binding DeckelHoehe}" />-->
<DataGridTextColumn Header="Entwässerung" Binding="{Binding Entwaesserung}" />
</DataGrid.Columns>
</DataGrid>
<StackPanel Grid.Row="1">
<Button Content="Schacht hinzufügen" Command="{Binding AddSchachtCommand}" />
<Button Content="Schacht Editieren" Command="{Binding EditSchachtCommand}" />
<Button Content="Schacht Löschen" Command="{Binding DeleteSchachtCommand}" />
<Button Content="Schächte aus CSV Laden" Command="{Binding ImportSchachtCommand}" />
</StackPanel>
</Grid>
</UserControl>

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
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 StammGenerator.Views
{
/// <summary>
/// Interaktionslogik für SchachtListView.xaml
/// </summary>
public partial class SchachtListView : UserControl
{
public SchachtListView()
{
InitializeComponent();
}
}
}