protected override void OnMouseDown(MouseEventArgs e) { base.OnMouseDown(e); if (e.Button == MouseButtons.Left) { if (e.X > this.Width - 14 && e.Y > 36) { // Find the position the mouse int i = 0; for (i = 0; i < this.transaction.Transactions.Count; ++i) { if (e.Y - 36 - i * 52 >= 5 && e.Y - 36 - i * 52 <= 14 + 5) { break; } } if (i < this.transaction.Transactions.Count) { InfoTransactionEditorKeyFieldsDialog itekfd = new InfoTransactionEditorKeyFieldsDialog(this.transaction.Transactions[i], this.transaction.UpdateComp, this.transaction.Transactions[i].TransTableName , ((InfoTransactionEditorDialog)frminfotransaction).SrcTableName); itekfd.ShowDialog(); this.Refresh(); } } else if (e.X > this.Width - 14 && e.Y < 36) { this.Cursor = Cursors.SizeAll; X_down = e.X; Y_down = e.Y; mousedown = true; } } }
private void btnTransKeyFields_Click(object sender, EventArgs e) { InfoTransactionEditorKeyFieldsDialog itekfd = new InfoTransactionEditorKeyFieldsDialog(this.transPrivateCopy, this.uctran, this.cmbTransTableName.Text, SrcTableName); itekfd.ShowDialog(); }