Skip to content

Commit

Permalink
fixed bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
pcinfogmach committed Nov 3, 2024
1 parent 6ac5de3 commit ecbe3ed
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ScreenCapture/PreviewWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private void SetButtonContentBasedOnLanguage()
{
var info = CultureInfo.CurrentUICulture.TwoLetterISOLanguageName;
// Check if the system language is set to Hebrew
if (info == "en")
if (info == "he")
{
this.Title = "צילום מסך";
this.FlowDirection = FlowDirection.RightToLeft;
Expand Down Expand Up @@ -116,7 +116,7 @@ private void SaveImageButton_Click(object sender, RoutedEventArgs e)
encoder.Frames.Add(BitmapFrame.Create(_bitmapImage));
encoder.Save(fileStream);
}

Close();
MessageBox.Show("Screenshot saved successfully!", "Save", MessageBoxButton.OK, MessageBoxImage.Information);
}
}
Expand All @@ -132,19 +132,22 @@ private void SaveTextButton_Click(object sender, RoutedEventArgs e)
if (saveFileDialog.ShowDialog() == true)
{
File.WriteAllText(saveFileDialog.FileName, ExtractedTextBox.Text);
Close();
MessageBox.Show("Text saved successfully!", "Save", MessageBoxButton.OK, MessageBoxImage.Information);
}
}

private void CopyImageButton_Click(object sender, RoutedEventArgs e)
{
Clipboard.SetImage(_bitmapImage);
Close();
MessageBox.Show("Image copied to clipboard!", "Copy", MessageBoxButton.OK, MessageBoxImage.Information);
}

private void CopyTextButton_Click(object sender, RoutedEventArgs e)
{
Clipboard.SetText(ExtractedTextBox.Text);
Close();
MessageBox.Show("Text copied to clipboard!", "Copy", MessageBoxButton.OK, MessageBoxImage.Information);
}

Expand Down

0 comments on commit ecbe3ed

Please sign in to comment.