Example #1
0
        void ReleaseDesignerOutlets()
        {
            if (AccountNumberLabel != null)
            {
                AccountNumberLabel.Dispose();
                AccountNumberLabel = null;
            }

            if (LoggedInEmailLabel != null)
            {
                LoggedInEmailLabel.Dispose();
                LoggedInEmailLabel = null;
            }

            if (RevealButton != null)
            {
                RevealButton.Dispose();
                RevealButton = null;
            }

            if (VersionNumberLabel != null)
            {
                VersionNumberLabel.Dispose();
                VersionNumberLabel = null;
            }
        }
Example #2
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            var openFileDialog = new OpenFileDialog
            {
                Filter           = "PNG|*.png",
                InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures),
                Multiselect      = false,
                Title            = "Open Image",
                CheckPathExists  = true,
                CheckFileExists  = true
            };

            var urlString = string.Empty;

            if (openFileDialog.ShowDialog() == true)
            {
                RevealedImage = null;
                urlString     = openFileDialog.FileName;

                SelectPhotoButton.IsEnabled = false;
                RevealButton.IsEnabled      = false;

                if (InitialImageLoad)
                {
                    ThumbText.Visibility = Visibility.Collapsed;
                }
                else
                {
                    await ImagePreview.HideUsingLinearAnimationAsync();
                }

                await ThumbLoading.ShowUsingLinearAnimationAsync();

                var availableToProcess = await ProcessImageAsync(urlString);

                await ThumbLoading.HideUsingLinearAnimationAsync();

                if (!availableToProcess)
                {
                    await ImagePreview.ShowUsingLinearAnimationAsync();

                    RevealButton.IsEnabled = true;
                }

                SelectPhotoButton.IsEnabled = true;

                if (InitialImageLoad)
                {
                    InitialImageLoad = false;
                }
                if (!RevealButton.IsVisible && !availableToProcess)
                {
                    RevealButton.ShowUsingLinearAnimation();
                }
            }
        }
Example #3
0
        void ReleaseDesignerOutlets()
        {
            if (BalanceLabel != null)
            {
                BalanceLabel.Dispose();
                BalanceLabel = null;
            }

            if (RevealButton != null)
            {
                RevealButton.Dispose();
                RevealButton = null;
            }

            if (TransactionsTableView != null)
            {
                TransactionsTableView.Dispose();
                TransactionsTableView = null;
            }
        }