コード例 #1
0
            public void OnConflict(object sender, GitConflictEventArgs e)
            {
                if (_synchronizer != null && _synchronizer.InvokeRequired)
                {
                    // If needed marshall the call to the UI thread

                    _synchronizer.Invoke(new EventHandler<GitConflictEventArgs>(OnConflict), new object[] { sender, e });
                    return;
                }

                VisualGitConfig config = GetService<IVisualGitConfigurationService>().Instance;

                if (config.InteractiveMergeOnConflict)
                {
                    // Only call interactive merge if the user opted in on it
                    if (_currentMergeConflictHandler == null)
                        _currentMergeConflictHandler = CreateMergeConflictHandler();

                    _currentMergeConflictHandler.OnConflict(e);
                }
            }
コード例 #2
0
 private MergeConflictHandler CreateMergeConflictHandler()
 {
     MergeConflictHandler mergeConflictHandler = new MergeConflictHandler(Context);
     mergeConflictHandler.PromptOnBinaryConflict = true;
     mergeConflictHandler.PromptOnTextConflict = true;
     return mergeConflictHandler;
 }