Exemplo n.º 1
0
 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();
     }
 }
Exemplo n.º 2
0
        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);
                }
            }
        }
Exemplo n.º 3
0
        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);
                }
            }
        }