예제 #1
0
        public void Initialize([CanBeNull] IAheadBehindDataProvider aheadBehindDataProvider, FilterBranchHelper filterBranchHelper)
        {
            _aheadBehindDataProvider = aheadBehindDataProvider;
            _filterBranchHelper      = filterBranchHelper;

            // This lazily sets the command source, invoking OnUICommandsSourceSet, which is required for setting up
            // notifications for each Tree.
            _ = UICommandsSource;
        }
        public void Setup()
        {
            _originalShowAheadBehindData    = AppSettings.ShowAheadBehindData;
            AppSettings.ShowAheadBehindData = true;

            _aheadBehindDataProvider = Substitute.For <IAheadBehindDataProvider>();

            _sut = new ToolStripPushButton();
            _sut.Initialize(_aheadBehindDataProvider, true);
        }
예제 #3
0
        public void Initialize([CanBeNull] IAheadBehindDataProvider aheadBehindDataProvider, FilterBranchHelper filterBranchHelper, ICheckRefs refsSource, IScriptHostControl scriptHost)
        {
            _aheadBehindDataProvider = aheadBehindDataProvider;
            _filterBranchHelper      = filterBranchHelper;
            _refsSource = refsSource;
            _scriptHost = scriptHost;

            // This lazily sets the command source, invoking OnUICommandsSourceSet, which is required for setting up
            // notifications for each Tree.
            _ = UICommandsSource;
        }
예제 #4
0
 public BranchTree(TreeNode treeNode, IGitUICommandsSource uiCommands, [CanBeNull] IAheadBehindDataProvider aheadBehindDataProvider)
     : base(treeNode, uiCommands)
 {
     _aheadBehindDataProvider = aheadBehindDataProvider;
 }
예제 #5
0
 public void Initialize([CanBeNull] IAheadBehindDataProvider aheadBehindDataProvider)
 {
     _aheadBehindDataProvider = aheadBehindDataProvider;
     ResetToDefaultState();
 }
예제 #6
0
 public void Initialize(IAheadBehindDataProvider aheadBehindDataProvider, bool supportsAheadBehindData)
 {
     _aheadBehindDataProvider = aheadBehindDataProvider;
     _supportsAheadBehindData = supportsAheadBehindData;
     ResetToDefaultState();
 }
예제 #7
0
 public BranchTree(TreeNode treeNode, IGitUICommandsSource uiCommands, [CanBeNull] IAheadBehindDataProvider aheadBehindDataProvider)
     : base(treeNode, uiCommands)
 {
     _aheadBehindDataProvider      = aheadBehindDataProvider;
     uiCommands.UICommandsChanged += delegate { TreeViewNode.TreeView.SelectedNode = null; };
 }
예제 #8
0
 public void Initialize([CanBeNull] IAheadBehindDataProvider aheadBehindDataProvider, FilterBranchHelper filterBranchHelper)
 {
     _aheadBehindDataProvider = aheadBehindDataProvider;
     _filterBranchHelper      = filterBranchHelper;
 }