From 72e11ea4620ed279ec0b2c132a30c3c3d4e30a63 Mon Sep 17 00:00:00 2001 From: denglihong2007 <2639367181@qq.com> Date: Thu, 3 Apr 2025 01:02:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=BC=96=E7=A0=81=E5=B9=B6=E6=B7=BB=E5=8A=A0=E4=BB=8E=E8=BD=A6?= =?UTF-8?q?=E6=AC=A1=E6=95=B0=E6=8D=AE=E5=BA=93=E5=AF=BC=E5=85=A5=E8=BD=A6?= =?UTF-8?q?=E7=AB=99=E8=BD=A6=E6=AC=A1=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Converters/TimeSpanJsonConverter.cs | 2 +- CRSim.Core/Models/Json.cs | 2 +- CRSim.Core/Models/Platform.cs | 2 +- CRSim.Core/Models/Section.cs | 2 +- CRSim.Core/Models/Settings.cs | 2 +- CRSim.Core/Models/Station.cs | 2 +- CRSim.Core/Models/StationType.cs | 2 +- CRSim.Core/Models/Ticket.cs | 2 +- CRSim.Core/Models/Tickets.cs | 2 +- CRSim.Core/Models/TrainNumber.cs | 2 +- CRSim.Core/Models/TrainStop.cs | 2 +- CRSim.Core/Models/WaitingArea.cs | 2 +- CRSim.Core/Services/DatabaseService.cs | 2 +- CRSim.Core/Services/IDatabaseService.cs | 2 +- CRSim.Core/Services/INetworkService.cs | 4 +- CRSim.Core/Services/ISettingsService.cs | 2 +- CRSim.Core/Services/ITimeService.cs | 2 +- CRSim.Core/Services/NetworkService.cs | 4 +- CRSim.Core/Services/SettingsService.cs | 2 +- CRSim.Core/Services/TimeService.cs | 2 +- .../Converters/LandmarkToStringConverter.cs | 2 +- .../Converters/LocationToStringConverter.cs | 2 +- .../MetroDateTimeToStringConverter.cs | 2 +- .../MetroDateTimeToVisibilityConverter.cs | 2 +- .../Converters/NumberToStringConverter.cs | 2 +- .../Converters/TextSpacingConverter.cs | 2 +- .../Converters/TrainStateColorConverter.cs | 2 +- .../Converters/TrainStateConverter.cs | 2 +- CRSim.ScreenSimulator/Models/TrainInfo.cs | 2 +- .../ViewModels/Windows/ScreenViewModel.cs | 2 +- .../Stations/Ankang/ExitScreenViewModel.cs | 2 +- .../BeijingXi/PrimaryScreenViewModel.cs | 2 +- .../PrimaryTicketCheckScreenViewModel.cs | 2 +- .../ChengduDong/SecondaryScreenViewModel.cs | 2 +- .../ChengduMetro/PlatformScreenViewModel.cs | 2 +- .../Fuzhou/TicketCheckScreenViewModel.cs | 2 +- .../SecondaryScreenViewModel.cs | 2 +- .../Guangyuan/PrimaryScreenViewModel.cs | 2 +- .../Hanzhong/PlatformScreenViewModel.cs | 2 +- .../Stations/Harbin/PrimaryScreenViewModel.cs | 2 +- .../Stations/Jinanxi/SmallScreenViewModel.cs | 2 +- .../Shanghai/OutsideScreenViewModel.cs | 2 +- .../Tianjin/PlatformScreenViewModel.cs | 2 +- .../Stations/Zibo/PrimaryScreenViewModel.cs | 2 +- .../Stations/Zibo/SecondaryScreenViewModel.cs | 2 +- .../Stations/Ankang/ExitScreenView.xaml.cs | 2 +- .../BeijingXi/PrimaryScreenView.xaml.cs | 2 +- .../PrimaryTicketCheckScreenView.xaml.cs | 2 +- .../ChengduDong/SecondaryScreenView.xaml.cs | 2 +- .../ChengduMetro/PlatformScreenView.xaml.cs | 2 +- .../Fuzhou/TicketCheckScreenView.xaml.cs | 2 +- .../SecondaryScreenView.xaml.cs | 2 +- .../Guangyuan/PrimaryScreenView.xaml.cs | 2 +- .../Hanzhong/PlatformScreenView.xaml.cs | 2 +- .../Stations/Harbin/PrimaryScreenView.xaml.cs | 2 +- .../Stations/Jinanxi/SmallScreenView.xaml.cs | 2 +- .../Shanghai/OutsideScreenView.xaml.cs | 2 +- .../Tianjin/PlatformScreenView.xaml.cs | 2 +- .../Stations/Zibo/PrimaryScreenView.xaml.cs | 2 +- .../Stations/Zibo/SecondaryScreenView.xaml.cs | 2 +- .../Converters/DateTimeToStringConverter.cs | 2 +- .../Converters/EmptyToVisibilityConverter.cs | 2 +- .../Converters/ListToStringConverter.cs | 2 +- .../Converters/TimeSpanToStringConverter.cs | 2 +- CRSim/App.xaml.cs | 2 +- CRSim/Controls/HeaderTile.xaml.cs | 2 +- CRSim/Controls/TileGallery.xaml.cs | 2 +- .../BooleanToVisibilityConverter.cs | 2 +- CRSim/MainWindow.xaml.cs | 2 +- CRSim/Models/NavigatedEventArgs.cs | 2 +- CRSim/Properties/GlobalUsings.cs | 2 +- CRSim/Services/DialogService.cs | 2 +- CRSim/Services/IDialogService.cs | 2 +- CRSim/Services/INavigationService.cs | 2 +- CRSim/Services/NavigationService.cs | 2 +- CRSim/Utility.cs | 2 +- .../Pages/DashboardPageViewModel.cs | 2 +- .../StationManagementPageViewModel.cs | 444 +++++++++--------- .../TrainNumberManagementPageViewModel.cs | 122 ++--- .../Pages/DataManagementPageViewModel.cs | 4 +- .../ViewModels/Pages/SettingsPageViewModel.cs | 2 +- .../ScreenSimulationPageViewModel.cs | 2 +- .../WebsiteSimulationPageViewModel.cs | 2 +- .../Pages/StartSimulationPageViewModel.cs | 4 +- .../ViewModels/Windows/MainWindowViewModel.cs | 2 +- CRSim/Views/Pages/DashboardPage.xaml.cs | 2 +- .../DataManagement/StationManagementPage.xaml | 9 +- .../StationManagementPage.xaml.cs | 2 +- .../TrainNumberManagementPage.xaml.cs | 2 +- CRSim/Views/Pages/DataManagementPage.xaml.cs | 2 +- CRSim/Views/Pages/SettingsPage.xaml.cs | 2 +- .../Simulation/ScreenSimulationPage.xaml.cs | 2 +- .../Simulation/WebsiteSimulationPage.xaml.cs | 2 +- CRSim/Views/Pages/StartSimulationPage.xaml.cs | 2 +- .../Windows/Dialogs/ConfirmDialog.xaml.cs | 2 +- .../Views/Windows/Dialogs/InputDialog.xaml.cs | 2 +- .../Windows/Dialogs/LongMessageDialog.xaml.cs | 2 +- .../Windows/Dialogs/MessageDialog.xaml.cs | 2 +- .../Windows/Dialogs/PlatformDialog.xaml.cs | 2 +- .../Windows/Dialogs/TicketCheckDialog.xaml.cs | 2 +- .../Dialogs/TrainNumberStopDialog.xaml.cs | 2 +- .../Windows/Dialogs/TrainStopDialog.xaml.cs | 2 +- 102 files changed, 393 insertions(+), 388 deletions(-) diff --git a/CRSim.Core/Converters/TimeSpanJsonConverter.cs b/CRSim.Core/Converters/TimeSpanJsonConverter.cs index 1353b60..d3cd621 100644 --- a/CRSim.Core/Converters/TimeSpanJsonConverter.cs +++ b/CRSim.Core/Converters/TimeSpanJsonConverter.cs @@ -1,4 +1,4 @@ -using System.Text.Json.Serialization; +using System.Text.Json.Serialization; using System.Text.Json; namespace CRSim.Core.Converters diff --git a/CRSim.Core/Models/Json.cs b/CRSim.Core/Models/Json.cs index 6e0ab43..cdd4428 100644 --- a/CRSim.Core/Models/Json.cs +++ b/CRSim.Core/Models/Json.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/CRSim.Core/Models/Platform.cs b/CRSim.Core/Models/Platform.cs index f80716a..c808f13 100644 --- a/CRSim.Core/Models/Platform.cs +++ b/CRSim.Core/Models/Platform.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/CRSim.Core/Models/Section.cs b/CRSim.Core/Models/Section.cs index df7f1da..8a9f0e0 100644 --- a/CRSim.Core/Models/Section.cs +++ b/CRSim.Core/Models/Section.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/CRSim.Core/Models/Settings.cs b/CRSim.Core/Models/Settings.cs index bdc0cb9..095af80 100644 --- a/CRSim.Core/Models/Settings.cs +++ b/CRSim.Core/Models/Settings.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Converters; +using CRSim.Core.Converters; using System.Text.Json.Serialization; namespace CRSim.Core.Models diff --git a/CRSim.Core/Models/Station.cs b/CRSim.Core/Models/Station.cs index 27de33c..847885f 100644 --- a/CRSim.Core/Models/Station.cs +++ b/CRSim.Core/Models/Station.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/CRSim.Core/Models/StationType.cs b/CRSim.Core/Models/StationType.cs index 37d9183..646b2aa 100644 --- a/CRSim.Core/Models/StationType.cs +++ b/CRSim.Core/Models/StationType.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/CRSim.Core/Models/Ticket.cs b/CRSim.Core/Models/Ticket.cs index 40c59ed..52c1162 100644 --- a/CRSim.Core/Models/Ticket.cs +++ b/CRSim.Core/Models/Ticket.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/CRSim.Core/Models/Tickets.cs b/CRSim.Core/Models/Tickets.cs index e5181d6..ba6dcc7 100644 --- a/CRSim.Core/Models/Tickets.cs +++ b/CRSim.Core/Models/Tickets.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/CRSim.Core/Models/TrainNumber.cs b/CRSim.Core/Models/TrainNumber.cs index 1dbeae9..ce2e2f9 100644 --- a/CRSim.Core/Models/TrainNumber.cs +++ b/CRSim.Core/Models/TrainNumber.cs @@ -1,4 +1,4 @@ -namespace CRSim.Core.Models +namespace CRSim.Core.Models { public class TrainNumber { diff --git a/CRSim.Core/Models/TrainStop.cs b/CRSim.Core/Models/TrainStop.cs index 42420e0..c0f6f43 100644 --- a/CRSim.Core/Models/TrainStop.cs +++ b/CRSim.Core/Models/TrainStop.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Converters; +using CRSim.Core.Converters; using System.Text.Json.Serialization; namespace CRSim.Core.Models diff --git a/CRSim.Core/Models/WaitingArea.cs b/CRSim.Core/Models/WaitingArea.cs index 440166f..9c12efb 100644 --- a/CRSim.Core/Models/WaitingArea.cs +++ b/CRSim.Core/Models/WaitingArea.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/CRSim.Core/Services/DatabaseService.cs b/CRSim.Core/Services/DatabaseService.cs index 289be84..751b925 100644 --- a/CRSim.Core/Services/DatabaseService.cs +++ b/CRSim.Core/Services/DatabaseService.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using System.Text.Json; using System.Text.Json.Serialization; diff --git a/CRSim.Core/Services/IDatabaseService.cs b/CRSim.Core/Services/IDatabaseService.cs index 3d44443..e7880c3 100644 --- a/CRSim.Core/Services/IDatabaseService.cs +++ b/CRSim.Core/Services/IDatabaseService.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using static System.Collections.Specialized.BitVector32; using Section = CRSim.Core.Models.Section; diff --git a/CRSim.Core/Services/INetworkService.cs b/CRSim.Core/Services/INetworkService.cs index 98e96b6..62b4179 100644 --- a/CRSim.Core/Services/INetworkService.cs +++ b/CRSim.Core/Services/INetworkService.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using System; using System.Collections.Generic; using System.Linq; @@ -10,6 +10,6 @@ namespace CRSim.Core.Services public interface INetworkService { Task?> GetTimeTableAsync(string number); - Task> GetTrainNumnersAsync(string name); + Task> GetTrainNumbersAsync(string name); } } diff --git a/CRSim.Core/Services/ISettingsService.cs b/CRSim.Core/Services/ISettingsService.cs index da71bde..ac6a9e3 100644 --- a/CRSim.Core/Services/ISettingsService.cs +++ b/CRSim.Core/Services/ISettingsService.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using System; using System.Collections.Generic; using System.Linq; diff --git a/CRSim.Core/Services/ITimeService.cs b/CRSim.Core/Services/ITimeService.cs index 158a549..2f7599d 100644 --- a/CRSim.Core/Services/ITimeService.cs +++ b/CRSim.Core/Services/ITimeService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Timers; namespace CRSim.Core.Services diff --git a/CRSim.Core/Services/NetworkService.cs b/CRSim.Core/Services/NetworkService.cs index dd0642d..1e156a8 100644 --- a/CRSim.Core/Services/NetworkService.cs +++ b/CRSim.Core/Services/NetworkService.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using System.Net; using System.Text.Json; @@ -77,7 +77,7 @@ namespace CRSim.Core.Services return null; } - public async Task> GetTrainNumnersAsync(string name) + public async Task> GetTrainNumbersAsync(string name) { var client = new HttpClient(); var stations = (await client.GetStringAsync("https://kyfw.12306.cn/otn/resources/js/framework/station_name.js")).Split("|||"); diff --git a/CRSim.Core/Services/SettingsService.cs b/CRSim.Core/Services/SettingsService.cs index aa887e8..b8a9069 100644 --- a/CRSim.Core/Services/SettingsService.cs +++ b/CRSim.Core/Services/SettingsService.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using Microsoft.Win32; using System.Text.Json; diff --git a/CRSim.Core/Services/TimeService.cs b/CRSim.Core/Services/TimeService.cs index 0ea2b7d..6f5c0ef 100644 --- a/CRSim.Core/Services/TimeService.cs +++ b/CRSim.Core/Services/TimeService.cs @@ -1,4 +1,4 @@ - + using CRSim.Core.Models; using System.Timers; diff --git a/CRSim.ScreenSimulator/Converters/LandmarkToStringConverter.cs b/CRSim.ScreenSimulator/Converters/LandmarkToStringConverter.cs index 4a7088a..5274c50 100644 --- a/CRSim.ScreenSimulator/Converters/LandmarkToStringConverter.cs +++ b/CRSim.ScreenSimulator/Converters/LandmarkToStringConverter.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using System.Windows.Data; namespace CRSim.ScreenSimulator.Converters diff --git a/CRSim.ScreenSimulator/Converters/LocationToStringConverter.cs b/CRSim.ScreenSimulator/Converters/LocationToStringConverter.cs index f1e6b75..8443668 100644 --- a/CRSim.ScreenSimulator/Converters/LocationToStringConverter.cs +++ b/CRSim.ScreenSimulator/Converters/LocationToStringConverter.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using System.Windows.Data; namespace CRSim.ScreenSimulator.Converters diff --git a/CRSim.ScreenSimulator/Converters/MetroDateTimeToStringConverter.cs b/CRSim.ScreenSimulator/Converters/MetroDateTimeToStringConverter.cs index 91d247b..7c5a6f1 100644 --- a/CRSim.ScreenSimulator/Converters/MetroDateTimeToStringConverter.cs +++ b/CRSim.ScreenSimulator/Converters/MetroDateTimeToStringConverter.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Services; +using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using Microsoft.Extensions.DependencyInjection; using System.Globalization; diff --git a/CRSim.ScreenSimulator/Converters/MetroDateTimeToVisibilityConverter.cs b/CRSim.ScreenSimulator/Converters/MetroDateTimeToVisibilityConverter.cs index bad6db9..a51e653 100644 --- a/CRSim.ScreenSimulator/Converters/MetroDateTimeToVisibilityConverter.cs +++ b/CRSim.ScreenSimulator/Converters/MetroDateTimeToVisibilityConverter.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Services; +using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using Microsoft.Extensions.DependencyInjection; using System.Globalization; diff --git a/CRSim.ScreenSimulator/Converters/NumberToStringConverter.cs b/CRSim.ScreenSimulator/Converters/NumberToStringConverter.cs index 1466d99..aa77c84 100644 --- a/CRSim.ScreenSimulator/Converters/NumberToStringConverter.cs +++ b/CRSim.ScreenSimulator/Converters/NumberToStringConverter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; diff --git a/CRSim.ScreenSimulator/Converters/TextSpacingConverter.cs b/CRSim.ScreenSimulator/Converters/TextSpacingConverter.cs index efdfe86..35364d1 100644 --- a/CRSim.ScreenSimulator/Converters/TextSpacingConverter.cs +++ b/CRSim.ScreenSimulator/Converters/TextSpacingConverter.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using System.Windows.Data; namespace CRSim.ScreenSimulator.Converters diff --git a/CRSim.ScreenSimulator/Converters/TrainStateColorConverter.cs b/CRSim.ScreenSimulator/Converters/TrainStateColorConverter.cs index 67b4850..36917dc 100644 --- a/CRSim.ScreenSimulator/Converters/TrainStateColorConverter.cs +++ b/CRSim.ScreenSimulator/Converters/TrainStateColorConverter.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using CRSim.Core.Services; using Microsoft.Extensions.DependencyInjection; using System.Globalization; diff --git a/CRSim.ScreenSimulator/Converters/TrainStateConverter.cs b/CRSim.ScreenSimulator/Converters/TrainStateConverter.cs index a11b893..ae363e6 100644 --- a/CRSim.ScreenSimulator/Converters/TrainStateConverter.cs +++ b/CRSim.ScreenSimulator/Converters/TrainStateConverter.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using CRSim.Core.Services; using Microsoft.Extensions.DependencyInjection; using System.Globalization; diff --git a/CRSim.ScreenSimulator/Models/TrainInfo.cs b/CRSim.ScreenSimulator/Models/TrainInfo.cs index 1d01f87..a7ce9bd 100644 --- a/CRSim.ScreenSimulator/Models/TrainInfo.cs +++ b/CRSim.ScreenSimulator/Models/TrainInfo.cs @@ -1,4 +1,4 @@ -namespace CRSim.ScreenSimulator.Models +namespace CRSim.ScreenSimulator.Models { public class TrainInfo { diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/ScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/ScreenViewModel.cs index 146d842..138d961 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/ScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/ScreenViewModel.cs @@ -1,4 +1,4 @@ -using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.ComponentModel; using CRSim.Core.Services; using CRSim.Core.Models; using CRSim.ScreenSimulator.Models; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Ankang/ExitScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Ankang/ExitScreenViewModel.cs index 53d93a2..9cc0bb6 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Ankang/ExitScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Ankang/ExitScreenViewModel.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Services; +using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using System.Collections.ObjectModel; using CRSim.Core.Models; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/BeijingXi/PrimaryScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/BeijingXi/PrimaryScreenViewModel.cs index 34c6cc7..6976a89 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/BeijingXi/PrimaryScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/BeijingXi/PrimaryScreenViewModel.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using System.Collections.ObjectModel; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/ChengduDong/PrimaryTicketCheckScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/ChengduDong/PrimaryTicketCheckScreenViewModel.cs index f4168fc..39a2c0f 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/ChengduDong/PrimaryTicketCheckScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/ChengduDong/PrimaryTicketCheckScreenViewModel.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using System.Collections.ObjectModel; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/ChengduDong/SecondaryScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/ChengduDong/SecondaryScreenViewModel.cs index 34bd78e..ab018b8 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/ChengduDong/SecondaryScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/ChengduDong/SecondaryScreenViewModel.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using CRSim.Core.Services; using System.Windows; using CRSim.ScreenSimulator.Models; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/ChengduMetro/PlatformScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/ChengduMetro/PlatformScreenViewModel.cs index 507bc7e..6d3b254 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/ChengduMetro/PlatformScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/ChengduMetro/PlatformScreenViewModel.cs @@ -1,4 +1,4 @@ -using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.ComponentModel; using CRSim.Core.Models; using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Fuzhou/TicketCheckScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Fuzhou/TicketCheckScreenViewModel.cs index a2402dc..52fded0 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Fuzhou/TicketCheckScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Fuzhou/TicketCheckScreenViewModel.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Services; +using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using System.Collections.ObjectModel; using CRSim.Core.Models; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/GuangdongIntercity/SecondaryScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/GuangdongIntercity/SecondaryScreenViewModel.cs index f4e014c..e7327b7 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/GuangdongIntercity/SecondaryScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/GuangdongIntercity/SecondaryScreenViewModel.cs @@ -1,4 +1,4 @@ -using System.Windows; +using System.Windows; using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using System.Collections.ObjectModel; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Guangyuan/PrimaryScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Guangyuan/PrimaryScreenViewModel.cs index cfda8ec..bd57589 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Guangyuan/PrimaryScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Guangyuan/PrimaryScreenViewModel.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Services; +using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using System.Collections.ObjectModel; using System.Windows; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Hanzhong/PlatformScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Hanzhong/PlatformScreenViewModel.cs index 3516c0f..e6d9ba8 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Hanzhong/PlatformScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Hanzhong/PlatformScreenViewModel.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Services; +using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using System.Collections.ObjectModel; using System.Windows; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Harbin/PrimaryScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Harbin/PrimaryScreenViewModel.cs index bf700c1..de0585c 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Harbin/PrimaryScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Harbin/PrimaryScreenViewModel.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using System.Collections.ObjectModel; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Jinanxi/SmallScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Jinanxi/SmallScreenViewModel.cs index 473c2ac..5b76543 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Jinanxi/SmallScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Jinanxi/SmallScreenViewModel.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using System.Collections.ObjectModel; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Shanghai/OutsideScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Shanghai/OutsideScreenViewModel.cs index b1e1958..46c9a93 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Shanghai/OutsideScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Shanghai/OutsideScreenViewModel.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Services; +using CRSim.Core.Services; using CRSim.Core.Models; using CRSim.ScreenSimulator.Models; using System.Collections.ObjectModel; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Tianjin/PlatformScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Tianjin/PlatformScreenViewModel.cs index d690715..3c1c199 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Tianjin/PlatformScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Tianjin/PlatformScreenViewModel.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Services; +using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using System.Collections.ObjectModel; using System.Windows; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Zibo/PrimaryScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Zibo/PrimaryScreenViewModel.cs index 091c66c..11d6d73 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Zibo/PrimaryScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Zibo/PrimaryScreenViewModel.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using System.Collections.ObjectModel; diff --git a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Zibo/SecondaryScreenViewModel.cs b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Zibo/SecondaryScreenViewModel.cs index 410ae2c..83c3043 100644 --- a/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Zibo/SecondaryScreenViewModel.cs +++ b/CRSim.ScreenSimulator/ViewModels/Windows/Stations/Zibo/SecondaryScreenViewModel.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; using CRSim.Core.Services; using CRSim.ScreenSimulator.Models; using System.Windows; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/Ankang/ExitScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/Ankang/ExitScreenView.xaml.cs index 670c1e3..537662c 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/Ankang/ExitScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/Ankang/ExitScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.Ankang; +using CRSim.ScreenSimulator.ViewModels.Ankang; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/BeijingXi/PrimaryScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/BeijingXi/PrimaryScreenView.xaml.cs index 1277447..290da2a 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/BeijingXi/PrimaryScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/BeijingXi/PrimaryScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.BeijingXi; +using CRSim.ScreenSimulator.ViewModels.BeijingXi; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/ChengduDong/PrimaryTicketCheckScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/ChengduDong/PrimaryTicketCheckScreenView.xaml.cs index eed3032..ef84b76 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/ChengduDong/PrimaryTicketCheckScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/ChengduDong/PrimaryTicketCheckScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.ChengduDong; +using CRSim.ScreenSimulator.ViewModels.ChengduDong; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/ChengduDong/SecondaryScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/ChengduDong/SecondaryScreenView.xaml.cs index 2d75f87..a06ceec 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/ChengduDong/SecondaryScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/ChengduDong/SecondaryScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.ChengduDong; +using CRSim.ScreenSimulator.ViewModels.ChengduDong; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/ChengduMetro/PlatformScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/ChengduMetro/PlatformScreenView.xaml.cs index f678781..923334c 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/ChengduMetro/PlatformScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/ChengduMetro/PlatformScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.ChengduMetro; +using CRSim.ScreenSimulator.ViewModels.ChengduMetro; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/Fuzhou/TicketCheckScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/Fuzhou/TicketCheckScreenView.xaml.cs index f045d83..f86a868 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/Fuzhou/TicketCheckScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/Fuzhou/TicketCheckScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.Fuzhou; +using CRSim.ScreenSimulator.ViewModels.Fuzhou; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/GuangdongIntercity/SecondaryScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/GuangdongIntercity/SecondaryScreenView.xaml.cs index 0c87931..ff7b4ff 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/GuangdongIntercity/SecondaryScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/GuangdongIntercity/SecondaryScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.GuangdongIntercity; +using CRSim.ScreenSimulator.ViewModels.GuangdongIntercity; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/Guangyuan/PrimaryScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/Guangyuan/PrimaryScreenView.xaml.cs index 4dbec30..cef33b5 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/Guangyuan/PrimaryScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/Guangyuan/PrimaryScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.Guangyuan; +using CRSim.ScreenSimulator.ViewModels.Guangyuan; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/Hanzhong/PlatformScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/Hanzhong/PlatformScreenView.xaml.cs index bf5c709..8111a98 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/Hanzhong/PlatformScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/Hanzhong/PlatformScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.Hanzhong; +using CRSim.ScreenSimulator.ViewModels.Hanzhong; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/Harbin/PrimaryScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/Harbin/PrimaryScreenView.xaml.cs index b2057d0..d3f282a 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/Harbin/PrimaryScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/Harbin/PrimaryScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.Harbin; +using CRSim.ScreenSimulator.ViewModels.Harbin; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/Jinanxi/SmallScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/Jinanxi/SmallScreenView.xaml.cs index ff41c7a..fbf2fa0 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/Jinanxi/SmallScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/Jinanxi/SmallScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.Jinanxi; +using CRSim.ScreenSimulator.ViewModels.Jinanxi; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/Shanghai/OutsideScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/Shanghai/OutsideScreenView.xaml.cs index fb58f12..8a0a0c8 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/Shanghai/OutsideScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/Shanghai/OutsideScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.Shanghai; +using CRSim.ScreenSimulator.ViewModels.Shanghai; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/Tianjin/PlatformScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/Tianjin/PlatformScreenView.xaml.cs index ff0bd3c..6dfe4ef 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/Tianjin/PlatformScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/Tianjin/PlatformScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.Tianjin; +using CRSim.ScreenSimulator.ViewModels.Tianjin; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/Zibo/PrimaryScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/Zibo/PrimaryScreenView.xaml.cs index 0aef33a..24741d9 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/Zibo/PrimaryScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/Zibo/PrimaryScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.Zibo; +using CRSim.ScreenSimulator.ViewModels.Zibo; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.ScreenSimulator/Views/Windows/Stations/Zibo/SecondaryScreenView.xaml.cs b/CRSim.ScreenSimulator/Views/Windows/Stations/Zibo/SecondaryScreenView.xaml.cs index 7002030..a01d014 100644 --- a/CRSim.ScreenSimulator/Views/Windows/Stations/Zibo/SecondaryScreenView.xaml.cs +++ b/CRSim.ScreenSimulator/Views/Windows/Stations/Zibo/SecondaryScreenView.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.ScreenSimulator.ViewModels.Zibo; +using CRSim.ScreenSimulator.ViewModels.Zibo; using System.Windows; using System.Windows.Input; using System.Windows.Media; diff --git a/CRSim.Shared/Converters/DateTimeToStringConverter.cs b/CRSim.Shared/Converters/DateTimeToStringConverter.cs index 51fe929..157ec40 100644 --- a/CRSim.Shared/Converters/DateTimeToStringConverter.cs +++ b/CRSim.Shared/Converters/DateTimeToStringConverter.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using System.Windows.Data; namespace CRSim.Shared.Converters diff --git a/CRSim.Shared/Converters/EmptyToVisibilityConverter.cs b/CRSim.Shared/Converters/EmptyToVisibilityConverter.cs index 0257913..2d85f9f 100644 --- a/CRSim.Shared/Converters/EmptyToVisibilityConverter.cs +++ b/CRSim.Shared/Converters/EmptyToVisibilityConverter.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using System.Windows; using System.Windows.Data; diff --git a/CRSim.Shared/Converters/ListToStringConverter.cs b/CRSim.Shared/Converters/ListToStringConverter.cs index 9500f67..f251549 100644 --- a/CRSim.Shared/Converters/ListToStringConverter.cs +++ b/CRSim.Shared/Converters/ListToStringConverter.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using System.Windows.Data; namespace CRSim.Shared.Converters diff --git a/CRSim.Shared/Converters/TimeSpanToStringConverter.cs b/CRSim.Shared/Converters/TimeSpanToStringConverter.cs index 1144291..3cdcb15 100644 --- a/CRSim.Shared/Converters/TimeSpanToStringConverter.cs +++ b/CRSim.Shared/Converters/TimeSpanToStringConverter.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using System.Windows.Data; namespace CRSim.Shared.Converters diff --git a/CRSim/App.xaml.cs b/CRSim/App.xaml.cs index 20a18c0..4568024 100644 --- a/CRSim/App.xaml.cs +++ b/CRSim/App.xaml.cs @@ -1,4 +1,4 @@ -namespace CRSim +namespace CRSim { /// /// Interaction logic for App.xaml diff --git a/CRSim/Controls/HeaderTile.xaml.cs b/CRSim/Controls/HeaderTile.xaml.cs index 467ab69..28cd860 100644 --- a/CRSim/Controls/HeaderTile.xaml.cs +++ b/CRSim/Controls/HeaderTile.xaml.cs @@ -1,4 +1,4 @@ -namespace CRSim.Controls +namespace CRSim.Controls { /// /// Interaction logic for HeaderTile.xaml diff --git a/CRSim/Controls/TileGallery.xaml.cs b/CRSim/Controls/TileGallery.xaml.cs index 9b20fbd..b8ab471 100644 --- a/CRSim/Controls/TileGallery.xaml.cs +++ b/CRSim/Controls/TileGallery.xaml.cs @@ -1,4 +1,4 @@ -namespace CRSim.Controls +namespace CRSim.Controls { /// /// Interaction logic for TileGallery.xaml diff --git a/CRSim/Converters/BooleanToVisibilityConverter.cs b/CRSim/Converters/BooleanToVisibilityConverter.cs index ae3e129..0dba24d 100644 --- a/CRSim/Converters/BooleanToVisibilityConverter.cs +++ b/CRSim/Converters/BooleanToVisibilityConverter.cs @@ -1,4 +1,4 @@ -namespace CRSim.Converters +namespace CRSim.Converters { public class BooleanToVisibilityConverter : IValueConverter { diff --git a/CRSim/MainWindow.xaml.cs b/CRSim/MainWindow.xaml.cs index 0c38f67..89ee9a8 100644 --- a/CRSim/MainWindow.xaml.cs +++ b/CRSim/MainWindow.xaml.cs @@ -1,4 +1,4 @@ -using System.Windows.Navigation; +using System.Windows.Navigation; namespace CRSim { diff --git a/CRSim/Models/NavigatedEventArgs.cs b/CRSim/Models/NavigatedEventArgs.cs index 1ae8ada..c703533 100644 --- a/CRSim/Models/NavigatedEventArgs.cs +++ b/CRSim/Models/NavigatedEventArgs.cs @@ -1,4 +1,4 @@ -namespace CRSim.Models +namespace CRSim.Models { public class NavigatingEventArgs { diff --git a/CRSim/Properties/GlobalUsings.cs b/CRSim/Properties/GlobalUsings.cs index cb4ea48..486996e 100644 --- a/CRSim/Properties/GlobalUsings.cs +++ b/CRSim/Properties/GlobalUsings.cs @@ -1,4 +1,4 @@ -global using System.IO; +global using System.IO; global using System.Diagnostics; global using System.Globalization; global using System.ComponentModel; diff --git a/CRSim/Services/DialogService.cs b/CRSim/Services/DialogService.cs index 00293d1..d6612ab 100644 --- a/CRSim/Services/DialogService.cs +++ b/CRSim/Services/DialogService.cs @@ -1,4 +1,4 @@ - + namespace CRSim.Services { public class DialogService : IDialogService diff --git a/CRSim/Services/IDialogService.cs b/CRSim/Services/IDialogService.cs index 6c72c86..34be96b 100644 --- a/CRSim/Services/IDialogService.cs +++ b/CRSim/Services/IDialogService.cs @@ -1,4 +1,4 @@ -namespace CRSim.Services +namespace CRSim.Services { public interface IDialogService { diff --git a/CRSim/Services/INavigationService.cs b/CRSim/Services/INavigationService.cs index f016eb6..6167abc 100644 --- a/CRSim/Services/INavigationService.cs +++ b/CRSim/Services/INavigationService.cs @@ -1,4 +1,4 @@ -namespace CRSim.Services +namespace CRSim.Services { public interface INavigationService { diff --git a/CRSim/Services/NavigationService.cs b/CRSim/Services/NavigationService.cs index cae170b..552e401 100644 --- a/CRSim/Services/NavigationService.cs +++ b/CRSim/Services/NavigationService.cs @@ -1,4 +1,4 @@ -namespace CRSim.Services +namespace CRSim.Services { public class NavigationService(IServiceProvider serviceProvider) : INavigationService { diff --git a/CRSim/Utility.cs b/CRSim/Utility.cs index 3c92015..16f6ce2 100644 --- a/CRSim/Utility.cs +++ b/CRSim/Utility.cs @@ -1,4 +1,4 @@ -namespace CRSim +namespace CRSim { internal static class Utility { diff --git a/CRSim/ViewModels/Pages/DashboardPageViewModel.cs b/CRSim/ViewModels/Pages/DashboardPageViewModel.cs index b336658..fa08a4e 100644 --- a/CRSim/ViewModels/Pages/DashboardPageViewModel.cs +++ b/CRSim/ViewModels/Pages/DashboardPageViewModel.cs @@ -1,4 +1,4 @@ -namespace CRSim.ViewModels +namespace CRSim.ViewModels { public partial class DashboardPageViewModel(INavigationService navigationService) : ObservableObject { diff --git a/CRSim/ViewModels/Pages/DataManagement/StationManagementPageViewModel.cs b/CRSim/ViewModels/Pages/DataManagement/StationManagementPageViewModel.cs index bd24f8e..c4edd76 100644 --- a/CRSim/ViewModels/Pages/DataManagement/StationManagementPageViewModel.cs +++ b/CRSim/ViewModels/Pages/DataManagement/StationManagementPageViewModel.cs @@ -11,10 +11,10 @@ public partial class StationManagementPageViewModel : ObservableObject public string Name { get; set; } } [ObservableProperty] - private string _pageTitle = "վ"; + private string _pageTitle = "车站管理"; [ObservableProperty] - private string _pageDescription = "Ǻܰѣǵñ! Owo"; + private string _pageDescription = "看起来不是很温馨的提醒:改完记得保存! Owo"; [ObservableProperty] private bool _isSelected = false; @@ -42,15 +42,15 @@ public partial class StationManagementPageViewModel : ObservableObject _databaseService = databaseService; _dialogService = dialogService; _networkService = networkService; - RefreshStationList(); + RefreshStations(); } - public void RefreshStationList() + #region Station + public void RefreshStations() { var stationsList = _databaseService.GetAllStations(); StationNames = [.. stationsList.Select(s => s.Name)]; } - [RelayCommand] public void StationSelected(object selectedStation) { @@ -58,55 +58,128 @@ public partial class StationManagementPageViewModel : ObservableObject Platforms.Clear(); TicketChecks.Clear(); TrainStops.Clear(); - if(selectedStation is string selectedStationName) + if (selectedStation is string selectedStationName) { SelectedStation = _databaseService.GetStationByName(selectedStationName); - foreach(WaitingArea waitingArea in SelectedStation.WaitingAreas) + foreach (WaitingArea waitingArea in SelectedStation.WaitingAreas) { WaitingAreaNames.Add(waitingArea.Name); foreach (string ticketCheck in waitingArea.TicketChecks) { - TicketChecks.Add(new TicketCheck { WaitingAreaName = waitingArea.Name,Name=ticketCheck }); + TicketChecks.Add(new TicketCheck { WaitingAreaName = waitingArea.Name, Name = ticketCheck }); } } foreach (TrainStop trainStop in SelectedStation.TrainStops) { TrainStops.Add(trainStop); } - foreach(var platform in SelectedStation.Platforms) + foreach (var platform in SelectedStation.Platforms) { Platforms.Add(platform); } IsSelected = true; } - if(selectedStation == null) + if (selectedStation == null) { IsSelected = false; } } + [RelayCommand] + public async Task AddStation() + { + string? station = _dialogService.GetInput("请输入车站名称"); + if (station != null) + { + if (StationNames.Contains(station)) + { + _dialogService.ShowMessage("添加失败", $"车站 {station} 已存在。"); + return; + } + _databaseService.AddStationByName(station); + await _databaseService.SaveData(); + RefreshStations(); + } + } + [RelayCommand] + public async Task DeleteStation(object selectedStation) + { + if (selectedStation is string s && !string.IsNullOrEmpty(s)) + { + _databaseService.DeleteStation(_databaseService.GetStationByName(s)); + await _databaseService.SaveData(); + RefreshStations(); + } + } + [RelayCommand] + public async Task DeleteAllStations() + { + if (!_dialogService.GetConfirm("当前操作会删除全部车站,是否继续?")) return; + foreach (string stationName in StationNames) + { + _databaseService.DeleteStation(_databaseService.GetStationByName(stationName)); + } + await _databaseService.SaveData(); + RefreshStations(); + } + public static Station GenerateStation(string stationName, ObservableCollection waitingAreaNames, ObservableCollection ticketChecks, ObservableCollection trainStops, ObservableCollection platforms) + { + var station = new Station + { + Name = stationName, + WaitingAreas = [.. waitingAreaNames.Select(name => new WaitingArea { Name = name })], + TrainStops = [.. trainStops], + Platforms = [.. platforms] + }; + // 将 TicketCheck 映射到对应的 WaitingArea + foreach (var ticketCheck in ticketChecks) + { + var waitingArea = station.WaitingAreas.FirstOrDefault(wa => wa.Name == ticketCheck.WaitingAreaName); + waitingArea?.TicketChecks.Add(ticketCheck.Name); + } + + return station; + } + [RelayCommand] + public async Task ImportFrom7D() + { + var path = _dialogService.GetFile("可执行程序文件 (*.exe)|*.exe|所有文件 (*.*)|*.*"); + if (path == null) return; + try + { + await _databaseService.ImportStationFrom7D(path); + await _databaseService.SaveData(); + RefreshStations(); + } + catch + { + _dialogService.ShowMessage("导入失败", "文件格式错误或被占用。"); + } + } + #endregion + + #region TicketCheck [RelayCommand] public void AddTicketCheck() { - (string waitingAreaName,List ticketChecks) = _dialogService.GetInputTicketCheck([.. WaitingAreaNames]); + (string waitingAreaName, List ticketChecks) = _dialogService.GetInputTicketCheck([.. WaitingAreaNames]); if (ticketChecks != null && waitingAreaName != null) { - foreach(string ticketCheck in ticketChecks) + foreach (string ticketCheck in ticketChecks) { if (TicketChecks.Select(x => x.Name).Contains(ticketCheck)) { - _dialogService.ShowMessage("ʧ", $" {ticketCheck} ƱѴڡ"); + _dialogService.ShowMessage("添加失败", $"编号 {ticketCheck} 检票口已存在。"); return; } TicketChecks.Add(new TicketCheck { WaitingAreaName = waitingAreaName, Name = ticketCheck }); } } } - [RelayCommand] public void DeleteTicketCheck(object selectedTicketCheck) { - if(selectedTicketCheck is TicketCheck ticketCheck) + if (selectedTicketCheck is TicketCheck ticketCheck) { TicketChecks.Remove(ticketCheck); } @@ -114,28 +187,30 @@ public partial class StationManagementPageViewModel : ObservableObject [RelayCommand] public void DeleteAllTicketCheck() { - if (!_dialogService.GetConfirm("ǰɾȫƱڣǷ")) return; + if (!_dialogService.GetConfirm("当前操作会删除全部检票口,是否继续?")) return; TicketChecks.Clear(); } + #endregion + + #region WaitingArea [RelayCommand] public void AddWaitingArea() { - string? waitingAreaName = _dialogService.GetInput(""); + string? waitingAreaName = _dialogService.GetInput("请输入候车室名称"); if (waitingAreaName != null) { if (WaitingAreaNames.Contains(waitingAreaName)) { - _dialogService.ShowMessage("ʧ",$" {waitingAreaName} Ѵڡ"); + _dialogService.ShowMessage("添加失败", $"名称 {waitingAreaName} 候车室已存在。"); return; } WaitingAreaNames.Add(waitingAreaName); } } - [RelayCommand] public void DeleteWaitingArea(object selectedWaitingArea) { - if(selectedWaitingArea is string n) + if (selectedWaitingArea is string n) { WaitingAreaNames.Remove(n); } @@ -143,9 +218,12 @@ public partial class StationManagementPageViewModel : ObservableObject [RelayCommand] public void DeleteAllWaitingArea() { - if (!_dialogService.GetConfirm("ǰɾȫңǷ")) return; + if (!_dialogService.GetConfirm("当前操作会删除全部候车室,是否继续?")) return; WaitingAreaNames.Clear(); } + #endregion + + #region Platform [RelayCommand] public void AddPlatform() { @@ -154,16 +232,15 @@ public partial class StationManagementPageViewModel : ObservableObject { foreach (var platform in platforms) { - if (Platforms.Any(x=>x.Name==platform.Name)) + if (Platforms.Any(x => x.Name == platform.Name)) { - _dialogService.ShowMessage("ʧ", $" {platform.Name} վ̨Ѵڡ"); + _dialogService.ShowMessage("添加失败", $"编号 {platform.Name} 站台已存在。"); return; } Platforms.Add(platform); } } } - [RelayCommand] public void DeletePlatform(object selectedPlatform) { @@ -175,148 +252,37 @@ public partial class StationManagementPageViewModel : ObservableObject [RelayCommand] public void DeleteAllPlatform() { - if (!_dialogService.GetConfirm("ǰɾȫվ̨Ƿ")) return; + if (!_dialogService.GetConfirm("当前操作会删除全部站台,是否继续?")) return; Platforms.Clear(); } + #endregion + #region TrainStop [RelayCommand] - public async Task AddStation() + public void ImportFromTrainNumbers() { - string? station = _dialogService.GetInput("복վ"); - if (station != null) + if (!CheckCanImport()) return; + var trainNumbers = _databaseService.GetAllTrainNumbers(); + if (trainNumbers.Count != 0) { - if (StationNames.Contains(station)) - { - _dialogService.ShowMessage("ʧ", $"վ {station} Ѵڡ"); - return; - } - _databaseService.AddStationByName(station); - await _databaseService.SaveData(); - RefreshStationList(); + TrainStops.Clear(); } - } - - [RelayCommand] - public async Task DeleteStation(object selectedStation) - { - if (selectedStation is string s && !string.IsNullOrEmpty(s)) + foreach (TrainNumber trainNumber in trainNumbers) { - _databaseService.DeleteStation(_databaseService.GetStationByName(s)); - await _databaseService.SaveData(); - RefreshStationList(); + var t = trainNumber.TimeTable.First(x => x.Station == SelectedStation.Name); + if (t == null) continue; + t.Number = trainNumber.Number; + t = RandomTrainStopProperties(t); + t.Origin = trainNumber.TimeTable.First().Station; + t.Terminal = trainNumber.TimeTable.Last().Station; + TrainStops.Add(t); } } [RelayCommand] - public async Task DeleteAllStations() - { - if (!_dialogService.GetConfirm("ǰɾȫվǷ")) return; - foreach(string stationName in StationNames) - { - _databaseService.DeleteStation(_databaseService.GetStationByName(stationName)); - } - await _databaseService.SaveData(); - RefreshStationList(); - } - [RelayCommand] - public async Task SaveChanges() - { - if (!(await Validate())) return; - _databaseService.UpdateStation(SelectedStation.Name, GenerateStation(SelectedStation.Name,WaitingAreaNames,TicketChecks,TrainStops,Platforms)); - await _databaseService.SaveData(); - } - - private Task Validate() - { - string message = ""; - foreach(var t in TicketChecks) - { - if (!WaitingAreaNames.Contains(t.WaitingAreaName)) - { - message += $"\nƱ {t.Name} ڵĺ {t.WaitingAreaName} ڣ"; - } - } - foreach(var s in TrainStops) - { - if(!Platforms.Any(x=> x.Name == s.Platform)) - { - message += $"\n {s.Number} վ̨ {s.Platform} ڣ"; - } - foreach(var t in s.TicketChecks) - { - if (!TicketChecks.Any(x => x.Name==t)) - { - message += $"\n {s.Number} ļƱ {t} ڣ"; - } - } - if (s.DepartureTime == null && s.ArrivalTime == null) - { - message += $"\n {s.Number} δõʱ䣻"; - } - if (s.Length==0) - { - message += $"\n {s.Number} Ϊ0"; - } - } - if (message == "") return Task.FromResult(true); - _dialogService.ShowMessage("ʧ", $" {message.Split("\n").Length-1} {message}\n޸дٴγԱ档"); - return Task.FromResult(false); - } - - public static Station GenerateStation(string stationName, ObservableCollection waitingAreaNames, ObservableCollection ticketChecks,ObservableCollection trainStops,ObservableCollection platforms) - { - var station = new Station - { - Name = stationName, - WaitingAreas = [.. waitingAreaNames.Select(name => new WaitingArea { Name = name })], - TrainStops = [.. trainStops], - Platforms = [..platforms] - }; - - // TicketCheck ӳ䵽Ӧ WaitingArea - foreach (var ticketCheck in ticketChecks) - { - var waitingArea = station.WaitingAreas.FirstOrDefault(wa => wa.Name == ticketCheck.WaitingAreaName); - waitingArea?.TicketChecks.Add(ticketCheck.Name); - } - - return station; - } - [RelayCommand] - public async Task ImportFromTimeTable() - { - //List stationNamesToAdd = []; - //foreach(TrainNumber trainNumber in _databaseService.GetAllTrainNumbers()) - //{ - // var stationNames = trainNumber.TimeTable.Select(x => x.Station).ToList(); - // foreach(string stationName in stationNames) - // { - // if(!stationNamesToAdd.Contains(stationName) && !StationNames.Contains(stationName)) - // { - // stationNamesToAdd.Add(stationName); - // } - // } - //} - //foreach(string stationName in stationNamesToAdd) - //{ - // _databaseService.AddStationByName(stationName); - //} - //await SaveChanges(); - //RefreshStationList(); - } - [RelayCommand] public async Task ImportFromLulutong() { - if (TicketChecks.Count == 0) - { - _dialogService.ShowMessage("ʧ", "ӼƱڡ"); - return; - } - if (Platforms.Count == 0) - { - _dialogService.ShowMessage("ʧ", "վ̨"); - return; - } - var path = _dialogService.GetFile("CSV ļ (*.csv)|*.csv|ļ (*.*)|*.*"); + if (!CheckCanImport()) return; + var path = _dialogService.GetFile("CSV 文件 (*.csv)|*.csv|所有文件 (*.*)|*.*"); if (path == null) return; try { @@ -357,35 +323,14 @@ public partial class StationManagementPageViewModel : ObservableObject Terminal = data[1].Split("-")[1], ArrivalTime = arrivalTime, DepartureTime = departureTime, - Platform = Platforms[new Random().Next(Platforms.Count)].Name, - Length = firstColumn.StartsWith('G') || firstColumn.StartsWith('D') || firstColumn.StartsWith('C') ? Math.Abs(firstColumn.GetHashCode()) % 3 == 0 ? 8 : 16 : 18, - Landmark = new[] { "ɫ", "ɫ", "ɫ", "ɫ", "ɫ", "ɫ", "ɫ", null }[new Random().Next(8)] }; - trainStop.TicketChecks = [.. TicketChecks.Where(x => x.Name == trainStop.Platform + "A" || x.Name == trainStop.Platform + "B").Select(x => x.Name)]; - if (trainStop.TicketChecks.Count == 0) trainStop.TicketChecks = [TicketChecks[new Random().Next(TicketChecks.Count)].Name]; - TrainStops.Add(trainStop); + TrainStops.Add(RandomTrainStopProperties(trainStop)); } } } catch { - _dialogService.ShowMessage("ʧ", "ļʽռá"); - } - } - [RelayCommand] - public async Task ImportFrom7D() - { - var path = _dialogService.GetFile("ִгļ (*.exe)|*.exe|ļ (*.*)|*.*"); - if (path == null) return; - try - { - await _databaseService.ImportStationFrom7D(path); - await _databaseService.SaveData(); - RefreshStationList(); - } - catch - { - _dialogService.ShowMessage("ʧ", "ļʽռá"); + _dialogService.ShowMessage("导入失败", "文件格式错误或被占用。"); } } [RelayCommand] @@ -393,12 +338,12 @@ public partial class StationManagementPageViewModel : ObservableObject { if (TrainStops.Count != 0) { - if (!_dialogService.GetConfirm("ǰܻʱ̱Ƿ")) + if (!_dialogService.GetConfirm("当前操作可能会清空时刻表。是否继续?")) { return; } } - var path = _dialogService.GetFile("Excel (*.xlsx)|*.xlsx|ļ (*.*)|*.*"); + var path = _dialogService.GetFile("Excel 工作薄 (*.xlsx)|*.xlsx|所有文件 (*.*)|*.*"); if (path == null) return; try { @@ -407,9 +352,9 @@ public partial class StationManagementPageViewModel : ObservableObject var worksheet = package.Workbook.Worksheets[0]; int rowCount = worksheet.Dimension.Rows; TrainStops.Clear(); - for (int row = 2; row <= rowCount; row++) + for (int row = 2; row <= rowCount; row++) { - if (worksheet.Cells[row, 1].Text.Trim() == ""|| + if (worksheet.Cells[row, 1].Text.Trim() == "" || worksheet.Cells[row, 2].Text.Trim() == "" || worksheet.Cells[row, 5].Text.Trim() == "" || worksheet.Cells[row, 6].Text.Trim() == "" || @@ -427,7 +372,7 @@ public partial class StationManagementPageViewModel : ObservableObject DepartureTime = TimeSpan.TryParseExact(worksheet.Cells[row, 4].Text, @"hh\:mm", null, out TimeSpan departure) ? departure : null, TicketChecks = [.. worksheet.Cells[row, 5].Text.Split(' ', StringSplitOptions.RemoveEmptyEntries)], Platform = worksheet.Cells[row, 6].Text.Trim(), - Landmark = worksheet.Cells[row, 7].Text.Trim() == "" ? "" : worksheet.Cells[row, 7].Text.Trim(), + Landmark = worksheet.Cells[row, 7].Text.Trim() == "" ? "无" : worksheet.Cells[row, 7].Text.Trim(), Origin = worksheet.Cells[row, 8].Text.Trim(), Terminal = worksheet.Cells[row, 9].Text.Trim() }); @@ -435,26 +380,26 @@ public partial class StationManagementPageViewModel : ObservableObject } catch { - _dialogService.ShowMessage("ʧ", "ļʽռá"); + _dialogService.ShowMessage("导入失败", "文件格式错误或被占用。"); } } [RelayCommand] public void ExportToExcel() { - var path = _dialogService.SaveFile("Excel (*.xlsx)|*.xlsx|ļ (*.*)|*.*","data"); + var path = _dialogService.SaveFile("Excel 工作薄 (*.xlsx)|*.xlsx|所有文件 (*.*)|*.*", "data"); if (path == null) return; ExcelPackage.License.SetNonCommercialPersonal("CRSim"); using var package = new ExcelPackage(); var worksheet = package.Workbook.Worksheets.Add("Sheet1"); - worksheet.Cells[1, 1].Value = ""; - worksheet.Cells[1, 2].Value = ""; - worksheet.Cells[1, 3].Value = "ʱ"; - worksheet.Cells[1, 4].Value = "ʱ"; - worksheet.Cells[1, 5].Value = "Ʊ"; - worksheet.Cells[1, 6].Value = "վ̨"; - worksheet.Cells[1, 7].Value = "ر"; - worksheet.Cells[1, 8].Value = "ʼվ"; - worksheet.Cells[1, 9].Value = "յվ"; + worksheet.Cells[1, 1].Value = "车次"; + worksheet.Cells[1, 2].Value = "长度"; + worksheet.Cells[1, 3].Value = "到时"; + worksheet.Cells[1, 4].Value = "发时"; + worksheet.Cells[1, 5].Value = "检票口"; + worksheet.Cells[1, 6].Value = "站台"; + worksheet.Cells[1, 7].Value = "地标"; + worksheet.Cells[1, 8].Value = "始发站"; + worksheet.Cells[1, 9].Value = "终到站"; for (int i = 0; i < TrainStops.Count; i++) { worksheet.Cells[i + 2, 1].Value = TrainStops[i].Number; @@ -469,7 +414,6 @@ public partial class StationManagementPageViewModel : ObservableObject } package.SaveAs(new FileInfo(path)); } - [RelayCommand] public void AddTrainStop() { @@ -478,7 +422,7 @@ public partial class StationManagementPageViewModel : ObservableObject { if (TrainStops.Any(x => x.Number == newTrainStop.Number)) { - _dialogService.ShowMessage("ʧ", $" {newTrainStop.Number} Ѵڡ"); + _dialogService.ShowMessage("添加失败", $"车次 {newTrainStop.Number} 已存在。"); return; } TrainStops.Add(newTrainStop); @@ -495,7 +439,7 @@ public partial class StationManagementPageViewModel : ObservableObject [RelayCommand] public void DeleteAllTrainStop() { - if (!_dialogService.GetConfirm("ǰɾȫΣǷ")) return; + if (!_dialogService.GetConfirm("当前操作会删除全部车次,是否继续?")) return; TrainStops.Clear(); } [RelayCommand] @@ -513,42 +457,96 @@ public partial class StationManagementPageViewModel : ObservableObject [RelayCommand] public async Task ImportFromInternet() { - if (TicketChecks.Count == 0) - { - _dialogService.ShowMessage("ʧ", "ӼƱڡ"); - return; - } - if (Platforms.Count == 0) - { - _dialogService.ShowMessage("ʧ", "վ̨"); - return; - } - if (TrainStops.Count != 0) - { - if (!_dialogService.GetConfirm("ǰʱ̱Ƿ")) - { - return; - } - } - - var stops = await _networkService.GetTrainNumnersAsync(SelectedStation.Name); - if (stops.Count !=0) + if (!CheckCanImport()) return; + var stops = await _networkService.GetTrainNumbersAsync(SelectedStation.Name); + if (stops.Count != 0) { TrainStops.Clear(); foreach (TrainStop t in stops) { - t.Platform = Platforms[new Random().Next(Platforms.Count)].Name; - t.Landmark = new[] { "ɫ", "ɫ", "ɫ", "ɫ", "ɫ", "ɫ", "ɫ", null }[new Random().Next(8)]; - t.Length = t.Number.StartsWith('G') || t.Number.StartsWith('D') || t.Number.StartsWith('C') ? Math.Abs(t.Number.GetHashCode()) % 3 == 0 ? 8 : 16 : 18; - t.TicketChecks = [.. TicketChecks.Where(x => x.Name == t.Platform + "A" || x.Name == t.Platform + "B").Select(x => x.Name)]; - if (t.TicketChecks.Count == 0) t.TicketChecks = [TicketChecks[new Random().Next(TicketChecks.Count)].Name]; - TrainStops.Add(t); + TrainStops.Add(RandomTrainStopProperties(t)); } } else { - _dialogService.ShowMessage("ȡʧ", "æվڡ"); + _dialogService.ShowMessage("获取失败", "服务器繁忙或车站不存在。"); } } + private bool CheckCanImport() + { + if (TicketChecks.Count == 0) + { + _dialogService.ShowMessage("导入失败", "请先添加检票口。"); + return false; + } + if (Platforms.Count == 0) + { + _dialogService.ShowMessage("导入失败", "请先添加站台。"); + return false; + } + if (TrainStops.Count != 0) + { + if (!_dialogService.GetConfirm("当前操作会清空时刻表。是否继续?")) + { + return false; + } + } + return true; + } + private TrainStop RandomTrainStopProperties(TrainStop t) + { + t.Platform = Platforms[new Random().Next(Platforms.Count)].Name; + t.Landmark = new[] { "红色", "绿色", "褐色", "蓝色", "紫色", "黄色", "橙色", null }[new Random().Next(8)]; + t.Length = t.Number.StartsWith('G') || t.Number.StartsWith('D') || t.Number.StartsWith('C') ? Math.Abs(t.Number.GetHashCode()) % 3 == 0 ? 8 : 16 : 18; + t.TicketChecks = [.. TicketChecks.Where(x => x.Name == t.Platform + "A" || x.Name == t.Platform + "B").Select(x => x.Name)]; + if (t.TicketChecks.Count == 0) t.TicketChecks = [TicketChecks[new Random().Next(TicketChecks.Count)].Name]; + return t; + } + #endregion -} + [RelayCommand] + public async Task SaveChanges() + { + if (!(await Validate())) return; + _databaseService.UpdateStation(SelectedStation.Name, GenerateStation(SelectedStation.Name,WaitingAreaNames,TicketChecks,TrainStops,Platforms)); + await _databaseService.SaveData(); + } + + private Task Validate() + { + string message = ""; + foreach(var t in TicketChecks) + { + if (!WaitingAreaNames.Contains(t.WaitingAreaName)) + { + message += $"\n检票口 {t.Name} 所在的候车室 {t.WaitingAreaName} 不存在;"; + } + } + foreach(var s in TrainStops) + { + if(!Platforms.Any(x=> x.Name == s.Platform)) + { + message += $"\n车次 {s.Number} 所分配的站台 {s.Platform} 不存在;"; + } + foreach(var t in s.TicketChecks) + { + if (!TicketChecks.Any(x => x.Name==t)) + { + message += $"\n车次 {s.Number} 所分配的检票口 {t} 不存在;"; + } + } + if (s.DepartureTime == null && s.ArrivalTime == null) + { + message += $"\n车次 {s.Number} 未配置到发时间;"; + } + if (s.Length==0) + { + message += $"\n车次 {s.Number} 长度为0;"; + } + } + if (message == "") return Task.FromResult(true); + _dialogService.ShowMessage("保存失败", $"发现 {message.Split("\n").Length-1} 个错误:{message}\n请修复所有错误后再次尝试保存。"); + return Task.FromResult(false); + } + +} \ No newline at end of file diff --git a/CRSim/ViewModels/Pages/DataManagement/TrainNumberManagementPageViewModel.cs b/CRSim/ViewModels/Pages/DataManagement/TrainNumberManagementPageViewModel.cs index a1c7992..ecf9a3a 100644 --- a/CRSim/ViewModels/Pages/DataManagement/TrainNumberManagementPageViewModel.cs +++ b/CRSim/ViewModels/Pages/DataManagement/TrainNumberManagementPageViewModel.cs @@ -9,10 +9,10 @@ namespace CRSim.ViewModels; public partial class TrainNumberManagementPageViewModel : ObservableObject { [ObservableProperty] - private string _pageTitle = "ι"; + private string _pageTitle = "车次管理"; [ObservableProperty] - private string _pageDescription = "Ǻܰѣǵñ! Owo"; + private string _pageDescription = "看起来不是很温馨的提醒:改完记得保存! Owo"; [ObservableProperty] private bool _isSelected = false; @@ -128,12 +128,12 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject [RelayCommand] public async Task AddTrainNumber() { - string? number = _dialogService.GetInput("복κ")?.ToUpper(); + string? number = _dialogService.GetInput("请输入车次号")?.ToUpper(); if (number != null) { if (TrainNumbers.Select(x => x.Number).Contains(number)) { - _dialogService.ShowMessage("ʧ", $"κ {number} Ѵڡ"); + _dialogService.ShowMessage("添加失败", $"车次号 {number} 已存在。"); return; } _databaseService.AddTrainNumber(number); @@ -154,7 +154,7 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject [RelayCommand] public async Task DeleteAllTrainNumbers() { - if (!_dialogService.GetConfirm("ǰɾȫΣǷ")) return; + if (!_dialogService.GetConfirm("当前操作会删除全部车次,是否继续?")) return; var trainNumbers = _databaseService.GetAllTrainNumbers().ToList(); foreach (TrainNumber trainNumber in trainNumbers) { @@ -171,7 +171,7 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject { if (TimeTable.Count != 0) { - if (!_dialogService.GetConfirm("ǰʱ̱Ƿ")) + if (!_dialogService.GetConfirm("当前操作可能清空时刻表。是否继续?")) { return; } @@ -189,7 +189,7 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject } else { - _dialogService.ShowMessage("ȡʧ", "δҵóΡ"); + _dialogService.ShowMessage("获取失败", "未找到该车次。"); } } [RelayCommand] @@ -200,7 +200,7 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject { if (TimeTable.Any(x => x.Station == newTrainStop.Station)) { - _dialogService.ShowMessage("", $"վ {newTrainStop.Station} Ѵڡ"); + _dialogService.ShowMessage("错误", $"车站 {newTrainStop.Station} 已存在。"); } if (selectedTrainStop != null) { @@ -225,7 +225,7 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject [RelayCommand] public void DeleteAllTrainStop() { - if (!_dialogService.GetConfirm("ǰɾȫͣվǷ")) return; + if (!_dialogService.GetConfirm("当前操作会删除全部停站,是否继续?")) return; TimeTable.Clear(); RefreshSections(); } @@ -244,14 +244,14 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject [RelayCommand] public void TimeTableExportToExcel() { - var path = _dialogService.SaveFile("Excel (*.xlsx)|*.xlsx|ļ (*.*)|*.*", "data"); + var path = _dialogService.SaveFile("Excel 工作薄 (*.xlsx)|*.xlsx|所有文件 (*.*)|*.*", "data"); if (path == null) return; ExcelPackage.License.SetNonCommercialPersonal("CRSim"); using var package = new ExcelPackage(); var worksheet = package.Workbook.Worksheets.Add("Sheet1"); - worksheet.Cells[1, 1].Value = "վ"; - worksheet.Cells[1, 2].Value = ""; - worksheet.Cells[1, 3].Value = ""; + worksheet.Cells[1, 1].Value = "车站名"; + worksheet.Cells[1, 2].Value = "到点"; + worksheet.Cells[1, 3].Value = "开点"; for (int i = 0; i < TimeTable.Count; i++) { worksheet.Cells[i + 2, 1].Value = TimeTable[i].Station; @@ -265,12 +265,12 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject { if (TimeTable.Count != 0) { - if (!_dialogService.GetConfirm("ǰܻʱ̱Ƿ")) + if (!_dialogService.GetConfirm("当前操作可能会清空时刻表。是否继续?")) { return; } } - var path = _dialogService.GetFile("Excel (*.xlsx)|*.xlsx|ļ (*.*)|*.*"); + var path = _dialogService.GetFile("Excel 工作薄 (*.xlsx)|*.xlsx|所有文件 (*.*)|*.*"); if (path == null) return; try { @@ -299,7 +299,7 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject } catch { - _dialogService.ShowMessage("ʧ", "ļʽռá"); + _dialogService.ShowMessage("导入失败", "文件格式错误或被占用。"); } } #endregion @@ -368,7 +368,7 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject [RelayCommand] public void PriceImportFromExcel() { - var path = _dialogService.GetFile("Excel (*.xlsx)|*.xlsx|ļ (*.*)|*.*"); + var path = _dialogService.GetFile("Excel 工作薄 (*.xlsx)|*.xlsx|所有文件 (*.*)|*.*"); if (path == null) return; try { @@ -427,29 +427,29 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject } catch { - _dialogService.ShowMessage("ʧ", "ļʽռá"); + _dialogService.ShowMessage("导入失败", "文件格式错误或被占用。"); } } [RelayCommand] public void PriceExportToExcel() { - var path = _dialogService.SaveFile("Excel (*.xlsx)|*.xlsx|ļ (*.*)|*.*", "data"); + var path = _dialogService.SaveFile("Excel 工作薄 (*.xlsx)|*.xlsx|所有文件 (*.*)|*.*", "data"); if (path == null) return; ExcelPackage.License.SetNonCommercialPersonal("CRSim"); using var package = new ExcelPackage(); var worksheet = package.Workbook.Worksheets.Add("Sheet1"); - worksheet.Cells[1, 1].Value = ""; - worksheet.Cells[1, 2].Value = "յ"; - worksheet.Cells[1, 3].Value = " ص"; - worksheet.Cells[1, 4].Value = "ѡһ"; - worksheet.Cells[1, 5].Value = "һ"; - worksheet.Cells[1, 6].Value = " Ȱ"; - worksheet.Cells[1, 7].Value = "߼"; - worksheet.Cells[1, 8].Value = "/ һ"; - worksheet.Cells[1, 9].Value = "Ӳ "; - worksheet.Cells[1, 10].Value = ""; - worksheet.Cells[1, 11].Value = "Ӳ"; - worksheet.Cells[1, 12].Value = ""; + worksheet.Cells[1, 1].Value = "区间起点"; + worksheet.Cells[1, 2].Value = "区间终点"; + worksheet.Cells[1, 3].Value = "商务座 特等座"; + worksheet.Cells[1, 4].Value = "优选一等座"; + worksheet.Cells[1, 5].Value = "一等座"; + worksheet.Cells[1, 6].Value = "二等座 二等包座"; + worksheet.Cells[1, 7].Value = "高级软卧"; + worksheet.Cells[1, 8].Value = "软卧/动卧 一等卧"; + worksheet.Cells[1, 9].Value = "硬卧 二等卧"; + worksheet.Cells[1, 10].Value = "软座"; + worksheet.Cells[1, 11].Value = "硬座"; + worksheet.Cells[1, 12].Value = "无座"; for (int i = 0; i < Sections.Count; i++) { worksheet.Cells[i + 2, 1].Value = Sections[i].From; @@ -478,7 +478,7 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject [RelayCommand] public void QuantityImportFromExcel() { - var path = _dialogService.GetFile("Excel (*.xlsx)|*.xlsx|ļ (*.*)|*.*"); + var path = _dialogService.GetFile("Excel 工作薄 (*.xlsx)|*.xlsx|所有文件 (*.*)|*.*"); if (path == null) return; try { @@ -537,29 +537,29 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject } catch { - _dialogService.ShowMessage("ʧ", "ļʽռá"); + _dialogService.ShowMessage("导入失败", "文件格式错误或被占用。"); } } [RelayCommand] public void QuantityExportToExcel() { - var path = _dialogService.SaveFile("Excel (*.xlsx)|*.xlsx|ļ (*.*)|*.*", "data"); + var path = _dialogService.SaveFile("Excel 工作薄 (*.xlsx)|*.xlsx|所有文件 (*.*)|*.*", "data"); if (path == null) return; ExcelPackage.License.SetNonCommercialPersonal("CRSim"); using var package = new ExcelPackage(); var worksheet = package.Workbook.Worksheets.Add("Sheet1"); - worksheet.Cells[1, 1].Value = ""; - worksheet.Cells[1, 2].Value = "յ"; - worksheet.Cells[1, 3].Value = " ص"; - worksheet.Cells[1, 4].Value = "ѡһ"; - worksheet.Cells[1, 5].Value = "һ"; - worksheet.Cells[1, 6].Value = " Ȱ"; - worksheet.Cells[1, 7].Value = "߼"; - worksheet.Cells[1, 8].Value = "/ һ"; - worksheet.Cells[1, 9].Value = "Ӳ "; - worksheet.Cells[1, 10].Value = ""; - worksheet.Cells[1, 11].Value = "Ӳ"; - worksheet.Cells[1, 12].Value = ""; + worksheet.Cells[1, 1].Value = "区间起点"; + worksheet.Cells[1, 2].Value = "区间终点"; + worksheet.Cells[1, 3].Value = "商务座 特等座"; + worksheet.Cells[1, 4].Value = "优选一等座"; + worksheet.Cells[1, 5].Value = "一等座"; + worksheet.Cells[1, 6].Value = "二等座 二等包座"; + worksheet.Cells[1, 7].Value = "高级软卧"; + worksheet.Cells[1, 8].Value = "软卧/动卧 一等卧"; + worksheet.Cells[1, 9].Value = "硬卧 二等卧"; + worksheet.Cells[1, 10].Value = "软座"; + worksheet.Cells[1, 11].Value = "硬座"; + worksheet.Cells[1, 12].Value = "无座"; for (int i = 0; i < Sections.Count; i++) { worksheet.Cells[i + 2, 1].Value = Sections[i].From; @@ -594,32 +594,32 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject } if (TimeTable.First().ArrivalTime != null) { - message += "\nʱ̱λʼվ"; + message += "\n时刻表首位必须是始发站;"; } if (TimeTable.Last().DepartureTime != null) { - message += "\nʱ̱ĩλյվ"; + message += "\n时刻表末位必须是终到站;"; } if (TimeTable.Select(x => x.Station).GroupBy(x => x).Any(g => g.Count() > 1)) { - message += "\nڶظͣվ"; + message += "\n存在多个重复停站;"; } if (TimeTable.Count(x => x.ArrivalTime == null)!=1) { - message += "\nڶʼվ"; + message += "\n存在多个始发站;"; } if (TimeTable.Count(x => x.DepartureTime == null) != 1) { - message += "\nڶյվ"; + message += "\n存在多个终到站;"; } if (message == "") return Task.FromResult(true); - _dialogService.ShowMessage("ʧ", $" {message.Split("\n").Length - 1} {message}\n޸дٴγԱ档"); + _dialogService.ShowMessage("保存失败", $"发现 {message.Split("\n").Length - 1} 个错误:{message}\n请修复所有错误后再次尝试保存。"); return Task.FromResult(false); } [RelayCommand] public async Task ImportFromLulutong() { - var path = _dialogService.GetFile("CSV ļ (*.csv)|*.csv|ļ (*.*)|*.*"); + var path = _dialogService.GetFile("CSV 文件 (*.csv)|*.csv|所有文件 (*.*)|*.*"); if (path == null) return; try { @@ -627,7 +627,7 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject var intersection = numbers.Intersect(TrainNumbers.Select(x => x.Number)).ToList(); if (intersection.Count != 0) { - if (!_dialogService.GetConfirm("ǰܸгãǷ")) return; + if (!_dialogService.GetConfirm("当前操作可能覆盖现有车次配置,是否继续?")) return; } foreach (string s in intersection) { @@ -675,7 +675,7 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject } catch { - _dialogService.ShowMessage("ʧ", "ļʽռá"); + _dialogService.ShowMessage("导入失败", "文件格式错误或被占用。"); ProgressValue = 0; } } @@ -683,28 +683,28 @@ public partial class TrainNumberManagementPageViewModel : ObservableObject { var firstColumnData = new List(); - // ʹ StreamReader ȡļ + // 使用 StreamReader 读取文件 using (var reader = new StreamReader(filePath)) { while (!reader.EndOfStream) { - var line = reader.ReadLine(); // ȡÿһ - var columns = line.Split(','); // նŷָ + var line = reader.ReadLine(); // 读取每一行 + var columns = line.Split(','); // 按照逗号分隔列 if (columns.Length > 0) { - var firstColumn = columns[0].Trim(); // ȡȥβո + var firstColumn = columns[0].Trim(); // 获取并去除首尾空格 if (!string.IsNullOrEmpty(firstColumn) && (char.IsLetterOrDigit(firstColumn[0]))) { int spaceIndex = firstColumn.IndexOf(' '); if (spaceIndex != -1) { - firstColumn = firstColumn[..spaceIndex]; // ȡոǰIJ + firstColumn = firstColumn[..spaceIndex]; // 取空格前的部分 } if (firstColumnData.Contains(firstColumn)) continue; - firstColumnData.Add(firstColumn); // ӵб + firstColumnData.Add(firstColumn); // 添加到结果列表 } } } diff --git a/CRSim/ViewModels/Pages/DataManagementPageViewModel.cs b/CRSim/ViewModels/Pages/DataManagementPageViewModel.cs index 5d695d4..d367b2e 100644 --- a/CRSim/ViewModels/Pages/DataManagementPageViewModel.cs +++ b/CRSim/ViewModels/Pages/DataManagementPageViewModel.cs @@ -3,10 +3,10 @@ namespace CRSim.ViewModels public partial class DataManagementPageViewModel(INavigationService navigationService) : ObservableObject { [ObservableProperty] - private string _pageTitle = "ݹ"; + private string _pageTitle = "数据管理"; [ObservableProperty] - private string _pageDescription = "վΡ·Ϣ"; + private string _pageDescription = "车站、车次、交路等信息管理"; [ObservableProperty] private ICollection _navigationCards = ControlsInfoDataSource.Instance.GetControlsInfo("Data Management"); diff --git a/CRSim/ViewModels/Pages/SettingsPageViewModel.cs b/CRSim/ViewModels/Pages/SettingsPageViewModel.cs index 7860a0d..0250597 100644 --- a/CRSim/ViewModels/Pages/SettingsPageViewModel.cs +++ b/CRSim/ViewModels/Pages/SettingsPageViewModel.cs @@ -1,4 +1,4 @@ -namespace CRSim.ViewModels +namespace CRSim.ViewModels { public partial class SettingsPageViewModel : ObservableObject { diff --git a/CRSim/ViewModels/Pages/Simulation/ScreenSimulationPageViewModel.cs b/CRSim/ViewModels/Pages/Simulation/ScreenSimulationPageViewModel.cs index 666e9d0..0b7edd6 100644 --- a/CRSim/ViewModels/Pages/Simulation/ScreenSimulationPageViewModel.cs +++ b/CRSim/ViewModels/Pages/Simulation/ScreenSimulationPageViewModel.cs @@ -3,7 +3,7 @@ namespace CRSim.ViewModels; public partial class ScreenSimulationPageViewModel : ObservableObject { [ObservableProperty] - private string _pageTitle = "ģ"; + private string _pageTitle = "引导屏模拟"; [ObservableProperty] private string _pageDescription = ""; diff --git a/CRSim/ViewModels/Pages/Simulation/WebsiteSimulationPageViewModel.cs b/CRSim/ViewModels/Pages/Simulation/WebsiteSimulationPageViewModel.cs index 441bbe6..c19185a 100644 --- a/CRSim/ViewModels/Pages/Simulation/WebsiteSimulationPageViewModel.cs +++ b/CRSim/ViewModels/Pages/Simulation/WebsiteSimulationPageViewModel.cs @@ -5,7 +5,7 @@ namespace CRSim.ViewModels; public partial class WebsiteSimulationPageViewModel : ObservableObject { [ObservableProperty] - private string _pageTitle = "12306ģ"; + private string _pageTitle = "12306模拟"; [ObservableProperty] private string _pageDescription = ""; diff --git a/CRSim/ViewModels/Pages/StartSimulationPageViewModel.cs b/CRSim/ViewModels/Pages/StartSimulationPageViewModel.cs index 33344c0..edd3a87 100644 --- a/CRSim/ViewModels/Pages/StartSimulationPageViewModel.cs +++ b/CRSim/ViewModels/Pages/StartSimulationPageViewModel.cs @@ -3,10 +3,10 @@ namespace CRSim.ViewModels public partial class StartSimulationPageViewModel(INavigationService navigationService) : ObservableObject { [ObservableProperty] - private string _pageTitle = "ʼģ"; + private string _pageTitle = "开始模拟"; [ObservableProperty] - private string _pageDescription = "ѡģĿ"; + private string _pageDescription = "请选择你想模拟的项目"; [ObservableProperty] private ICollection _navigationCards = ControlsInfoDataSource.Instance.GetControlsInfo("Start Simulation"); diff --git a/CRSim/ViewModels/Windows/MainWindowViewModel.cs b/CRSim/ViewModels/Windows/MainWindowViewModel.cs index 36d8545..20d2a9b 100644 --- a/CRSim/ViewModels/Windows/MainWindowViewModel.cs +++ b/CRSim/ViewModels/Windows/MainWindowViewModel.cs @@ -1,4 +1,4 @@ -namespace CRSim.ViewModels +namespace CRSim.ViewModels { public partial class MainWindowViewModel : ObservableObject { diff --git a/CRSim/Views/Pages/DashboardPage.xaml.cs b/CRSim/Views/Pages/DashboardPage.xaml.cs index 95166f5..557be06 100644 --- a/CRSim/Views/Pages/DashboardPage.xaml.cs +++ b/CRSim/Views/Pages/DashboardPage.xaml.cs @@ -1,4 +1,4 @@ -namespace CRSim.Views +namespace CRSim.Views { /// /// DashboardPage.xaml 的交互逻辑 diff --git a/CRSim/Views/Pages/DataManagement/StationManagementPage.xaml b/CRSim/Views/Pages/DataManagement/StationManagementPage.xaml index 327b3e7..629f4e8 100644 --- a/CRSim/Views/Pages/DataManagement/StationManagementPage.xaml +++ b/CRSim/Views/Pages/DataManagement/StationManagementPage.xaml @@ -1,4 +1,4 @@ - + + + + + + + diff --git a/CRSim/Views/Pages/DataManagement/StationManagementPage.xaml.cs b/CRSim/Views/Pages/DataManagement/StationManagementPage.xaml.cs index 128977c..dd944dc 100644 --- a/CRSim/Views/Pages/DataManagement/StationManagementPage.xaml.cs +++ b/CRSim/Views/Pages/DataManagement/StationManagementPage.xaml.cs @@ -1,4 +1,4 @@ - + namespace CRSim.Views; public partial class StationManagementPage : Page { diff --git a/CRSim/Views/Pages/DataManagement/TrainNumberManagementPage.xaml.cs b/CRSim/Views/Pages/DataManagement/TrainNumberManagementPage.xaml.cs index 9f42232..2a99a62 100644 --- a/CRSim/Views/Pages/DataManagement/TrainNumberManagementPage.xaml.cs +++ b/CRSim/Views/Pages/DataManagement/TrainNumberManagementPage.xaml.cs @@ -1,4 +1,4 @@ - + namespace CRSim.Views; public partial class TrainNumberManagementPage : Page { diff --git a/CRSim/Views/Pages/DataManagementPage.xaml.cs b/CRSim/Views/Pages/DataManagementPage.xaml.cs index 50949c8..f41f11f 100644 --- a/CRSim/Views/Pages/DataManagementPage.xaml.cs +++ b/CRSim/Views/Pages/DataManagementPage.xaml.cs @@ -1,4 +1,4 @@ -namespace CRSim.Views; +namespace CRSim.Views; public partial class DataManagementPage : Page { diff --git a/CRSim/Views/Pages/SettingsPage.xaml.cs b/CRSim/Views/Pages/SettingsPage.xaml.cs index ed490a3..4b1594e 100644 --- a/CRSim/Views/Pages/SettingsPage.xaml.cs +++ b/CRSim/Views/Pages/SettingsPage.xaml.cs @@ -1,4 +1,4 @@ -using System.Text.RegularExpressions; +using System.Text.RegularExpressions; using System.Windows.Documents; using System.Windows.Navigation; using System.Windows.Shapes; diff --git a/CRSim/Views/Pages/Simulation/ScreenSimulationPage.xaml.cs b/CRSim/Views/Pages/Simulation/ScreenSimulationPage.xaml.cs index 93e22c6..c5f435c 100644 --- a/CRSim/Views/Pages/Simulation/ScreenSimulationPage.xaml.cs +++ b/CRSim/Views/Pages/Simulation/ScreenSimulationPage.xaml.cs @@ -1,4 +1,4 @@ -namespace CRSim.Views; +namespace CRSim.Views; public partial class ScreenSimulationPage : Page { public ScreenSimulationPageViewModel ViewModel { get; } diff --git a/CRSim/Views/Pages/Simulation/WebsiteSimulationPage.xaml.cs b/CRSim/Views/Pages/Simulation/WebsiteSimulationPage.xaml.cs index fc9b819..8092a5d 100644 --- a/CRSim/Views/Pages/Simulation/WebsiteSimulationPage.xaml.cs +++ b/CRSim/Views/Pages/Simulation/WebsiteSimulationPage.xaml.cs @@ -1,4 +1,4 @@ -namespace CRSim.Views; +namespace CRSim.Views; public partial class WebsiteSimulationPage : Page { public WebsiteSimulationPageViewModel ViewModel { get; } diff --git a/CRSim/Views/Pages/StartSimulationPage.xaml.cs b/CRSim/Views/Pages/StartSimulationPage.xaml.cs index 61cf4e0..0bfecb0 100644 --- a/CRSim/Views/Pages/StartSimulationPage.xaml.cs +++ b/CRSim/Views/Pages/StartSimulationPage.xaml.cs @@ -1,4 +1,4 @@ -namespace CRSim.Views; +namespace CRSim.Views; public partial class StartSimulationPage : Page { diff --git a/CRSim/Views/Windows/Dialogs/ConfirmDialog.xaml.cs b/CRSim/Views/Windows/Dialogs/ConfirmDialog.xaml.cs index b939679..f98d101 100644 --- a/CRSim/Views/Windows/Dialogs/ConfirmDialog.xaml.cs +++ b/CRSim/Views/Windows/Dialogs/ConfirmDialog.xaml.cs @@ -1,4 +1,4 @@ -namespace CRSim.Views +namespace CRSim.Views { /// /// UserInputDialog.xaml 的交互逻辑 diff --git a/CRSim/Views/Windows/Dialogs/InputDialog.xaml.cs b/CRSim/Views/Windows/Dialogs/InputDialog.xaml.cs index a444144..26f8d02 100644 --- a/CRSim/Views/Windows/Dialogs/InputDialog.xaml.cs +++ b/CRSim/Views/Windows/Dialogs/InputDialog.xaml.cs @@ -1,4 +1,4 @@ -namespace CRSim.Views +namespace CRSim.Views { /// /// UserInputDialog.xaml 的交互逻辑 diff --git a/CRSim/Views/Windows/Dialogs/LongMessageDialog.xaml.cs b/CRSim/Views/Windows/Dialogs/LongMessageDialog.xaml.cs index 01e1a21..f42a567 100644 --- a/CRSim/Views/Windows/Dialogs/LongMessageDialog.xaml.cs +++ b/CRSim/Views/Windows/Dialogs/LongMessageDialog.xaml.cs @@ -1,4 +1,4 @@ -namespace CRSim.Views +namespace CRSim.Views { /// /// UserInputDialog.xaml 的交互逻辑 diff --git a/CRSim/Views/Windows/Dialogs/MessageDialog.xaml.cs b/CRSim/Views/Windows/Dialogs/MessageDialog.xaml.cs index 4cbe25c..d966699 100644 --- a/CRSim/Views/Windows/Dialogs/MessageDialog.xaml.cs +++ b/CRSim/Views/Windows/Dialogs/MessageDialog.xaml.cs @@ -1,4 +1,4 @@ -namespace CRSim.Views +namespace CRSim.Views { /// /// UserInputDialog.xaml 的交互逻辑 diff --git a/CRSim/Views/Windows/Dialogs/PlatformDialog.xaml.cs b/CRSim/Views/Windows/Dialogs/PlatformDialog.xaml.cs index a49a0db..54a4b34 100644 --- a/CRSim/Views/Windows/Dialogs/PlatformDialog.xaml.cs +++ b/CRSim/Views/Windows/Dialogs/PlatformDialog.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; namespace CRSim.Views { diff --git a/CRSim/Views/Windows/Dialogs/TicketCheckDialog.xaml.cs b/CRSim/Views/Windows/Dialogs/TicketCheckDialog.xaml.cs index 26806fa..d513112 100644 --- a/CRSim/Views/Windows/Dialogs/TicketCheckDialog.xaml.cs +++ b/CRSim/Views/Windows/Dialogs/TicketCheckDialog.xaml.cs @@ -1,4 +1,4 @@ -using System.Text.RegularExpressions; +using System.Text.RegularExpressions; namespace CRSim.Views { diff --git a/CRSim/Views/Windows/Dialogs/TrainNumberStopDialog.xaml.cs b/CRSim/Views/Windows/Dialogs/TrainNumberStopDialog.xaml.cs index 24e822f..08320ac 100644 --- a/CRSim/Views/Windows/Dialogs/TrainNumberStopDialog.xaml.cs +++ b/CRSim/Views/Windows/Dialogs/TrainNumberStopDialog.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; namespace CRSim.Views { diff --git a/CRSim/Views/Windows/Dialogs/TrainStopDialog.xaml.cs b/CRSim/Views/Windows/Dialogs/TrainStopDialog.xaml.cs index ad21cd0..338c8ca 100644 --- a/CRSim/Views/Windows/Dialogs/TrainStopDialog.xaml.cs +++ b/CRSim/Views/Windows/Dialogs/TrainStopDialog.xaml.cs @@ -1,4 +1,4 @@ -using CRSim.Core.Models; +using CRSim.Core.Models; namespace CRSim.Views {