public void InvokeRenameFinished(RenameFinishedEventArgs args)
 {
     EventHandler<RenameFinishedEventArgs> handler = RenameFinished;
     if(handler != null)
     {
         handler(this, args);
     }
 }
 private string BuildStatusMessage(RenameFinishedEventArgs args)
 {
     // TODO NKO: Use the args.RollbackSuccessfull flag for a proper message so the user does now that a rollback failed or completed.
     return args.RenameSuccessfull ? LocalizationService.GetString(LocalizationResourceNames.MainFormStatusLabelRenamingSuccessfull) : LocalizationService.GetString(LocalizationResourceNames.MainFormStatusLabelRenamingFailed);
 }
        public void RenameFinished(object sender, RenameFinishedEventArgs args)
        {
            statusMessage = BuildStatusMessage(args);
            renameButtonEnabled = args.Finished;

            if(InvokeRequired)
            {
                Invoke(new InvokeDelegate(UpdateProjects));
                Invoke(new InvokeDelegate(SetStatusMessage));
                Invoke(new InvokeDelegate(EnableRenameButton));
            }
            else
            {
                SetupBindingSource();

                statusLabel.Text = statusMessage;
                renameButton.Enabled = args.Finished;
                newProjectNameTextbox.Text = string.Empty;
            }
        }