Esempio n. 1
0
        public override void MouseDown(ISpatialDisplay sender, IPosition p, MouseButtons b)
        {
            if (b == MouseButtons.Right)
            {
                ShowContextMenu(sender, p);
            }

            // If there's no command, or it doesn't handle left clicks...
            else if (m_Command == null || !m_Command.LButtonDown(p))
            {
                bool isMultiSelect = (Control.ModifierKeys & Keys.Shift) != 0;

                // If we're currently auto-highlighting, and the user is doing
                // a multi-select, turn off auto-highlight and get rid of the
                // properties window (confusing).

                // TODO: May want to keep the properties window, but disabled. In the
                // past, it was ok to close because the dialog rested on top of the
                // map. Now, closing the property window causes a redraw, which is
                // a bit unexpected in the middle of a multiselect.

                if (isMultiSelect)
                {
                    m_IsAutoSelect = 0;
                    m_Main.ClosePropertiesWindow();
                }

                if (m_Sel == null)
                {
                    OnSelect(sender, p, isMultiSelect);
                }
                else
                {
                    m_Sel.CtrlMouseDown(p);
                }
            }
        }