Revisionschächte werden nun mit abgelegt.

This commit is contained in:
2023-07-24 19:51:45 +02:00
parent cea3fc448b
commit a0067655b4
5 changed files with 31 additions and 3 deletions

View File

@@ -138,6 +138,19 @@ namespace StammGenerator.ViewModel
} }
} }
public ESchachtType SchachtType
{
get => _model.SchachtType;
set
{
if(_model.SchachtType != value)
{
_model.SchachtType = value;
OnPropertyChanged();
}
}
}
public ManholeEditViewModel(ISchachtDataService schachtDataService,IActualState actualState, IRenavigator renavigator) public ManholeEditViewModel(ISchachtDataService schachtDataService,IActualState actualState, IRenavigator renavigator)
{ {
_schachtDataService = schachtDataService; _schachtDataService = schachtDataService;

View File

@@ -29,6 +29,7 @@
<RowDefinition Height="auto" /> <RowDefinition Height="auto" />
<RowDefinition Height="auto" /> <RowDefinition Height="auto" />
<RowDefinition Height="auto" /> <RowDefinition Height="auto" />
<RowDefinition Height="auto" />
<RowDefinition /> <RowDefinition />
</Grid.RowDefinitions> </Grid.RowDefinitions>
@@ -42,6 +43,7 @@
<Label Grid.Column="0" Grid.Row="7" Content="Vermesser" /> <Label Grid.Column="0" Grid.Row="7" Content="Vermesser" />
<Label Grid.Column="0" Grid.Row="8" Content="Aufnahmedatum" /> <Label Grid.Column="0" Grid.Row="8" Content="Aufnahmedatum" />
<Label Grid.Column="0" Grid.Row="9" Content="Entwässerungsart" /> <Label Grid.Column="0" Grid.Row="9" Content="Entwässerungsart" />
<Label Grid.Column="0" Grid.Row="10" Content="SchachtType" />
<TextBox Margin="2" Grid.Column="1" Grid.Row="0" Text="{Binding Objektbezeichnung}" /> <TextBox Margin="2" Grid.Column="1" Grid.Row="0" Text="{Binding Objektbezeichnung}" />
<TextBox Margin="2" Grid.Column="1" Grid.Row="1" Text="{Binding DeckelRechtsWert}" /> <TextBox Margin="2" Grid.Column="1" Grid.Row="1" Text="{Binding DeckelRechtsWert}" />
@@ -59,8 +61,14 @@
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Mischwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToParameterConverter},ConverterParameter={x:Static stat:EEntwaeserung.Mischwasser}}" /> <RadioButton Style="{StaticResource ToggleButtonList}" Content="Mischwasser" IsChecked="{Binding Entwaeserung, Converter={StaticResource EqualValueToParameterConverter},ConverterParameter={x:Static stat:EEntwaeserung.Mischwasser}}" />
</DockPanel> </DockPanel>
<DockPanel Grid.Column="1" Grid.Row="10">
<!-- SchachtType-->
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Hauptkanal" IsChecked="{Binding SchachtType, Converter={StaticResource EqualValueToParameterConverter},ConverterParameter={x:Static stat:ESchachtType.Hauptkanal}}" />
<RadioButton Style="{StaticResource ToggleButtonList}" Content="Revision" IsChecked="{Binding SchachtType, Converter={StaticResource EqualValueToParameterConverter},ConverterParameter={x:Static stat:ESchachtType.Revisionschacht}}" />
</DockPanel>
<StackPanel Grid.ColumnSpan="2" Grid.Row="10">
<StackPanel Grid.ColumnSpan="2" Grid.Row="11">
<Button Content="Speichern" Command="{Binding Speichern}" /> <Button Content="Speichern" Command="{Binding Speichern}" />
</StackPanel> </StackPanel>

View File

@@ -20,6 +20,7 @@
<!--<DataGridTextColumn Header="Sohlhöhe" Binding="{Binding SohlHoehe}" />--> <!--<DataGridTextColumn Header="Sohlhöhe" Binding="{Binding SohlHoehe}" />-->
<!--<DataGridTextColumn Header="Deckelhöhe" Binding="{Binding DeckelHoehe}" />--> <!--<DataGridTextColumn Header="Deckelhöhe" Binding="{Binding DeckelHoehe}" />-->
<DataGridTextColumn Header="Entwässerung" Binding="{Binding Entwaesserung}" /> <DataGridTextColumn Header="Entwässerung" Binding="{Binding Entwaesserung}" />
<DataGridTextColumn Header="SchachtTyp" Binding="{Binding SchachtType}" />
</DataGrid.Columns> </DataGrid.Columns>
</DataGrid> </DataGrid>
<StackPanel Grid.Row="1"> <StackPanel Grid.Row="1">

View File

@@ -15,7 +15,8 @@ namespace WWTech_KanalSchnittstelle.Exporter.Kandis
public async Task<bool> Export(string projektname,EKodierungssystem kodierungssystem, List<Kanal> haltungen, List<Schacht> schaechte, IWWLog log) public async Task<bool> Export(string projektname,EKodierungssystem kodierungssystem, List<Kanal> haltungen, List<Schacht> schaechte, IWWLog log)
{ {
KANDIS_HALTUNG60 haltung = new KANDIS_HALTUNG60(projektname, haltungen, log); KANDIS_HALTUNG60 haltung = new KANDIS_HALTUNG60(projektname, haltungen, log);
KANDIS_SCHACHT60 schacht = new KANDIS_SCHACHT60(projektname, schaechte, log); KANDIS_SCHACHT60 hauptschacht = new KANDIS_SCHACHT60(projektname, schaechte.FindAll(x => x.SchachtType == ESchachtType.Hauptkanal), log);
KANDIS_HAUSREV60 revisschacht = new KANDIS_HAUSREV60(projektname, schaechte.FindAll(x => x.SchachtType == ESchachtType.Revisionschacht), log);
return true; return true;
} }
} }

View File

@@ -23,8 +23,13 @@ namespace WWTech_KanalSchnittstelle.Exporter.Kandis
WriteContent(new Tuple<uint, uint>(293,307), schacht.SohlRechtsWert.ToString()); WriteContent(new Tuple<uint, uint>(293,307), schacht.SohlRechtsWert.ToString());
WriteContent(new Tuple<uint, uint>(309, 323), schacht.SohlHochWert.ToString()); WriteContent(new Tuple<uint, uint>(309, 323), schacht.SohlHochWert.ToString());
WriteContent(new Tuple<uint, uint>(325, 334), "1"); // Status Schachtmittelkoordinaten WriteContent(new Tuple<uint, uint>(325, 334), "1"); // Status Schachtmittelkoordinaten
// Deckelkoordinaten
WriteContent(new Tuple<uint, uint>(336, 350), schacht.DeckelRechtsWert.ToString());
WriteContent(new Tuple<uint, uint>(352, 366), schacht.DeckelHochWert.ToString());
WriteContent(new Tuple<uint, uint>(368, 377), "1");
WriteLineInFile();
} }
CloseStream();
} }
} }
} }