Skip to content

Commit 247cfb5

Browse files
committed
Automatic merge of T1.5.1-1201-g5d239654f2 and 16 pull requests
- Pull request #799 at dfc715e: Consolidated wind simulation - Pull request #839 at d00beb9: First phase of https://blueprints.launchpad.net/or/+spec/additional-cruise-control-parameters - Pull request #885 at 8f473ce: feat: Add notifications to Menu - Pull request #891 at 9a1d6b2: Auto save - Pull request #892 at 1f5ba4c: Signal Function OPP_SIG_ID_TRAINPATH - Pull request #952 at 8347095: Investigation - Pulsing graphics - Pull request #953 at a519452: Fix Lights Crash on Corrupt Shapes - Pull request #954 at e715fa4: Multiple Track Profiles & Superelevation Improvements - Pull request #962 at 46d0472: Fix pantographs on unpowered cars - Pull request #972 at e90a2aa: On Map window color changed switch or signal is not changed - Pull request #980 at a7406de: Downloading route content (Github, zip) second part - Pull request #981 at ef9b55d: Multiple type trainset lightglows - Pull request #982 at efcf19c: WEB based Switch Panel enhancement: Alerter - Pull request #983 at 202316e: WEB based Switch Panel bug: DPU window - Pull request #900 at c27f32d: DMI updates - Pull request #876 at f92de76: docs: add source for documents previously on website to source Documentation folder
18 parents 5d7e77e + 5d23965 + dfc715e + d00beb9 + 8f473ce + 9a1d6b2 + 1f5ba4c + 8347095 + a519452 + e715fa4 + 46d0472 + e90a2aa + a7406de + ef9b55d + efcf19c + 202316e + c27f32d + f92de76 commit 247cfb5

File tree

2 files changed

+50
-1
lines changed

2 files changed

+50
-1
lines changed

Source/RunActivity/Viewer3D/Popups/TrainDPUWindow.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ void VerticalWindow_Click(Control arg1, Point arg2)
340340
UpdateWindowSize();
341341
}
342342

343-
private void UpdateWindowSize()
343+
public void UpdateWindowSize()
344344
{
345345
labels = TrainDPUWindowList(Owner.Viewer, normalTextMode).ToList();
346346
ModifyWindowSize();

Source/RunActivity/Viewer3D/WebServices/SwitchPanel/SwitchesOnPanel.cs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ public bool IsPressed(UserCommand userCommand)
195195
case UserCommand.DisplayHUD:
196196
IsPressedDisplayHUD();
197197
return false;
198+
case UserCommand.DisplayTrainDpuWindow:
199+
IsPressedDisplayDpuWindow();
200+
return false;
198201
default:
199202
return true;
200203
}
@@ -328,6 +331,52 @@ private void IsPressedDisplayHUD()
328331
}
329332
}
330333

334+
private void IsPressedDisplayDpuWindow()
335+
{
336+
if (!Viewer.TrainDpuWindow.Visible)
337+
{
338+
// DpuWindow not visible
339+
Viewer.TrainDpuWindow.normalTextMode = true;
340+
Viewer.TrainDpuWindow.normalVerticalMode = true;
341+
Viewer.TrainDpuWindow.Visible = true;
342+
Viewer.TrainDpuWindow.UpdateWindowSize();
343+
}
344+
else
345+
{
346+
// visible
347+
if ((Viewer.TrainDpuWindow.normalTextMode == true) && (Viewer.TrainDpuWindow.normalVerticalMode == true))
348+
{
349+
Viewer.TrainDpuWindow.normalVerticalMode = false;
350+
Viewer.TrainDpuWindow.UpdateWindowSize();
351+
return;
352+
}
353+
354+
if ((Viewer.TrainDpuWindow.normalTextMode == true) && (Viewer.TrainDpuWindow.normalVerticalMode == false))
355+
{
356+
Viewer.TrainDpuWindow.normalTextMode = false;
357+
Viewer.TrainDpuWindow.normalVerticalMode = true;
358+
Viewer.TrainDpuWindow.UpdateWindowSize();
359+
return;
360+
}
361+
362+
if ((Viewer.TrainDpuWindow.normalTextMode == false) && (Viewer.TrainDpuWindow.normalVerticalMode == true))
363+
{
364+
Viewer.TrainDpuWindow.normalVerticalMode = false;
365+
Viewer.TrainDpuWindow.UpdateWindowSize();
366+
return;
367+
}
368+
369+
if ((Viewer.TrainDpuWindow.normalTextMode == false) && (Viewer.TrainDpuWindow.normalVerticalMode == false))
370+
{
371+
Viewer.TrainDpuWindow.normalTextMode = true;
372+
Viewer.TrainDpuWindow.normalVerticalMode = true;
373+
Viewer.TrainDpuWindow.Visible = false;
374+
Viewer.TrainDpuWindow.UpdateWindowSize();
375+
return;
376+
}
377+
}
378+
}
379+
331380
public bool IsChanged()
332381
{
333382
bool changed = false;

0 commit comments

Comments
 (0)