コード例 #1
0
        /// <summary>
        /// 成交表的右键事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TradedCellMouseDownPutBrand(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }

            if (e.Button == MouseButtons.Right)
            {
                Transaction dataInfo = this.dataGridView_Traded.Rows[e.RowIndex].DataBoundItem as Transaction;
                Debug.Assert(dataInfo != null);

                if ((DataGridView)sender == this.dataGridView_Traded)
                {
                    //成交的Cell右键Menu
                    UseMenuTrip trip = new UseMenuTrip(OperationType.UnKnow, Cursor.Position, m_contractVo, null, null, dataInfo, this);
                }
            }
        }
コード例 #2
0
        /// <summary>
        /// 挂牌右击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CellMouseDownPutBrand(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.RowIndex < 0 || e.ColumnIndex < 0)
            {
                return;
            }

            if (e.Button == MouseButtons.Right)
            {
                SelfListed dataInfo = this.dataGridView_PutBrand.Rows[e.RowIndex].DataBoundItem as SelfListed;
                Debug.Assert(dataInfo != null);

                //挂牌的Cell右键Menu
                if ((DataGridView)sender == this.dataGridView_PutBrand)
                {
                    UseMenuTrip trip = new UseMenuTrip(OperationType.PutBrand, Cursor.Position, m_contractVo, dataInfo, null, null, this);
                }
            }
        }