Exemple #1
0
        /// <summary>
        /// Handles a key up event
        /// </summary>
        /// <param name="sender">The display where the key event originated</param>
        /// <param name="k">Information about the event</param>
        public override void KeyUp(ISpatialDisplay sender, KeyEventArgs k)
        {
            // Whereas Control.ModifierKeys sees Keys.Control, the KeyUp event passes Keys.ControlKey
            if (k.KeyCode == Keys.ControlKey && m_Sel != null)
            {
                // Grab the selected items (if any) and merge any currently selected features.
                Selection s = m_Sel.Selection;
                FreeAreaSelectionTool();
                if (s.Count > 0)
                {
                    s.AddRange(this.SpatialSelection.Items);
                    SetSelection(s);
                }

                // Ensure everything is back to normal
                ActiveDisplay.RestoreLastDraw();

                // Force any prior selection to show
                m_HasSelectionChanged = true;
                //ActiveDisplay.PaintNow();
            }
        }
Exemple #2
0
 /// <summary>
 /// Indicates that any painting previously done by a command should be erased. This
 /// tells the command's active display that it should revert the display buffer to
 /// the way it was at the end of the last draw from the map model. Given that a command
 /// supports painting, it's <c>Paint</c> method will be called during idle time.
 /// </summary>
 void ErasePainting()
 {
     ActiveDisplay.RestoreLastDraw();
 }