public AnimationWindowHierarchyGUI(TreeViewController treeView, AnimationWindowState state) : base(treeView)
 {
     this.k_AnimatePropertyLabel = new GUIContent("Add Property");
     this.m_LightSkinPropertyTextColor = new Color(0.35f, 0.35f, 0.35f);
     this.m_PhantomCurveColor = new Color(0f, 0.6f, 0.6f);
     this.state = state;
 }
 public ProjectBrowserColumnOneTreeViewGUI(TreeViewController treeView) : base(treeView)
 {
     this.k_FavoritesIcon = EditorGUIUtility.FindTexture("Favorite Icon");
     this.k_FavoriteFolderIcon = EditorGUIUtility.FindTexture("FolderFavorite Icon");
     this.k_FavoriteFilterIcon = EditorGUIUtility.FindTexture("Search Icon");
     this.m_IsCreatingSavedFilter = false;
 }
Esempio n. 3
0
 public void Init(Rect rect, BackendData backendData)
 {
     if (this.m_TreeView == null)
     {
         ITreeViewDataSource source;
         this.m_BackendData = backendData;
         TreeViewState treeViewState = new TreeViewState {
             columnWidths = new float[] { 
                 250f,
                 90f,
                 93f,
                 98f,
                 74f,
                 78f
             }
         };
         this.m_TreeView = new TreeViewController(this.m_EditorWindow, treeViewState);
         ITreeViewGUI gui = new TestGUI(this.m_TreeView);
         ITreeViewDragging dragging = new TestDragging(this.m_TreeView, this.m_BackendData);
         if (this.m_Lazy)
         {
             source = new LazyTestDataSource(this.m_TreeView, this.m_BackendData);
         }
         else
         {
             source = new TestDataSource(this.m_TreeView, this.m_BackendData);
         }
         this.m_TreeView.Init(rect, source, gui, dragging);
         this.m_ColumnHeader = new TreeViewColumnHeader();
         this.m_ColumnHeader.columnWidths = treeViewState.columnWidths;
         this.m_ColumnHeader.minColumnWidth = 30f;
         this.m_ColumnHeader.columnRenderer = (Action<int, Rect>) Delegate.Combine(this.m_ColumnHeader.columnRenderer, new Action<int, Rect>(this, (IntPtr) this.OnColumnRenderer));
     }
 }
