Exemple #1
0
        private void OnItemExpanding(object sender, VirtualizingItemExpandingArgs e)
        {
            ProjectItem item = e.Item as ProjectItem;

            if (item != null)
            {
                e.Children = item.Children.Where(projectItem => projectItem.IsFolder).OrderBy(projectItem => projectItem.Name)
                             .Union(item.Children.Where(projectItem => m_project.IsScene(projectItem)).OrderBy(projectItem => projectItem.Name));
            }
        }
 private void OnPropertyExpanded(object sender, VirtualizingItemExpandingArgs e)
 {
     if (PropertyExpanded != null)
     {
         RuntimeAnimationProperty item = (RuntimeAnimationProperty)e.Item;
         int index = IndexOf(item);
         PropertyExpanded(new ItemArg {
             Item = (RuntimeAnimationProperty)e.Item, Row = index
         });
     }
 }
Exemple #3
0
        private void OnItemExpanding(object sender, VirtualizingItemExpandingArgs e)
        {
            System.Guid assetTypeGuid = m_project.ToGuid(Asset.GetType());

            ProjectItem item = e.Item as ProjectItem;

            if (item != null)
            {
                e.Children = item.Children.Where(projectItem => projectItem.IsFolder).OrderBy(projectItem => projectItem.Name)
                             .Union(item.Children.Where(projectItem => !projectItem.IsFolder && ((AssetItem)projectItem).TypeGuid == assetTypeGuid).OrderBy(projectItem => projectItem.Name));
            }
        }
Exemple #4
0
 private void OnItemExpanding(object sender, VirtualizingItemExpandingArgs e)
 {
     ProjectItem item = e.Item as ProjectItem;
     if (item != null)
     {
         item.Children = item.Children
             .OrderBy(projectItem => projectItem.NameExt).ToList();
         e.Children = item.Children
             .Where(projectItem => CanDisplayFolder(projectItem))
             .OrderBy(projectItem => projectItem.NameExt);
     }
 }
Exemple #5
0
 private void OnItemExpanding(object sender, VirtualizingItemExpandingArgs e)
 {
     if (!(e.Item is OCFolder ocFolder))
     {
         return;
     }
     if (ocFolder.Child.Count > 0)
     {
         List <ObjectCtrl> childObjectCtrls = ocFolder.ChildObjectCtrls;
         e.Children       = (IEnumerable)childObjectCtrls;
         e.ChildrenExpand = (IEnumerable)childObjectCtrls.Select <ObjectCtrl, bool>((Func <ObjectCtrl, bool>)(v => v.ObjectInfo is OIFolder && ((OIFolder)v.ObjectInfo).Expand));
     }
     ocFolder.OIFolder.Expand = true;
 }
Exemple #6
0
        protected virtual void OnItemExpanding(object sender, VirtualizingItemExpandingArgs e)
        {
            ExposeToEditor exposeToEditor = (ExposeToEditor)e.Item;

            if (exposeToEditor.HasChildren())
            {
                e.Children = exposeToEditor.GetChildren().Where(obj => !obj.MarkAsDestroyed);

                //This line is required to syncronize selection, runtime selection and treeview selection
                OnTreeViewSelectionChanged(m_treeView.SelectedItems, m_treeView.SelectedItems);
            }
            else
            {
                e.Children = new ExposeToEditor[0];
            }
        }
        private void OnItemExpanding(object sender, VirtualizingItemExpandingArgs e)
        {
            GameObject     gameObject     = (GameObject)e.Item;
            ExposeToEditor exposeToEditor = gameObject.GetComponent <ExposeToEditor>();

            if (exposeToEditor.ChildCount > 0)
            {
                e.Children = exposeToEditor.GetChildren().Where(obj => !obj.MarkAsDestroyed).Select(obj => obj.gameObject);

                //This line is required to syncronize selection, runtime selection and treeview selection
                OnTreeViewSelectionChanged(m_treeView.SelectedItems, m_treeView.SelectedItems);
            }
            else
            {
                e.Children = new GameObject[0];
            }
        }
        private void OnItemExpanding(object sender, VirtualizingItemExpandingArgs e)
        {
            GameObject     gameObject     = (GameObject)e.Item;
            ExposeToEditor exposeToEditor = gameObject.GetComponent <ExposeToEditor>();

            //gameObject.GetComponentsInChildren<ExposeToEditor>(true).Where(exp =>
            //    exp != exposeToEditor &&
            //    exp.transform.parent.GetComponentsInParent<ExposeToEditor>(true).FirstOrDefault() == exposeToEditor);


            if (exposeToEditor.ChildCount > 0)
            {
                e.Children = exposeToEditor.GetChildren().Where(obj => !obj.MarkAsDestroyed).Select(obj => obj.gameObject);

                //This line is required to syncronize selection, runtime selection and treeview selection
                OnTreeViewSelectionChanged(m_treeView.SelectedItems, m_treeView.SelectedItems);
            }
        }
Exemple #9
0
        private void OnItemExpanding(object sender, VirtualizingItemExpandingArgs e)
        {
            ToolCmd cmd = (ToolCmd)e.Item;

            e.Children = cmd.Children;
        }
        private void OnItemExpanding(object sender, VirtualizingItemExpandingArgs e)
        {
            ProjectItem item = (ProjectItem)e.Item;

            e.Children = item.Children;
        }
Exemple #11
0
        private void OnItemExpanding(object sender, VirtualizingItemExpandingArgs e)
        {
            RuntimeAnimationProperty item = (RuntimeAnimationProperty)e.Item;

            e.Children = item.Children;
        }