示例#1
0
        // ListBox > 더블클릭
        void Lst_L_DoubleClick(object sender, EventArgs e)
        {
            var LBC = sender as DevExpress.XtraEditors.ListBoxControl;

            string LayerName = LBC.SelectedItem as string;

            #region 필터
            TypedValue[] tvs = new TypedValue[]
            {
                new TypedValue(Convert.ToInt32(DxfCode.Operator), "<or"),
                new TypedValue(Convert.ToInt32(DxfCode.LayerName), LayerName),
                new TypedValue(Convert.ToInt32(DxfCode.Operator), "or>"),
            };

            var selectFilter = new SelectionFilter(tvs);
            #endregion

            var PSR = AC.Editor.SelectAll(selectFilter);

            if (PSR.Status == PromptStatus.OK)
            {
                CADUtil.SetSelected(PSR);

                AC.Editor.WriteMessage("\n'" + LayerName + "' 레이어 객체" + PSR.Value.Count.ToString() + "개 선택. \n");
            }
            else
            {
                AC.Editor.WriteMessage("\n'" + LayerName + "' 레이어 객체가 없습니다. \n");
            }


            Autodesk.AutoCAD.Internal.Utils.SetFocusToDwgView();
        }