Ejemplo n.º 1
0
        /// <summary>
        /// On click, update Redbrick.
        ///
        /// This is where we used to wait 10-20 seconds for the built-in property manager.
        ///
        /// If you were wondering, people don't get raises for that kind of increase in productivity.
        /// It pays the same as sitting in front of a brake all day. I'm considering bringing the
        /// wait back. We just need this:
        /// System.Threading.Thread.Sleep(10000);
        /// </summary>
        /// <returns>0</returns>
        int ad_UserSelectionPostNotify()
        {
            // What do we got?
            swSelComp = swSelMgr.GetSelectedObjectsComponent2(1);
            if (swSelComp != null)
            {
                // This thing!
                Document = swSelComp.GetModelDoc2();
                // Let's have a look.
                ConnectSelection();
            }
            else
            {
                // Nothing's selected?
                Document = SwApp.ActiveDoc;
                // Just look at the root item then.
                ConnectSelection();
            }

            return(0);
        }