ProjektListView Added
This commit is contained in:
@@ -9,7 +9,7 @@ namespace SewerStammGen.Enum
|
||||
public enum EMainWindowViewType
|
||||
{
|
||||
Home,
|
||||
Projects,
|
||||
ProjectsList,
|
||||
EditSchacht,
|
||||
SewerConnectionEdit
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ using SewerStammGen.WPF.ViewModel.Factories;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Security;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -33,7 +34,10 @@ namespace SewerStammGen.HostBuilders
|
||||
return () => new SewerConnectorViewModel();
|
||||
});
|
||||
|
||||
|
||||
services.AddSingleton<CreateViewModel<ProjektListViewModel>>(services =>
|
||||
{
|
||||
return () => new ProjektListViewModel();
|
||||
});
|
||||
|
||||
services.AddSingleton<IViewModelAbstractFactory, MainWindowViewModelFactory>();
|
||||
});
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
<DataTemplate DataType="{x:Type viewmodel:SewerConnectorViewModel}">
|
||||
<view:UCSewerConnector />
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type viewmodel:ProjektListViewModel}">
|
||||
<view:ProjektListView />
|
||||
</DataTemplate>
|
||||
</Window.Resources>
|
||||
|
||||
|
||||
|
||||
@@ -13,16 +13,19 @@ namespace SewerStammGen.WPF.ViewModel.Factories
|
||||
private CreateViewModel<HomeViewModel> _createHomeViewModel;
|
||||
private CreateViewModel<EditManHoleViewModel> _createEditManholeViewModel;
|
||||
private CreateViewModel<SewerConnectorViewModel> _createSewerConnectorViewModel;
|
||||
private CreateViewModel<ProjektListViewModel> _createProjektListViewModel;
|
||||
|
||||
public MainWindowViewModelFactory(
|
||||
CreateViewModel<HomeViewModel> createHomeViewModel,
|
||||
CreateViewModel<EditManHoleViewModel> createEditManholeViewModel,
|
||||
CreateViewModel<SewerConnectorViewModel> createSewerConnectorViewModel
|
||||
CreateViewModel<SewerConnectorViewModel> createSewerConnectorViewModel,
|
||||
CreateViewModel<ProjektListViewModel> createProjektListViewModel
|
||||
)
|
||||
{
|
||||
_createHomeViewModel = createHomeViewModel;
|
||||
_createEditManholeViewModel = createEditManholeViewModel;
|
||||
_createSewerConnectorViewModel = createSewerConnectorViewModel;
|
||||
_createProjektListViewModel = createProjektListViewModel;
|
||||
}
|
||||
|
||||
public BaseViewModel CreateViewModel(EMainWindowViewType viewType)
|
||||
@@ -38,6 +41,8 @@ namespace SewerStammGen.WPF.ViewModel.Factories
|
||||
case EMainWindowViewType.SewerConnectionEdit:
|
||||
return _createSewerConnectorViewModel();
|
||||
|
||||
case EMainWindowViewType.ProjectsList: return _createProjektListViewModel();
|
||||
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SewerStammGen.WPF.ViewModel
|
||||
{
|
||||
public class ProjectListViewModel : BaseViewModel
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -15,10 +15,10 @@
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<RadioButton Content="Home" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:HomeViewModel}}" Command="{Binding UpdateCurrentViewModelCommand}" CommandParameter="{x:Static nav:EMainWindowViewType.Home}" Style="{StaticResource ToggleButtonList}" />
|
||||
<RadioButton IsEnabled="False" Content="Projekte" Command="{Binding UpdateCurrentViewModelCommand}" CommandParameter="{x:Static nav:EMainWindowViewType.Projects}" Style="{StaticResource ToggleButtonList}" />
|
||||
<RadioButton Content="Schächte" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:EditManHoleViewModel}}" Command="{Binding UpdateCurrentViewModelCommand}" CommandParameter="{x:Static nav:EMainWindowViewType.EditSchacht}" Style="{StaticResource ToggleButtonList}" />
|
||||
<RadioButton Content="Kanäle" IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:SewerConnectorViewModel}}" Command="{Binding UpdateCurrentViewModelCommand}" CommandParameter="{x:Static nav:EMainWindowViewType.SewerConnectionEdit}" Style="{StaticResource ToggleButtonList}" />
|
||||
<RadioButton IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:HomeViewModel}}" Command="{Binding UpdateCurrentViewModelCommand}" CommandParameter="{x:Static nav:EMainWindowViewType.Home}" Style="{StaticResource ToggleButtonList}" Content="Home" />
|
||||
<RadioButton IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:ProjektListViewModel}}" Command="{Binding UpdateCurrentViewModelCommand}" CommandParameter="{x:Static nav:EMainWindowViewType.ProjectsList}" Style="{StaticResource ToggleButtonList}" Content="Projekte" />
|
||||
<RadioButton IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:EditManHoleViewModel}}" Command="{Binding UpdateCurrentViewModelCommand}" CommandParameter="{x:Static nav:EMainWindowViewType.EditSchacht}" Style="{StaticResource ToggleButtonList}" Content="Schächte" />
|
||||
<RadioButton IsChecked="{Binding CurrentViewModel, Mode=OneWay, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Type viewmodel:SewerConnectorViewModel}}" Command="{Binding UpdateCurrentViewModelCommand}" CommandParameter="{x:Static nav:EMainWindowViewType.SewerConnectionEdit}" Style="{StaticResource ToggleButtonList}" Content="Kanäle" />
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<UserControl x:Class="SewerStammGen.WPF.Views.Projekte.ProjektListView"
|
||||
<UserControl x:Class="SewerStammGen.WPF.Views.ProjektListView"
|
||||
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:SewerStammGen.WPF.Views.Projekte"
|
||||
xmlns:local="clr-namespace:SewerStammGen.WPF.Views"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Grid>
|
||||
|
||||
@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
|
||||
using System.Windows.Navigation;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace SewerStammGen.WPF.Views.Projekte
|
||||
namespace SewerStammGen.WPF.Views
|
||||
{
|
||||
/// <summary>
|
||||
/// Interaktionslogik für ProjektListView.xaml
|
||||
|
||||
Reference in New Issue
Block a user