Example #1
0
        private bool ValidateScreenshotIdInput()
        {
            bool isValid = ScreenshotID.Validate(this.ScreenshotIdBox.Text);

            this.ScreenshotIdBox.BorderBrush         = isValid ? _normalScreenshotIdBoxBorderBrush : App.ErrorBrush;
            this.GoToIdButton.IsEnabled              = isValid;
            this.GoToIdButton.Foreground             = isValid ? App.DefaultForegroundBrush : App.ErrorBrush;
            this.ScreenshotInvalidWarning.Visibility = isValid ? Visibility.Collapsed : Visibility.Visible;
            return(isValid);
        }
Example #2
0
 private async void GoToIdButton_Click(object sender, RoutedEventArgs e)
 {
     if (!ScreenshotID.Validate(ScreenshotIdBox.Text))
     {
         this.WriteStatusError("Incorrect Screenshot ID.", true);
     }
     else
     {
         await DisplayImageAsync(new ScreenshotID(ScreenshotIdBox.Text));
     }
 }