fixed some bugs
This commit is contained in:
1 parent
203fbb4541
commit
f261f3199f
11 files changed
+147
-19
No files matched your search
@@ -3,6 +3,7 @@ using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Runtime;
|
||||
using System.Security.Authentication;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
@@ -21,6 +22,19 @@ namespace HandyControlDemo
|
||||
private static Mutex AppMutex;
|
||||
#pragma warning restore IDE0052
|
||||
|
||||
public App()
|
||||
{
|
||||
#if !netle40
|
||||
var cachePath = $"{AppDomain.CurrentDomain.BaseDirectory}Cache";
|
||||
if (!Directory.Exists(cachePath))
|
||||
{
|
||||
Directory.CreateDirectory(cachePath);
|
||||
}
|
||||
ProfileOptimization.SetProfileRoot(cachePath);
|
||||
ProfileOptimization.StartProfile("Profile");
|
||||
#endif
|
||||
}
|
||||
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
AppMutex = new Mutex(true, "HandyControlDemo", out var createdNew);
|
||||
|
||||
Reference in new issue
Block a user