private static void ShowResult(ServiceResult result, string boxTitle) { var icon = result.Success ? MessageBoxIcon.Information : MessageBoxIcon.Error; MessageBox.Show(result.Description, boxTitle, MessageBoxButtons.OK, icon); }
private void DoneCreating(ServiceResult result) { if (result.Success) { MessageBox.Show(result.Description); } else { MessageBox.Show(result.Description, "Erro ao criar ambiente de desenvolvimento.", MessageBoxButtons.OK, MessageBoxIcon.Error); } if (this.InvokeRequired) { this.Invoke((Action)delegate { this.Close(); }); } else { this.Close(); } }
private void CreationCompleted(string message, bool success) { if (this.Done != null) { var info = new ServiceResult(success, message); this.Done(info); } }