Skip to content

Commit

Permalink
Merge pull request #260 from jannikbecker/staging
Browse files Browse the repository at this point in the history
Version 1.2.2
  • Loading branch information
jannikbecker authored Nov 24, 2024
2 parents c10ef06 + 08d14a3 commit 4ea2aba
Show file tree
Hide file tree
Showing 17 changed files with 1,004 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Leibit.Client.WPF/Leibit.Client.WPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
<Version>1.2.1</Version>
<Version>1.2.2</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<PackageProjectUrl>https://github.com/jannikbecker/leibit</PackageProjectUrl>
<RepositoryUrl>https://github.com/jannikbecker/leibit</RepositoryUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ private void __RefreshCommands()
ShowTrainCompositionCommand.SetCanExecute(SelectedItem.Schedule.Train.Composition.IsNotNullOrWhiteSpace());
ShowLocalOrdersCommand.SetCanExecute(SelectedItem.Schedule.LocalOrders.IsNotNullOrWhiteSpace());
EnterExpectedDelayCommand.SetCanExecute(SelectedItem.State != "beendet");
ShowTrackChangeCommand.SetCanExecute((liveSchedule == null || !liveSchedule.IsArrived) && (SelectedItem.Schedule.Track == null || SelectedItem.Schedule.Track.IsPlatform));
ShowTrackChangeCommand.SetCanExecute(__CanChangeTrack());
ShowDelayJustificationCommand.SetCanExecute(SelectedItem.DelayInfo == 'U');
EnterTrainStateCommand.SetCanExecute(liveSchedule != null && liveSchedule.IsArrived && !liveSchedule.IsDeparted);
}
Expand All @@ -301,6 +301,8 @@ private void __RowDoubleClick()
__ShowDelayJustification();
else if (SelectedColumn == "LocalOrders" && SelectedItem.LocalOrders == 'J')
__ShowLocalOrders();
else if ((SelectedColumn == "Track.Name" || SelectedColumn == "LiveTrack.Name") && __CanChangeTrack())
__ShowTrackChange();
else
__ShowTrainSchedule();
}
Expand All @@ -315,6 +317,14 @@ private void __EnterExpectedDelay()
}
#endregion

#region [__CanChangeTrack]
private bool __CanChangeTrack()
{
var liveSchedule = SelectedItem.CurrentTrain?.Schedules.FirstOrDefault(s => s.Schedule.Station.ShortSymbol == SelectedItem.Schedule.Station.ShortSymbol && s.Schedule.Time == SelectedItem.Schedule.Time);
return (liveSchedule == null || !liveSchedule.IsArrived) && (SelectedItem.Schedule.Track == null || SelectedItem.Schedule.Track.IsPlatform);
}
#endregion

