private void Conotrl_MouseDown(object sender, MouseEventArgs e) { if (Switcher.IsAddingOrEditingMessageLabel) { var slSender = sender as IControlExProperties; int RX = e.X; int RY = e.Y; if (slSender != null) { RX += slSender.ControlLocation.X; RY += slSender.ControlLocation.Y; } var ax = new MouseEventArgs(e.Button, e.Clicks, RX, RY, e.Delta); OnMouseDown(ax); } else { if (e.Button == MouseButtons.Left) { MvCtrlInfor = new MoveControlInfor { Location = e.Location }; } } }
private void Tpnl_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left) { MvCtrlInfor = new MoveControlInfor { Location = e.Location }; } }
private void InitializeSelfDefineComponent() { picsScale = 1F; MvCtrlInfor = null; Switcher = new SwitchOnOff(); if (components == null) { components = new System.ComponentModel.Container(); } picMenu = new FunctionsPart.PicContentMenu(this.components); picMenu.Opening += new System.ComponentModel.CancelEventHandler(this.mnChildSelectionAction_Opening); picMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.mnChildSelectionAction_ItemClicked); picMenu.Name = "SelfPicContextMenu"; lblMenu = new LabelContxtMenu(this.components); lblMenu.Opening += new System.ComponentModel.CancelEventHandler(this.mnChildSelectionAction_Opening); lblMenu.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.mnChildSelectionAction_ItemClicked); lblMenu.Name = "SelfLabelContextMenu"; RunCommand = null; }
private void Conotrl_MouseUp(object sender, MouseEventArgs e) { MvCtrlInfor = null; }