private void updateTable(ProblemResult result)
        {
            ResultTabs.Clear();
            for (int i = 0; i < result.TableResult.Values.Count; ++i)
            {
                ResultDataTable resultDataTable = new ResultDataTable(result.TableResult.Values[i]);
                DataGrid dataGrid = new DataGrid();
                dataGrid.IsReadOnly = true;
                dataGrid.CanUserSortColumns = false;
                dataGrid.CanUserAddRows = false;
                dataGrid.CanUserDeleteRows = false;
                dataGrid.CanUserResizeRows = false;
                dataGrid.CanUserResizeColumns = false;
                dataGrid.SelectionUnit = DataGridSelectionUnit.Cell;
                dataGrid.ItemsSource = resultDataTable.AsDataView;

                TabItem tabItem = new TabItem();
                tabItem.Header = 
                    string.IsNullOrEmpty(result.TableResult.Values[i].Title) 
                    ? (i + 1).ToString() : result.TableResult.Values[i].Title;
                tabItem.Content = dataGrid;
                ResultTabs.Add(tabItem);
            }

            if (ResultTabs.Count > 0)
            {
                tcResultsTabs.SelectedIndex = 0;
                tcResultsTabs.SelectedItem = ResultTabs.First();
                ResultTabs.First().IsSelected = true;
            }
        }
 private void updatePlot(ProblemResult result)
 {
     spotControl.ClearGraphs();
     foreach (var value in result.VisualResult.Graphs)
     {
         List<Point> points = new List<Point>();
         for (int i = 0; i < value.Keys.Count; ++i)
         {
             points.Add(new Point(value.Keys[i], value.Values[i]));
         }
         spotControl.AddGraph(points, getRandomColor(Colors.LightGray), 2, value.Title);
     }
     if (result.VisualResult.Graphs.Count > 1)
     {
         spotControl.ShowGraphInfo = true;
     }
     else
     {
         spotControl.ShowGraphInfo = false;
     }
 }