Commit 0667c868 authored by 潘栩锋's avatar 潘栩锋 🚴

AD盒模拟器,只有右键点击 window的状态栏 才能退出

parent a0214ae9
<Application x:Class="FLYAD7_Simulation_Wpf.App" <Application x:Class="FLYAD7_Simulation_Wpf.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml"> >
<Application.Resources> <Application.Resources>
</Application.Resources> </Application.Resources>
......
...@@ -12,5 +12,35 @@ namespace FLYAD7_Simulation_Wpf ...@@ -12,5 +12,35 @@ namespace FLYAD7_Simulation_Wpf
/// </summary> /// </summary>
public partial class App : Application public partial class App : Application
{ {
FLY.AppHelper.AppJustOne appjustone;
FLY.AppHelper.WindowNotifyIconHelper notifyiconhelper;
public App()
{
appjustone = new FLY.AppHelper.AppJustOne(this);
AppDomain.CurrentDomain.UnhandledException += (s, e) =>
{
string err = e.ExceptionObject.ToString();
var logger = NLog.LogManager.GetLogger("app");
logger.Fatal(err);
MessageBox.Show("程序出现异常,请把下面信息拍照发给厂家" + Environment.NewLine + err,
"异常,联系厂家",
MessageBoxButton.OK, MessageBoxImage.Error);
};
this.Startup += (s, e) =>
{
this.MainWindow = new MainWindow();
Misc.Ver ver = new Misc.Ver();
ver.SrcType = this.GetType();
this.MainWindow.Title = ver.ToString();
notifyiconhelper = new FLY.AppHelper.WindowNotifyIconHelper(this.MainWindow, this.MainWindow.Title);
this.MainWindow.Show();
};
}
} }
} }
...@@ -140,6 +140,10 @@ ...@@ -140,6 +140,10 @@
<AppDesigner Include="Properties\" /> <AppDesigner Include="Properties\" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\..\Project.FLY.AppHelper\FLY.AppHelper\FLY.AppHelper.csproj">
<Project>{9c46d98f-6500-490b-9e56-c89dfffa05f8}</Project>
<Name>FLY.AppHelper</Name>
</ProjectReference>
<ProjectReference Include="..\..\Project.FLY.FObjSys\FObjSys\FObjBase.csproj"> <ProjectReference Include="..\..\Project.FLY.FObjSys\FObjSys\FObjBase.csproj">
<Project>{ABFE87D4-B692-4AE9-A8C0-1F470B8ACBB8}</Project> <Project>{ABFE87D4-B692-4AE9-A8C0-1F470B8ACBB8}</Project>
<Name>FObjBase</Name> <Name>FObjBase</Name>
......
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15 # Visual Studio Version 16
VisualStudioVersion = 15.0.28307.572 VisualStudioVersion = 16.0.29911.84
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Flyad7_WPF", "Flyad7_WPF\Flyad7_WPF.csproj", "{FC6014B3-1105-4F08-B1D1-1F1398C999AF}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Flyad7_WPF", "Flyad7_WPF\Flyad7_WPF.csproj", "{FC6014B3-1105-4F08-B1D1-1F1398C999AF}"
EndProject EndProject
...@@ -34,6 +34,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ...@@ -34,6 +34,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
版本说明.txt = 版本说明.txt 版本说明.txt = 版本说明.txt
EndProjectSection EndProjectSection
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FLY.AppHelper", "..\Project.FLY.AppHelper\FLY.AppHelper\FLY.AppHelper.csproj", "{9C46D98F-6500-490B-9E56-C89DFFFA05F8}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -174,6 +176,18 @@ Global ...@@ -174,6 +176,18 @@ Global
{267EDB8F-705D-4309-9C50-E89A8610394D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {267EDB8F-705D-4309-9C50-E89A8610394D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{267EDB8F-705D-4309-9C50-E89A8610394D}.Release|Mixed Platforms.Build.0 = Release|Any CPU {267EDB8F-705D-4309-9C50-E89A8610394D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{267EDB8F-705D-4309-9C50-E89A8610394D}.Release|x86.ActiveCfg = Release|Any CPU {267EDB8F-705D-4309-9C50-E89A8610394D}.Release|x86.ActiveCfg = Release|Any CPU
{9C46D98F-6500-490B-9E56-C89DFFFA05F8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9C46D98F-6500-490B-9E56-C89DFFFA05F8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9C46D98F-6500-490B-9E56-C89DFFFA05F8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{9C46D98F-6500-490B-9E56-C89DFFFA05F8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{9C46D98F-6500-490B-9E56-C89DFFFA05F8}.Debug|x86.ActiveCfg = Debug|Any CPU
{9C46D98F-6500-490B-9E56-C89DFFFA05F8}.Debug|x86.Build.0 = Debug|Any CPU
{9C46D98F-6500-490B-9E56-C89DFFFA05F8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9C46D98F-6500-490B-9E56-C89DFFFA05F8}.Release|Any CPU.Build.0 = Release|Any CPU
{9C46D98F-6500-490B-9E56-C89DFFFA05F8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{9C46D98F-6500-490B-9E56-C89DFFFA05F8}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{9C46D98F-6500-490B-9E56-C89DFFFA05F8}.Release|x86.ActiveCfg = Release|Any CPU
{9C46D98F-6500-490B-9E56-C89DFFFA05F8}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment