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