コード例 #1
0
        /// <summary>
        ///     Method called from the view. Generate a report from a set of selected configurations once
        ///     all conditions are fulfilled.
        /// </summary>
        public void MakeReport()
        {
            Task.Run(() =>
            {
                StartLongOperation();
                // Execute the Query
                string batchFilename = LoadedBatch;

                LoadedBatch = "Running query";

                List <TrackGroup> queryResultTracks = null;
                List <Report> queryReports          = null;
                try
                {
                    Query.Execute(LoggedExperiments, OnExperimentalUnitProcessed, out queryResultTracks, out queryReports);
                }
                catch (Exception ex)
                {
                    string exception = ex.ToString();
                }
                //Clone the query
                LogQueryViewModel clonedQuery = Serialiazer.Clone(Query);

                //Create and add to list the result of the query
                LogQueryResultViewModel result = new LogQueryResultViewModel(queryResultTracks, queryReports, clonedQuery);
                LogQueryResults.Add(result);
                //set this last result as selected
                SelectedLogQueryResult = LogQueryResults[LogQueryResults.Count - 1];

                LoadedBatch = batchFilename;
                EndLongOperation();
            });
        }
コード例 #2
0
 /// <summary>
 ///     Close a tab (report view) and remove it from the list of reports.
 /// </summary>
 /// <param name="result">The report to be removed</param>
 public void Close(LogQueryResultViewModel result)
 {
     LogQueryResults.Remove(result);
     if (LogQueryResults.Count > 0)
     {
         SelectedLogQueryResult = LogQueryResults[0];
     }
     else
     {
         SelectedLogQueryResult = null;
     }
 }