示例#1
0
        /// <summary>
        /// Handle a MouseDown event, recording the selected node if it seems likely that the
        /// TreeView Select operation will ignore it.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void m_treeView_MouseDown(object sender, MouseEventArgs e)
        {
            TreeNode tn = m_treeView.GetNodeAt(e.X, e.Y);

            if (tn != null &&
                (e.X >= tn.Bounds.X && e.X <= tn.Bounds.X + tn.Bounds.Width) &&
                (e.Y >= tn.Bounds.Y && e.Y <= tn.Bounds.Y + tn.Bounds.Height))
            {
                m_tnMouseDown = tn;
            }
            else
            {
                m_tnMouseDown = null;
            }
        }
示例#2
0
        /// <summary>
        /// Handle a MouseDown event, recording the selected node if it seems likely that the
        /// TreeView Select operation will ignore it.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <remarks>Method is only used on Windows</remarks>
        private void m_treeView_MouseDown(object sender, MouseEventArgs e)
        {
            Debug.Assert(!Platform.IsMono, "Method only needed on Windows (FWNX-399)");
            TreeNode tn = m_treeView.GetNodeAt(e.X, e.Y);

            if (tn != null &&
                (e.X >= tn.Bounds.X && e.X <= tn.Bounds.X + tn.Bounds.Width) &&
                (e.Y >= tn.Bounds.Y && e.Y <= tn.Bounds.Y + tn.Bounds.Height))
            {
                m_tnMouseDown = tn;
            }
            else
            {
                m_tnMouseDown = null;
            }
        }