public override void RegisterGraphicalPrimitive(InfoObject o, AGraphicalPrimitive p) { p.Subscribe(this); // Create lookup table entries if (!observedVisElements.ContainsKey(o)) { observedVisElements.Add(o, new List <AGraphicalPrimitive>()); } observedVisElements[o].Add(p); if (!representedInfoObjects.ContainsKey(p)) { representedInfoObjects.Add(p, new List <InfoObject>()); } representedInfoObjects[p].Add(o); // Add to visbridge if there is one if (visBridges.ContainsKey(o.dataSetID) && visBridges[o.dataSetID].Connects(o)) { visBridges[o.dataSetID].Connect(o, o.dataSet.colorTableBrushing[o], p); } }
// .................................................................... IPrimitiveObserver public void Observe(AGraphicalPrimitive observable) { observable.Subscribe(this); }