/// <summary> /// Update the License Statistics /// </summary> private void UpdateLicenseStatistics() { // Recover the total license count from the product key Layton.Cab.Interface.LaytonProductKey key = WorkItem.RootWorkItem.Items[Layton.Cab.Interface.MiscStrings.ProductKey] as Layton.Cab.Interface.LaytonProductKey; int licenseCount = (key.IsTrial) ? 10 : key.AssetCount; UltraExplorerBarGroup licenses = overviewExplorerBar.Groups["licensing"]; if (licenses == null) { return; } // Set this in the explorer bar licenses.Items["licensecount"].Text = StatisticTitles.LicensedFor + licenseCount.ToString(); // Now we need a count of the 'licensable' assets within the database - this is the number of assets // which have been audited excluding child assets and any which have been flagged as 'disposed of' AssetDAO awDataAccess = new AssetDAO(); int licensesUsed = awDataAccess.LicensedAssetCount(); licenses.Items["licensesused"].Text = StatisticTitles.LicensesUsed + licensesUsed.ToString(); }