コード例 #1
0
 public GameObjectTreeViewDataSource(TreeView treeView, int rootInstanceID, bool showRootNode, bool rootNodeIsCollapsable) : base(treeView)
 {
     this.m_SearchString    = string.Empty;
     this.sortingState      = new SortingState();
     this.m_RootInstanceID  = rootInstanceID;
     this.showRootNode      = showRootNode;
     base.rootIsCollapsable = rootNodeIsCollapsable;
 }
コード例 #2
0
 public GameObjectTreeViewDataSource(TreeView treeView, int rootInstanceID, bool showRootNode, bool rootNodeIsCollapsable) : base(treeView)
 {
     this.m_SearchString = string.Empty;
     this.sortingState = new SortingState();
     this.m_RootInstanceID = rootInstanceID;
     this.showRootNode = showRootNode;
     base.rootIsCollapsable = rootNodeIsCollapsable;
 }
コード例 #3
0
 public GameObjectTreeViewDataSource(TreeView treeView, int rootInstanceID, bool showRootNode, bool rootNodeIsCollapsable) : base(treeView)
 {
     this.kGameObjectClassID       = BaseObjectTools.StringToClassID("GameObject");
     this.m_SearchString           = string.Empty;
     this.m_StickySceneHeaderItems = new List <GameObjectTreeViewItem>();
     this.sortingState             = new SortingState();
     this.m_RootInstanceID         = rootInstanceID;
     this.showRootNode             = showRootNode;
     base.rootIsCollapsable        = rootNodeIsCollapsable;
 }
コード例 #4
0
        // RadGridView-columns use SortingState-enum:
        public virtual AmbethISortDescriptor ConvertTelerikSortingState(SortingState state, String memberName)
        {
            if (state == SortingState.None)
            {
                return(null);
            }
            AmbethSortDescriptor result = new AmbethSortDescriptor();

            result.Member = memberName;
            if (state == SortingState.Ascending)
            {
                result.SortDirection = AmbethSortDirection.ASCENDING;
            }
            else if (state == SortingState.Descending)
            {
                result.SortDirection = AmbethSortDirection.DESCENDING;
            }
            return(result);
        }
コード例 #5
0
        public override void Resolve(IsoTransform isoTransform)
        {
            if (isoTransform == null)
            {
                return;
            }

            //apply xy screen position
            var posXY = Isometric.IsoToUnitySpace(isoTransform.Position);

            isoTransform.transform.position = new Vector3(posXY.x, posXY.y, isoTransform.transform.position.z);

            //add if not exists
            SortingState sortingState;

            if (!_isoTransformToSortingState.TryGetValue(isoTransform, out sortingState))
            {
                sortingState = new SortingState(isoTransform);
                _nodes.Add(sortingState);
                _isoTransformToSortingState.Add(isoTransform, sortingState);
            }

            //remove from parent dependencies
            for (int i = 0; i < sortingState.ParentDependencies.Count; i++)
            {
                sortingState.ParentDependencies[i].ChildDependencies.Remove(sortingState);
            }

            sortingState.ParentDependencies.Clear();

            //remove from child dependencies
            for (int i = 0; i < sortingState.ChildDependencies.Count; i++)
            {
                var childDependency = sortingState.ChildDependencies[i];
                childDependency.ParentDependencies.Remove(sortingState);
            }

            sortingState.ChildDependencies.Clear();
            sortingState.Hexagon = new Hexagon(isoTransform);
            CalculateDependencies(sortingState);
        }
コード例 #6
0
 private void CalculateDependencies(SortingState sortingState)
 {
     for (int i = 0; i < _nodes.Count; i++)
     {
         var other = _nodes[i];
         if (!sortingState.Hexagon.Overlaps(other.Hexagon))
         {
             continue;
         }
         if (ADependsOnB(sortingState.Isotransform, other.Isotransform))
         {
             other.ChildDependencies.Add(sortingState);
             sortingState.ParentDependencies.Add(other);
         }
         else
         {
             sortingState.ChildDependencies.Add(other);
             other.ParentDependencies.Add(sortingState);
         }
     }
 }
コード例 #7
0
        private float SetDepthRecursive(SortingState state, float depth)
        {
            //termination
            if (state.Visited)
            {
                return(depth);
            }
            state.Visited = true;

            //recursive call
            var result = depth;

            for (int i = 0; i < state.ParentDependencies.Count; i++)
            {
                var dependency = state.ParentDependencies[i];
                result = SetDepthRecursive(dependency, result);
            }
            //set result
            state.Depth = result;
            return(state.Depth + .1f);
        }
コード例 #8
0
 public void OnSortChanged(string columnName, SortingState sortState)
 {
 }
コード例 #9
0
 public void OnSortChanged(string columnName, SortingState sortState)
 {
     Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() => { UserFunctions.SaveUserDefaultSortSettingsAsync("Groups", columnName, sortState); }));
 }
コード例 #10
0
ファイル: SearchFilter.cs プロジェクト: VJan-fin/FASAP
 private void labelFASAP18_Click(object sender, EventArgs e)
 {
     SortingState.Name();
 }
コード例 #11
0
ファイル: SearchFilter.cs プロジェクト: VJan-fin/FASAP
 private void labelFASAP19_Click(object sender, EventArgs e)
 {
     SortingState.Rejting();
 }