System.Windows.Forms.ListBox.OnMouseUpLB C# (CSharp) Method

OnMouseUpLB() private method

private OnMouseUpLB ( object sender, MouseEventArgs e ) : void
sender object
e MouseEventArgs
return void
		private void OnMouseUpLB (object sender, MouseEventArgs e)
		{
			// Only do stuff with the left mouse button
			if ((e.Button & MouseButtons.Left) == 0)
				return;

			if (e.Clicks > 1) {
				OnDoubleClick (EventArgs.Empty);
#if NET_2_0
				OnMouseDoubleClick (e);
#endif
			}
			else if (e.Clicks == 1) {
				OnClick (EventArgs.Empty);
#if NET_2_0
				OnMouseClick (e);
#endif
			}
			
			if (!button_pressed)
				return;

			int index = IndexAtClientPoint (e.X, e.Y);
			OnItemClick (index);
			button_pressed = ctrl_pressed = shift_pressed = false;
		}