Sewermainview angefangen
This commit is contained in:
@@ -55,36 +55,55 @@ namespace DaSaSo.Wpf
|
||||
|
||||
|
||||
services.AddSingleton<IViewModelAbstractFactory, MainWindowViewModelFactory>();
|
||||
services.AddSingleton<IViewModelSewerMainFactory, SewerWindowViewModelFactory>();
|
||||
services.AddSingleton<CreateViewModel<ClientEditViewModel>>(services =>
|
||||
{
|
||||
return () => new ClientEditViewModel(
|
||||
services.GetRequiredService<IDataService<Client>>(),
|
||||
services.GetRequiredService<IActualProject>(),
|
||||
new ViewModelDelegateRenavigator(
|
||||
services.GetRequiredService<INavigator>()
|
||||
services.GetRequiredService<IMainWindowNavigator>()
|
||||
));
|
||||
});
|
||||
services.AddSingleton<CreateViewModel<HomeViewModel>>(services =>
|
||||
{
|
||||
return () => new HomeViewModel();
|
||||
});
|
||||
services.AddSingleton<CreateViewModel<SewerStammdatenViewModel>>(services =>
|
||||
{
|
||||
return () => new SewerStammdatenViewModel(
|
||||
services.GetRequiredService<IActualProject>()
|
||||
);
|
||||
});
|
||||
services.AddSingleton<CreateViewModel<SewerDamageListViewModel>>(services =>
|
||||
{
|
||||
return () => new SewerDamageListViewModel();
|
||||
});
|
||||
|
||||
services.AddSingleton<CreateViewModel<ClientListViewModel>>(services =>
|
||||
{
|
||||
return () => new ClientListViewModel(
|
||||
services.GetRequiredService<IDataService<Client>>(),
|
||||
services.GetRequiredService<IActualProject>(),
|
||||
new ViewModelDelegateRenavigator(
|
||||
services.GetRequiredService<INavigator>()
|
||||
services.GetRequiredService<IMainWindowNavigator>()
|
||||
));
|
||||
});
|
||||
|
||||
services.AddSingleton<CreateViewModel<SewerMainListViewModel>>(services =>
|
||||
{
|
||||
return () => new SewerMainListViewModel(
|
||||
services.GetRequiredService<ISewerMainNavigator>(),
|
||||
services.GetRequiredService<IActualProject>(),
|
||||
services.GetRequiredService<IViewModelSewerMainFactory>()
|
||||
);
|
||||
});
|
||||
services.AddSingleton<CreateViewModel<ProjectListViewModel>>(services =>
|
||||
{
|
||||
return () => new ProjectListViewModel(
|
||||
services.GetRequiredService<IDataService<Project>>(),
|
||||
services.GetRequiredService<IActualProject>(),
|
||||
new ViewModelDelegateRenavigator(
|
||||
services.GetRequiredService<INavigator>()),
|
||||
services.GetRequiredService<IMainWindowNavigator>()),
|
||||
services.GetRequiredService<IProjectService>()
|
||||
|
||||
);
|
||||
@@ -96,7 +115,7 @@ namespace DaSaSo.Wpf
|
||||
services.GetRequiredService<IDataService<Buildingsite>>(),
|
||||
services.GetRequiredService<IActualProject>(),
|
||||
new ViewModelDelegateRenavigator(
|
||||
services.GetRequiredService<INavigator>()),
|
||||
services.GetRequiredService<IMainWindowNavigator>()),
|
||||
services.GetRequiredService<IBuildingsiteService>()
|
||||
);
|
||||
});
|
||||
@@ -112,7 +131,8 @@ namespace DaSaSo.Wpf
|
||||
|
||||
//services.AddSingleton<INavigator, Navigator>();
|
||||
services.AddScoped<IActualProject, ActualProject>();
|
||||
services.AddScoped<INavigator, Navigator>();
|
||||
services.AddScoped<IMainWindowNavigator, MainWindowNavigator>();
|
||||
services.AddScoped<ISewerMainNavigator, SewerMainNavigator>();
|
||||
|
||||
services.AddScoped<MainWindowViewModel>();
|
||||
});
|
||||
|
||||
@@ -3,13 +3,15 @@
|
||||
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:DaSaSo.Wpf.Controls"
|
||||
xmlns:nav="clr-namespace:DaSaSo.Domain.Enums;assembly=DaSaSo.Domain"
|
||||
xmlns:local="clr-namespace:DaSaSo.Wpf.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerMainListViewModel}"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="200">
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<RadioButton Content="Stammdaten" Style="{StaticResource ToggleButtonList}" Margin="20" />
|
||||
<RadioButton Content="Schäden" Style="{StaticResource ToggleButtonList}" Margin="20" />
|
||||
<RadioButton Content="Stammdaten" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerStammdaten}" Margin="20" />
|
||||
<RadioButton Content="Schäden" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerDamageList}" Margin="20" />
|
||||
<RadioButton Content="Schließen" Style="{StaticResource ToggleButtonList}" Command="{Binding UpdateCurrentSewerViewModelCommand}" CommandParameter="{x:Static nav:ESewerWindowViewType.SewerStammdaten}" Margin="20" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -40,6 +40,9 @@
|
||||
<Compile Update="View\SewerObject\SewerMainView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Update="View\SewerObject\SewerStammdatenView.xaml.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Update="Controls\MainWindowNavigationBar.xaml">
|
||||
@@ -81,6 +84,9 @@
|
||||
<Page Update="View\SewerObject\SewerMainView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="View\SewerObject\SewerStammdatenView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Update="Window\MainWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
|
||||
@@ -3,9 +3,16 @@
|
||||
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:DaSaSo.Wpf.View.SewerObject" xmlns:Controls="clr-namespace:DaSaSo.Wpf.Controls"
|
||||
xmlns:viewModel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel"
|
||||
xmlns:local="clr-namespace:DaSaSo.Wpf.View.SewerObject" xmlns:Controls="clr-namespace:DaSaSo.Wpf.Controls" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:SewerMainListViewModel}"
|
||||
mc:Ignorable="d"
|
||||
xmlns:views ="clr-namespace:DaSaSo.Wpf.View.SewerObject"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<DataTemplate DataType="{x:Type viewmodel:SewerStammdatenViewModel}">
|
||||
<views:SewerStammdatenView />
|
||||
</DataTemplate>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto" />
|
||||
@@ -16,7 +23,7 @@
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Controls:SewerObjectNavigationBar Grid.Column="0" />
|
||||
<ContentControl Grid.Column="1" />
|
||||
<ContentControl Grid.Column="1" Content="{Binding CurrentSewerViewModel}" />
|
||||
<StatusBar Grid.Row="1" Grid.ColumnSpan="2">
|
||||
<StatusBarItem Content="Dada" />
|
||||
</StatusBar>
|
||||
|
||||
55
DaSaSo.Wpf/View/SewerObject/SewerStammdatenView.xaml
Normal file
55
DaSaSo.Wpf/View/SewerObject/SewerStammdatenView.xaml
Normal file
@@ -0,0 +1,55 @@
|
||||
<UserControl x:Class="DaSaSo.Wpf.View.SewerObject.SewerStammdatenView"
|
||||
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:DaSaSo.Wpf.View.SewerObject"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Column="0" Grid.Row="0" Content="Haltungsname" Margin="20" />
|
||||
<Label Grid.Column="0" Grid.Row="1" Content="Punkt Oben" Margin="20" />
|
||||
<Label Grid.Column="0" Grid.Row="2" Content="Punkt Unten" Margin="20" />
|
||||
<Label Grid.Column="0" Grid.Row="3" Content="Durchmesser" Margin="20" />
|
||||
<Label Grid.Column="0" Grid.Row="4" Content="Material" Margin="20" />
|
||||
<Label Grid.Column="0" Grid.Row="5" Content="Leitungslänge" Margin="20" />
|
||||
<TextBox Grid.Column="1" Grid.Row="0" Text="{Binding Haltungsname }" Margin="20" />
|
||||
<TextBox Grid.Column="1" Grid.Row="1" Text="{Binding Oberepunkt }" Margin="20" />
|
||||
<TextBox Grid.Column="1" Grid.Row="2" Text="{Binding Unterepunkt }" Margin="20" />
|
||||
<TextBox Grid.Column="1" Grid.Row="3" Text="{Binding Durchmesser }" Margin="20" />
|
||||
<TextBox Grid.Column="1" Grid.Row="4" Text="{Binding Material }" Margin="20" />
|
||||
<TextBox Grid.Column="1" Grid.Row="5" Text="{Binding Leitungslength }" Margin="20" />
|
||||
</Grid>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="auto"/>
|
||||
<RowDefinition Height="auto" />
|
||||
</Grid.RowDefinitions>
|
||||
<Label Grid.Row="0" Grid.Column="0" Content="Strasse" Margin="20" />
|
||||
<Label Grid.Row="1" Grid.Column="0" Content="Ort" Margin="20" />
|
||||
<TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Strasse}" Margin="20"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Ort}" Margin="20"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
28
DaSaSo.Wpf/View/SewerObject/SewerStammdatenView.xaml.cs
Normal file
28
DaSaSo.Wpf/View/SewerObject/SewerStammdatenView.xaml.cs
Normal 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 DaSaSo.Wpf.View.SewerObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaction logic for SewerStammdatenView.xaml
|
||||
/// </summary>
|
||||
public partial class SewerStammdatenView : UserControl
|
||||
{
|
||||
public SewerStammdatenView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,11 +7,12 @@
|
||||
xmlns:ProjektViews="clr-namespace:DaSaSo.Wpf.View.Project"
|
||||
xmlns:BuildingsiteViews="clr-namespace:DaSaSo.Wpf.View.Buildingsites"
|
||||
xmlns:SewerObjectViews="clr-namespace:DaSaSo.Wpf.View.SewerObjecte"
|
||||
xmlns:SewerObjectView="clr-namespace:DaSaSo.Wpf.View.SewerObject"
|
||||
xmlns:controls="clr-namespace:DaSaSo.Wpf.Controls"
|
||||
xmlns:View="clr-namespace:DaSaSo.Wpf.View"
|
||||
xmlns:local="clr-namespace:DaSaSo.Wpf" xmlns:viewmodel="clr-namespace:DaSaSo.ViewModel;assembly=DaSaSo.ViewModel" d:DataContext="{d:DesignInstance Type=viewmodel:MainWindowViewModel}"
|
||||
mc:Ignorable="d"
|
||||
Title="Cosysda Sanierungs Software" Height="450" Width="800" WindowState="Maximized">
|
||||
Title="Cosysda Sanierungs Software" Height="450" Width="800" WindowState="Maximized" FontSize="20">
|
||||
<Window.Resources>
|
||||
<DataTemplate DataType="{x:Type viewmodel:ClientListViewModel}">
|
||||
<ClientViews:ClientListView />
|
||||
@@ -37,6 +38,9 @@
|
||||
<DataTemplate DataType="{x:Type viewmodel:SewerObjectListViewModel}">
|
||||
<SewerObjectViews:SewerObjecteListView />
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type viewmodel:SewerMainListViewModel}">
|
||||
<SewerObjectView:SewerMainView />
|
||||
</DataTemplate>
|
||||
</Window.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
Reference in New Issue
Block a user