| | |
| | | /// 前回选择的控件
|
| | | /// </summary>
|
| | | private NormalSelectControl oldSelectContr = null;
|
| | | /// <summary>
|
| | | /// 选择取消(不是左上角),并且按下确定键时,是否调用回调函数(调用时传递的参数是 -1,默认不回调)
|
| | | /// </summary>
|
| | | public bool CancelCallEvent = false;
|
| | | /// <summary>
|
| | | /// 选择的行能否取消
|
| | | /// </summary>
|
| | | public bool SelectRowCanCancel = true;
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | //回调函数
|
| | | FinishSelectEvent.Invoke(Convert.ToInt32(oldSelectContr.MainKeys));
|
| | | }
|
| | | else if (FinishSelectEvent != null && this.CancelCallEvent == true)
|
| | | {
|
| | | //回调函数
|
| | | FinishSelectEvent.Invoke(-1);
|
| | | }
|
| | | this.CloseForm();
|
| | | };
|
| | |
|
| | |
| | | //取消选择
|
| | | if (btnRow.IsSelected == true)
|
| | | {
|
| | | //允许取消的时候,才能取消
|
| | | if (this.SelectRowCanCancel == true)
|
| | | {
|
| | | btnRow.IsSelected = false;
|
| | | oldSelectContr = null;
|
| | | }
|
| | | return;
|
| | | }
|
| | | if (oldSelectContr != null)
|