public AboutPage() { this.InitializeComponent(); if (ThemeHelper.GetCurrentTheme() == Classes.Model.Theme.Dark) { coloredLogo.Visibility = Visibility.Collapsed; whiteLogo.Visibility = Visibility.Visible; } else { coloredLogo.Visibility = Visibility.Visible; whiteLogo.Visibility = Visibility.Collapsed; } appNameText.Text = PackageHelper.GetAppNameString(); appVersionText.Text = PackageHelper.GetAppVersionString(); if (LocalConfiguration.LatestAssetUpdateVersion == 0) { assetUpdatePackSection.Visibility = Visibility.Collapsed; } else { assetUpdatePackSection.Visibility = Visibility.Visible; assetUpdatePackText.Text = LocalConfiguration.LatestAssetUpdateVersion.ToString(); } }
private async void Contact_Click(Hyperlink sender, HyperlinkClickEventArgs args) { RandomAccessStreamReference logFileReference = null; var emailMessage = new EmailMessage { Body = "", }; try { if (await ApplicationData.Current.LocalFolder.TryGetItemAsync("logs") is StorageFolder logFolder) { if (await logFolder.TryGetItemAsync("xpotify-email.log") is StorageFile oldLogFile) { await oldLogFile.DeleteAsync(); } if (await logFolder.TryGetItemAsync("xpotify.log") is StorageFile logFile) { var newFile = await logFile.CopyAsync(logFolder, "xpotify-email.log"); logFileReference = RandomAccessStreamReference.CreateFromFile(newFile); } } } catch (Exception ex) { emailMessage.Body = "\r\n\r\n\r\n\r\nCould not attach log file\r\n" + ex.ToString(); } emailMessage.To.Add(new EmailRecipient(supportEmailAddress)); emailMessage.Subject = $"{PackageHelper.GetAppNameString()} v{PackageHelper.GetAppVersionString()}"; if (logFileReference != null) { emailMessage.Attachments.Add(new EmailAttachment("xpotify-email.log", logFileReference)); } await EmailManager.ShowComposeNewEmailAsync(emailMessage); AnalyticsHelper.Log("helpLink", "email"); }