mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-26 03:59:34 +08:00
app center
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
using System.Windows;
|
||||
using Microsoft.AppCenter;
|
||||
using Microsoft.AppCenter.Analytics;
|
||||
using Microsoft.AppCenter.Crashes;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Application.Models;
|
||||
using System.Windows;
|
||||
using System.Windows.Shell;
|
||||
using WpfApplication = System.Windows.Application;
|
||||
|
||||
@@ -16,5 +21,18 @@ namespace System.Application.UI
|
||||
void JumpList_JumpItemsRemovedByUser(object sender, JumpItemsRemovedEventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
base.OnStartup(e);
|
||||
|
||||
var options = DI.Get_Nullable<IOptions<AppSettings>>();
|
||||
|
||||
var appSecret = options?.Value.AppSecretVisualStudioAppCenter;
|
||||
if (!string.IsNullOrWhiteSpace(appSecret))
|
||||
{
|
||||
AppCenter.Start(appSecret, typeof(Analytics), typeof(Crashes));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user