From 5be2a86369737f38910f50963da464133e6022a4 Mon Sep 17 00:00:00 2001 From: Hirek193 Date: Tue, 16 Jun 2026 21:21:44 +0200 Subject: [PATCH] nav menu translations --- StarterNG/Assets/Langs/English.axaml | 8 ++++++++ StarterNG/Assets/Langs/Polski.axaml | 8 ++++++++ StarterNG/MainWindow.axaml | 28 ++++++++++++++++++++++------ StarterNG/MainWindow.axaml.cs | 14 ++++++++++++++ 4 files changed, 52 insertions(+), 6 deletions(-) diff --git a/StarterNG/Assets/Langs/English.axaml b/StarterNG/Assets/Langs/English.axaml index 3fe5713..e7cbe9f 100644 --- a/StarterNG/Assets/Langs/English.axaml +++ b/StarterNG/Assets/Langs/English.axaml @@ -1,11 +1,19 @@  + + + Scenarios + Depot + Settings + Controls + Sceneries Vehicles Scenario description Consist Start + Open latest simulation log Vehicle database diff --git a/StarterNG/Assets/Langs/Polski.axaml b/StarterNG/Assets/Langs/Polski.axaml index 28545e2..418b153 100644 --- a/StarterNG/Assets/Langs/Polski.axaml +++ b/StarterNG/Assets/Langs/Polski.axaml @@ -1,11 +1,19 @@  + + + Scenariusze + Zajezdnia + Ustawienia + Sterowanie + Scenerie Pojazdy Opis scenariusza Zestawienie Uruchom + Otwórz ostatni log symulatora Baza pojazdów diff --git a/StarterNG/MainWindow.axaml b/StarterNG/MainWindow.axaml index e282b51..9845967 100644 --- a/StarterNG/MainWindow.axaml +++ b/StarterNG/MainWindow.axaml @@ -7,12 +7,22 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:svg="clr-namespace:Avalonia.Svg;assembly=Avalonia.Svg" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:views="clr-namespace:StarterNG.Views" BackgroundStyle="Bubble" + xmlns:views="clr-namespace:StarterNG.Views" + xmlns:starterNg="clr-namespace:StarterNG" + BackgroundStyle="Flat" Title="MaSzyna - Symulator pojazdów szynowych" Height="800" Width="1000" WindowStartupLocation="CenterScreen"> + + + - + @@ -22,7 +32,9 @@ - + @@ -32,7 +44,9 @@ - + @@ -42,7 +56,9 @@ - + @@ -71,7 +87,7 @@ - diff --git a/StarterNG/MainWindow.axaml.cs b/StarterNG/MainWindow.axaml.cs index f281283..bd18461 100644 --- a/StarterNG/MainWindow.axaml.cs +++ b/StarterNG/MainWindow.axaml.cs @@ -1,4 +1,6 @@ +using System; using System.Diagnostics; +using System.IO; using System.Text; using Avalonia.Controls; using Avalonia.Interactivity; @@ -25,4 +27,16 @@ public partial class MainWindow : SukiWindow UseShellExecute = true }); } + + private void openLastLogClick(object? sender, RoutedEventArgs e) + { + string logPath = "log.txt"; + if (File.Exists(logPath)) + { + Process.Start(new ProcessStartInfo(logPath) + { + UseShellExecute = true + }); + } + } } \ No newline at end of file