Sewerconnection viewmodel hinzugefügt
This commit is contained in:
@@ -11,6 +11,6 @@ namespace SewerStammGen.Enum
|
|||||||
Home,
|
Home,
|
||||||
Projects,
|
Projects,
|
||||||
EditSchacht,
|
EditSchacht,
|
||||||
Sewer
|
SewerConnectionEdit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,11 @@ namespace SewerStammGen.HostBuilders
|
|||||||
return () => new EditManHoleViewModel();
|
return () => new EditManHoleViewModel();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
services.AddSingleton<CreateViewModel<SewerConnectorViewModel>>(services =>
|
||||||
|
{
|
||||||
|
return () => new SewerConnectorViewModel();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
services.AddSingleton<IViewModelAbstractFactory, MainWindowViewModelFactory>();
|
services.AddSingleton<IViewModelAbstractFactory, MainWindowViewModelFactory>();
|
||||||
|
|||||||
@@ -17,6 +17,9 @@
|
|||||||
<DataTemplate DataType="{x:Type viewmodel:EditManHoleViewModel}">
|
<DataTemplate DataType="{x:Type viewmodel:EditManHoleViewModel}">
|
||||||
<view:UCEditSchacht />
|
<view:UCEditSchacht />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
<DataTemplate DataType="{x:Type viewmodel:SewerConnectorViewModel}">
|
||||||
|
<view:UCSewerConnector />
|
||||||
|
</DataTemplate>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,14 +12,17 @@ namespace SewerStammGen.ViewModel.Factories
|
|||||||
{
|
{
|
||||||
private CreateViewModel<HomeViewModel> _createHomeViewModel;
|
private CreateViewModel<HomeViewModel> _createHomeViewModel;
|
||||||
private CreateViewModel<EditManHoleViewModel> _createEditManholeViewModel;
|
private CreateViewModel<EditManHoleViewModel> _createEditManholeViewModel;
|
||||||
|
private CreateViewModel<SewerConnectorViewModel> _createSewerConnectorViewModel;
|
||||||
|
|
||||||
public MainWindowViewModelFactory(
|
public MainWindowViewModelFactory(
|
||||||
CreateViewModel<HomeViewModel> createHomeViewModel,
|
CreateViewModel<HomeViewModel> createHomeViewModel,
|
||||||
CreateViewModel<EditManHoleViewModel> createEditManholeViewModel
|
CreateViewModel<EditManHoleViewModel> createEditManholeViewModel,
|
||||||
|
CreateViewModel<SewerConnectorViewModel> createSewerConnectorViewModel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_createHomeViewModel = createHomeViewModel;
|
_createHomeViewModel = createHomeViewModel;
|
||||||
_createEditManholeViewModel = createEditManholeViewModel;
|
_createEditManholeViewModel = createEditManholeViewModel;
|
||||||
|
_createSewerConnectorViewModel = createSewerConnectorViewModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseViewModel CreateViewModel(EMainWindowViewType viewType)
|
public BaseViewModel CreateViewModel(EMainWindowViewType viewType)
|
||||||
@@ -32,6 +35,9 @@ namespace SewerStammGen.ViewModel.Factories
|
|||||||
case EMainWindowViewType.EditSchacht:
|
case EMainWindowViewType.EditSchacht:
|
||||||
return _createEditManholeViewModel();
|
return _createEditManholeViewModel();
|
||||||
|
|
||||||
|
case EMainWindowViewType.SewerConnectionEdit:
|
||||||
|
return _createSewerConnectorViewModel();
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
|||||||
|
|
||||||
namespace SewerStammGen.ViewModel
|
namespace SewerStammGen.ViewModel
|
||||||
{
|
{
|
||||||
class SewerConnectorViewModel : BaseViewModel
|
public class SewerConnectorViewModel : BaseViewModel
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<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 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 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="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" Command="{Binding UpdateCurrentViewModelCommand}" CommandParameter="{x:Static nav:EMainWindowViewType.Sewer}" 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}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -13,11 +13,31 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<StackPanel>
|
<Grid.RowDefinitions>
|
||||||
<syncfusion:SfMultiColumnDropDownControl
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid Grid.Row="0">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Label Grid.Row="0" Grid.Column="0" FontSize="20" Content="Obere Schacht" />
|
||||||
|
<Label Grid.Row="1" Grid.Column="0" FontSize="20" Content="Untere Schacht" />
|
||||||
|
<Label Grid.Row="2" Grid.Column="0" FontSize="20" Content="Haltungsbezeichnung" />
|
||||||
|
|
||||||
|
<syncfusion:SfMultiColumnDropDownControl Grid.Column="1" Grid.Row="0"
|
||||||
Width="250"
|
Width="250"
|
||||||
Height="24"
|
|
||||||
Margin="10,0"
|
Margin="10,0"
|
||||||
|
FontSize="20"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
AllowAutoComplete="True"
|
AllowAutoComplete="True"
|
||||||
@@ -29,8 +49,43 @@
|
|||||||
PopupWidth="400"
|
PopupWidth="400"
|
||||||
ValueMember="Cast"
|
ValueMember="Cast"
|
||||||
>
|
>
|
||||||
|
|
||||||
</syncfusion:SfMultiColumnDropDownControl>
|
</syncfusion:SfMultiColumnDropDownControl>
|
||||||
|
<syncfusion:SfMultiColumnDropDownControl Grid.Column="1" Grid.Row="1"
|
||||||
|
Width="250"
|
||||||
|
|
||||||
|
Margin="10,0"
|
||||||
|
FontSize="20"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
AllowAutoComplete="True"
|
||||||
|
AllowImmediatePopup="True"
|
||||||
|
AllowIncrementalFiltering="True"
|
||||||
|
AutoGenerateColumns="False"
|
||||||
|
DisplayMember="Title"
|
||||||
|
HeaderTemplate="{StaticResource headerTemplate}"
|
||||||
|
PopupWidth="400"
|
||||||
|
ValueMember="Cast"
|
||||||
|
></syncfusion:SfMultiColumnDropDownControl>
|
||||||
|
<TextBox Grid.Row="2" Grid.Column="1" FontSize="20" Margin="5" />
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<Grid Grid.Row="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition />
|
||||||
|
<ColumnDefinition />
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Label VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" FontSize="20" Content="Material" />
|
||||||
|
<Label VerticalAlignment="Center" Grid.Row="1" Grid.Column="0" FontSize="20" Content="Durchmesser" />
|
||||||
|
<TextBox Grid.Row="0" Grid.Column="1" Margin="5" FontSize="20" Text="{Binding X}" />
|
||||||
|
<TextBox Grid.Row="1" Grid.Column="1" Margin="5" FontSize="20" Text="{Binding X}" />
|
||||||
|
</Grid>
|
||||||
|
<StackPanel Grid.Row="3">
|
||||||
|
<Button FontSize="20" Content="Speichern" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
Reference in New Issue
Block a user