Esempio n. 1
0
 public void CreateSelection(PtSelectContext SltCtx, DisplayItem SelectedItem)
 {
     Debug.Assert(SltCtx != null && SelectedItem != null);
     if (SltCtx.CurrentSelectionSet != null && SelectedItem != null)
     {
         m_SelectTolerance = SltCtx.SelectTolerance;
         Selection Slt = GetSelection();
         Slt.SetManipulator(GetManipulator(SelectedItem));
         SltCtx.CurrentSelectionSet.AddSelection(Slt);
     }
 }
Esempio n. 2
0
        protected Manipulator GetManipulator(DisplayItem SelectedItem)
        {
            Debug.Assert(SelectedItem != null);
            if (null == SelectedItem) return null;

            if (SelectedItem is DisplayItemCircle)
            {
                return OnItemSelection((DisplayItemCircle)SelectedItem);
            }
            else if (SelectedItem is DisplayItemLine)
            {
                return OnItemSelection((DisplayItemLine)SelectedItem);
            }
            else if (SelectedItem is DisplayItemPoint)
            {
                return OnItemSelection((DisplayItemPoint)SelectedItem);
            }
            else if (SelectedItem is DisplayItemText)
            {
                return OnItemSelection((DisplayItemText)SelectedItem);
            }

               return null;
        }
Esempio n. 3
0
 public void AddItem(DisplayItem newItem)
 {
     if (newItem != null)
         m_ItemList.Add(newItem);
 }
Esempio n. 4
0
        // Save the quality result
        public void AddItem(double distance, DisplayItem item)
        {
            Debug.Assert(item != null);
            if (null == item) return;

            m_HittedDLItems.AddItem(distance, item);
            if (item is DisplayItemPoint)
                m_HittedDLPoints.AddItem(distance, item);
        }