Example #1
0
        public static void AddLayerPanel()
        {
            try
            {
                if (layerManage != null && layerPs != null)
                {
                    layerPs.Visible = true;
                    layerManage.InitiationLayer();
                }
                else
                {
                    layerManage = new LayerManage();
                    layerPs     = new PaletteSet("图层管理")
                    {
                        { "用户控件", layerManage }
                    };

                    layerPs.Visible           = true;
                    layerPs.Size              = new Size(220, 140);
                    layerPs.Dock              = DockSides.Right;
                    layerPs.StateChanged     += layerPs_StateChanged;
                    DCadApi.isShowLayerManage = true;
                }
            }
            catch (Autodesk.AutoCAD.Runtime.Exception)
            {
                PublicMethod.Instance.ShowMessage("图层管理面板加载失败!");
            }
        }
Example #2
0
 /// <summary>
 /// 卸载图层管理
 /// </summary>
 public static void RemoveLayerManager()
 {
     if (layerManage != null && !layerPs.IsDisposed)
     {
         layerPs.Visible = false;
         layerPs.Dispose();
         layerManage = null;
     }
 }