void extender_CustomColumnClick(object sender, CheckForm.ListViewExtender.CustomColumnClickEventArgs e) { if (e.ColumnIndex == 3) { // Fix if (e.Item == null) return; PosCheckResult check = e.Item.Tag as PosCheckResult; if (check.Fix()) { ReadPos(m_Items); PopulateList(); } } else if (e.ColumnIndex == 4) { // Zoom if (e.Item == null) return; PosCheckResult check = e.Item.Tag as PosCheckResult; DWGUtility.ZoomToObjects(check.Items); } else if (e.ColumnIndex == 5) { // Select and close form if (e.Item == null) return; PosCheckResult check = e.Item.Tag as PosCheckResult; Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor.SetImpliedSelection(check.Items.ToArray()); Close(); } }
private void PosCheck() { PromptSelectionResult sel = DWGUtility.SelectAllPosUser(true); if (sel.Status != PromptStatus.OK) return; ObjectId[] items = sel.Value.GetObjectIds(); using (CheckForm form = new CheckForm()) { if (form.Init(items)) { Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(null, form, false); } } }
private void PosCheck() { PromptSelectionResult sel = DWGUtility.SelectAllPosUser(true); if (sel.Status != PromptStatus.OK) { return; } ObjectId[] items = sel.Value.GetObjectIds(); using (CheckForm form = new CheckForm()) { if (form.Init(items)) { Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(null, form, false); } } }