public void PopConfirm( String title, String message, Actionitem< WindowBase > actionOk, Actionitem< WindowBase > actionCancel ){ var dialogResult = MessageBox.Show( this, message, title, MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2 ); if( dialogResult == DialogResult.OK && actionOk != null ) actionOk.Invoke( this ); if( dialogResult == DialogResult.Cancel && actionCancel != null ) actionCancel.Invoke( this ); }
public void PopAlert( String title, String message, Actionitem< WindowBase > action ){ var dialogResult = MessageBox.Show( this, message, title, MessageBoxButtons.OK, MessageBoxIcon.Warning ); if( dialogResult == DialogResult.OK && action != null ) action.Invoke( this ); }