新增1.0和2.0两种协议车型车型
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Windows;
|
||||
|
||||
namespace StandardScene.Fass2Simulator
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
if (HasTestArg(e.Args))
|
||||
{
|
||||
var code = Fass2SimSelfTests.Run(e.Args);
|
||||
Shutdown(code);
|
||||
return;
|
||||
}
|
||||
|
||||
base.OnStartup(e);
|
||||
Exit += (_, __) => Fass2SimFileLogger.Shutdown();
|
||||
var window = new MainWindow();
|
||||
MainWindow = window;
|
||||
window.Show();
|
||||
}
|
||||
|
||||
private static bool HasTestArg(string[] args)
|
||||
{
|
||||
if (args == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
foreach (var arg in args)
|
||||
{
|
||||
if (string.Equals(arg, "--motion-test", StringComparison.OrdinalIgnoreCase)
|
||||
|| string.Equals(arg, "--action-test", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user