public void Dismiss()
        {
            if (DismissAnimationStory != null)
            {
                FSLog.Debug("Already dismissing");
                return;
            }

            if (Dismissing != null)
            {
                Dismissing(this, new EventArgs());
            }

            // Hide the bubble control with fade
            DismissAnimationStory = FSAnim.Fade(this.LayoutRoot,
                                                to: 0,
                                                start: true,
                                                onCompletion: () =>
            {
                this.Visibility = Visibility.Collapsed;
                IsLoaded        = false;

                if (Dismissed != null)
                {
                    Dismissed(this, new EventArgs());
                }
                DismissAnimationStory = null;
            });
        }
Exemple #2
0
 public void Show()
 {
     ShowAnimation = FSAnim.Fade(this, from: 0, to: 1, duration: 250, start: true);
     CloseTimer    = FSCall.Delayed(() =>
     {
         Bubble.Dismiss();
     }, TimeSpan.FromSeconds(2));
 }
        private void AgreeButton_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            var easing = new CubicEase();

            easing.EasingMode = EasingMode.EaseOut;

            SettingsManager.IsPrivacyPolicyAccepted = true;

            FSAnim.Fade(PrivacyPolicyContainer, to: 0, easing: easing, start: true,
                        onCompletion: () =>
            {
                PrivacyPolicyContainer.Visibility = Visibility.Collapsed;
                ShowSignupControls();
            });
        }
        private void ShowSignupControls()
        {
            var easing = new CubicEase();

            easing.EasingMode = EasingMode.EaseOut;

            var story = FSAnim.Fade(InfoText,
                                    to: 1,
                                    //story: story,
                                    easing: easing,
                                    startTime: 250,
                                    duration: 250);

            if (ByFSecureImage.Visibility == Visibility.Visible)
            {
                FSAnim.Fade(ByFSecureImage,
                            to: 0,
                            story: story,
                            easing: easing,
                            startTime: 0,
                            duration: 250,
                            onCompletion: () =>
                {
                    ByFSecureImage.Visibility = Visibility.Collapsed;
                });
            }

            FSAnim.Fade(EmailTextBox,
                        to: 1,
                        story: story,
                        easing: easing,
                        startTime: 350,
                        duration: 250);

            FSAnim.Fade(SignupButton,
                        to: 1,
                        story: story,
                        easing: easing,
                        startTime: 450,
                        duration: 250);

            LoginContainer.Visibility = Visibility.Visible;

            story.Begin();
        }
Exemple #5
0
        public void ShowHeaderPanel()
        {
            if (HeaderPanel.Visibility == Visibility.Visible)
            {
                return;
            }

            HeaderPanel.Fill       = (SolidColorBrush)(this.Resources["Colors"] as ResourceDictionary)["BRUSH_Main"];
            HeaderPanel.Visibility = Visibility.Visible;
            //HeaderPanel.Opacity = 1;

            FSAnim.Fade(HeaderPanel,
                        from: 0,
                        to: 1,
                        duration: 100,
                        startTime: 500,
                        start: true);
        }
        void SignupPage_Loaded(object sender, RoutedEventArgs e)
        {
            var easing = new CubicEase();

            easing.EasingMode = EasingMode.EaseOut;

            var story = FSAnim.Fade(AppIconImage,
                                    from: 0,
                                    to: 1,
                                    easing: easing,
                                    duration: 250);

            FSAnim.Fade(AppNameText,
                        from: 0,
                        to: 1,
                        story: story,
                        easing: easing,
                        startTime: 250,
                        duration: 250);

            FSAnim.Fade(ByFSecureImage,
                        from: 0,
                        to: 1,
                        story: story,
                        easing: easing,
                        startTime: 500,
                        duration: 250);

            story.Completed += (object s2, EventArgs e2) =>
            {
                if (ServerAPIManager.Instance.IsLoggedIn)
                {
                    // Register if failed to do so at signup
                    Dispatcher.BeginInvoke(async() =>
                                           await ServerAPIManager.Instance.RegisterNotificationUrl());

                    OpenMapPage();
                    return;
                }

                // Scale app icon smaller for content
                FSAnim.Scale(AppInfoContainer.RenderTransform,
                             //story: story,
                             easing: easing,
                             toX: 0.66,
                             toY: 0.66,
                             startTime: 0,
                             start: true,
                             onCompletion: () =>
                {
                    // Show privacy policy agreement if not accepted yet
                    if (!SettingsManager.IsPrivacyPolicyAccepted)
                    {
                        PrivacyPolicyContainer.Opacity = 0;

                        story = FSAnim.Fade(PrivacyPolicyContainer, from: 0, to: 1, easing: easing);

                        FSAnim.Fade(ByFSecureImage,
                                    to: 0,
                                    story: story,
                                    easing: easing,
                                    startTime: 0,
                                    duration: 250,
                                    onCompletion: () =>
                        {
                            ByFSecureImage.Visibility = Visibility.Collapsed;
                        });

                        PrivacyPolicyContainer.Visibility = Visibility.Visible;

                        story.Begin();

                        return;
                    }

                    // Show signup controls if not signed up yet
                    ShowSignupControls();
                });
            };

            FSCall.Delayed(() => story.Begin(), 250);
        }