确认后,不使用回调返回内容,因为这样的话,对话会影响很多功能问题,比如,获取焦点等,在窗体还没有释放之前,这些方式都无效
private void ConfirmSelectCell(Object item)
{
//if (this.Selected!=null)
//{
// this.Selected(item,null);
//}
Result = item;
this.DialogResult = DialogResult.OK;
}
Form form = new ...
//
if (form.ShowDialog() == DialogResult.OK)
{
//do something
}