Stream(ArrayList data, SelectedSubObject selSubObj) { data.Add(new Snoop.Data.ClassSeparator(typeof(SelectedSubObject))); data.Add(new Snoop.Data.String("Selection method", selSubObj.SelectionMethod.ToString())); data.Add(new Snoop.Data.Object("Full sub-entity path", selSubObj.FullSubentityPath)); //data.Add(new Snoop.Data.Int("Graphics system marker", selSubObj.GraphicsSystemMarker)); // TBD: Fix JMA data.Add(new Snoop.Data.Object("Optional details", selSubObj.OptionalDetails)); CrossingOrWindowSelectedSubObject crossOrWindowSelSubObj = selSubObj as CrossingOrWindowSelectedSubObject; if (crossOrWindowSelSubObj != null) { Stream(data, crossOrWindowSelSubObj); return; } FenceSelectedSubObject fenceSelSubObj = selSubObj as FenceSelectedSubObject; if (fenceSelSubObj != null) { Stream(data, fenceSelSubObj); return; } PickPointSelectedSubObject pickPtSelSubObj = selSubObj as PickPointSelectedSubObject; if (pickPtSelSubObj != null) { Stream(data, pickPtSelSubObj); return; } }
CollectEvent(object sender, CollectorEventArgs e) { // cast the sender object to the SnoopCollector we are expecting Collector snoopCollector = sender as Collector; if (snoopCollector == null) { Debug.Assert(false); // why did someone else send us the message? return; } // see if it is a type we are responsible for Editor editor = e.ObjToSnoop as Editor; if (editor != null) { Stream(snoopCollector.Data(), editor); return; } PromptOptions promptOpts = e.ObjToSnoop as PromptOptions; if (promptOpts != null) { Stream(snoopCollector.Data(), promptOpts); return; } PromptStringOptionsEventArgs promptStringArgs = e.ObjToSnoop as PromptStringOptionsEventArgs; if (promptStringArgs != null) { Stream(snoopCollector.Data(), promptStringArgs); return; } PromptSelectionOptionsEventArgs promptSelectionArgs = e.ObjToSnoop as PromptSelectionOptionsEventArgs; if (promptSelectionArgs != null) { Stream(snoopCollector.Data(), promptSelectionArgs); return; } PromptSelectionOptions promptSelectionOpts = e.ObjToSnoop as PromptSelectionOptions; if (promptSelectionOpts != null) { Stream(snoopCollector.Data(), promptSelectionOpts); return; } PromptPointOptionsEventArgs promptPointArgs = e.ObjToSnoop as PromptPointOptionsEventArgs; if (promptPointArgs != null) { Stream(snoopCollector.Data(), promptPointArgs); return; } PromptNestedEntityResultEventArgs promptNestResultArgs = e.ObjToSnoop as PromptNestedEntityResultEventArgs; if (promptNestResultArgs != null) { Stream(snoopCollector.Data(), promptNestResultArgs); return; } PromptResult promptResult = e.ObjToSnoop as PromptResult; if (promptResult != null) { Stream(snoopCollector.Data(), promptResult); return; } PromptKeywordOptionsEventArgs promptKeywordArgs = e.ObjToSnoop as PromptKeywordOptionsEventArgs; if (promptKeywordArgs != null) { Stream(snoopCollector.Data(), promptKeywordArgs); return; } PromptIntegerOptionsEventArgs promptIntArgs = e.ObjToSnoop as PromptIntegerOptionsEventArgs; if (promptIntArgs != null) { Stream(snoopCollector.Data(), promptIntArgs); return; } PromptEntityOptionsEventArgs promptEntArgs = e.ObjToSnoop as PromptEntityOptionsEventArgs; if (promptEntArgs != null) { Stream(snoopCollector.Data(), promptEntArgs); return; } PromptDoubleOptionsEventArgs promptDoubleArgs = e.ObjToSnoop as PromptDoubleOptionsEventArgs; if (promptDoubleArgs != null) { Stream(snoopCollector.Data(), promptDoubleArgs); return; } PromptSelectionResult prSelRes = e.ObjToSnoop as PromptSelectionResult; if (prSelRes != null) { Stream(snoopCollector.Data(), prSelRes); return; } SelectionSet selSet = e.ObjToSnoop as SelectionSet; if (selSet != null) { Stream(snoopCollector.Data(), selSet); return; } SelectedObject selObj = e.ObjToSnoop as SelectedObject; if (selObj != null) { Stream(snoopCollector.Data(), selObj); return; } SelectedSubObject selSubObj = e.ObjToSnoop as SelectedSubObject; if (selSubObj != null) { Stream(snoopCollector.Data(), selSubObj); return; } SelectionDetails selDetails = e.ObjToSnoop as SelectionDetails; if (selDetails != null) { Stream(snoopCollector.Data(), selDetails); return; } SelectionRemovedEventArgs selRemovedArgs = e.ObjToSnoop as SelectionRemovedEventArgs; if (selRemovedArgs != null) { Stream(snoopCollector.Data(), selRemovedArgs); return; } SelectionAddedEventArgs selAddedArgs = e.ObjToSnoop as SelectionAddedEventArgs; if (selAddedArgs != null) { Stream(snoopCollector.Data(), selAddedArgs); return; } DraggingEndedEventArgs dragEndArgs = e.ObjToSnoop as DraggingEndedEventArgs; if (dragEndArgs != null) { Stream(snoopCollector.Data(), dragEndArgs); return; } InputPointContext inputPtCntxt = e.ObjToSnoop as InputPointContext; if (inputPtCntxt != null) { Stream(snoopCollector.Data(), inputPtCntxt); return; } Keyword keyword = e.ObjToSnoop as Keyword; if (keyword != null) { Stream(snoopCollector.Data(), keyword); return; } PointFilterEventArgs ptFilterEventArgs = e.ObjToSnoop as PointFilterEventArgs; if (ptFilterEventArgs != null) { Stream(snoopCollector.Data(), ptFilterEventArgs); return; } PointFilterResult ptFilterRes = e.ObjToSnoop as PointFilterResult; if (ptFilterRes != null) { Stream(snoopCollector.Data(), ptFilterRes); return; } PointMonitorEventArgs ptMonitorArgs = e.ObjToSnoop as PointMonitorEventArgs; if (ptMonitorArgs != null) { Stream(snoopCollector.Data(), ptMonitorArgs); return; } PromptAngleOptionsEventArgs promptAngleOptsArgs = e.ObjToSnoop as PromptAngleOptionsEventArgs; if (promptAngleOptsArgs != null) { Stream(snoopCollector.Data(), promptAngleOptsArgs); return; } PromptDistanceOptionsEventArgs promptDistanceOptsArgs = e.ObjToSnoop as PromptDistanceOptionsEventArgs; if (promptDistanceOptsArgs != null) { Stream(snoopCollector.Data(), promptDistanceOptsArgs); return; } PromptDoubleResultEventArgs promptDoubleResArgs = e.ObjToSnoop as PromptDoubleResultEventArgs; if (promptDoubleResArgs != null) { Stream(snoopCollector.Data(), promptDoubleResArgs); return; } PromptFileOptions promptFileOpts = e.ObjToSnoop as PromptFileOptions; if (promptFileOpts != null) { Stream(snoopCollector.Data(), promptFileOpts); return; } PromptForEntityEndingEventArgs promptForEntEndArgs = e.ObjToSnoop as PromptForEntityEndingEventArgs; if (promptForEntEndArgs != null) { Stream(snoopCollector.Data(), promptForEntEndArgs); return; } PromptForSelectionEndingEventArgs promptForSelEndArgs = e.ObjToSnoop as PromptForSelectionEndingEventArgs; if (promptForSelEndArgs != null) { Stream(snoopCollector.Data(), promptForSelEndArgs); return; } PromptNestedEntityOptions promptNestEntOpts = e.ObjToSnoop as PromptNestedEntityOptions; if (promptNestEntOpts != null) { Stream(snoopCollector.Data(), promptNestEntOpts); return; } PromptNestedEntityOptionsEventArgs promptNestEntOptsArgs = e.ObjToSnoop as PromptNestedEntityOptionsEventArgs; if (promptNestEntOptsArgs != null) { Stream(snoopCollector.Data(), promptNestEntOptsArgs); return; } PromptSelectionResultEventArgs promptSelResArgs = e.ObjToSnoop as PromptSelectionResultEventArgs; if (promptSelResArgs != null) { Stream(snoopCollector.Data(), promptSelResArgs); return; } // ValueTypes we have to treat a bit different if (e.ObjToSnoop is PickPointDescriptor) { Stream(snoopCollector.Data(), (PickPointDescriptor)e.ObjToSnoop); return; } }