Browse Source

Add link to area about Tesseract Langues

pull/430/head
Joseph Finney 1 year ago
parent
commit
bba61d53f5
  1. 9
      Text-Grab/Pages/LanguageSettings.xaml
  2. 7
      Text-Grab/Pages/LanguageSettings.xaml.cs

9
Text-Grab/Pages/LanguageSettings.xaml

@ -41,6 +41,7 @@
</StackPanel>
<StackPanel
x:Name="TesseractLanguagesStackPanel"
d:Visibility="Visible"
Orientation="Vertical"
Visibility="Collapsed">
<TextBlock
@ -73,10 +74,10 @@
</ListView.ItemTemplate>
</ListView>
<TextBlock
Margin="0,20,0,0"
Style="{StaticResource TextBodyNormal}"
Text="Download and install languages from Tesseract GitHub" />
<TextBlock Margin="0,20,0,0" Style="{StaticResource TextBodyNormal}">
Download and install languages from Tesseract GitHub<LineBreak />
<Hyperlink NavigateUri="https://github.com/tesseract-ocr/tessdata" RequestNavigate="Hyperlink_RequestNavigate">https://github.com/tesseract-ocr/tessdata</Hyperlink>
</TextBlock>
<StackPanel Margin="0,8,0,0" Orientation="Horizontal">
<ComboBox
x:Name="AllLanguagesComboBox"

7
Text-Grab/Pages/LanguageSettings.xaml.cs

@ -6,6 +6,7 @@ using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Text_Grab.Interfaces;
using Text_Grab.Models;
using Text_Grab.Properties;
@ -143,4 +144,10 @@ public partial class LanguageSettings : Page
Process.Start("explorer.exe", tesseractFilePath);
}
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri) { UseShellExecute = true });
e.Handled = true;
}
}
Loading…
Cancel
Save