mirror of
https://github.com/denglihong2007/CRSim
synced 2026-08-05 08:55:52 +08:00
Merge pull request #291 from denglihong2007/dev
chore: 重构全局 using、依赖注入与启动参数配置 [skip cliff]
This commit is contained in:
@@ -1,8 +1,4 @@
|
||||
using CRSim.PlatformDiagram;
|
||||
using CRSim.WebsiteSimulator;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace CRSim
|
||||
namespace CRSim
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
@@ -59,7 +55,6 @@ namespace CRSim
|
||||
services.AddSingleton<StyleManager>();
|
||||
services.AddSingleton<MainWindow>();
|
||||
services.AddSingleton<StartWindow>();
|
||||
services.AddSingleton<Generator>();
|
||||
services.AddTransient<Simulator>();
|
||||
services.AddTransient<DashboardPageViewModel>();
|
||||
services.AddTransient<StationManagementPageViewModel>();
|
||||
|
||||
@@ -7,12 +7,11 @@ global using System.Threading.Tasks;
|
||||
global using System.Collections.Generic;
|
||||
global using System.Collections.ObjectModel;
|
||||
global using System.Reflection;
|
||||
global using System.Timers;
|
||||
global using System.Diagnostics;
|
||||
global using System.Threading;
|
||||
|
||||
global using Microsoft.UI.Xaml;
|
||||
global using Microsoft.UI.Xaml.Controls;
|
||||
global using Microsoft.UI.Dispatching;
|
||||
global using Microsoft.UI.Windowing;
|
||||
global using Microsoft.Extensions.Hosting;
|
||||
global using Microsoft.Extensions.DependencyInjection;
|
||||
@@ -25,13 +24,15 @@ global using CRSim.Models;
|
||||
global using CRSim.Services;
|
||||
global using CRSim.ViewModels;
|
||||
global using CRSim.ScreenSimulator;
|
||||
global using CRSim.PlatformDiagram;
|
||||
global using CRSim.WebsiteSimulator;
|
||||
global using CRSim.Core.Utils;
|
||||
global using CRSim.Core.Models;
|
||||
global using CRSim.Core.Services;
|
||||
global using CRSim.Core.Abstractions;
|
||||
|
||||
|
||||
global using OfficeOpenXml;
|
||||
|
||||
global using CommunityToolkit.WinUI;
|
||||
|
||||
global using Windows.Graphics;
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"profiles": {
|
||||
"CRSim (Package)": {
|
||||
"commandName": "MsixPackage"
|
||||
"commandName": "MsixPackage",
|
||||
"commandLineArgs": "-debug"
|
||||
},
|
||||
"CRSim (Unpackaged)": {
|
||||
"commandName": "Project",
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using CRSim.PlatformDiagram;
|
||||
namespace CRSim.ViewModels;
|
||||
|
||||
namespace CRSim.ViewModels;
|
||||
|
||||
public partial class PlatformDiagramPageViewModel(IDialogService _dialogService, IDatabaseService _databaseService, Generator _generator) : ObservableObject
|
||||
public partial class PlatformDiagramPageViewModel(IDialogService _dialogService, IDatabaseService _databaseService) : ObservableObject
|
||||
{
|
||||
public string PageTitle = "生成站台占用图";
|
||||
public Station? SelectedStation;
|
||||
|
||||
Reference in New Issue
Block a user