#region [__ShowTrackChange]
private void __ShowTrackChange()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ private bool __CheckOverlap(ChildWindow window, FrameworkElement contentControl,
{
foreach (ChildWindow refWindow in Children)
{
if (window == refWindow)
if (window == refWindow || !refWindow.IsVisible)
continue;

var refContentControl = __GetTemplateChild(refWindow, "DesignerContainerContent");
Expand Down
4 changes: 4 additions & 0 deletions Leibit.Core/Data/Areas.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<leibit>
<area id="nhth" name="Mitteldeutschland">
<estw id="FSP" name="Frankfurt Sportfeld" dataFile="leibit_FF-SPORTFELD.dat" infrastructureManager="DB"/>
<estw id="FF_N" name="Frankfurt Hbf Nordseite" dataFile="leibit_FF-HBF NORDSEITE.dat" infrastructureManager="DB"/>
<estw id="FF_S" name="Frankfurt Hbf Südseite" dataFile="leibit_FF-HBF SÜDSEITE.dat" infrastructureManager="DB"/>
<estw id="FHAU" name="Frankfurt-Hauptwache" dataFile="leibit_FF-HAUPTWACHE.dat" infrastructureManager="DB"/>
<estw id="NWH" name="Würzburg Hbf" dataFile="leibit_WÜRZBURG HBF.dat" infrastructureManager="DB"/>
<estw id="NGM" name="Gemünden" dataFile="leibit_GEMÜNDEN.dat" infrastructureManager="DB"/>
<estw id="NLO" name="Lohr" dataFile="leibit_LOHR.dat" infrastructureManager="DB"/>
Expand Down
218 changes: 218 additions & 0 deletions Leibit.Core/Data/nhth/FF_N.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,218 @@
<?xml version="1.0" encoding="utf-8" ?>
<estw>
<station name="Frankfurt (Main) Hbf" short="FF_N" refNr="2" scheduleFile="G2______.ABF" localOrderFile="bf2_____.abf" displayName="Frankfurt Hbf">
<track name="011" displayName="11">
<block name="02BFSFN3"/>
</track>
<track name="012" displayName="12">
<block name="02BFSFN2"/>
</track>
<track name="013" displayName="13">
<block name="02G013"/>
<block name="02G213"/>
</track>
<track name="014" displayName="14">
<block name="02G014"/>
<block name="02G214"/>
</track>
<track name="015" displayName="15">
<block name="02G015"/>
<block name="02G215"/>
</track>
<track name="016" displayName="16">
<block name="02G016"/>
<block name="02G216"/>
</track>
<track name="017" displayName="17">
<block name="02G017"/>
<block name="02G217"/>
</track>
<track name="018" displayName="18">
<block name="02G018"/>
<block name="02G218"/>
</track>
<track name="019" displayName="19">
<block name="02G019"/>
<block name="02G219"/>
</track>
<track name="020" displayName="20">
<block name="02G020"/>
<block name="02G220"/>
</track>
<track name="021" displayName="21">
<block name="02G021"/>
<block name="02G221"/>
</track>
<track name="022" displayName="22">
<block name="02G022"/>
<block name="02G222"/>
</track>
<track name="023" displayName="23">
<block name="02G023"/>
<block name="02G223"/>
</track>
<track name="024" displayName="24">
<block name="02G024"/>
<block name="02G224"/>
</track>
</station>

<station name="Frankfurt (Main) Hbf" short="FF_S" refNr="1">
<track calculateDelay="false" isPlatform="false">
<block name="02BFSFN1" direction="left"/>
<block name="02BFSFN4" direction="left"/>
</track>
</station>

<station name="Frankfurt (Main) Galluswarte" short="FGA" refNr="21">
<scheduleFile fileName="G21_____.abf">
<track>003</track>
<track>004</track>
<track>105</track>
<track>106</track>
<track>107</track>
<track>200</track>
</scheduleFile>

<track name="003">
<block name="21S003"/>
</track>
<track name="004">
<block name="21S004"/>
</track>
<track name="105">
<block name="21S102"/>
<alternative track="003"/>
<alternative track="004"/>
<alternative track="106"/>
<alternative track="107"/>
</track>
<track name="106">
<block name="21S101"/>
<alternative track="003"/>
<alternative track="004"/>
<alternative track="105"/>
<alternative track="107"/>
</track>
<track name="107">
<block name="21S100"/>
<alternative track="003"/>
<alternative track="004"/>
<alternative track="105"/>
<alternative track="106"/>
</track>
<track name="200">
<block name="21S200"/>
<alternative track="003"/>
<alternative track="004"/>
</track>
</station>

<station name="Frankfurt (Main) West" short="FFW" refNr="22">
<track calculateDelay="false" isPlatform="false">
<block name="21S301" direction="left"/>
<block name="21S302" direction="left"/>
</track>
</station>

<station name="Frankfurt (Main) Hbf (tief)" short="FFT" refNr="3">
<track calculateDelay="false" isPlatform="false">
<block name="03BFTFN1" direction="right"/>
<block name="03BFTFN2" direction="right"/>
</track>
</station>

<station name="Frankfurt (Main) Hoch/Tief" short="FF H" refNr="3" scheduleFile="b3______.ABF">
<track name="113">
<block name="12B113"/>
</track>
<track name="419" isPlatform="false">
<block name="02G419" direction="left"/>
</track>
<track name="519" isPlatform="false">
<block name="02B114" direction="right"/>
</track>
<track name="170" isPlatform="false">
<block name="03G170" direction="left"/>
</track>
<track name="190" isPlatform="false">
<block name="03G12" direction="right"/>
</track>
<track name="070" isPlatform="false">
<block name="03G070" direction="left"/>
</track>
<track name="090" isPlatform="false">
<block name="03B11" direction="right"/>
</track>
<track name="620" isPlatform="false">
<block name="02G620" direction="left"/>
</track>
<track name="621" isPlatform="false">
<block name="02G621" direction="left"/>
</track>
<track name="820" isPlatform="false">
<block name="02G820" direction="right"/>
</track>
</station>

<station name="Frankfurt (Main) Außenbahnhof" short="FFAU" refNr="3">
<track calculateDelay="false" isPlatform="false">
<block name="02BFAFF" direction="left"/>
</track>
</station>

<station name="Frankfurt Mainzer Landstraße" short="FMLA" refNr="6">
<track calculateDelay="false" isPlatform="false">
<block name="02B101" direction="left"/>
</track>
</station>

<station name="Frankfurt am Main Kleyerstraße" short="FKY" refNr="4" scheduleFile="G4______.ABF">
<track name="11" isPlatform="false">
<block name="03B11" direction="left"/>
</track>
<track name="12" isPlatform="false">
<block name="04G12" direction="left"/>
</track>
<track name="91" isPlatform="false">
<block name="04B21" direction="right"/>
</track>
<track name="92" isPlatform="false">
<block name="04G22" direction="right"/>
</track>
<track name="93" isPlatform="false">
<block name="04B01" direction="right"/>
</track>
<track name="94" isPlatform="false">
<block name="12B02" direction="right"/>
</track>
</station>

<station name="Frankfurt-Niederrad" short="FNI" refNr="12" scheduleFile="v12_____.ABF" displayName="F-Niederrad">
<track name="03" displayName="4">
<block name="12S03"/>
</track>
<track name="04" displayName="3">
<block name="12S04"/>
</track>

<track calculateDelay="false" isPlatform="false">
<block name="12S111" direction="left"/>
<block name="12S112" direction="left"/>
</track>
</station>

<station name="Frankfurt Sportfeld" short="FSP" refNr="13">
<track calculateDelay="false" isPlatform="false">
<block name="12S05" direction="left"/>
<block name="12S06" direction="left"/>
</track>
</station>

<station name="Frankfurt-Griesheim" short="FGM" refNr="5">
<track calculateDelay="false" isPlatform="false">
<block name="05B24" direction="left"/>
<block name="04B21" direction="left"/>
</track>
</station>
</estw>
111 changes: 111 additions & 0 deletions Leibit.Core/Data/nhth/FF_S.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8" ?>
<estw>
<station name="Frankfurt (Main) Hbf" short="FF_S" refNr="1" scheduleFile="g1______.abf" localOrderFile="bf1_____.abf" displayName="Frankfurt Hbf">
<track name="100" displayName="1a">
<block name="01G100"/>
</track>
<track name="001" displayName="1">
<block name="01G001"/>
<block name="01G201"/>
</track>
<track name="002" displayName="2">
<block name="01G002"/>
<block name="01G202"/>
</track>
<track name="003" displayName="3">
<block name="01G003"/>
<block name="01G203"/>
</track>
<track name="004" displayName="4">
<block name="01G004"/>
<block name="01G204"/>
</track>
<track name="005" displayName="5">
<block name="01G005"/>
<block name="01G205"/>
</track>
<track name="006" displayName="6">
<block name="01G006"/>
<block name="01G206"/>
</track>
<track name="007" displayName="7">
<block name="01G007"/>
<block name="01G207"/>
</track>
<track name="008" displayName="8">
<block name="01G008"/>
<block name="01G208"/>
</track>
<track name="009" displayName="9">
<block name="01G009"/>
<block name="01G209"/>
</track>
<track name="010" displayName="10">
<block name="01G010"/>
<block name="01G210"/>
</track>
<track name="011" displayName="11">
<block name="01G011"/>
<block name="01G211"/>
</track>
<track name="012" displayName="12">
<block name="01G012"/>
<block name="01G212"/>
</track>
<track name="013" displayName="13">
<block name="01BFNFS1"/>
</track>
</station>

<station name="Frankfurt (Main) Hbf" short="FF_N" refNr="2">
<track calculateDelay="false" isPlatform="false">
<block name="01BFNFS2" direction="left"/>
<block name="01BFNFS3" direction="left"/>
<block name="01BFNFS4" direction="right"/>
</track>
</station>

<station name="Frankfurt Main-Neckar-Brücke" short="FMST" refNr="40">
<track calculateDelay="false" isPlatform="false">
<block name="40S21" direction="left"/>
<block name="40S23" direction="left"/>
<block name="40S03" direction="left"/>
<block name="40S1003" direction="left"/>
</track>
</station>

<station name="Gutleuthof" short="FGUR" refNr="11" scheduleFile="g11_____.abf">
<track name="101" isPlatform="false">
<block name="11B01" direction="left"/>
</track>
<track name="102" isPlatform="false">
<block name="11B02" direction="left"/>
</track>
<track name="103" isPlatform="false">
<block name="11B902" direction="right"/>
</track>
<track name="104" isPlatform="false">
<block name="12B901" direction="right"/>
</track>
<track name="201" isPlatform="false">
<block name="11B11" direction="right"/>
</track>
<track name="202" isPlatform="false">
<block name="06B12" direction="right"/>
</track>
</station>

<station name="Frankfurt-Niederrad" short="FNI" refNr="12">
<track calculateDelay="false" isPlatform="false">
<block name="11B902" direction="left"/>
<block name="12S12G81" direction="left"/>
</track>
</station>

<station name="Frankfurt Mainzer Landstraße" short="FMLA" refNr="6">
<track calculateDelay="false" isPlatform="false">
<block name="11B11" direction="left"/>
<block name="06B12" direction="left"/>
</track>
</station>
</estw>
Loading

0 comments on commit 4ea2aba

Please sign in to comment.