protected virtual void OnButtonAddBranchClicked(object sender, EventArgs e) { var dlg = new EditBranchDialog(repo, null, true); try { if (MessageService.RunCustomDialog(dlg) == (int)ResponseType.Ok) { repo.CreateBranch(dlg.BranchName, dlg.TrackSource); FillBranches(); } } finally { dlg.Destroy(); } }
protected virtual void OnButtonAddBranchClicked(object sender, EventArgs e) { var dlg = new EditBranchDialog(repo); try { if (MessageService.RunCustomDialog(dlg) == (int)ResponseType.Ok) { repo.CreateBranch(dlg.BranchName, dlg.TrackSource, dlg.TrackRef); FillBranches(); } } catch (Exception ex) { MessageService.ShowError(GettextCatalog.GetString("The branch could not be created"), ex); } finally { dlg.Destroy(); dlg.Dispose(); } }