Projekteinstellungen erweitert
This commit is contained in:
@@ -1,27 +1,49 @@
|
||||
using SewerStammGen.Shared.Domain;
|
||||
using SewerStammGen.Shared.Contracts;
|
||||
using SewerStammGen.Shared.Domain;
|
||||
using Shared.Contracts;
|
||||
using StammGenerator.Commands;
|
||||
using StammGenerator.ViewModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using WWTech_KanalSchnittstelle.Exporter;
|
||||
|
||||
namespace StammGenerator.Commands
|
||||
{
|
||||
internal class ProjectExportCommand : AsyncCommandBase
|
||||
{
|
||||
private readonly IActualState _actualState;
|
||||
private readonly IExport _export;
|
||||
private readonly IHaltungDataService _haltungDataService;
|
||||
private readonly ISchachtDataService _schachtDataService;
|
||||
private readonly IProjektDataService _projektDataService;
|
||||
|
||||
public ProjectExportCommand(IActualState actualState)
|
||||
public ProjectExportCommand(IActualState actualState, IHaltungDataService haltungDataService, ISchachtDataService schachtDataService, IProjektDataService projektDataService)
|
||||
{
|
||||
_actualState = actualState;
|
||||
|
||||
_haltungDataService = haltungDataService;
|
||||
_schachtDataService = schachtDataService;
|
||||
_projektDataService = projektDataService;
|
||||
}
|
||||
|
||||
public override async Task ExecuteAsync(object? parameter)
|
||||
{
|
||||
await _export.Export(new List<Kanal>(), new List<Schacht>());
|
||||
|
||||
Projekt prj = await _projektDataService.Get(_actualState.ProjektID);
|
||||
|
||||
try
|
||||
{
|
||||
IExport export = ExporterFactory.Export(prj.ExportType);
|
||||
IEnumerable<Kanal> haltungen = await _haltungDataService.GetAllByProjekt(prj);
|
||||
IEnumerable<Schacht> schaechte = await _schachtDataService.GetAllByProjekt(prj);
|
||||
|
||||
await export.Export(_actualState.ProjektID.ToString(), prj.Kodierungssystem, haltungen.ToList(), schaechte.ToList());
|
||||
}
|
||||
catch(NotImplementedException)
|
||||
{
|
||||
MessageBoxResult result = MessageBox.Show(string.Format("Schnittstelle Export format: {0} ist nicht Implementiert", prj.ExportType), "Fehlende Implementation", MessageBoxButton.OK, MessageBoxImage.Exclamation);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using SewerStammGen.Shared.Enum;
|
||||
using System;
|
||||
using System.CodeDom;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
@@ -18,6 +20,9 @@ namespace StammGenerator.Converters
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (targetType == typeof(EEntwaeserung)) return (EEntwaeserung)parameter;
|
||||
if (targetType == typeof(EExportType)) return (EExportType)parameter;
|
||||
if (targetType == typeof(EKodierungssystem)) return (EKodierungssystem)parameter;
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
using SewerStammGen.Shared.Domain;
|
||||
using SewerStammGen.Shared.Enum;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace StammGenerator.Converters
|
||||
{
|
||||
public class ValueToEntConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return value.ToString() == parameter.ToString();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
|
||||
return (EEntwaeserung)parameter;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
using SewerStammGen.Shared.Enum;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace StammGenerator.Converters
|
||||
{
|
||||
public class ValueToExportConverter: IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return value.ToString() == parameter.ToString();
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
|
||||
return (EExportType)parameter;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,6 +66,8 @@ namespace StammGenerator.HostBuilders
|
||||
{
|
||||
return () => new HaltungListViewModel(
|
||||
services.GetRequiredService<IHaltungDataService>(),
|
||||
services.GetRequiredService<ISchachtDataService>(),
|
||||
services.GetRequiredService<IProjektDataService>(),
|
||||
services.GetRequiredService<IActualState>(),
|
||||
services.GetRequiredService<ViewModelDelegateRenavigator<HaltungEditViewModel>>()
|
||||
);
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace StammGenerator.ViewModel
|
||||
public ICommand AddCommand { get; set; }
|
||||
public ICommand ExportCommand { get; set; }
|
||||
|
||||
public HaltungListViewModel(IHaltungDataService haltungDataService, IActualState actualState, IRenavigator renavigator )
|
||||
public HaltungListViewModel(IHaltungDataService haltungDataService, ISchachtDataService schachtDataService, IProjektDataService projektDataService, IActualState actualState, IRenavigator renavigator )
|
||||
{
|
||||
_haltungen = new ObservableCollection<Kanal>();
|
||||
_haltungDataService = haltungDataService;
|
||||
@@ -31,7 +31,7 @@ namespace StammGenerator.ViewModel
|
||||
|
||||
EditCommand = new HaltungEditCommand(actualState, renavigator, this);
|
||||
AddCommand = new HaltungAddCommand(actualState, renavigator);
|
||||
ExportCommand = new ProjectExportCommand(actualState);
|
||||
ExportCommand = new ProjectExportCommand(actualState, haltungDataService, schachtDataService,projektDataService);
|
||||
|
||||
LoadHaltungen();
|
||||
}
|
||||
|
||||
@@ -75,6 +75,7 @@ namespace StammGenerator.ViewModel
|
||||
Speichern = new RelayCommand((x) => this.SaveProject());
|
||||
this.ProjektSettingsViewModel = new ProjektSettingsViewModel();
|
||||
|
||||
|
||||
LoadProjekt();
|
||||
}
|
||||
|
||||
@@ -89,10 +90,13 @@ namespace StammGenerator.ViewModel
|
||||
Auftraggeber = new Auftraggeber(),
|
||||
};
|
||||
}
|
||||
|
||||
this.ProjektSettingsViewModel.Projekt = _model;
|
||||
OnPropertyChanged(nameof(ProjektName));
|
||||
OnPropertyChanged(nameof(Erstelldatum));
|
||||
OnPropertyChanged(nameof(Strasse));
|
||||
OnPropertyChanged(nameof(Ort));
|
||||
OnPropertyChanged(nameof(ProjektSettingsViewModel));
|
||||
}
|
||||
|
||||
private void SaveProject()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using SewerStammGen.Shared.Enum;
|
||||
using SewerStammGen.Shared.Domain;
|
||||
using SewerStammGen.Shared.Enum;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -12,31 +13,60 @@ namespace StammGenerator.ViewModel
|
||||
|
||||
public class ProjektSettingsViewModel : BaseViewModel
|
||||
{
|
||||
private EExportType _selectedNorm;
|
||||
private Visibility _xmlVisible;
|
||||
private Visibility _kandisVisible;
|
||||
private ESelectedNorm _selectedNorm;
|
||||
private EKodierungssystem _selectedKodier;
|
||||
private Projekt _projekt = new Projekt();
|
||||
|
||||
public EExportType SelectedNorm
|
||||
|
||||
|
||||
public ESelectedNorm SelectedNorm
|
||||
{
|
||||
get => _selectedNorm;
|
||||
set
|
||||
{
|
||||
if(value != _selectedNorm)
|
||||
if(_selectedNorm != value)
|
||||
{
|
||||
_selectedNorm = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
public EExportType SelectedExport
|
||||
{
|
||||
get => _projekt.ExportType;
|
||||
set
|
||||
{
|
||||
if(value != _projekt.ExportType)
|
||||
{
|
||||
_projekt.ExportType = value;
|
||||
|
||||
if (_selectedNorm == EExportType.KANDIS)
|
||||
if (_projekt.ExportType == EExportType.KANDIS)
|
||||
{
|
||||
KandisVisible = Visibility.Visible;
|
||||
XmlVisible = Visibility.Collapsed;
|
||||
}
|
||||
else if(_selectedNorm == EExportType.XML)
|
||||
else if(_projekt.ExportType == EExportType.XML)
|
||||
{
|
||||
XmlVisible = Visibility.Visible;
|
||||
KandisVisible = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
OnPropertyChanged();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
public EKodierungssystem SelectedKodier
|
||||
{
|
||||
get => _selectedKodier;
|
||||
set
|
||||
{
|
||||
if(_selectedKodier != value)
|
||||
{
|
||||
_selectedKodier = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,11 +97,41 @@ namespace StammGenerator.ViewModel
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Projekt Projekt
|
||||
{
|
||||
get => _projekt;
|
||||
set
|
||||
{
|
||||
if(value != _projekt)
|
||||
{
|
||||
_projekt = value;
|
||||
//SelectedExport = _projekt.ExportType;
|
||||
if(_projekt.ExportType == EExportType.KANDIS)
|
||||
{
|
||||
_kandisVisible = Visibility.Visible;
|
||||
_xmlVisible = Visibility.Collapsed;
|
||||
}
|
||||
else if(_projekt.ExportType == EExportType.XML)
|
||||
{
|
||||
_xmlVisible = Visibility.Visible;
|
||||
_kandisVisible = Visibility.Collapsed;
|
||||
}
|
||||
OnPropertyChanged();
|
||||
OnPropertyChanged(nameof(SelectedNorm));
|
||||
OnPropertyChanged(nameof(SelectedExport));
|
||||
OnPropertyChanged(nameof(KandisVisible));
|
||||
OnPropertyChanged(nameof(XmlVisible));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ProjektSettingsViewModel()
|
||||
{
|
||||
SelectedNorm = EExportType.XML;
|
||||
|
||||
//SelectedExport = EExportType.XML;
|
||||
//this.Projekt = new Projekt();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<converter:ValueToEntConverter x:Key="EqualValueToEntwaesserungConverter" />
|
||||
<converter:EqualValueToParameterConverter x:Key="EqualValueToParameterConverter" />
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid>
|
||||
@@ -59,9 +59,9 @@
|
||||
<TextBox Grid.Row="1" Grid.Column="1" Width="200" HorizontalAlignment="Left" Margin="5,5,5,5" Text="{Binding Durchmesser}" Grid.ColumnSpan="2" />
|
||||
<TextBox Grid.Row="2" Grid.Column="1" Width="100" HorizontalAlignment="Left" Margin="5,5,5,5" Text="{Binding Haltungslaenge}" Grid.ColumnSpan="2" />
|
||||
<DockPanel Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2">
|
||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Regenwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToEntwaesserungConverter},ConverterParameter={x:Static stat:EEntwaeserung.Regenwasser}}" />
|
||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Schmutzwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToEntwaesserungConverter},ConverterParameter={x:Static stat:EEntwaeserung.Schmutzwasser}}" />
|
||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Mischwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToEntwaesserungConverter},ConverterParameter={x:Static stat:EEntwaeserung.Mischwasser}}" />
|
||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Regenwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToParameterConverter},ConverterParameter={x:Static stat:EEntwaeserung.Regenwasser}}" />
|
||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Schmutzwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToParameterConverter},ConverterParameter={x:Static stat:EEntwaeserung.Schmutzwasser}}" />
|
||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Mischwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToParameterConverter},ConverterParameter={x:Static stat:EEntwaeserung.Mischwasser}}" />
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="1357.579" d:DesignWidth="820.842">
|
||||
<d:UserControl.DataContext>
|
||||
<viewmodel:ProjektSettingsViewModel SelectedNorm="XML"/>
|
||||
<viewmodel:ProjektSettingsViewModel />
|
||||
</d:UserControl.DataContext>
|
||||
<UserControl.Resources>
|
||||
<converter:ValueToExportConverter x:Key="EqualValueToExportConverter" />
|
||||
<converter:EqualValueToParameterConverter x:Key="EqualValueToParameterConverter" />
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
@@ -23,45 +23,39 @@
|
||||
|
||||
<Grid Grid.Row="0" Margin="20,20,20,20">
|
||||
<StackPanel>
|
||||
<RadioButton GroupName="MainNorm" x:Name="XML" Content="XML" IsChecked="{Binding SelectedNorm,Converter={StaticResource EqualValueToExportConverter}, ConverterParameter={x:Static stat:EExportType.XML}}" />
|
||||
<RadioButton GroupName="MainNorm" x:Name="KANDIS" Content="KANDIS" IsChecked="{Binding SelectedNorm,Converter={StaticResource EqualValueToExportConverter}, ConverterParameter={x:Static stat:EExportType.KANDIS}}" />
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="MainNorm" x:Name="XML" Content="XML" IsChecked="{Binding SelectedExport,Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Static stat:EExportType.XML}}" />
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="MainNorm" x:Name="KANDIS" Content="KANDIS" IsChecked="{Binding SelectedExport,Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Static stat:EExportType.KANDIS}}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" Margin="20" Visibility="{Binding KandisVisible}">
|
||||
<!-- KANDIS -->
|
||||
<StackPanel>
|
||||
<RadioButton Content="KANDIS 4.0" />
|
||||
<RadioButton Content="KANDIS 6.0" />
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="KANDIS" Content="KANDIS 4.0" IsChecked="{Binding SelectedExport, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Static stat:EExportType.KANDIS4}}" />
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="KANDIS" Content="KANDIS 6.0" IsChecked="{Binding SelectedExport, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Static stat:EExportType.KANDIS6}}" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" Margin="20" Visibility="{Binding XmlVisible}">
|
||||
<!-- XML-->
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition />
|
||||
<RowDefinition />
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0">
|
||||
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2003 / Ohne nationale Festlegung</RadioButton>
|
||||
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2003 / Nationale Festlegung DWA M 149-2</RadioButton>
|
||||
<RadioButton GroupName="Norm" IsEnabled="False">DIN - EN 13508 - 2: 2003 / andere nationale Festlegung (Bemerkung erforderlich)</RadioButton>
|
||||
<RadioButton GroupName="Norm" IsEnabled="False">ISYBAU 2001</RadioButton>
|
||||
<RadioButton GroupName="Norm" IsEnabled="False">ISYBAU 1996</RadioButton>
|
||||
<RadioButton GroupName="Norm" IsEnabled="False">anderes Kodiersystem (Bemerkung erfolrderlich)</RadioButton>
|
||||
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2003 / Nationale Festlegung Arbeitshilfen Abwasser</RadioButton>
|
||||
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2011 / Ohne nationale Festlegung</RadioButton>
|
||||
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2011 / Nationale Festlegung DWA M 149 - 2</RadioButton>
|
||||
<RadioButton GroupName="Norm">DIN - EN 13508 - 2: 2011 / Nationale Festlegung Arbeitshilfen Abwasser</RadioButton>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Row="1">
|
||||
<RadioButton GroupName="Regelwerk" IsEnabled="False">Arbeitshilfen Abwasser (ISYBAU 1996/2001)</RadioButton>
|
||||
<RadioButton GroupName="Regelwerk">Arbeitshilfen Abwasser (ISYBAU 2006)</RadioButton>
|
||||
<RadioButton GroupName="Regelwerk" IsEnabled="False">Sonstige Festlegungen</RadioButton>
|
||||
<RadioButton GroupName="Regelwerk" IsEnabled="False">keine Angaben</RadioButton>
|
||||
<RadioButton GroupName="Regelwerk">Arbeitshilfen Abwasser (ISYBAU 2013)</RadioButton>
|
||||
<RadioButton GroupName="Regelwerk">Arbeitshilfen Abwasser (ISYBAU 2017)</RadioButton>
|
||||
<StackPanel>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Norm" IsChecked="{Binding SelectedKodier, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Static stat:EKodierungssystem.EN13508_2_2003}}">DIN - EN 13508 - 2: 2003 / Ohne nationale Festlegung</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Norm" IsChecked="{Binding SelectedKodier, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Static stat:EKodierungssystem.EN13508_2_2003_DWA_M_192_2}}">DIN - EN 13508 - 2: 2003 / Nationale Festlegung DWA M 149-2</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Norm" IsEnabled="False">DIN - EN 13508 - 2: 2003 / andere nationale Festlegung (Bemerkung erforderlich)</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Norm" IsEnabled="False">ISYBAU 2001</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Norm" IsEnabled="False">ISYBAU 1996</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Norm" IsEnabled="False">anderes Kodiersystem (Bemerkung erfolrderlich)</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Norm" IsChecked="{Binding SelectedKodier, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Static stat:EKodierungssystem.EN13508_2_2003_ARBEITSHILFEN_ABWASSER}}">DIN - EN 13508 - 2: 2003 / Nationale Festlegung Arbeitshilfen Abwasser</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Norm" IsChecked="{Binding SelectedKodier, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Static stat:EKodierungssystem.EN13508_2_2011}}">DIN - EN 13508 - 2: 2011 / Ohne nationale Festlegung</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Norm" IsChecked="{Binding SelectedKodier, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Static stat:EKodierungssystem.EN13508_2_2011_DWA_M_192_2}}">DIN - EN 13508 - 2: 2011 / Nationale Festlegung DWA M 149 - 2</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Norm" IsChecked="{Binding SelectedKodier, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Static stat:EKodierungssystem.EN13508_2_2011_ARBEITSHILFEN_ABWASSER}}">DIN - EN 13508 - 2: 2011 / Nationale Festlegung Arbeitshilfen Abwasser</RadioButton>
|
||||
<Button Content="Trenner" IsEnabled="False" />
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Regelwerk" IsEnabled="False">Arbeitshilfen Abwasser (ISYBAU 1996/2001)</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Regelwerk" IsChecked="{Binding SelectedExport, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Static stat:EExportType.XML2006}}" >Arbeitshilfen Abwasser (ISYBAU 2006)</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Regelwerk" IsEnabled="False">Sonstige Festlegungen</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Regelwerk" IsEnabled="False">keine Angaben</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Regelwerk" IsChecked="{Binding SelectedExport, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Static stat:EExportType.XML2013}}">Arbeitshilfen Abwasser (ISYBAU 2013)</RadioButton>
|
||||
<RadioButton Style="{StaticResource SmallToggleButtonList}" GroupName="Regelwerk" IsChecked="{Binding SelectedExport, Converter={StaticResource EqualValueToParameterConverter}, ConverterParameter={x:Static stat:EExportType.XML2017}}">Arbeitshilfen Abwasser (ISYBAU 2017)</RadioButton>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
xmlns:stat="clr-namespace:SewerStammGen.Shared.Enum;assembly=SewerStammGen.Shared"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<UserControl.Resources>
|
||||
<converter:ValueToEntConverter x:Key="EqualValueToEntwaesserungConverter" />
|
||||
<converter:EqualValueToParameterConverter x:Key="EqualValueToParameterConverter" />
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -49,9 +49,9 @@
|
||||
<TextBox Margin="2" Grid.Column="1" Grid.Row="6" Text="{Binding SohlHoehe}" />
|
||||
|
||||
<DockPanel Grid.Column="1" Grid.Row="7">
|
||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Regenwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToEntwaesserungConverter},ConverterParameter={x:Static stat:EEntwaeserung.Regenwasser}}" />
|
||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Schmutzwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToEntwaesserungConverter},ConverterParameter={x:Static stat:EEntwaeserung.Schmutzwasser}}" />
|
||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Mischwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToEntwaesserungConverter},ConverterParameter={x:Static stat:EEntwaeserung.Mischwasser}}" />
|
||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Regenwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToParameterConverter},ConverterParameter={x:Static stat:EEntwaeserung.Regenwasser}}" />
|
||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Schmutzwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToParameterConverter},ConverterParameter={x:Static stat:EEntwaeserung.Schmutzwasser}}" />
|
||||
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Mischwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToParameterConverter},ConverterParameter={x:Static stat:EEntwaeserung.Mischwasser}}" />
|
||||
</DockPanel>
|
||||
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Grid>
|
||||
<Rectangle Name="rect" Fill="#FF808080" Stretch="Fill"/>
|
||||
<ContentPresenter VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5" RecognizesAccessKey="True" TextBlock.FontFamily="Seggeo" TextBlock.FontSize="16" TextBlock.Foreground="#FFFFFFFF" TextBlock.FontWeight="Light" />
|
||||
<ContentPresenter VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5"
|
||||
RecognizesAccessKey="True" TextBlock.FontFamily="Seggeo" TextBlock.FontSize="16"
|
||||
TextBlock.Foreground="#FFFFFFFF" TextBlock.FontWeight="Light" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="UIElement.IsMouseOver" Value="True">
|
||||
@@ -27,4 +29,37 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="SmallToggleButtonList" TargetType="{x:Type RadioButton}">
|
||||
<Setter Property="FrameworkElement.OverridesDefaultStyle" Value="True"/>
|
||||
<Setter Property="FrameworkElement.FocusVisualStyle" Value="{x:Null}"/>
|
||||
<Setter Property="Height" Value="40" />
|
||||
<Setter Property="Width" Value="auto" />
|
||||
<Setter Property="Margin" Value="2" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type RadioButton}">
|
||||
<Grid>
|
||||
<Rectangle x:Name="rect" Fill="#FF808080" Stretch="Fill" />
|
||||
<ContentPresenter VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5" RecognizesAccessKey="True"
|
||||
TextBlock.FontFamily="Seggeo" TextBlock.FontSize="12"
|
||||
TextBlock.Foreground="#FFFFFFFF" TextBlock.FontWeight="Light" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="UIElement.IsMouseOver" Value="True">
|
||||
<Setter TargetName="rect" Property="Shape.Fill" Value="BlueViolet"/>
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
||||
</Trigger>
|
||||
<Trigger Property="RadioButton.IsChecked" Value="True">
|
||||
<Setter TargetName="rect" Property="Shape.Fill" Value="BlueViolet" />
|
||||
<Setter Property="Foreground" Value="#FFFFFFFF" />
|
||||
</Trigger>
|
||||
<Trigger Property="RadioButton.IsEnabled" Value="False">
|
||||
<Setter TargetName="rect" Property="Shape.Fill" Value="DarkGray" />
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user