コード例 #1
0
 void ChangesetsViewMenu.IMenuOperations.DiffBranch()
 {
     LaunchDiffOperations.DiffBranch(
         ChangesetsSelection.GetSelectedRepository(mChangesetsListView),
         ChangesetsSelection.GetSelectedChangeset(mChangesetsListView),
         mIsGluonMode);
 }
コード例 #2
0
 void IChangesetMenuOperations.DiffChangeset()
 {
     LaunchDiffOperations.DiffChangeset(
         ChangesetsSelection.GetSelectedRepository(mChangesetsListView),
         ChangesetsSelection.GetSelectedChangeset(mChangesetsListView),
         mIsGluonMode);
 }
コード例 #3
0
        void OnSelectionChanged()
        {
            if (!ChangesetsSelection.IsSingleSelection(mChangesetsListView))
            {
                return;
            }

            mDiffPanel.UpdateInfo(
                MountPointWithPath.BuildWorkspaceRootMountPoint(
                    ChangesetsSelection.GetSelectedRepository(mChangesetsListView)),
                ChangesetsSelection.GetSelectedChangeset(mChangesetsListView));
        }
コード例 #4
0
        void OnSelectionChanged()
        {
            List <RepObjectInfo> selectedChangesets = ChangesetsSelection.
                                                      GetSelectedRepObjectInfos(mChangesetsListView);

            if (selectedChangesets.Count != 1)
            {
                return;
            }

            mDiffPanel.UpdateInfo(
                MountPointWithPath.BuildWorkspaceRootMountPoint(
                    ChangesetsSelection.GetSelectedRepository(mChangesetsListView)),
                (ChangesetExtendedInfo)selectedChangesets[0]);
        }
コード例 #5
0
        void IChangesetMenuOperations.DiffSelectedChangesets()
        {
            List <RepObjectInfo> selectedChangesets = ChangesetsSelection.
                                                      GetSelectedRepObjectInfos(mChangesetsListView);

            if (selectedChangesets.Count < 2)
            {
                return;
            }

            LaunchDiffOperations.DiffSelectedChangesets(
                ChangesetsSelection.GetSelectedRepository(mChangesetsListView),
                (ChangesetExtendedInfo)selectedChangesets[0],
                (ChangesetExtendedInfo)selectedChangesets[1],
                mIsGluonMode);
        }
コード例 #6
0
 ChangesetExtendedInfo ChangesetsViewMenu.IMenuOperations.GetSelectedChangeset()
 {
     return(ChangesetsSelection.GetSelectedChangeset(
                mChangesetsListView));
 }
コード例 #7
0
        void FillChangesets(WorkspaceInfo wkInfo, string query)
        {
            if (mIsRefreshing)
            {
                return;
            }

            mIsRefreshing = true;

            List <RepObjectInfo> changesetsToSelect =
                ChangesetsSelection.GetSelectedRepObjectInfos(mChangesetsListView);

            int defaultRow = TableViewOperations.
                             GetFirstSelectedRow(mChangesetsListView);

            ((IProgressControls)mProgressControls).ShowProgress(
                PlasticLocalization.GetString(
                    PlasticLocalization.Name.LoadingChangesets));

            long            loadedChangesetId = -1;
            ViewQueryResult queryResult       = null;

            IThreadWaiter waiter = ThreadWaiter.GetWaiter();

            waiter.Execute(
                /*threadOperationDelegate*/ delegate
            {
                queryResult = new ViewQueryResult(
                    PlasticGui.Plastic.API.FindQuery(wkInfo, query));

                loadedChangesetId = GetLoadedChangesetId(
                    wkInfo, mIsGluonMode);
            },
                /*afterOperationDelegate*/ delegate
            {
                try
                {
                    if (waiter.Exception != null)
                    {
                        ExceptionsHandler.DisplayException(waiter.Exception);
                        return;
                    }

                    int changesetsCount = GetChangesetsCount(queryResult);

                    mChangesetsLabelText = string.Format(
                        PlasticLocalization.GetString(PlasticLocalization.Name.ChangesetsCount),
                        changesetsCount);

                    UpdateChangesetsList(
                        mChangesetsListView,
                        queryResult,
                        loadedChangesetId);

                    if (changesetsCount == 0)
                    {
                        mDiffPanel.ClearInfo();
                        return;
                    }

                    ChangesetsSelection.SelectChangesets(
                        mChangesetsListView, changesetsToSelect, defaultRow);
                }
                finally
                {
                    ((IProgressControls)mProgressControls).HideProgress();
                    mIsRefreshing = false;
                }
            });
        }
コード例 #8
0
 int IChangesetMenuOperations.GetSelectedChangesetsCount()
 {
     return(ChangesetsSelection.GetSelectedChangesetsCount(mChangesetsListView));
 }