private void lnkWriteMergeScripts_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { try { using (var dialog = new Dialog.ConfigDialog<ScriptWriterSettings>()) { var settings = new ScriptWriterSettings(); dialog.DataSource = settings; if (dialog.ShowDialog() == DialogResult.OK) { var repo = new GitRepo(settings.RepoPath); var initDir = repo.GetDirectory(settings.InitCommit); var destDir = repo.GetDirectory(settings.DestCommit); ProgressDialog.Display(this, d => { initDir.WriteAmlMergeScripts(destDir, settings.SaveDirectory, d.SetProgress); }); } } } catch (Exception ex) { Utils.HandleError(ex); } }
private void lnkGitMergeHelper_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { try { using (var dialog = new Dialog.ConfigDialog<MergeSettings>()) { var settings = new MergeSettings(); settings.ContinueLast = true; dialog.DataSource = settings; if (dialog.ShowDialog() == DialogResult.OK) { var mergeOp = new GitRepo(settings.RepoPath).GetMerge(settings.LocalBranch, settings.RemoteBranch); var main = new Main(); var step = new MergeInterface(); step.ContinueLastMerge = settings.ContinueLast; main.GoToStep(step.Initialize(mergeOp)); main.Show(); } } } catch (Exception ex) { Utils.HandleError(ex); } }