using System.Windows;
using Venus_Simulator.Instances;
using MECF.Framework.UI.Core.Applications;
using Venus_Core;
namespace Venus_Simulator
{
///
/// App.xaml 的交互逻辑
///
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
SystemConfig.Instance.Initialize();
SimulatorJetChamber.CurrentPMAChamber = (JetChamber)SystemConfig.Instance.GetValue($"PMA.ChamberType");
SimulatorJetChamber.CurrentPMBChamber = (JetChamber)SystemConfig.Instance.GetValue($"PMB.ChamberType");
SimulatorJetChamber.CurrentPMCChamber = (JetChamber)SystemConfig.Instance.GetValue($"PMC.ChamberType");
SimulatorJetChamber.CurrentPMDChamber = (JetChamber)SystemConfig.Instance.GetValue($"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);
}
}
}