Esempio n. 1
0
        private void FetchAppInfo()
        {
            try
            {
                appInfo = null;
                // Cleanup
                if (appImage != null)
                {
                    appImage.Dispose();
                    appImage = null;
                }

                if (!String.IsNullOrEmpty(settings.ApplicationId))
                {
                    appInfo = UWPManager.Instance.GetUWCApps().FirstOrDefault(a => a.Name == settings.ApplicationId);
                    if (appInfo == null)
                    {
                        Logger.Instance.LogMessage(TracingLevel.ERROR, $"FetchAppInfo could not find UWC app: {settings.ApplicationId}");
                        return;
                    }
                    appImage = (Bitmap)Image.FromFile(appInfo.Logo.LocalPath);
                }
            }
            catch (Exception ex)
            {
                Logger.Instance.LogMessage(TracingLevel.ERROR, $"FetchAppInfo Exception: {ex}");
            }
        }
Esempio n. 2
0
        private void InitializeSettings()
        {
            appInfo = null;
            if (!String.IsNullOrEmpty(settings.ApplicationId))
            {
                FetchAppInfo();
            }

            SaveSettings();
        }