Esempio n. 1
0
        public async void NavigateToShellSection(ShellSection shellSection)
        {
            if (ShellSection != shellSection)
            {
                if (ShellSection != null)
                {
                    ShellSection.PropertyChanged -= ShellSectionOnPropertyChanged;
                    ShellSectionController.ItemsCollectionChanged -= ShellSectionControllerOnItemsCollectionChanged;
                    ShellSection = null;
                }

                ShellSection = shellSection;
                ShellSection.PropertyChanged += ShellSectionOnPropertyChanged;
                ShellSectionController.ItemsCollectionChanged += ShellSectionControllerOnItemsCollectionChanged;
            }

            UpdateTopTabs();

            var  content  = shellSection.CurrentItem;
            Page nextPage = (shellSection as IShellSectionController)
                            .PresentedPage ?? ((IShellContentController)content)?.GetOrCreateContent();

            SectionFrame.Navigate(new ShellPageWrapper());
            await Task.Delay(100);

            var shellSectionCurrent = Shell.CurrentItem.CurrentItem;

            NavigateToContent(new NavigationRequestedEventArgs(nextPage, true), shellSectionCurrent);
        }
Esempio n. 2
0
            internal void GetVertices(HVA.Section MotLib, int FrameIdx, PAL Palette, List <VertexPositionColorNormal> Vertices, List <int> Indices)
            {
                if (ComputedFrames[FrameIdx] == null)
                {
                    ComputeVerticesIndices(Palette);

                    var computedF = new SectionFrame();

                    var rot = MotLib.GetRotation(FrameIdx);
                    var pos = MotLib.GetPosition(FrameIdx);

                    pos *= Tail.HVAMultiplier;

                    computedF.ComputedVertices = ComputedVertices.Select(v => {
                        v.Position  = Vector3.Transform(v.Position, rot);
                        v.Position += pos;
                        return(v);
                    }).ToList();

                    computedF.ComputedIndices = ComputedIndices;

                    ComputedFrames[FrameIdx] = computedF;
                }

                var cached = ComputedFrames[FrameIdx];

                Vertices.AddRange(cached.ComputedVertices);
                Indices.AddRange(cached.ComputedIndices);
            }
Esempio n. 3
0
        private void OnInsertRequested(NavigationRequestedEventArgs args)
        {
            var pageIndex = ShellSection.Stack.ToList().IndexOf(args.Page);

            if (pageIndex == ((IEnumerable <object>)SectionFrame.BackStack).Count() - 1)
            {
                SectionFrame.Navigate(new ShellPageWrapper());
            }
            else
            {
                //
                //  ((IEnumerable<object>)SectionFrame.BackStack).
            }
        }
Esempio n. 4
0
            internal void GetVertices(HVA.Section MotLib, int FrameIdx, PAL Palette, List<VertexPositionColorNormal> Vertices, List<int> Indices)
            {
                if (ComputedFrames[FrameIdx] == null) {
                    ComputeVerticesIndices(Palette);

                    var computedF = new SectionFrame();

                    var rot = MotLib.GetRotation(FrameIdx);
                    var pos = MotLib.GetPosition(FrameIdx);

                    pos *= Tail.HVAMultiplier;

                    computedF.ComputedVertices = ComputedVertices.Select(v => {
                        v.Position = Vector3.Transform(v.Position, rot);
                        v.Position += pos;
                        return v;
                    }).ToList();

                    computedF.ComputedIndices = ComputedIndices;

                    ComputedFrames[FrameIdx] = computedF;
                }

                var cached = ComputedFrames[FrameIdx];

                Vertices.AddRange(cached.ComputedVertices);
                Indices.AddRange(cached.ComputedIndices);
            }
Esempio n. 5
0
 private async void OnPushRequested(NavigationRequestedEventArgs args)
 {
     SectionFrame.Navigate(new ShellPageWrapper());
 }
Esempio n. 6
0
 private async void OnPopRequested(NavigationRequestedEventArgs args)
 {
     SectionFrame.GoBack();
 }