Esempio n. 4
0
        public TreeSelectionData(TreeViewController<DTreeItem> tvController, SelectionType selectionType)
        {
            MethodName = string.Empty;
            TypeName = string.Empty;
            NameSpace = string.Empty;
            AssemblyName = string.Empty;
            if (tvController.SelectedNode != null)
            {
                this.SelectionType = selectionType;

                switch (selectionType)
                {
                    case SelectionType.ASSEMBLY:
                        this.AssemblyName = tvController.SelectedNode.Value.Text;
                        break;
                    case SelectionType.NAMESPACE:
                        this.NameSpace = tvController.SelectedNode.Value.Text;
                        this.AssemblyName = tvController.SelectedNode.Parent.Value.Text;
                        break;
                    case SelectionType.TYPE:
                        this.TypeName = tvController.SelectedNode.Value.Text;
                        this.NameSpace = tvController.SelectedNode.Parent.Value.Text;
                        this.AssemblyName = tvController.SelectedNode.Parent.Parent.Value.Text;
                        break;
                    case SelectionType.METHOD:
                        this.MethodName = tvController.SelectedNode.Value.Text;
                        this.TypeName = tvController.SelectedNode.Parent.Value.Text;
                        this.NameSpace = tvController.SelectedNode.Parent.Parent.Value.Text;
                        this.AssemblyName = tvController.SelectedNode.Parent.Parent.Parent.Value.Text;
                        break;
                    default:
                        break;
                }
            }
        }
 public static void CreateAndSetTreeView(ObjectTreeForSelector.TreeSelectorData data)
 {
     AudioMixerController objectFromInstanceID = InternalEditorUtility.GetObjectFromInstanceID(data.userData) as AudioMixerController;
     TreeViewController treeView = new TreeViewController(data.editorWindow, data.state);
     GroupTreeViewGUI gui = new GroupTreeViewGUI(treeView);
     TreeViewDataSourceForMixers mixers = new TreeViewDataSourceForMixers(treeView, objectFromInstanceID);
     mixers.onVisibleRowsChanged = (Action) Delegate.Combine(mixers.onVisibleRowsChanged, new Action(gui, (IntPtr) this.CalculateRowRects));
     treeView.deselectOnUnhandledMouseDown = false;
     treeView.Init(data.treeViewRect, mixers, gui, null);
     data.objectTreeForSelector.SetTreeView(treeView);
 }
 public TreeViewTestWithCustomHeight(EditorWindow editorWindow, BackendData backendData, Rect rect)
 {
     this.m_BackendData = backendData;
     TreeViewState treeViewState = new TreeViewState();
     this.m_TreeView = new TreeViewController(editorWindow, treeViewState);
     TestGUICustomItemHeights gui = new TestGUICustomItemHeights(this.m_TreeView);
     TestDragging dragging = new TestDragging(this.m_TreeView, this.m_BackendData);
     TestDataSource data = new TestDataSource(this.m_TreeView, this.m_BackendData);
     data.onVisibleRowsChanged = (Action) Delegate.Combine(data.onVisibleRowsChanged, new Action(gui, (IntPtr) this.CalculateRowRects));
     this.m_TreeView.Init(rect, data, gui, dragging);
     data.SetExpanded(data.root, true);
 }
 public PackageExportTreeView(PackageExport packageExport, TreeViewState treeViewState, Rect startRect)
 {
     this.m_PackageExport = packageExport;
     this.m_TreeView = new TreeViewController(this.m_PackageExport, treeViewState);
     PackageExportTreeViewDataSource data = new PackageExportTreeViewDataSource(this.m_TreeView, this);
     PackageExportTreeViewGUI gui = new PackageExportTreeViewGUI(this.m_TreeView, this);
     this.m_TreeView.Init(startRect, data, gui, null);
     this.m_TreeView.ReloadData();
     this.m_TreeView.selectionChangedCallback = (Action<int[]>) Delegate.Combine(this.m_TreeView.selectionChangedCallback, new Action<int[]>(this.SelectionChanged));
     gui.itemWasToggled = (Action<PackageExportTreeViewItem>) Delegate.Combine(gui.itemWasToggled, new Action<PackageExportTreeViewItem>(this.ItemWasToggled));
     this.ComputeEnabledStateForFolders();
 }
 public AudioMixersTreeView(AudioMixerWindow mixerWindow, TreeViewState treeState, Func<List<AudioMixerController>> getAllControllersCallback)
 {
     this.m_TreeView = new TreeViewController(mixerWindow, treeState);
     this.m_TreeView.deselectOnUnhandledMouseDown = false;
     this.m_TreeView.selectionChangedCallback = (Action<int[]>) Delegate.Combine(this.m_TreeView.selectionChangedCallback, new Action<int[]>(this.OnTreeSelectionChanged));
     this.m_TreeView.contextClickItemCallback = (Action<int>) Delegate.Combine(this.m_TreeView.contextClickItemCallback, new Action<int>(this.OnTreeViewContextClick));
     AudioMixersTreeViewGUI gui = new AudioMixersTreeViewGUI(this.m_TreeView);
     AudioMixersDataSource data = new AudioMixersDataSource(this.m_TreeView, getAllControllersCallback);
     AudioMixerTreeViewDragging dragging = new AudioMixerTreeViewDragging(this.m_TreeView, new Action<List<AudioMixerController>, AudioMixerController>(this, (IntPtr) this.OnMixersDroppedOnMixerCallback));
     this.m_TreeView.Init(mixerWindow.position, data, gui, dragging);
     this.m_TreeView.ReloadData();
 }
 public void Test_LoadNull()
 {
     //---------------Set up test pack-------------------
     TreeViewWin treeView = new TreeViewWin();
     TreeViewController treeViewController = new TreeViewController(treeView);
     //-------------Assert Preconditions -------------
     Assert.AreEqual(0, treeView.Nodes.Count);
     //---------------Execute Test ----------------------
     treeViewController.LoadTreeView(null);
     //---------------Test Result -----------------------
     Assert.AreEqual(0, treeView.Nodes.Count);
 }
 public void Init(EditorWindow owner, Rect rect)
 {
     if (this.m_State.hierarchyState == null)
     {
         this.m_State.hierarchyState = new AnimationWindowHierarchyState();
     }
     this.m_TreeView = new TreeViewController(owner, this.m_State.hierarchyState);
     this.m_State.hierarchyData = new AnimationWindowHierarchyDataSource(this.m_TreeView, this.m_State);
     this.m_TreeView.Init(rect, this.m_State.hierarchyData, new AnimationWindowHierarchyGUI(this.m_TreeView, this.m_State), null);
     this.m_TreeView.deselectOnUnhandledMouseDown = true;
     this.m_TreeView.selectionChangedCallback = (Action<int[]>) Delegate.Combine(this.m_TreeView.selectionChangedCallback, new Action<int[]>(this.m_State.OnHierarchySelectionChanged));
     this.m_TreeView.ReloadData();
 }
 public void InitIfNeeded(EditorWindow owner, Rect rect)
 {
     if (this.m_TreeViewState == null)
     {
         this.m_TreeViewState = new TreeViewState();
         this.m_TreeView = new TreeViewController(owner, this.m_TreeViewState);
         this.m_TreeView.deselectOnUnhandledMouseDown = true;
         this.m_TreeViewDataSource = new AddCurvesPopupHierarchyDataSource(this.m_TreeView);
         TreeViewGUI gui = new AddCurvesPopupHierarchyGUI(this.m_TreeView, owner);
         this.m_TreeView.Init(rect, this.m_TreeViewDataSource, gui, null);
         this.m_TreeViewDataSource.UpdateData();
     }
 }
 public AudioMixerGroupTreeView(AudioMixerWindow mixerWindow, TreeViewState treeState)
 {
     this.m_AudioGroupTreeState = treeState;
     this.m_AudioGroupTree = new TreeViewController(mixerWindow, this.m_AudioGroupTreeState);
     this.m_AudioGroupTree.deselectOnUnhandledMouseDown = false;
     this.m_AudioGroupTree.selectionChangedCallback = (Action<int[]>) Delegate.Combine(this.m_AudioGroupTree.selectionChangedCallback, new Action<int[]>(this.OnTreeSelectionChanged));
     this.m_AudioGroupTree.contextClickItemCallback = (Action<int>) Delegate.Combine(this.m_AudioGroupTree.contextClickItemCallback, new Action<int>(this.OnTreeViewContextClick));
     this.m_AudioGroupTree.expandedStateChanged = (Action) Delegate.Combine(this.m_AudioGroupTree.expandedStateChanged, new Action(this, (IntPtr) this.SaveExpandedState));
     this.m_TreeViewGUI = new AudioGroupTreeViewGUI(this.m_AudioGroupTree);
     this.m_TreeViewGUI.NodeWasToggled = (Action<AudioMixerTreeViewNode, bool>) Delegate.Combine(this.m_TreeViewGUI.NodeWasToggled, new Action<AudioMixerTreeViewNode, bool>(this, (IntPtr) this.OnNodeToggled));
     this.m_AudioGroupTreeDataSource = new AudioGroupDataSource(this.m_AudioGroupTree, this.m_Controller);
     this.m_AudioGroupTree.Init(mixerWindow.position, this.m_AudioGroupTreeDataSource, this.m_TreeViewGUI, new AudioGroupTreeViewDragging(this.m_AudioGroupTree, this));
     this.m_AudioGroupTree.ReloadData();
 }
 public void Test_RootNodeBusinessObject()
 {
     //---------------Set up test pack-------------------
     TreeViewWin treeView = new TreeViewWin();
     TreeViewController treeViewController = new TreeViewController(treeView);
     OrganisationTestBO organisationTestBO = new OrganisationTestBO();
     treeViewController.LoadTreeView(organisationTestBO);
     //-------------Assert Preconditions -------------
     Assert.AreEqual(1, treeView.Nodes.Count);
     //---------------Execute Test ----------------------
     IBusinessObject businessObject = treeViewController.RootNodeBusinessObject;
     //---------------Test Result -----------------------
     Assert.AreSame(organisationTestBO, businessObject);
 }
        public void Clear()
        {
            m_Owner = null;
            m_TreeViewNeededEvent = null;
            m_SelectionEvent      = null;

            m_DoubleClickedEvent = null;
            m_OriginalSelectedID = 0;
            m_UserData           = 0;

            m_TreeView          = null;
            m_TreeViewState     = null;
            m_ErrorCounter      = 0;
            m_FocusSearchFilter = false;
            m_Debounce          = null;
        }
Esempio n. 15
0
        public void WorkerCompleted()
        {
            UpdateAssemblyStats();

            statusLabel.Text = "Building Tree";

            treeView.BeginUpdate();
            tvController = new TreeViewController<DTreeItem>(treeView,
                                                             mainController.AssemblyParser.AssemblyData.AssemblyTree,
                                                             new ImageTreeNodeMapper<DTreeItem>());
            treeView.EndUpdate();
            // expand the tree
            treeView.Nodes[0].Expand();

            StopProgress();
        }
