private void DoLicenseChanged() { if (!haltEvents && (LicenseChanged != null)) { LicenseChanged.Invoke(this, new EventArgs()); } }
/// <summary> /// 初始化单一实例应用程序对象。这是执行的创作代码的第一行, /// 已执行,逻辑上等同于 main() 或 WinMain()。 /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; this.EnteredBackground += OnEnteringBackground; this.LeavingBackground += OnLeavingBackground; this.Resuming += OnResuming; FirstRunWork(); storeContext.OfflineLicensesChanged += async(s, e) => { AppLicense = await s.GetAppLicenseAsync(); LicenseChanged?.Invoke(AppLicense); }; InitializeAppLicense(); }
/// <summary> /// 初始化单一实例应用程序对象。这是执行的创作代码的第一行, /// 已执行,逻辑上等同于 main() 或 WinMain()。 /// </summary> public App() { this.InitializeComponent(); this.Suspending += OnSuspending; this.EnteredBackground += OnEnteringBackground; this.LeavingBackground += OnLeavingBackground; this.Resuming += OnResuming; storeContext.OfflineLicensesChanged += async(s, e) => { AppLicense = await s.GetAppLicenseAsync(); LicenseChanged?.Invoke(AppLicense); }; //处理运行时版本信息更新 InitializeAppLicense(); //初始化版本信息 if (Settings.DownloadsFolderToken == null || !StorageApplicationPermissions.MostRecentlyUsedList .ContainsItem(Settings.DownloadsFolderToken)) { Settings.DownloadsFolderToken = null; } TXDataFileIO.StartInitializeMessages(); //不管有没有都要Start Converters.ExtentionConverter.InitializeDictionary(); }
private async void InitializeAppLicense() { AppLicense = await storeContext.GetAppLicenseAsync(); LicenseChanged?.Invoke(AppLicense); }