コード例 #1
0
        public PreviewSelfiePage()
        {
            _previewSelfieViewModel = new PreviewSelfieViewModel(NavigateService.GetNavigationData <BitmapImage>());
            this.DataContext        = _previewSelfieViewModel;

            InitializeComponent();

            SetApplicationBar();
        }
コード例 #2
0
        public DownloadPage()
        {
            _downloadNodeViewModel = new DownloadNodeViewModel(NavigateService.GetNavigationData <NodeViewModel>());
            this.DataContext       = _downloadNodeViewModel;

            InitializeComponent();

            SetApplicationBar();
            SetImageSize();
        }
コード例 #3
0
        public MediaAlbumPage()
        {
            _mediaAlbumViewModel = new MediaAlbumViewModel(SdkService.MegaSdk,
                                                           NavigateService.GetNavigationData <BaseMediaViewModel <PictureAlbum> >());
            this.DataContext = _mediaAlbumViewModel;
            InitializeComponent();

            SetApplicationBar();

            InteractionEffectManager.AllowedTypes.Add(typeof(RadDataBoundListBoxItem));
        }
コード例 #4
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            NavigationService.RemoveBackEntry();

            _originPage = NavigateService.GetNavigationData <Type>();
            if (_originPage == null || _originPage == typeof(NodeDetailsPage) ||
                _originPage == typeof(PreviewImagePage) || _originPage == typeof(PhotoCameraPage))
            {
                _originPage = typeof(MainPage);
            }
        }
コード例 #5
0
        private void SetApplicationBar()
        {
            if (ApplicationBar == null)
            {
                ApplicationBar = (ApplicationBar)Resources["MediaAlbumMenu"];
            }

            if (_mediaAlbumViewModel == null)
            {
                _mediaAlbumViewModel = new MediaAlbumViewModel(SdkService.MegaSdk,
                                                               NavigateService.GetNavigationData <BaseMediaViewModel <PictureAlbum> >());
            }

            // Change and translate the current application bar
            _mediaAlbumViewModel.ChangeMenu(this.ApplicationBar.Buttons,
                                            this.ApplicationBar.MenuItems);
        }
コード例 #6
0
        public NodeDetailsPage()
        {
            _nodeViewModel        = NavigateService.GetNavigationData <NodeViewModel>();
            _nodeDetailsViewModel = new NodeDetailsViewModel(this, _nodeViewModel);

            this.DataContext = _nodeDetailsViewModel;

            InitializeComponent();
            SetApplicationBar();

            // Subscribe to the NetworkAvailabilityChanged event
            DeviceNetworkInformation.NetworkAvailabilityChanged += new EventHandler <NetworkNotificationEventArgs>(NetworkAvailabilityChanged);

            LabelSize.Text     = String.Concat(UiResources.UI_Size, ":");
            LabelContent.Text  = String.Concat(UiResources.UI_Content, ":");
            LabelAdded.Text    = String.Concat(UiResources.UI_Added, ":");
            LabelModified.Text = String.Concat(UiResources.UI_Modified, ":");
        }
コード例 #7
0
        private void OnLoaded(object sender, System.Windows.RoutedEventArgs e)
        {
            if (_mediaAlbumViewModel == null)
            {
                _mediaAlbumViewModel = new MediaAlbumViewModel(SdkService.MegaSdk,
                                                               NavigateService.GetNavigationData <BaseMediaViewModel <PictureAlbum> >());
            }

            if (_mediaAlbumViewModel.Pictures == null)
            {
                return;
            }

            var lastPicture = _mediaAlbumViewModel.Pictures.LastOrDefault();

            if (lastPicture != null)
            {
                LstMediaItems.BringIntoView(lastPicture);
            }
        }
コード例 #8
0
        public PreviewImagePage()
        {
            _folderViewModel       = NavigateService.GetNavigationData <FolderViewModel>();
            _previewImageViewModel = new PreviewImageViewModel(SdkService.MegaSdk, App.AppInformation, _folderViewModel);

            this.DataContext = _previewImageViewModel;

            InitializeComponent();
            SetApplicationBar((_folderViewModel == null) ? false : true);

            if (AppService.IsLowMemoryDevice())
            {
                SlideViewAndFilmStrip.ItemRealizationMode = SlideViewItemRealizationMode.ViewportItem;
            }

            if (!DebugService.DebugSettings.IsDebugMode || !DebugService.DebugSettings.ShowMemoryInformation)
            {
                return;
            }

            MemoryControl.Visibility = Visibility.Visible;
            MemoryControl.StartMemoryCounter();
        }