12345678910111213141516171819202122232425262728293031323334353637383940 |
- using System.Windows;
- using Venus_Simulator.Instances;
- using MECF.Framework.UI.Core.Applications;
- using Venus_Core;
- namespace Venus_Simulator
- {
- /// <summary>
- /// App.xaml 的交互逻辑
- /// </summary>
- public partial class App : Application
- {
- protected override void OnStartup(StartupEventArgs e)
- {
- base.OnStartup(e);
- SystemConfig.Instance.Initialize();
- SimulatorJetChamber.CurrentPMAChamber = (JetChamber)SystemConfig.Instance.GetValue<int>($"PMA.ChamberType");
- SimulatorJetChamber.CurrentPMBChamber = (JetChamber)SystemConfig.Instance.GetValue<int>($"PMB.ChamberType");
- SimulatorJetChamber.CurrentPMCChamber = (JetChamber)SystemConfig.Instance.GetValue<int>($"PMC.ChamberType");
- SimulatorJetChamber.CurrentPMDChamber = (JetChamber)SystemConfig.Instance.GetValue<int>($"PMD.ChamberType");
- UiApplication.Instance.Initialize(new UiInstance());
- SimulatorSystem.Instance.Initialize();
- }
- protected override void OnExit(ExitEventArgs e)
- {
- UiApplication.Instance.Terminate();
- SimulatorSystem.Instance.Terminate();
- base.OnExit(e);
- }
- }
- }
|