コード例 #1
0
        private void LastestSecurityIssuesMenuItem_Click(object sender, RoutedEventArgs e)
        {
            if (DateList.Count > 1)
            {
                DateList.RemoveAt(DateList.Count - 1);                      //Den neusten Eintrag entfernen
                var dates = DateList.OrderByDescending(d => d).ToList();    //Von neusten zu am längsten her umsortieren

                ReportLatestSecurityIssues reportLatestSecurityIssues = new ReportLatestSecurityIssues(dates);
                reportLatestSecurityIssues.ShowDialog();

                if (reportLatestSecurityIssues.DialogResult == true)
                {
                    LoaderHelper.LoaderStart();

                    ProcessStatusBar.Visibility = Visibility.Visible;
                    ProcessStatusText.Content   = "Erstelle Report: Neuste Sicherheitslücken";
                    ProcessStatusBar.Value      = 10;

                    if (DataFilter == null)
                    {
                        DataFilter = new DataFilter();
                    }
                    DataFilter.DataSetCount = reportLatestSecurityIssues.DatesBack;

                    ExportDataType.DATA_TYPE dataType = reportLatestSecurityIssues.DataType;

                    (new Thread(() => {
                        var issues = dataController.GetLatestSecurityIssues(_connection.BaseURL, _connection.Token, DataFilter);
                        _progressBarValue = 25;
                        ReportController.CreateLatestReport(dataType, issues);
                    })).Start();
                }
            }
            else
            {
                MessageBox.Show("Noch nicht genug Daten gesammt um Report zu erstellen.");
            }
        }