Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using Microsoft.Research.DynamicDataDisplay.Common.Auxiliary;
|
---|
6 | using Microsoft.Research.DynamicDataDisplay.Common;
|
---|
7 |
|
---|
8 | namespace 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.