コード例 #1
0
ファイル: PageBase.cs プロジェクト: Makzz90/VKClient_re
        private async void HandleCallbackParameters()
        {
            string parameterForIdAndReset = ParametersRepository.GetParameterForIdAndReset("CallbackUriToLaunch") as string;

            if (parameterForIdAndReset == null)
            {
                return;
            }
            await Launcher.LaunchUriAsync(new Uri(parameterForIdAndReset, UriKind.Absolute));
        }
コード例 #2
0
ファイル: PageBase.cs プロジェクト: Makzz90/VKClient_re
 internal void PrepareForMenuNavigation(Action callback, bool needClearStack)
 {
     TransitionService.SetNavigationOutTransition((UIElement)this, null);
     ParametersRepository.SetParameterForId("IsMenuNavigation", true);
     if (needClearStack)
     {
         ParametersRepository.SetParameterForId("NeedClearNavigationStack", true);
     }
     callback();
 }
コード例 #3
0
ファイル: PageBase.cs プロジェクト: Makzz90/VKClient_re
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     PageBase.CurrentPageDataRequestee = (IPageDataRequesteeInfo)this;
     this._lastNavigationIsReset       = e.NavigationMode == NavigationMode.Reset;
     this._lastTimeNavigatedTo         = DateTime.Now;
     this.HandleOnNavigatedTo(e);
     if (!this.SkipNextNavigationParametersRepositoryClearing)
     {
         ParametersRepository.Clear();
     }
     else
     {
         this.SkipNextNavigationParametersRepositoryClearing = false;
     }
 }
コード例 #4
0
ファイル: PageBase.cs プロジェクト: Makzz90/VKClient_re
        protected void HandleValidationInputParams()
        {
            ValidationUserResponse parameterForIdAndReset = ParametersRepository.GetParameterForIdAndReset("ValidationResponse") as ValidationUserResponse;

            if (parameterForIdAndReset == null)
            {
                return;
            }
            if (this._validationResponseCallback != null)
            {
                this._validationResponseCallback(parameterForIdAndReset);
            }
            else
            {
                if (this._validation2FAResponseCallback == null)
                {
                    return;
                }
                this._validation2FAResponseCallback(parameterForIdAndReset);
            }
        }
コード例 #5
0
ファイル: PageBase.cs プロジェクト: Makzz90/VKClient_re
        private void HandleMoneyTransferValidationInputParams()
        {
            MoneyTransferAcceptedResponse parameterForIdAndReset1 = ParametersRepository.GetParameterForIdAndReset("MoneyTransferAcceptedResponse") as MoneyTransferAcceptedResponse;

            if (parameterForIdAndReset1 != null)
            {
                if (!parameterForIdAndReset1.IsSucceeded)
                {
                    return;
                }
                EventAggregator.Current.Publish(new MoneyTransferAcceptedEvent(parameterForIdAndReset1.TransferId, parameterForIdAndReset1.FromId, parameterForIdAndReset1.ToId));
            }
            else
            {
                MoneyTransferSentResponse parameterForIdAndReset2 = ParametersRepository.GetParameterForIdAndReset("MoneyTransferSentResponse") as MoneyTransferSentResponse;
                if (parameterForIdAndReset2 == null || !parameterForIdAndReset2.IsSucceeded)
                {
                    return;
                }
                EventAggregator.Current.Publish(new MoneyTransferSentEvent());
                this.HandleMoneyTransferSentResponse(parameterForIdAndReset2);
            }
        }