Esempio n. 16
0
        public static void CreateAndSetTreeView(ObjectTreeForSelector.TreeSelectorData data)
        {
            var ignoreController = InternalEditorUtility.GetObjectFromInstanceID(data.userData) as AudioMixerController;

            // Create treeview
            var treeView   = new TreeViewController(data.editorWindow, data.state);
            var treeGui    = new GroupTreeViewGUI(treeView);
            var dataSource = new TreeViewDataSourceForMixers(treeView, ignoreController);

            dataSource.onVisibleRowsChanged      += treeGui.CalculateRowRects;
            treeView.deselectOnUnhandledMouseDown = false;
            treeView.Init(data.treeViewRect, dataSource, treeGui, null);

            // Set
            data.objectTreeForSelector.SetTreeView(treeView);
        }
        public void Test_RootNodeBusinessObject()
        {
            //---------------Set up test pack-------------------
            TreeViewWin        treeView           = new TreeViewWin();
            TreeViewController treeViewController = new TreeViewController(treeView);
            OrganisationTestBO organisationTestBO = new OrganisationTestBO();

            treeViewController.LoadTreeView(organisationTestBO);
            //-------------Assert Preconditions -------------
            Assert.AreEqual(1, treeView.Nodes.Count);
            //---------------Execute Test ----------------------
            IBusinessObject businessObject = treeViewController.RootNodeBusinessObject;

            //---------------Test Result -----------------------
            Assert.AreSame(organisationTestBO, businessObject);
        }
        public void Init(SketchUpNodeInfo[] nodes, SketchUpImporterModelEditor suModelEditor)
        {
            base.titleContent    = SketchUpImportDlg.Styles.styles.windowTitle;
            base.minSize         = this.m_WindowMinSize;
            base.position        = new Rect(base.position.x, base.position.y, base.minSize.x, base.minSize.y);
            this.m_TreeViewState = new TreeViewState();
            this.m_TreeView      = new TreeViewController(this, this.m_TreeViewState);
            this.m_ImportGUI     = new SketchUpTreeViewGUI(this.m_TreeView);
            this.m_DataSource    = new SketchUpDataSource(this.m_TreeView, nodes);
            this.m_TreeView.Init(base.position, this.m_DataSource, this.m_ImportGUI, null);
            TreeViewController expr_C4 = this.m_TreeView;

            expr_C4.selectionChangedCallback = (Action <int[]>)Delegate.Combine(expr_C4.selectionChangedCallback, new Action <int[]>(this.OnTreeSelectionChanged));
            this.m_ModelEditor = new WeakReference(suModelEditor);
            this.isModal       = false;
        }
        public TimelineGroupGUI(TreeViewController treeview, TimelineTreeViewGUI treeviewGUI, int id, int depth, TreeViewItem parent, string displayName, TrackAsset trackAsset, bool isRoot)
            : base(id, depth, parent, displayName, trackAsset, treeview, treeviewGUI)
        {
            m_Styles = DirectorStyles.Instance;
            m_IsRoot = isRoot;

            var trackPath    = AssetDatabase.GetAssetPath(trackAsset);
            var sequencePath = AssetDatabase.GetAssetPath(treeviewGUI.TimelineWindow.state.editSequence.asset);

            if (trackPath != sequencePath)
            {
                m_IsReferencedTrack = true;
            }

            m_GroupDepth = CalculateGroupDepth(parent);
        }
 public void Test_LoadSingleBO_NoChildren()
 {
     //---------------Set up test pack-------------------
     TreeViewWin treeView = new TreeViewWin();
     TreeViewController treeViewController = new TreeViewController(treeView);
     OrganisationTestBO organisationTestBO = new OrganisationTestBO();
     //-------------Assert Preconditions -------------
     Assert.AreEqual(0, treeView.Nodes.Count);
     //---------------Execute Test ----------------------
     treeViewController.LoadTreeView(organisationTestBO);
     //---------------Test Result -----------------------
     Assert.AreEqual(1, treeView.Nodes.Count);
     ITreeNode node = treeView.Nodes[0];
     Assert.AreEqual(organisationTestBO.ToString(), node.Text);
     Assert.AreEqual(0, node.Nodes.Count);
 }
        public void SetTreeView(TreeViewController treeView)
        {
            this.m_TreeView = treeView;
            TreeViewController expr_0E = this.m_TreeView;

            expr_0E.selectionChangedCallback = (Action <int[]>)Delegate.Remove(expr_0E.selectionChangedCallback, new Action <int[]>(this.OnItemSelectionChanged));
            TreeViewController expr_35 = this.m_TreeView;

            expr_35.selectionChangedCallback = (Action <int[]>)Delegate.Combine(expr_35.selectionChangedCallback, new Action <int[]>(this.OnItemSelectionChanged));
            TreeViewController expr_5C = this.m_TreeView;

            expr_5C.itemDoubleClickedCallback = (Action <int>)Delegate.Remove(expr_5C.itemDoubleClickedCallback, new Action <int>(this.OnItemDoubleClicked));
            TreeViewController expr_83 = this.m_TreeView;

            expr_83.itemDoubleClickedCallback = (Action <int>)Delegate.Combine(expr_83.itemDoubleClickedCallback, new Action <int>(this.OnItemDoubleClicked));
        }
