Example #1
0
        AddSystemObjectTreeNode(string name, object obj, TreeNode parent)
        {
            TreeNode newNode = new TreeNode();

            newNode.Tag  = obj;
            newNode.Text = name;
            if (parent == null)
            {
                m_tvCmds.Nodes.Add(newNode);
            }
            else
            {
                parent.Nodes.Add(newNode);
            }

            AcRx.Dictionary dict = obj as AcRx.Dictionary;
            if (dict != null)
            {
                IEnumerable enumerable = dict as IEnumerable;
                if (enumerable != null)
                {
                    IEnumerator enumerator = enumerable.GetEnumerator();
                    while (enumerator.MoveNext())
                    {
                        this.AddSystemObjectTreeNode(((DictionaryEntry)enumerator.Current).Key.ToString(), ((DictionaryEntry)enumerator.Current).Value, newNode);
                    }
                }
            }
        }
Example #2
0
        Stream(ArrayList data, AcRx.Dictionary dict)
        {
            data.Add(new Snoop.Data.ClassSeparator(typeof(AcRx.Dictionary)));

            data.Add(new Snoop.Data.Int("Count", dict.Count));
            data.Add(new Snoop.Data.Bool("Deletes objects", dict.DeletesObjects));
            data.Add(new Snoop.Data.Bool("Is case sensitive", dict.IsCaseSensitive));
            data.Add(new Snoop.Data.Bool("Is sorted", dict.IsSorted));
        }
Example #3
0
        Stream(ArrayList data, Autodesk.AutoCAD.Runtime.RXObject rxObj)
        {
            data.Add(new Snoop.Data.ClassSeparator(typeof(Autodesk.AutoCAD.Runtime.RXObject)));

            data.Add(new Snoop.Data.Class("Class", rxObj.GetType()));
            data.Add(new Snoop.Data.String("Rx class name", MgdDbg.Utils.AcadUi.ObjToRxClassStr(rxObj)));

            // branch to all types we are concerned with
            AcDb.Database db = rxObj as AcDb.Database;
            if (db != null)
            {
                Stream(data, db);
                return;
            }

            AcDb.HostApplicationServices hAppSrvs = rxObj as AcDb.HostApplicationServices;
            if (hAppSrvs != null)
            {
                Stream(data, hAppSrvs);
                return;
            }

            AcRx.DynamicLinker dLinker = rxObj as AcRx.DynamicLinker;
            if (dLinker != null)
            {
                Stream(data, dLinker);
                return;
            }

            AcRx.Dictionary dict = rxObj as AcRx.Dictionary;
            if (dict != null)
            {
                Stream(data, dict);
                return;
            }

            AcRx.RXClass rxClass = rxObj as AcRx.RXClass;
            if (rxClass != null)
            {
                Stream(data, rxClass);
                return;
            }
        }