예제 #1
0
파일: Main.cs 프로젝트: ericcastoldi/Stag
        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);
     }
 }