Esempio n. 22
0
        private void TreeViewItemOnMouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            // TODO: Get Node From Sender ????
            XmlNode selectedNode = TreeViewController.GetNAntNode(NAntTreeView.SelectedItem as TreeViewItem);

            _viewController.CurrentNode = selectedNode;

            if (TreeViewController.IsNAntTarget(NAntTreeView.SelectedItem as TreeViewItem))
            {
                Start_Click(sender, e);
            }
            else
            {
                // TODO Open Nant File at property position
            }
        }
        public TimelineTreeView(TimelineWindow sequencerWindow, TreeViewController treeView)
        {
            m_TreeView = treeView;
            m_TreeView.useExpansionAnimation = true;

            m_TreeView.selectionChangedCallback         += SelectionChangedCallback;
            m_TreeView.contextClickOutsideItemsCallback += ContextClickOutsideItemsCallback;
            m_TreeView.itemDoubleClickedCallback        += ItemDoubleClickedCallback;
            m_TreeView.contextClickItemCallback         += ContextClickItemCallback;

            m_TreeView.SetConsumeKeyDownEvents(false);
            m_Styles = DirectorStyles.Instance;
            m_State  = sequencerWindow.state;

            m_FoldoutWidth = DirectorStyles.Instance.foldout.fixedWidth;
        }
        public void OnEnable()
        {
            bool flag = false;

            base.titleContent = new GUIContent("Editor Tests");
            s_Instance        = this;
            this.m_Settings   = new EditorTestsRunnerSettings("UnityTest.EditorTestsRunnerWindow");
            this.m_FilterSettings.UpdateCounters(Enumerable.Empty <ITestResult>());
            if ((s_TestEngine.testSuite != null) && (s_TestEngine.testSuite.get_TestCount() != 0))
            {
                if (this.m_TestListTree == null)
                {
                    if (this.m_TestListState == null)
                    {
                        this.m_TestListState = new TreeViewState();
                    }
                    if (this.m_TestListTree == null)
                    {
                        this.m_TestListTree = new TreeViewController(this, this.m_TestListState);
                    }
                    this.m_TestListTree.deselectOnUnhandledMouseDown = false;
                    this.m_TestListTree.selectionChangedCallback     = (Action <int[]>)Delegate.Combine(this.m_TestListTree.selectionChangedCallback, new Action <int[]>(this.TestSelectionCallback));
                    this.m_TestListTree.itemDoubleClickedCallback    = (Action <int>)Delegate.Combine(this.m_TestListTree.itemDoubleClickedCallback, new Action <int>(this.TestDoubleClickCallback));
                    this.m_TestListTree.contextClickItemCallback     = (Action <int>)Delegate.Combine(this.m_TestListTree.contextClickItemCallback, new Action <int>(this.TestContextClick));
                    this.m_TestListTreeViewDataSource = new TestListTreeViewDataSource(this.m_TestListTree, this);
                    if ((this.m_ResultList == null) || (this.m_ResultList.Count <EditorTestResult>() == 0))
                    {
                        this.m_TestListTreeViewDataSource.ExpandTreeOnCreation();
                    }
                    this.m_TestListTree.Init(new Rect(), this.m_TestListTreeViewDataSource, new TestListTreeViewGUI(this.m_TestListTree), null);
                    flag = true;
                }
                this.m_TestListTree.ReloadData();
                this.m_ResultList = this.m_TestListTreeViewDataSource.resultState;
                if (flag)
                {
                    foreach (EditorTestResult result in this.m_TestListTreeViewDataSource.resultState)
                    {
                        result.outdated = true;
                    }
                }
                if (this.m_TestListTree.HasSelection())
                {
                    this.m_TestListTree.selectionChangedCallback(this.m_TestListTree.GetSelection());
                }
            }
        }
        public void Test_GetBusinessObjectTreeNode_RootNode()
        {
            //---------------Set up test pack-------------------
            TreeViewWin         treeView            = new TreeViewWin();
            TreeViewController  treeViewController  = new TreeViewController(treeView);
            ContactPersonTestBO contactPersonTestBO = new ContactPersonTestBO();

            treeViewController.LoadTreeView(contactPersonTestBO);
            //-------------Assert Preconditions -------------
            Assert.AreEqual(1, treeView.Nodes.Count);
            //---------------Execute Test ----------------------
            TreeNode fetchedTreeNode = treeViewController.GetBusinessObjectTreeNode(contactPersonTestBO);

            //---------------Test Result -----------------------
            Assert.IsNotNull(fetchedTreeNode);
            Assert.AreSame(fetchedTreeNode, treeView.Nodes[0].OriginalNode);
        }
Esempio n. 26
0
        public AudioMixersTreeView(AudioMixerWindow mixerWindow, TreeViewState treeState, Func <List <AudioMixerController> > getAllControllersCallback)
        {
            this.m_TreeView = new TreeViewController(mixerWindow, treeState);
            this.m_TreeView.deselectOnUnhandledMouseDown = false;
            TreeViewController expr_26 = this.m_TreeView;

            expr_26.selectionChangedCallback = (Action <int[]>)Delegate.Combine(expr_26.selectionChangedCallback, new Action <int[]>(this.OnTreeSelectionChanged));
            TreeViewController expr_4D = this.m_TreeView;

            expr_4D.contextClickItemCallback = (Action <int>)Delegate.Combine(expr_4D.contextClickItemCallback, new Action <int>(this.OnTreeViewContextClick));
            AudioMixersTreeViewGUI     gui      = new AudioMixersTreeViewGUI(this.m_TreeView);
            AudioMixersDataSource      data     = new AudioMixersDataSource(this.m_TreeView, getAllControllersCallback);
            AudioMixerTreeViewDragging dragging = new AudioMixerTreeViewDragging(this.m_TreeView, new Action <List <AudioMixerController>, AudioMixerController>(this.OnMixersDroppedOnMixerCallback));

            this.m_TreeView.Init(mixerWindow.position, data, gui, dragging);
            this.m_TreeView.ReloadData();
        }
Esempio n. 27
0
        public void InitIfNeeded(Rect rect, CurveDataSource dataSource)
        {
            if (Event.current.type != EventType.Layout)
            {
                return;
            }

            m_ClipDataSource = dataSource;
            var clip = dataSource.animationClip;

            List <EditorCurveBinding> allBindings = new List <EditorCurveBinding>();

            allBindings.Add(new EditorCurveBinding {
                propertyName = "Summary"
            });
            if (clip != null)
            {
                allBindings.AddRange(AnimationUtility.GetCurveBindings(clip));
            }

            m_DopeLines.list = allBindings.ToArray();

            if (m_TreeViewState != null)
            {
                return;
            }

            m_TreeViewState = new TreeViewState();

            m_TreeView = new TreeViewController(m_Window, m_TreeViewState)
            {
                useExpansionAnimation        = false,
                deselectOnUnhandledMouseDown = true
            };

            m_TreeView.selectionChangedCallback += OnItemSelectionChanged;

            m_TreeViewDataSource = new BindingTreeViewDataSource(m_TreeView, clip);

            m_TreeView.Init(rect, m_TreeViewDataSource, new BindingTreeViewGUI(m_TreeView), null);

            m_TreeViewDataSource.UpdateData();

            OnItemSelectionChanged(null);
        }
Esempio n. 28
0
        public TimelineTrackGUI(TreeViewController tv, TimelineTreeViewGUI w, int id, int depth, TreeViewItem parent, string displayName, TrackAsset sequenceActor) : base(tv, w, id, depth, parent, displayName, sequenceActor, false)
        {
            AnimationTrack animationTrack = sequenceActor as AnimationTrack;

            if (animationTrack != null)
            {
                this.m_InfiniteTrackDrawer = new InfiniteTrackDrawer(new AnimationTrackKeyDataSource(animationTrack));
                this.UpdateInfiniteClipEditor(animationTrack, w.TimelineWindow);
                if (animationTrack.ShouldShowInfiniteClipEditor())
                {
                    this.clipCurveEditor = new ClipCurveEditor(new InfiniteClipCurveDataSource(this), w.TimelineWindow);
                }
            }
            this.m_HadProblems     = false;
            this.m_InitHadProblems = false;
            this.m_Bindings        = base.track.get_outputs().ToArray <PlayableBinding>();
            base.AddManipulator(new TrackVerticalResize());
        }
        public void Test_LoadSingleBO_NoChildren()
        {
            //---------------Set up test pack-------------------
            TreeViewWin        treeView           = new TreeViewWin();
            TreeViewController treeViewController = new TreeViewController(treeView);
            OrganisationTestBO organisationTestBO = new OrganisationTestBO();

            //-------------Assert Preconditions -------------
            Assert.AreEqual(0, treeView.Nodes.Count);
            //---------------Execute Test ----------------------
            treeViewController.LoadTreeView(organisationTestBO);
            //---------------Test Result -----------------------
            Assert.AreEqual(1, treeView.Nodes.Count);
            ITreeNode node = treeView.Nodes[0];

            Assert.AreEqual(organisationTestBO.ToString(), node.Text);
            Assert.AreEqual(0, node.Nodes.Count);
        }
