Пример #1
0
 private void RefreshBaseFilter()
 {
     ProfilerUtilities.BeginSample("MultiColumnAssetList::RefreshBaseFilter");
     interrestingStatus = VCCommands.Instance.GetFilteredAssets(baseFilter);
     //D.Log("RefreshBaseFilter, interrestingStatus.Count : " + interrestingStatus.Count());
     RefreshGUIFilter();
     ProfilerUtilities.EndSample();
 }
Пример #2
0
 public void SetAssetPaths(IEnumerable <string> assets, IEnumerable <string> dependencies)
 {
     D.Log("VCCommitWindow:SetAssetPaths");
     ProfilerUtilities.BeginSample("CommitWindow::SetAssetPaths");
     assetPaths          = assets.Select(s => new ComposedString(s)).ToList();
     depedencyAssetPaths = dependencies.Select(s => new ComposedString(s)).ToList();
     vcMultiColumnAssetList.SetBaseFilter(BaseFilter);
     RefreshSelection();
     ProfilerUtilities.EndSample();
 }
Пример #3
0
        public void RefreshGUIFilter()
        {
            ProfilerUtilities.BeginSample("MultiColumnAssetList::RefreshGUIFilter");

            //showBoldLabels = multiColumnState.Ascending && multiColumnState.SelectedColumnIndex == 2;

            if (m_MultiColumnView.bShowAdditionalFolders)
            {
                List <VersionControlStatus> dataWithLabels = interrestingStatus.Where(status => guiFilter(status)).ToList();
                foreach (VersionControlStatus item in dataWithLabels.ToList())
                {
                    string strPath = System.IO.Path.GetDirectoryName(item.assetPath.Compose()).Replace('\\', '/');
                    VersionControlStatus itemCurrent = item;
                    while (strPath != "")
                    {
                        int index = dataWithLabels.IndexOf(itemCurrent) + 1;
                        VersionControlStatus status = new VersionControlStatus();
                        status.assetPath      = strPath;
                        status.allowLocalEdit = false;
                        status.isFolderLabel  = true;

                        if (!dataWithLabels.Any(x => x.assetPath == status.assetPath))
                        {
                            dataWithLabels.Insert(index, status);
                        }


                        itemCurrent = status;
                        strPath     = System.IO.Path.GetDirectoryName(itemCurrent.assetPath.Compose()).Replace('\\', '/');
                    }
                }
                m_MultiColumnView.setItems(dataWithLabels);
            }
            else
            {
                //if (showBoldLabels)
                //{
                //    // HACK: We want to display bold folder labels above our rows like the old Unity Asset Server window.
                //    // Therefore, for each folder path we add an additional asset which only displays the path.
                //    // Used in MultiColumnView.ListViewRow to draw bold labels without any meta information when isFolderLabel is true.
                //    List<VersionControlStatus> dataWithLabels = interrestingStatus.Where(status => guiFilter(status)).ToList();
                //    foreach (VersionControlStatus item in dataWithLabels.ToList())
                //    {
                //        int index = dataWithLabels.IndexOf(item) + 1;
                //        VersionControlStatus status = new VersionControlStatus();
                //        status.assetPath = System.IO.Path.GetDirectoryName(item.assetPath.Compose());
                //        status.allowLocalEdit = false;
                //        status.isFolderLabel = true;

                //        if (!dataWithLabels.Any(x => x.assetPath == status.assetPath))
                //            dataWithLabels.Insert(index, status);
                //    }
                //    multiColumnState.Refresh(dataWithLabels);
                //}
                //else
                //{
                m_MultiColumnView.setItems(interrestingStatus.Where(status => guiFilter(status)));
            }
            //}
            // End Hack.

            ProfilerUtilities.EndSample();
        }
 public void RefreshGUIFilter()
 {
     ProfilerUtilities.BeginSample("MultiColumnAssetList::RefreshGUIFilter");
     multiColumnState.Refresh(interrestingStatus.Where(status => guiFilter(status)));
     ProfilerUtilities.EndSample();
 }