private listViewScans_MouseDown ( object sender, MouseEventArgs e ) : void | ||
sender | object | |
e | MouseEventArgs | |
리턴 | void |
private void listViewScans_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button != System.Windows.Forms.MouseButtons.Right)
{
return;
}
ListViewItem choice = null;
foreach (ListViewItem item in listViewScans.Items)
{
if (item.Bounds.Contains(new Point(e.X, e.Y)))
{
choice = item;
}
}
if (choice == null)
{
this.contextMenuStripAdd.Show(listViewScans, e.X, e.Y);
}
else
{
this.GetScanMenu(((IMasterScan)choice.Tag)).Show(listViewScans, e.X, e.Y);
}
}