Beispiel #1
0
        private void OnReportIssueWindowClosing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            ReportIssueFeedback reportIssueWindow = sender as ReportIssueFeedback;

            if (!reportIssueWindow.SendMessage)
            {
                return;
            }

            try
            {
                System.Security.Cryptography.SHA1 sha = new System.Security.Cryptography.SHA1CryptoServiceProvider();
                byte[] b64Name = System.Text.ASCIIEncoding.ASCII.GetBytes(System.Environment.UserName);

                byte[] hashed = sha.ComputeHash(b64Name);

                string hashedName = System.Text.ASCIIEncoding.ASCII.GetString(hashed);

                Logger.LogInfo("UserReportInfo", hashedName);
            }

            catch (Exception)
            {
            }

            Logger.LogInfo("UserReportType", reportIssueWindow.FeedbackType);
            Logger.LogInfo("UserReport", reportIssueWindow.Report);

            if (reportIssueWindow.Email != string.Empty)
            {
                Logger.LogInfo("UserEmail", reportIssueWindow.Email);
            }

            if (CurrentGraphCanvas != null && CurrentGraphCanvas.VisualHost != null)
            {
                string uiStates = CurrentGraphCanvas.Controller.GetRecordedUiStates();
                string vmStates = CurrentGraphCanvas.Controller.GetRecordedVmStates();
                Logger.LogError("Backtrace-uiStates", uiStates);
                Logger.LogError("Backtrace-vmStates", vmStates);
            }

            MessageBox.Show(UiStrings.ReportIssueAcknowledge, "Report Issue");
        }
Beispiel #2
0
        private void OnOptionReportClicked(object sender, RoutedEventArgs e)
        {
            if (collectInfoManager == null)
            {
                throw new InvalidOperationException("CollectInfoManager is not initialized (D8BF3BF5D96B)");
            }

            if (collectInfoManager.GetCollectInfoOption())
            {
                ReportIssueFeedback reportIssueWindow = new ReportIssueFeedback();
                if (null != Application.Current)
                {
                    reportIssueWindow.Owner = Application.Current.MainWindow;
                }
                reportIssueWindow.Closing += OnReportIssueWindowClosing;
                reportIssueWindow.Show();
            }
            else
            {
                new PopupDialog(ResourceNames.Warning, UiStrings.ReportIssueDisabled, string.Empty, string.Empty, "Ok");
            }
        }