Stream(ArrayList data, Autodesk.AutoCAD.Windows.StatusBarItem statusBarItem) { data.Add(new Snoop.Data.ClassSeparator(typeof(Autodesk.AutoCAD.Windows.StatusBarItem))); data.Add(new Snoop.Data.Bool("Enabled", statusBarItem.Enabled)); data.Add(new Snoop.Data.Icon("Icon", statusBarItem.Icon)); data.Add(new Snoop.Data.String("Tool tip text", statusBarItem.ToolTipText)); data.Add(new Snoop.Data.Bool("Visible", statusBarItem.Visible)); Autodesk.AutoCAD.Windows.Pane pane = statusBarItem as Autodesk.AutoCAD.Windows.Pane; if (pane != null) { Stream(data, pane); return; } Autodesk.AutoCAD.Windows.TrayItem trayItem = statusBarItem as Autodesk.AutoCAD.Windows.TrayItem; if (trayItem != null) { Stream(data, trayItem); 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; } // 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; } }