本文整理汇总了C#中System.Windows.Forms.MouseEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# MouseEventArgs类的具体用法?C# MouseEventArgs怎么用?C# MouseEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MouseEventArgs类属于System.Windows.Forms命名空间,在下文中一共展示了MouseEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LeftMouseFullClicked
public override void LeftMouseFullClicked(MouseEventArgs e)
{
if (_validPos)
{
engine.addNode(nodeType);
}
}
示例2: MouseUp
private static void MouseUp(object sender, MouseEventArgs mouseEventArgs)
{
if (mouseEventArgs.Button == MouseButtons.Left)
KeysPressed &= ~VolumeScrollKey.LeftMouseButton;
if (mouseEventArgs.Button == MouseButtons.Right)
KeysPressed &= ~VolumeScrollKey.RightMouseButton;
}
示例3: OnMouseWheel
void OnMouseWheel(object sender, MouseEventArgs e)
{
WheelActions inputaction = e.Delta > 0 ? WheelActions.Up : WheelActions.Down;
if (inputaction == action)
base.OnEventTriggered(EventTypes.MouseWheel, this);
}
示例4: tc_MouseClick
private void tc_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Middle)
{
for (int i = 0; i < tc.TabCount; ++i)
{
if (tc.GetTabRect(i).Contains(e.Location))
{
TabPage tabPage = tc.TabPages[i];
if (tabPage != null)
{
TabInfo tabInfo = tabPage.Tag as TabInfo;
if (tabInfo != null)
{
tc.TabPages.Remove(tabPage);
Tabs.Remove(tabInfo);
}
}
return;
}
}
}
}
示例5: listbox_clients_DoubleClickSubItem
private void listbox_clients_DoubleClickSubItem(object sender, ChatListEventArgs e, MouseEventArgs es)
{
if (listbox_clients.Items[0].SubItems[0].Status== ChatListSubItem.UserStatus.OffLine)
{
showInfo("你处于离线状态", MyConfig.INT_UPDATEUI_TXBOX);
return;
}
if (listbox_clients.Items[0].SubItems[0].IsVip)
{
showInfo("你处于远程控制状态", MyConfig.INT_UPDATEUI_TXBOX);
return;
}
if (e.SelectSubItem.DisplayName.Equals(label_nickname.Text))
{
showInfo("设备不能连接自身", MyConfig.INT_UPDATEUI_TXBOX);
//return;
}
if (e.SelectSubItem.Status==ChatListSubItem.UserStatus.OffLine)
{
showInfo("你连接的远端设备不在线", MyConfig.INT_UPDATEUI_TXBOX);
return;
}
if (e.SelectSubItem.IsVip)
{
showInfo("你连接的远端设备处于控制状态", MyConfig.INT_UPDATEUI_TXBOX);
return;
}
connect(e.SelectSubItem.Tag.ToString());
}
示例6: itemListBox_MouseDown
public void itemListBox_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
offsetListBox.SelectedIndex = offsetListBox.IndexFromPoint(e.Location);
}
}
示例7: TxtMessagesMouseUp
private void TxtMessagesMouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
contextOuputMenu.Show(txtMessages, e.Location);
}
}
示例8: CanvasForm_MouseDown
private void CanvasForm_MouseDown(object sender, MouseEventArgs e)
{
allowToDraw = true;
tmpShape = ShapeFactory.GetShapeInstance(ShapeFactory.GetTypeByNumber(cbType.SelectedIndex), e.X, e.Y, 1, 1, Convert.ToInt16(width.SelectedItem), colorPanel.BackColor);
tabControlCanvas.SelectedTab.Controls[0].Controls.Add(tmpShape);
shapeIndex = tabControlCanvas.SelectedTab.Controls[0].Controls.Count - 1;
}
示例9: rb_MouseUp
private void rb_MouseUp(object sender, MouseEventArgs e)
{
var fs = ((RibbonButton)sender).Text;
fontSize = Convert.ToInt32(fs);
switch (FontSize)
{
case 8:
fontSize = 1;
break;
case 10:
fontSize = 2;
break;
case 12:
fontSize = 3;
break;
case 14:
fontSize = 4;
break;
case 18:
fontSize = 5;
break;
case 24:
fontSize = 6;
break;
case 28:
fontSize = 7;
break;
}
TextBoxText = fs;
}
示例10: ListBoxMouseDoubleClick
private void ListBoxMouseDoubleClick(object sender, MouseEventArgs e)
{
if (listBox.SelectedIndex == -1)
return;
DialogResult = DialogResult.OK;
Close();
}
示例11: LeftMousePressed
public override void LeftMousePressed(MouseEventArgs e)
{
engine.setInitPos();
engine.setInitAngle();
origX = System.Windows.Forms.Control.MousePosition.X;
origY = System.Windows.Forms.Control.MousePosition.Y;
}
示例12: LlText_MouseClick
private void LlText_MouseClick(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
CmMenu.Show(PlHead, 0, PlHead.Height);
}
}
示例13: notifyIcon_MouseUp
private void notifyIcon_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button != MouseButtons.Left) return;
var mi = typeof(NotifyIcon).GetMethod("ShowContextMenu", BindingFlags.Instance | BindingFlags.NonPublic);
mi.Invoke(_notifyIcon, null);
}
示例14: OnMouseButton
public override void OnMouseButton(bool down, MouseEventArgs e)
{
int deviceX = 0, deviceY = 0;
HardwareToDevice(e.X, e.Y, ref deviceX, ref deviceY);
switch (e.Button)
{
case MouseButtons.Left:
if (down)
{
m_Camera.BeginMouseRotate(deviceX, deviceY);
}
break;
case MouseButtons.Middle:
if (down)
{
m_Camera.BeginMouseTrack(deviceX, deviceY);
}
break;
case MouseButtons.Right:
if (down)
{
m_Camera.BeginMouseZoom(deviceX);
}
break;
}
}
示例15: MouseUp
public MouseEvent MouseUp(MouseEventArgs e)
{
MouseEvent.MouseInfo mouseInfo = new MouseEvent.MouseInfo(false, false, new TPoint(e.X, e.Y));
InheritButtonStatesFromPreviousMouseEvent(ref mouseInfo);
if (e.Button == MouseButtons.Left)
{
mouseInfo.leftButton = false;
MouseEvent mouseEvent = new MouseEvent(MouseEvent.EventState.LUp, mouseInfo, m_previousEvent.Info.position);
m_previousEvent = mouseEvent;
return mouseEvent;
}
else if (e.Button == MouseButtons.Middle)
{
mouseInfo.middleButton = false;
MouseEvent mouseEvent = new MouseEvent(MouseEvent.EventState.MUp, mouseInfo, m_previousEvent.Info.position);
m_previousEvent = mouseEvent;
return mouseEvent;
}
else if (e.Button == MouseButtons.Right)
{
mouseInfo.rightButton = false;
MouseEvent mouseEvent = new MouseEvent(MouseEvent.EventState.RUp, mouseInfo, m_previousEvent.Info.position);
m_previousEvent = mouseEvent;
return mouseEvent;
}
return null;
}