private static MessageBoxIcon ResolveIcon(IAlertEntity alertEntity) { if (alertEntity.IsError) { return(MessageBoxIcon.Error); } if (alertEntity.IsWarn) { return(MessageBoxIcon.Warning); } return(MessageBoxIcon.None); }
public void Alert(IAlertEntity alertEntity) { var icon = ResolveIcon(alertEntity); MessageBox.Show(alertEntity.Text, alertEntity.Header, MessageBoxButtons.OK, icon); }