Example #1
0
 public async void Update(Guid tab_id)
 {
     CurrentWebPageViewModel   = TabPageViewModel.Current.ActiveWebPageViewModel(tab_id);
     MenuPageDocumentTitleText = CurrentWebPageViewModel.WebTitle();
     MenuPageUriText           = CurrentWebPageViewModel.Source.ToString();
     ScreenShot = await CurrentWebPageViewModel.CaptureScreenShot();
 }
Example #2
0
        public WebPageViewModel ActiveWebPageViewModel(Guid tab_id)
        {
            WebPageViewModel _viewmodel = null;

            foreach (var item in TabPageFrameGrid.Children)
            {
                var viewmodel = (WebPageViewModel)(((WebPage)(((Frame)item).Content)).DataContext);
                if (viewmodel.ID == tab_id)
                {
                    _viewmodel = viewmodel;
                }
            }
            return(_viewmodel);
        }
Example #3
0
        public static WebPageViewModel ReturnActiveWebPageViewModel()
        {
            WebPageViewModel result = null;
            Guid             active_id;

            active_id = AppManager.Current.Active_Tab_ID;

            foreach (var item in All)
            {
                if (item.ID == active_id)
                {
                    result = item;
                }
            }
            return(result);
        }
        public void SwitchTaskView()
        {
            if (IsTaskViewVisible == false)
            {
                MainFrame_Grid.Children.Move(1, Convert.ToUInt32(MainFrame_Grid.Children.IndexOf(MainFrame_Grid.Children.Last())));

                //ConnectedAnimationService.GetForCurrentView().DefaultDuration = new TimeSpan(0, 0, 0, 0, 800);
                ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("ForwardConnectedAnimation", WebPageViewModel.ReturnActiveWebview());
                var anim = ConnectedAnimationService.GetForCurrentView().GetAnimation("ForwardConnectedAnimation");
                if (anim != null)
                {
                    //anim.Configuration = new DirectConnectedAnimationConfiguration();
                    anim.TryStart(TabsSetViewModel.ReturnActiveWebview());
                }

                TabsSetViewModel.SwitchTaskView();

                IsTaskViewVisible = true;
            }
            else
            {
                //ConnectedAnimationService.GetForCurrentView().DefaultDuration = new TimeSpan(0, 0, 0, 800);
                ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("BackwardConnectedAnimation", TabsSetViewModel.ReturnActiveWebview());

                MainFrame_Grid.Children.Move(Convert.ToUInt32(MainFrame_Grid.Children.IndexOf(MainFrame_Grid.Children.Last())), 1);

                var anim = ConnectedAnimationService.GetForCurrentView().GetAnimation("BackwardConnectedAnimation");
                if (anim != null)
                {
                    //anim.Configuration = new DirectConnectedAnimationConfiguration();
                    anim.TryStart(WebPageViewModel.ReturnActiveWebview());
                }

                TabsSetViewModel.SwitchTaskView();


                IsTaskViewVisible = false;
            }
        }
Example #5
0
 public void Navigate(string newsource)
 {
     WebPageViewModel.ReturnActiveWebPageViewModel().SetSource(new Uri(newsource));
 }