コード例 #6
0
ファイル: PageBase.cs プロジェクト: Makzz90/VKClient_re
        public PageBase()
        {
            ProgressBar progressBar = new ProgressBar();
            int         num1        = 1;

            progressBar.IsIndeterminate = (num1 != 0);
            int num2 = 0;

            ((FrameworkElement)progressBar).VerticalAlignment = ((VerticalAlignment)num2);
            SolidColorBrush solidColorBrush1 = new SolidColorBrush(Colors.White);

            ((Control)progressBar).Foreground = ((Brush)solidColorBrush1);
            int num3 = 1;

            ((UIElement)progressBar).Visibility = ((Visibility)num3);
            this._progressBar      = progressBar;
            this.Flyouts           = new ObservableCollection <IFlyout>();
            this.FullscreenLoaders = new ObservableCollection <FullscreenLoader>();
            this._guid             = Guid.NewGuid();
            this._menuAppBar       = new ApplicationBar();
            Rectangle rectangle1 = new Rectangle();
            int       num4       = 0;

            ((FrameworkElement)rectangle1).HorizontalAlignment = ((HorizontalAlignment)num4);
            int num5 = 0;

            ((FrameworkElement)rectangle1).VerticalAlignment = ((VerticalAlignment)num5);
            double num6 = 65.0;

            ((FrameworkElement)rectangle1).Width = num6;
            double num7 = 96.0;

            ((FrameworkElement)rectangle1).Height = num7;
            SolidColorBrush solidColorBrush2 = new SolidColorBrush(Colors.Transparent);

            ((Shape)rectangle1).Fill = ((Brush)solidColorBrush2);
            int num8 = 0;

            ((FrameworkElement)rectangle1).UseOptimizedManipulationRouting = (num8 != 0);
            this._openMenuTapArea = rectangle1;
            Rectangle rectangle2 = new Rectangle();
            int       num9       = 0;

            ((FrameworkElement)rectangle2).HorizontalAlignment = ((HorizontalAlignment)num9);
            int num10 = 3;

            ((FrameworkElement)rectangle2).VerticalAlignment = ((VerticalAlignment)num10);
            double num11 = 16.0;

            ((FrameworkElement)rectangle2).Width = num11;
            SolidColorBrush solidColorBrush3 = new SolidColorBrush(Colors.Transparent);

            ((Shape)rectangle2).Fill = ((Brush)solidColorBrush3);
            int num12 = 0;

            ((FrameworkElement)rectangle2).UseOptimizedManipulationRouting = (num12 != 0);
            Thickness thickness = new Thickness(0.0, 96.0, 0.0, 0.0);

            ((FrameworkElement)rectangle2).Margin = thickness;
            this._menuCallout = rectangle2;
            Rectangle rectangle3 = new Rectangle();
            int       num13      = 3;

            ((FrameworkElement)rectangle3).HorizontalAlignment = ((HorizontalAlignment)num13);
            int num14 = 3;

            ((FrameworkElement)rectangle3).VerticalAlignment = ((VerticalAlignment)num14);
            SolidColorBrush solidColorBrush4 = new SolidColorBrush(Colors.Transparent);

            ((Shape)rectangle3).Fill = ((Brush)solidColorBrush4);
            int num15 = 0;

            ((FrameworkElement)rectangle3).UseOptimizedManipulationRouting = (num15 != 0);
            int num16 = 1;

            ((UIElement)rectangle3).Visibility = ((Visibility)num16);
            this._transparentOverlay           = rectangle3;
            this._lastTimeNavigatedTo          = DateTime.MinValue;
            this._panels = new List <IMyVirtualizingPanel>();
            //base.\u002Ector();
            ++PageBase.TotalCount;
            this.SetNavigationEffects();
            this._imageViewerDecorator.SetPage((PhoneApplicationPage)this);
            if (ParametersRepository.GetParameterForIdAndReset("SwitchNavigationEffects") != null)
            {
                this.SwitchNavigationEffects();
            }
            if (ParametersRepository.GetParameterForIdAndReset("IsMenuNavigation") != null)
            {
                TransitionService.SetNavigationInTransition((UIElement)this, null);
                if (ParametersRepository.GetParameterForIdAndReset("NeedClearNavigationStack") != null)
                {
                    this._shouldResetStack = true;
                }
            }
            // ISSUE: method pointer
            ((FrameworkElement)this).Loaded += (new RoutedEventHandler(this.PageBase_Loaded));
            this.OrientationChanged         += (new EventHandler <OrientationChangedEventArgs>(this.PageBase_OrientationChanged));
            this.Flyouts.CollectionChanged  += (NotifyCollectionChangedEventHandler)((sender, args) =>
            {
                this.UpdateOpenMenuTapAreaVisibility();
                this.FlyoutsCollectionChanged();
            });
            this.FullscreenLoaders.CollectionChanged += (NotifyCollectionChangedEventHandler)((sender, args) =>
            {
                this.UpdateOpenMenuTapAreaVisibility();
                this.FlyoutsCollectionChanged();
            });
        }
