using System;
|
using System.Windows;
|
using log4net.Config;
|
|
namespace CanSimulatorServer.App
|
{
|
/// <summary>
|
/// CAN 模拟器服务进程入口(纯手动启动,主程序与 DeviceBroker 均不拉起)。
|
/// 读取 App.config 的 ServerPort / ListenOnAllInterfaces,拉起 TcpSimulatorHost 并显示监控 UI。
|
/// </summary>
|
public class App : Application
|
{
|
protected override void OnStartup(StartupEventArgs e)
|
{
|
base.OnStartup(e);
|
XmlConfigurator.Configure();
|
|
MainWindow = new MainWindow
|
{
|
Title = "CAN 模拟器服务 (CanSimulatorServer)",
|
Width = 1000,
|
Height = 680,
|
WindowStartupLocation = WindowStartupLocation.CenterScreen
|
};
|
MainWindow.Show();
|
}
|
}
|
|
/// <summary>无 XAML 启动器:SDK 工程显式入口。</summary>
|
public static class Entry
|
{
|
[STAThread]
|
public static void Main()
|
{
|
var app = new App();
|
app.Run();
|
}
|
}
|
}
|