Esempio n. 30
0
        public TimelineTrackGUI(TreeViewController tv, TimelineTreeViewGUI w, int id, int depth, TreeViewItem parent, string displayName, TrackAsset sequenceActor)
            : base(tv, w, id, depth, parent, displayName, sequenceActor, false)
        {
            AnimationTrack animationTrack = sequenceActor as AnimationTrack;

            if (animationTrack != null)
            {
                m_InfiniteTrackDrawer = new InfiniteTrackDrawer(new AnimationTrackKeyDataSource(animationTrack));
            }
            else if (sequenceActor.HasAnyAnimatableParameters() && !sequenceActor.clips.Any())
            {
                m_InfiniteTrackDrawer = new InfiniteTrackDrawer(new TrackPropertyCurvesDataSource(sequenceActor));
            }

            UpdateInfiniteClipEditor(w.TimelineWindow);

            var bindings = track.outputs.ToArray();

            m_TrackDrawData.m_HasBinding = bindings.Length > 0;
            if (m_TrackDrawData.m_HasBinding)
            {
                m_TrackDrawData.m_Binding = bindings[0];
            }
            m_TrackDrawData.m_IsSubTrack      = IsSubTrack();
            m_TrackDrawData.m_AllowsRecording = DoesTrackAllowsRecording(sequenceActor);
            m_DefaultTrackIcon = TrackResourceCache.GetTrackIcon(track);


            m_TrackEditor = CustomTimelineEditorCache.GetTrackEditor(sequenceActor);

            try
            {
                m_TrackDrawOptions = m_TrackEditor.GetTrackOptions(track, null);
            }
            catch (Exception e)
            {
                Debug.LogException(e);
                m_TrackDrawOptions = CustomTimelineEditorCache.GetDefaultTrackEditor().GetTrackOptions(track, null);
            }

            m_TrackDrawOptions.errorText = null; // explicitly setting to null for an uninitialized state

            RebuildGUICacheIfNecessary();
        }
Esempio n. 31
0
        public void Init(TestRunnerWindow window, ITestAdaptor rootTest)
        {
            if (m_Window == null)
            {
                m_Window = window;
            }

            if (m_TestListTree == null)
            {
                if (m_TestListState == null)
                {
                    m_TestListState = new TreeViewState();
                }
                if (m_TestListTree == null)
                {
                    m_TestListTree = new TreeViewController(m_Window, m_TestListState);
                }

                m_TestListTree.deselectOnUnhandledMouseDown = false;

                m_TestListTree.selectionChangedCallback  += TestSelectionCallback;
                m_TestListTree.itemDoubleClickedCallback += TestDoubleClickCallback;
                m_TestListTree.contextClickItemCallback  += TestContextClickCallback;

                var testListTreeViewDataSource = new TestListTreeViewDataSource(m_TestListTree, this, rootTest);

                if (!newResultList.Any())
                {
                    testListTreeViewDataSource.ExpandTreeOnCreation();
                }

                m_TestListTree.Init(new Rect(),
                                    testListTreeViewDataSource,
                                    new TestListTreeViewGUI(m_TestListTree),
                                    null);
            }

            EditorApplication.update += RepaintIfProjectPathChanged;

            m_TestRunnerUIFilter.UpdateCounters(newResultList);
            m_TestRunnerUIFilter.RebuildTestList     = () => m_TestListTree.ReloadData();
            m_TestRunnerUIFilter.SearchStringChanged = s => m_TestListTree.searchString = s;
            m_TestRunnerUIFilter.SearchStringCleared = () => FrameSelection();
        }
        public void Init(SketchUpNodeInfo[] nodes, SketchUpImporterModelEditor suModelEditor)
        {
            titleContent = Styles.styles.windowTitle;
            minSize      = m_WindowMinSize;
            position     = new Rect(position.x, position.y, minSize.x, minSize.y);

            m_TreeViewState = new TreeViewState();

            m_TreeView = new TreeViewController(this, m_TreeViewState);

            m_ImportGUI  = new SketchUpTreeViewGUI(m_TreeView);
            m_DataSource = new SketchUpDataSource(m_TreeView, nodes);
            m_TreeView.Init(position, m_DataSource, m_ImportGUI, null);

            m_TreeView.selectionChangedCallback += OnTreeSelectionChanged;

            m_ModelEditor = new WeakReference(suModelEditor);

            isModal = false;
        }
        public TimelineTrackGUI(TreeViewController tv, TimelineTreeViewGUI w, int id, int depth, TreeViewItem parent, string displayName, TrackAsset sequenceActor)
            : base(tv, w, id, depth, parent, displayName, sequenceActor, false)
        {
            AnimationTrack animationTrack = sequenceActor as AnimationTrack;

            if (animationTrack != null)
            {
                m_InfiniteTrackDrawer = new InfiniteTrackDrawer(new AnimationTrackKeyDataSource(animationTrack));
                UpdateInfiniteClipEditor(animationTrack, w.TimelineWindow);

                if (animationTrack.ShouldShowInfiniteClipEditor())
                {
                    clipCurveEditor = new ClipCurveEditor(new InfiniteClipCurveDataSource(this), w.TimelineWindow);
                }
            }

            m_HadProblems     = false;
            m_InitHadProblems = false;
            m_Bindings        = track.outputs.ToArray();
        }
Esempio n. 34
0
        public void Init(EditorWindow owner, Rect rect)
        {
            if (m_State.hierarchyState == null)
            {
                m_State.hierarchyState = new AnimationWindowHierarchyState();
            }

            m_TreeView            = new TreeViewController(owner, m_State.hierarchyState);
            m_State.hierarchyData = new AnimationWindowHierarchyDataSource(m_TreeView, m_State);
            m_TreeView.Init(rect,
                            m_State.hierarchyData,
                            new AnimationWindowHierarchyGUI(m_TreeView, m_State),
                            null
                            );

            m_TreeView.deselectOnUnhandledMouseDown = true;
            m_TreeView.selectionChangedCallback    += m_State.OnHierarchySelectionChanged;

            m_TreeView.ReloadData();
        }
Esempio n. 35
0
        private void TreeViewItemOnMouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            // TODO: Get Node From Sender ????
            // Get the selected node
            XmlNode selectedNode = TreeViewController.GetNAntNode(NAntTreeView.SelectedItem as TreeViewItem);

            _viewController.CurrentNode = selectedNode;

            /*
             * // Check if node can be display in property pane
             * if (selectedNode != null)
             *  m_ItemProperties.SelectedObject = _viewController.CurrentNode.Descriptor;
             * else
             *  m_ItemProperties.SelectedObject = null;
             */


            // Refresh button
            RefreshView();
        }
