Stream(ArrayList data, Autodesk.AutoCAD.Windows.StatusBar statusBar) { data.Add(new Snoop.Data.ClassSeparator(typeof(Autodesk.AutoCAD.Windows.StatusBar))); data.Add(new Snoop.Data.Enumerable("Panes", statusBar.Panes)); data.Add(new Snoop.Data.Enumerable("Tray items", statusBar.TrayItems)); }
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; } // branch to all types we are concerned with System.Type type = e.ObjToSnoop as System.Type; if (type != null) { Stream(snoopCollector.Data(), type); return; } System.Version ver = e.ObjToSnoop as System.Version; if (ver != null) { Stream(snoopCollector.Data(), ver); return; } System.Collections.Specialized.StringCollection strCol = e.ObjToSnoop as System.Collections.Specialized.StringCollection; if (strCol != null) { Stream(snoopCollector.Data(), strCol); return; } AcAp.Document doc = e.ObjToSnoop as AcAp.Document; if (doc != null) { Stream(snoopCollector.Data(), doc); return; } AcAp.DocumentCollectionEventArgs docCollectEventArgs = e.ObjToSnoop as AcAp.DocumentCollectionEventArgs; if (docCollectEventArgs != null) { Stream(snoopCollector.Data(), docCollectEventArgs); return; } AcAp.DocumentLockModeWillChangeEventArgs docLockModeEventArgs = e.ObjToSnoop as AcAp.DocumentLockModeWillChangeEventArgs; if (docLockModeEventArgs != null) { Stream(snoopCollector.Data(), docLockModeEventArgs); return; } AcAp.DocumentLockModeChangedEventArgs docLockModeChangedEventArgs = e.ObjToSnoop as AcAp.DocumentLockModeChangedEventArgs; if (docLockModeChangedEventArgs != null) { Stream(snoopCollector.Data(), docLockModeChangedEventArgs); return; } AcAp.DocumentLockModeChangeVetoedEventArgs docLockModeVetoedEventArgs = e.ObjToSnoop as AcAp.DocumentLockModeChangeVetoedEventArgs; if (docLockModeVetoedEventArgs != null) { Stream(snoopCollector.Data(), docLockModeVetoedEventArgs); return; } AcAp.DocumentDestroyedEventArgs docDestroyedEventArgs = e.ObjToSnoop as AcAp.DocumentDestroyedEventArgs; if (docDestroyedEventArgs != null) { Stream(snoopCollector.Data(), docDestroyedEventArgs); return; } AcAp.DocumentCollection docCollection = e.ObjToSnoop as AcAp.DocumentCollection; if (docCollection != null) { Stream(snoopCollector.Data(), docCollection); return; } AcAp.XrefFileLock xrefFileLock = e.ObjToSnoop as AcAp.XrefFileLock; if (xrefFileLock != null) { Stream(snoopCollector.Data(), xrefFileLock); return; } Autodesk.AutoCAD.Windows.Window win = e.ObjToSnoop as Autodesk.AutoCAD.Windows.Window; if (win != null) { Stream(snoopCollector.Data(), win); return; } Autodesk.AutoCAD.Windows.StatusBar statusBar = e.ObjToSnoop as Autodesk.AutoCAD.Windows.StatusBar; if (statusBar != null) { Stream(snoopCollector.Data(), statusBar); return; } Autodesk.AutoCAD.Windows.StatusBarItem statusBarItem = e.ObjToSnoop as Autodesk.AutoCAD.Windows.StatusBarItem; if (statusBarItem != null) { Stream(snoopCollector.Data(), statusBarItem); return; } }