Example #1
0
        /// <summary>
        /// 连接关系面板
        /// </summary>
        /// <param name="ee"> </param>
        public static void AddOrUpdateConnectPanel(selectEntityArgs ee)
        {
            try
            {
                //PublicMethod.Instance.Editor.SetImpliedSelection(new ObjectId[0]);
                if (null == ConnectCtl && null == ConnetPs)
                {
                    if (false == ee.badd)
                    {
                        return;
                    }
                    ConnectCtl = new ConnectManager();
                    //ConnectSel = new ConnectBySel();
                    ConnetPs = new PaletteSet("拓扑关系管理")
                    {
                        { "用户控件", ConnectCtl }
                        //{"yonghu",ConnectSel}
                    };

                    ConnetPs.Size          = new Size(246, 140);
                    ConnetPs.Dock          = DockSides.Left;
                    ConnetPs.StateChanged += ConnetPs_StateChanged;
                    ConnetPs.Visible       = true;
                }
                else if (false == ee.badd && ConnetPs.Visible != true)
                {
                    return;
                }

                ConnetPs.Visible = true;
                if (ConnectCtl != null)
                {
                    ConnectCtl.SetNod(ee);
                }
            }
            catch (Autodesk.AutoCAD.Runtime.Exception)
            {
                PublicMethod.Instance.ShowMessage("连接关系面板加载失败!");
            }
        }