Sewerconnection viewmodel hinzugefügt
This commit is contained in:
@@ -11,6 +11,6 @@ namespace SewerStammGen.Enum
|
||||
Home,
|
||||
Projects,
|
||||
EditSchacht,
|
||||
Sewer
|
||||
SewerConnectionEdit
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,11 @@ namespace SewerStammGen.HostBuilders
|
||||
return () => new EditManHoleViewModel();
|
||||
});
|
||||
|
||||
services.AddSingleton<CreateViewModel<SewerConnectorViewModel>>(services =>
|
||||
{
|
||||
return () => new SewerConnectorViewModel();
|
||||
});
|
||||
|
||||
|
||||
|
||||
services.AddSingleton<IViewModelAbstractFactory, MainWindowViewModelFactory>();
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
<DataTemplate DataType="{x:Type viewmodel:EditManHoleViewModel}">
|
||||
<view:UCEditSchacht />
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type viewmodel:SewerConnectorViewModel}">
|
||||
<view:UCSewerConnector />
|
||||
</DataTemplate>
|
||||
</Window.Resources>
|
||||
|
||||
|
||||
|
||||
@@ -12,14 +12,17 @@ namespace SewerStammGen.ViewModel.Factories
|
||||
{
|
||||
private CreateViewModel<HomeViewModel> _createHomeViewModel;
|
||||
private CreateViewModel<EditManHoleViewModel> _createEditManholeViewModel;
|
||||
private CreateViewModel<SewerConnectorViewModel> _createSewerConnectorViewModel;
|
||||
|
||||
public MainWindowViewModelFactory(
|
||||
CreateViewModel<HomeViewModel> createHomeViewModel,
|
||||
CreateViewModel<EditManHoleViewModel> createEditManholeViewModel
|
||||
CreateViewModel<EditManHoleViewModel> createEditManholeViewModel,
|
||||
CreateViewModel<SewerConnectorViewModel> createSewerConnectorViewModel
|
||||
)
|
||||
{
|
||||
_createHomeViewModel = createHomeViewModel;
|
||||
_createEditManholeViewModel = createEditManholeViewModel;
|
||||
_createSewerConnectorViewModel = createSewerConnectorViewModel;
|
||||
}
|
||||
|
||||
public BaseViewModel CreateViewModel(EMainWindowViewType viewType)
|
||||
@@ -32,6 +35,9 @@ namespace SewerStammGen.ViewModel.Factories
|
||||
case EMainWindowViewType.EditSchacht:
|
||||
return _createEditManholeViewModel();
|
||||
|
||||
case EMainWindowViewType.SewerConnectionEdit:
|
||||
return _createSewerConnectorViewModel();
|
||||
|
||||
default:
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
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 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" 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>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -13,11 +13,31 @@
|
||||
</DataTemplate>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<StackPanel>
|
||||
<syncfusion:SfMultiColumnDropDownControl
|
||||
<Grid.RowDefinitions>
|
||||
<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"
|
||||
Height="24"
|
||||
|
||||
Margin="10,0"
|
||||
FontSize="20"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Top"
|
||||
AllowAutoComplete="True"
|
||||
@@ -31,6 +51,41 @@
|
||||
>
|
||||
|
||||
</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>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user