Esempio n. 36
0
        public AudioMixerGroupTreeView(AudioMixerWindow mixerWindow, TreeViewState treeState)
        {
            m_AudioGroupTreeState = treeState;

            m_AudioGroupTree = new TreeViewController(mixerWindow, m_AudioGroupTreeState);
            m_AudioGroupTree.deselectOnUnhandledMouseDown = false;
            m_AudioGroupTree.selectionChangedCallback    += OnTreeSelectionChanged;
            m_AudioGroupTree.contextClickItemCallback    += OnTreeViewContextClick;
            m_AudioGroupTree.expandedStateChanged        += SaveExpandedState;

            m_TreeViewGUI = new AudioGroupTreeViewGUI(m_AudioGroupTree);
            m_TreeViewGUI.NodeWasToggled += OnNodeToggled;

            m_AudioGroupTreeDataSource = new AudioGroupDataSource(m_AudioGroupTree, m_Controller);
            m_AudioGroupTree.Init(mixerWindow.position,
                                  m_AudioGroupTreeDataSource, m_TreeViewGUI,
                                  new AudioGroupTreeViewDragging(m_AudioGroupTree, this)
                                  );
            m_AudioGroupTree.ReloadData();
        }
        public void Test_LoadSingleBO_OneChildRelationship_Expanded()
        {
            //---------------Set up test pack-------------------
            TreeViewWin        treeView           = new TreeViewWin();
            TreeViewController treeViewController = new TreeViewController(treeView);
            OrganisationTestBO organisationTestBO = new OrganisationTestBO();

            //-------------Assert Preconditions -------------
            Assert.AreEqual(0, treeView.Nodes.Count);
            //---------------Execute Test ----------------------
            treeViewController.LoadTreeView(organisationTestBO, 1);
            //---------------Test Result -----------------------
            Assert.AreEqual(1, treeView.Nodes.Count);
            ITreeNode node = treeView.Nodes[0];

            Assert.AreEqual(organisationTestBO.ToString(), node.Text);
            Assert.AreEqual(1, node.Nodes.Count);
            ITreeNode relationshipNode = node.Nodes[0];

            Assert.AreEqual("ContactPeople", relationshipNode.Text);
        }
        public AudioMixerGroupTreeView(AudioMixerWindow mixerWindow, TreeViewState treeState)
        {
            this.m_AudioGroupTreeState = treeState;
            this.m_AudioGroupTree      = new TreeViewController(mixerWindow, this.m_AudioGroupTreeState);
            this.m_AudioGroupTree.deselectOnUnhandledMouseDown = false;
            TreeViewController expr_32 = this.m_AudioGroupTree;

            expr_32.selectionChangedCallback = (Action <int[]>)Delegate.Combine(expr_32.selectionChangedCallback, new Action <int[]>(this.OnTreeSelectionChanged));
            TreeViewController expr_59 = this.m_AudioGroupTree;

            expr_59.contextClickItemCallback = (Action <int>)Delegate.Combine(expr_59.contextClickItemCallback, new Action <int>(this.OnTreeViewContextClick));
            TreeViewController expr_80 = this.m_AudioGroupTree;

            expr_80.expandedStateChanged = (Action)Delegate.Combine(expr_80.expandedStateChanged, new Action(this.SaveExpandedState));
            this.m_TreeViewGUI           = new AudioGroupTreeViewGUI(this.m_AudioGroupTree);
            AudioGroupTreeViewGUI expr_B8 = this.m_TreeViewGUI;

            expr_B8.NodeWasToggled          = (Action <AudioMixerTreeViewNode, bool>)Delegate.Combine(expr_B8.NodeWasToggled, new Action <AudioMixerTreeViewNode, bool>(this.OnNodeToggled));
            this.m_AudioGroupTreeDataSource = new AudioGroupDataSource(this.m_AudioGroupTree, this.m_Controller);
            this.m_AudioGroupTree.Init(mixerWindow.position, this.m_AudioGroupTreeDataSource, this.m_TreeViewGUI, new AudioGroupTreeViewDragging(this.m_AudioGroupTree, this));
            this.m_AudioGroupTree.ReloadData();
        }
        public TimelineTreeViewGUI(TimelineWindow sequencerWindow, TimelineAsset timeline, Rect rect)
        {
            m_Timeline = timeline;
            m_Window   = sequencerWindow;

            var treeviewState = new TreeViewState();

            treeviewState.scrollPos = new Vector2(treeviewState.scrollPos.x, TimelineWindowViewPrefs.GetOrCreateViewModel(m_Timeline).verticalScroll);

            m_TreeView = new TreeViewController(sequencerWindow, treeviewState);
            m_TreeView.horizontalScrollbarStyle = GUIStyle.none;
            m_TreeView.scrollViewStyle          = GUI.skin.scrollView;

            m_TimelineTreeView = new TimelineTreeView(sequencerWindow, m_TreeView);
            var dragging = new TimelineDragging(m_TreeView, m_Window, m_Timeline);

            m_DataSource = new TimelineDataSource(this, m_TreeView, sequencerWindow);

            m_DataSource.onVisibleRowsChanged += m_TimelineTreeView.CalculateRowRects;
            m_TreeView.Init(rect, m_DataSource, m_TimelineTreeView, dragging);

            m_DataSource.ExpandItems(m_DataSource.root);
        }
Esempio n. 40
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            // test the navtree building:
            try
            {
                TreeViewController.PopulateTreeView(ref treeView1, true, tbEndNodeFormat.Text);
            }
            catch (Exception)
            {
                MessageBox.Show("Invalid values.");
                return;
            }

            if (treeView1.Nodes != null)
            {
                if (treeView1.Nodes.Count == 0)
                {
                    MessageBox.Show("No nodes to populate.");
                    return;
                }
            }
            else
            {
                MessageBox.Show("No nodes to populate.");
                return;
            }

            Properties.Preferences.Default.TreeNodeFormat = tbEndNodeFormat.Text;
            Properties.Preferences.Default.PlaySplashClip = cbPlaySplashClip.Checked;

            if (cbNodeGrouping.SelectedIndex != -1)
            {
                Properties.Preferences.Default.NodeGrouping = cbNodeGrouping.SelectedIndex;
            }

            Properties.Preferences.Default.Save();
        }
 public void InitIfNeeded(Rect rect, CurveDataSource dataSource)
 {
     if (Event.get_current().get_type() == 8)
     {
         this.m_ClipDataSource = dataSource;
         AnimationClip             animationClip = dataSource.animationClip;
         int                       num           = (this.m_DopeLines.get_list() == null) ? 0 : this.m_DopeLines.get_list().Count;
         List <EditorCurveBinding> list          = new List <EditorCurveBinding>();
         list.Add(new EditorCurveBinding
         {
             propertyName = "Summary"
         });
         if (animationClip != null)
         {
             list.AddRange(AnimationUtility.GetCurveBindings(animationClip));
         }
         this.m_DopeLines.set_list(list.ToArray());
         if (num != this.m_DopeLines.get_list().Count)
         {
             this.UpdateRowHeight();
         }
         if (this.m_TreeViewState == null)
         {
             this.m_TreeViewState = new TreeViewState();
             TreeViewController treeViewController = new TreeViewController(this.m_Window, this.m_TreeViewState);
             treeViewController.set_useExpansionAnimation(false);
             treeViewController.set_deselectOnUnhandledMouseDown(true);
             this.m_TreeView = treeViewController;
             TreeViewController expr_FD = this.m_TreeView;
             expr_FD.set_selectionChangedCallback((Action <int[]>)Delegate.Combine(expr_FD.get_selectionChangedCallback(), new Action <int[]>(this.OnItemSelectionChanged)));
             this.m_TreeViewDataSource = new BindingTreeViewDataSource(this.m_TreeView, animationClip);
             this.m_TreeView.Init(rect, this.m_TreeViewDataSource, new BindingTreeViewGUI(this.m_TreeView), null);
             this.m_TreeViewDataSource.UpdateData();
             this.OnItemSelectionChanged(null);
         }
     }
 }
