Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Common/Auxiliary/IPlotterElementExtensions.cs @ 13749

Last change on this file since 13749 was 12503, checked in by aballeit, 9 years ago

#2283 added GUI and charts; fixed MCTS

File size: 735 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5
6namespace Microsoft.Research.DynamicDataDisplay
7{
8  public static class IPlotterElementExtensions
9  {
10    public static void RemoveFromPlotter(this IPlotterElement element)
11    {
12      if (element == null)
13        throw new ArgumentNullException("element");
14
15      if (element.Plotter != null)
16      {
17        element.Plotter.Children.Remove(element);
18      }
19    }
20
21    public static void AddToPlotter(this IPlotterElement element, Plotter plotter)
22    {
23      if (element == null)
24        throw new ArgumentNullException("element");
25      if (plotter == null)
26        throw new ArgumentNullException("plotter");
27
28
29      plotter.Children.Add(element);
30    }
31  }
32}
Note: See TracBrowser for help on using the repository browser.