예제 #1
0
        public RepositoryTab(string git_repository_path)
        {
            git_repository_path_ = git_repository_path;

            InitializeComponent();

            UserControls.PendingTabViewModel pendingTabViewModel = (UserControls.PendingTabViewModel)PendingTab.DataContext;
            UserControls.StashTabViewModel   stashTabViewModel   = (UserControls.StashTabViewModel)StashTab.DataContext;
            UserControls.BranchTabViewModel  branchTabViewModel  = (UserControls.BranchTabViewModel)BranchTab.DataContext;
            UserControls.TagTabViewModel     tagTabViewModel     = (UserControls.TagTabViewModel)TagTab.DataContext;
            UserControls.RemoteTabViewModel  remoteTabViewModel  = (UserControls.RemoteTabViewModel)RemoteTab.DataContext;

            var viewModel = new ViewModels.RepositoryViewModel(git_repository_path,
                                                               this,
                                                               pendingTabViewModel,
                                                               stashTabViewModel,
                                                               branchTabViewModel,
                                                               tagTabViewModel,
                                                               remoteTabViewModel);

            DataContext = viewModel;

            pendingTabViewModel.SetGitRepository(viewModel);
            stashTabViewModel.SetGitRepository(viewModel);
            branchTabViewModel.SetGitRepository(viewModel);
            tagTabViewModel.SetGitRepository(viewModel);
            remoteTabViewModel.SetGitRepository(viewModel);

            IGitRepository gitRepository = viewModel;

            Plugin.PluginController.ConstructPluginToolbarButtons(toolBar, gitRepository);
        }
예제 #2
0
        public PendingTab()
        {
            InitializeComponent();

            PendingTabViewModel pendingTabViewModel = (PendingTabViewModel)DataContext;

            pendingTabViewModel.OnSelectAllCallbackViewSide = () => unstagedFileListBox.SelectAll();
        }