Esempio n. 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void DGV_Targets_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right)
     {
         try
         {
             DataGridView.HitTestInfo hti = DGV_Targets.HitTest(e.X, e.Y);
             if (hti.RowIndex >= 0)
             {
                 CMS_ManageTargets.Show(DGV_Targets, e.Location);
             }
         }
         catch (Exception) { }
     } // if (e.Bu...
 }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void DGV_Targets_MouseDown(object sender, MouseEventArgs e)
        {
            try
            {
                DataGridView.HitTestInfo hti = DGV_Targets.HitTest(e.X, e.Y);

                if (hti.RowIndex >= 0)
                {
                    DGV_Targets.ClearSelection();
                    DGV_Targets.Rows[hti.RowIndex].Selected = true;
                    DGV_Targets.CurrentCell = DGV_Targets.Rows[hti.RowIndex].Cells[0];
                }
            }
            catch (Exception lEx)
            {
                LogConsole.Main.LogConsole.pushMsg(String.Format("ARPScan: {1}", lEx.Message));
                DGV_Targets.ClearSelection();
            }
        }