Esempio n. 42
0
    public void Initialize(string name, string path, string type, object[] args, bool isFolded, TreeViewController controller, int id)
    {
        Name           = name;
        Path           = path;
        Type           = type;
        Args           = args;
        IsFolded       = isFolded;
        ViewController = controller;
        Id             = id;

        var rt = GetComponent <RectTransform>();

        //rt.sizeDelta = new Vector2(rt.sizeDelta.x, 15);

        SetArrowSize(ViewController.ArrowSize);
        SetArrowAlpha(0.5f);
        SetArrowState(IsFolded);
        SetArrowVisibility(false);
        SetChildrenVisibility(!IsFolded);

        ArrowObject.GetComponent <ArrowScript>().DropDownToggle += DropDownToggleDelegate;
        ArrowObject.GetComponent <ArrowScript>().SetState(isFolded);
        ArrowObject.GetComponent <ArrowScript>().SetState(IsVisible);
        ArrowObject.GetComponent <ArrowScript>().SetAlpha(0.5f);


        //FieldObject = TreeUtility.InstantiateNodeField(Type);
        FieldObject = Instantiate(Resources.Load("RangeItem", typeof(GameObject))) as GameObject;
        FieldObject.GetComponent <IItemInterface>().Parameters = Args;
        FieldObject.GetComponent <IItemInterface>().SetTextFontSize(ViewController.TextFontSize);
        FieldObject.GetComponent <IItemInterface>().SetContentAlpha(0.1f);
        FieldObject.transform.SetParent(this.transform, false);
        SetFieldObjectSize(ViewController.TextFieldSize);
        RangeFieldItem = GetComponentInChildren <RangeFieldItem>();

        SetFoldedState(isFolded);
    }
Esempio n. 43
0
        public TimelineTreeViewGUI(TimelineWindow sequencerWindow, TimelineAsset timeline, Rect rect)
        {
            this.m_Timeline = timeline;
            this.m_Window   = sequencerWindow;
            TreeViewState treeViewState = new TreeViewState();

            this.m_TreeView = new TreeViewController(sequencerWindow, treeViewState);
            this.m_TreeView.set_horizontalScrollbarStyle(GUIStyle.get_none());
            this.m_TimelineTreeView = new TimelineTreeView(sequencerWindow, this.m_TreeView);
            TimelineDragging timelineDragging = new TimelineDragging(this.m_TreeView, this.m_Window, this.m_Timeline);

            this.m_DataSource = new TimelineDataSource(this, this.m_TreeView, sequencerWindow);
            TimelineDataSource expr_7B = this.m_DataSource;

            expr_7B.onVisibleRowsChanged = (Action)Delegate.Combine(expr_7B.onVisibleRowsChanged, new Action(this.m_TimelineTreeView.CalculateRowRects));
            this.m_TreeView.Init(rect, this.m_DataSource, this.m_TimelineTreeView, timelineDragging);
            TreeViewController expr_C0 = this.m_TreeView;

            expr_C0.set_dragEndedCallback((Action <int[], bool>) Delegate.Combine(expr_C0.get_dragEndedCallback(), new Action <int[], bool>(delegate(int[] ids, bool value)
            {
                SelectionManager.Clear();
            })));
            this.m_DataSource.ExpandItems(this.m_DataSource.get_root());
        }
        public void Test_SetupNodeWithBusinessObject_LoadSingleBo_CustomDisplayValue()
        {
            //---------------Set up test pack-------------------
            TreeViewWin        treeView           = new TreeViewWin();
            TreeViewController treeViewController = new TreeViewController(treeView);

            string customDisplayValue = TestUtil.GetRandomString();
            ContactPersonTestBO contactPersonTestBO = new ContactPersonTestBO();

            //-------------Assert Preconditions -------------
            Assert.AreEqual(0, treeView.Nodes.Count);
            //---------------Execute Test ----------------------
            treeViewController.SetupNodeWithBusinessObject += delegate(TreeNode treeNode, IBusinessObject businessObject)
            {
                treeNode.Text = customDisplayValue;
            };
            treeViewController.LoadTreeView(contactPersonTestBO);
            //---------------Test Result -----------------------
            Assert.AreEqual(1, treeView.Nodes.Count);
            ITreeNode node = treeView.Nodes[0];

            Assert.AreEqual(customDisplayValue, node.Text);
            Assert.AreEqual(0, node.Nodes.Count);
        }