コード例 #7
0
        public PageBase()
        {
            ProgressBar progressBar = new ProgressBar();

            progressBar.IsIndeterminate = true;
            int num1 = 0;

            progressBar.VerticalAlignment = (VerticalAlignment)num1;
            SolidColorBrush solidColorBrush1 = new SolidColorBrush(Colors.White);

            progressBar.Foreground = (Brush)solidColorBrush1;
            int num2 = 1;

            progressBar.Visibility     = (Visibility)num2;
            this._progressBar          = progressBar;
            this._appBarButtonSettings = new ApplicationBarIconButton()
            {
                IconUri = new Uri("Resources/appbar.feature.settings.rest.png", UriKind.Relative),
                Text    = CommonResources.MainPage_Menu_AppBar_Settings
            };
            this.Flyouts           = new ObservableCollection <IFlyout>();
            this.FullscreenLoaders = new ObservableCollection <FullscreenLoader>();
            this._guid             = Guid.NewGuid();
            this._menuAppBar       = new ApplicationBar();
            Rectangle rectangle1 = new Rectangle();
            int       num3       = 0;

            rectangle1.HorizontalAlignment = (HorizontalAlignment)num3;
            int num4 = 0;

            rectangle1.VerticalAlignment = (VerticalAlignment)num4;
            double num5 = 65.0;

            rectangle1.Width = num5;
            double num6 = 96.0;

            rectangle1.Height = num6;
            SolidColorBrush solidColorBrush2 = new SolidColorBrush(Colors.Transparent);

            rectangle1.Fill = (Brush)solidColorBrush2;
            int num7 = 0;

            rectangle1.UseOptimizedManipulationRouting = num7 != 0;
            this._openMenuTapArea = rectangle1;
            Rectangle rectangle2 = new Rectangle();
            int       num8       = 0;

            rectangle2.HorizontalAlignment = (HorizontalAlignment)num8;
            int num9 = 3;

            rectangle2.VerticalAlignment = (VerticalAlignment)num9;
            double num10 = 16.0;

            rectangle2.Width = num10;
            SolidColorBrush solidColorBrush3 = new SolidColorBrush(Colors.Transparent);

            rectangle2.Fill = (Brush)solidColorBrush3;
            int num11 = 0;

            rectangle2.UseOptimizedManipulationRouting = num11 != 0;
            Thickness thickness = new Thickness(0.0, 96.0, 0.0, 0.0);

            rectangle2.Margin = thickness;
            this._menuCallout = rectangle2;
            Rectangle rectangle3 = new Rectangle();
            int       num12      = 3;

            rectangle3.HorizontalAlignment = (HorizontalAlignment)num12;
            int num13 = 3;

            rectangle3.VerticalAlignment = (VerticalAlignment)num13;
            SolidColorBrush solidColorBrush4 = new SolidColorBrush(Colors.Transparent);

            rectangle3.Fill = (Brush)solidColorBrush4;
            int num14 = 0;

            rectangle3.UseOptimizedManipulationRouting = num14 != 0;
            int num15 = 1;

            rectangle3.Visibility     = (Visibility)num15;
            this._transparentOverlay  = rectangle3;
            this._lastTimeNavigatedTo = DateTime.MinValue;
            this._panels = new List <IMyVirtualizingPanel>();
            ++PageBase.TotalCount;
            this.SetNavigationEffects();
            this._imageViewerDecorator.SetPage((PhoneApplicationPage)this);
            if (ParametersRepository.GetParameterForIdAndReset("SwitchNavigationEffects") != null)
            {
                this.SwitchNavigationEffects();
            }
            if (ParametersRepository.GetParameterForIdAndReset("IsMenuNavigation") != null)
            {
                TransitionService.SetNavigationInTransition((UIElement)this, (NavigationInTransition)null);
                if (ParametersRepository.GetParameterForIdAndReset("NeedClearNavigationStack") != null)
                {
                    this._shouldResetStack = true;
                }
            }
            this.Loaded                    += new RoutedEventHandler(this.PageBase_Loaded);
            this.OrientationChanged        += new EventHandler <OrientationChangedEventArgs>(this.PageBase_OrientationChanged);
            this.Flyouts.CollectionChanged += (NotifyCollectionChangedEventHandler)((sender, args) =>
            {
                this.UpdateOpenMenuTapAreaVisibility();
                this.FlyoutsCollectionChanged();
            });
            this.FullscreenLoaders.CollectionChanged += (NotifyCollectionChangedEventHandler)((sender, args) =>
            {
                this.UpdateOpenMenuTapAreaVisibility();
                this.FlyoutsCollectionChanged();
            });
        }