Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Charts/RemoveAll.cs @ 13398

Last change on this file since 13398 was 12503, checked in by aballeit, 10 years ago

#2283 added GUI and charts; fixed MCTS

File size: 886 bytes
RevLine 
[12503]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using Microsoft.Research.DynamicDataDisplay.Common.Auxiliary;
6using Microsoft.Research.DynamicDataDisplay.Common;
7
8namespace Microsoft.Research.DynamicDataDisplay.Charts
9{
10  public sealed class RemoveAll : IPlotterElement
11  {
12    private Type type;
13    [NotNull]
14    public Type Type
15    {
16      get { return type; }
17      set
18      {
19        if (value == null)
20          throw new ArgumentNullException("value");
21 
22        type = value;
23      }
24    }
25
26    private Plotter plotter;
27    public Plotter Plotter
28    {
29      get { return plotter; }
30    }
31
32    public void OnPlotterAttached(Plotter plotter)
33    {
34      this.plotter = plotter;
35      if (type != null)
36      {
37        plotter.Children.RemoveAllOfType(type);
38      }
39    }
40
41    public void OnPlotterDetaching(Plotter plotter)
42    {
43      this.plotter = null;
44    }
45  }
46}
Note: See TracBrowser for help on using the repository browser.