Esempio n. 1
0
        private static async void Switch(string url)
        {
            await VCCommands.Instance.SwitchBranchTask(url);

            AssetDatabaseRefreshManager.RequestAssetDatabaseRefresh();
            Refresh();
        }
Esempio n. 2
0
 private void OnEnable()
 {
     AssetDatabaseRefreshManager.PauseAssetDatabaseRefresh();
     minSize  = new Vector2(1000, 400);
     position = new Rect {
         xMin   = Screen.width * 0.5f - this.minSize.x,
         yMin   = Screen.height * 0.5f - this.minSize.y,
         width  = this.minSize.x,
         height = this.minSize.y
     };
     commitMessageHeight = EditorPrefs.GetFloat("VCCommitWindow/commitMessageHeight", 140.0f);
     rect = new Rect(0, commitMessageHeight, position.width, 10.0f);
     vcMultiColumnAssetList = new VCMultiColumnAssetList(Repaint, VCSettings.SelectiveCommit);
     VCCommands.Instance.StatusCompleted += RefreshSelection;
 }
Esempio n. 3
0
        private static async void Merge(string url)
        {
            int progressCounter = 0;

            void UpdateMergeProgress(string s)
            {
                EditorUtility.DisplayProgressBar("Merge", s, ((progressCounter++ % 25) / 25f));
            }

            VCCommands.Instance.ProgressInformation += UpdateMergeProgress;
            bool result = await VCCommands.Instance.MergeBranchTask(url);

            VCCommands.Instance.ProgressInformation -= UpdateMergeProgress;
            EditorUtility.ClearProgressBar();
            if (result)
            {
                await VCCommands.Instance.StatusTask(StatusLevel.Local, DetailLevel.Normal);

                VCCommands.Instance.CommitDialog(GetChangedAssets().Select(status => status.assetPath.Compose()).ToList(), includeDependencies: false, showUserConfirmation: true, commitMessage: $"Merged {url} to {currentBranch}");
                AssetDatabaseRefreshManager.RequestAssetDatabaseRefresh();
            }
        }
Esempio n. 4
0
 private void OnDisable()
 {
     EditorPrefs.SetFloat("VCCommitWindow/commitMessageHeight", commitMessageHeight);
     vcMultiColumnAssetList.Dispose();
     AssetDatabaseRefreshManager.ResumeAssetDatabaseRefresh();
 }