Esempio n. 45
0
    public void Initialize(string name, string path, string type, object[] args, bool isFolded, TreeViewController controller, int id)
	{
        Name = name;
        Path = path;
        Type = type;
        Args = args;
        IsFolded = isFolded;
        ViewController = controller;
        Id = id;

        var rt = GetComponent<RectTransform>();
        //rt.sizeDelta = new Vector2(rt.sizeDelta.x, 15);

        SetArrowSize(ViewController.ArrowSize);
        SetArrowAlpha(0.5f);
        SetArrowState(IsFolded);
        SetArrowVisibility(false);
        SetChildrenVisibility(!IsFolded);

        ArrowObject.GetComponent<ArrowScript>().DropDownToggle += DropDownToggleDelegate;
        ArrowObject.GetComponent<ArrowScript>().SetState(isFolded);
        ArrowObject.GetComponent<ArrowScript>().SetState(IsVisible);
        ArrowObject.GetComponent<ArrowScript>().SetAlpha(0.5f);
        

        //FieldObject = TreeUtility.InstantiateNodeField(Type);
        FieldObject = Instantiate(Resources.Load("RangeItem", typeof(GameObject))) as GameObject;
        FieldObject.GetComponent<IItemInterface>().Parameters = Args;
        FieldObject.GetComponent<IItemInterface>().SetTextFontSize(ViewController.TextFontSize);
        FieldObject.GetComponent<IItemInterface>().SetContentAlpha(0.1f);
        FieldObject.transform.SetParent(this.transform, false);
        SetFieldObjectSize(ViewController.TextFieldSize);
        RangeFieldItem = GetComponentInChildren<RangeFieldItem>();

        SetFoldedState(isFolded);
	}
 public ProjectBrowserColumnOneTreeViewDragging(TreeViewController treeView) : base(treeView)
 {
 }
 public TestListTreeViewGUI(TreeViewController testListTree) : base(testListTree)
 {
 }
        public void Test_SetupNodeWithBusinessObject_LoadSingleBo_CustomDisplayValue()
        {
            //---------------Set up test pack-------------------
            TreeViewWin treeView = new TreeViewWin();
            TreeViewController treeViewController = new TreeViewController(treeView);

            string customDisplayValue = TestUtil.GetRandomString();
            ContactPersonTestBO contactPersonTestBO =  new ContactPersonTestBO();
            //-------------Assert Preconditions -------------
            Assert.AreEqual(0, treeView.Nodes.Count);
            //---------------Execute Test ----------------------
            treeViewController.SetupNodeWithBusinessObject += delegate(TreeNode treeNode, IBusinessObject businessObject)
            {
                treeNode.Text = customDisplayValue;
            };
            treeViewController.LoadTreeView(contactPersonTestBO);
            //---------------Test Result -----------------------
            Assert.AreEqual(1, treeView.Nodes.Count);
            ITreeNode node = treeView.Nodes[0];
            Assert.AreEqual(customDisplayValue, node.Text);
            Assert.AreEqual(0, node.Nodes.Count);

        }
 public PackageExportTreeViewGUI(TreeViewController treeView, PackageExportTreeView view) : base(treeView)
 {
     this.k_FoldoutWidth = 12f;
     this.m_PackageExportView = view;
     base.k_BaseIndent = 4f;
     if (!PackageExportTreeView.s_UseFoldouts)
     {
         this.k_FoldoutWidth = 0f;
     }
 }
 public PackageExportTreeViewDataSource(TreeViewController treeView, PackageExportTreeView view) : base(treeView)
 {
     this.m_PackageExportView = view;
     base.rootIsCollapsable = false;
     base.showRootItem = false;
 }
 public AudioGroupDataSource(TreeViewController treeView, AudioMixerController controller) : base(treeView)
 {
     this.m_Controller = controller;
 }
 public TestListTreeViewDataSource(TreeViewController testListTree, TestListGUI testListGUI) : base(testListTree)
 {
     base.showRootItem = false;
     base.rootIsCollapsable = false;
     this.m_TestListGUI = testListGUI;
 }
 public void Test_LoadSingleBO_OneChildRelationship_Expanded()
 {
     //---------------Set up test pack-------------------
     TreeViewWin treeView = new TreeViewWin();
     TreeViewController treeViewController = new TreeViewController(treeView);
     OrganisationTestBO organisationTestBO = new OrganisationTestBO();  
     //-------------Assert Preconditions -------------
     Assert.AreEqual(0, treeView.Nodes.Count);
     //---------------Execute Test ----------------------
     treeViewController.LoadTreeView(organisationTestBO, 1);
     //---------------Test Result -----------------------
     Assert.AreEqual(1, treeView.Nodes.Count);
     ITreeNode node = treeView.Nodes[0];
     Assert.AreEqual(organisationTestBO.ToString(), node.Text);
     Assert.AreEqual(1, node.Nodes.Count);
     ITreeNode relationshipNode = node.Nodes[0];
     Assert.AreEqual("ContactPeople", relationshipNode.Text);
 }
 public void Test_LoadSingleBO_OneChild_Expanded()
 {
     //---------------Set up test pack-------------------
     TreeViewWin treeView = new TreeViewWin();
     TreeViewController treeViewController = new TreeViewController(treeView);
     OrganisationTestBO organisationTestBO = new OrganisationTestBO {Name = TestUtil.GetRandomString()};
     ContactPersonTestBO contactPersonTestBO = organisationTestBO.ContactPeople.CreateBusinessObject();
     contactPersonTestBO.Surname = TestUtil.GetRandomString();
     //-------------Assert Preconditions -------------
     Assert.AreEqual(0, treeView.Nodes.Count);
     //---------------Execute Test ----------------------
     treeViewController.LoadTreeView(organisationTestBO, 2);
     //---------------Test Result -----------------------
     Assert.AreEqual(1, treeView.Nodes.Count);
     ITreeNode node = treeView.Nodes[0];
     Assert.AreEqual(organisationTestBO.ToString(), node.Text);
     Assert.AreEqual(1, node.Nodes.Count);
     ITreeNode relationshipNode = node.Nodes[0];
     Assert.AreEqual("ContactPeople", relationshipNode.Text);
     Assert.AreEqual(1, relationshipNode.Nodes.Count);
     ITreeNode childNode = relationshipNode.Nodes[0];
     Assert.AreEqual(contactPersonTestBO.ToString(), childNode.Text);
 }
 public SketchUpDataSource(TreeViewController treeView, SketchUpNodeInfo[] nodes) : base(treeView)
 {
     this.m_Nodes = nodes;
     this.FetchData();
 }
 public SketchUpTreeViewGUI(TreeViewController treeView) : base(treeView)
 {
     this.k_Root = EditorGUIUtility.FindTexture("DefaultAsset Icon");
     this.k_Icon = EditorGUIUtility.FindTexture("Mesh Icon");
     base.k_BaseIndent = 20f;
 }
 public TestGUICustomItemHeights(TreeViewController treeView) : base(treeView)
 {
     this.m_Column1Width = 300f;
     base.m_FoldoutWidth = Styles.foldout.fixedWidth;
 }
 public void Test_GetBusinessObjectTreeNode_RootNode()
 {
     //---------------Set up test pack-------------------
     TreeViewWin treeView = new TreeViewWin();
     TreeViewController treeViewController = new TreeViewController(treeView);
     ContactPersonTestBO contactPersonTestBO = new ContactPersonTestBO();
     treeViewController.LoadTreeView(contactPersonTestBO);
     //-------------Assert Preconditions -------------
     Assert.AreEqual(1, treeView.Nodes.Count);
     //---------------Execute Test ----------------------
     TreeNode fetchedTreeNode = treeViewController.GetBusinessObjectTreeNode(contactPersonTestBO);
     //---------------Test Result -----------------------
     Assert.IsNotNull(fetchedTreeNode);
     Assert.AreSame(fetchedTreeNode, treeView.Nodes[0].OriginalNode);
 }
Esempio n. 59
0
 public AudioGroupTreeViewDragging(TreeViewController treeView, AudioMixerGroupTreeView owner)
     : base(treeView)
 {
     m_owner = owner;
 }
Esempio n. 60
0
 public TestGUI(TreeViewController treeView) : base(treeView)
 {
     this.m_FolderIcon = EditorGUIUtility.FindTexture(EditorResourcesUtility.folderIconName);
     this.m_Icon = EditorGUIUtility.FindTexture("boo Script Icon");
 }