Beispiel #1
0
        public static async Task ReportError(string viewName, string errorStack = null, bool includeDeviceInfo = true)
        {
            var deviceInfo = new EasClientDeviceInformation();

            const string to      = "*****@*****.**";
            const string subject = "《饥荒百科全书 by tpxxn》应用错误报告";
            var          body    = $"{errorStack}  " + //错误堆栈
                                   $"(程序版本:{GetAppVersion()}, " +
                                   $"所在页面:{viewName}, ";

            if (includeDeviceInfo)
            {
                body += $", 设备名:{deviceInfo.FriendlyName}, " +
                        $"操作系统:{deviceInfo.OperatingSystem}, " +
                        $"系统版本:{Global.GetOsVersion()}, " +
                        $"SKU:{deviceInfo.SystemSku}, " +
                        $"产品名称:{deviceInfo.SystemProductName}, " +
                        $"制造商:{deviceInfo.SystemManufacturer}, " +
                        $"固件版本:{deviceInfo.SystemFirmwareVersion}, " +
                        $"硬件版本:{deviceInfo.SystemHardwareVersion})";
            }
            else
            {
                body += ")";
            }

            await CallExternalContent.OpenEmailComposeAsync(to, subject, body);
        }
        public static async Task ReportError(string feedbackText, string qqText)
        {
            const string to      = "*****@*****.**";
            const string subject = "《饥荒百科全书 by tpxxn》意见与建议";
            var          body    = feedbackText;

            if (qqText != null)
            {
                body += " QQ:" + qqText;
            }
            await CallExternalContent.OpenEmailComposeAsync(to, subject, body);
        }