ChatGPTAITranslationContent.xaml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <UserControl x:Class="PDF_Master.Views.HomePanel.ChatGPTAI.ChatGPTAITranslationContent"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:PDF_Master.Views.HomePanel.ChatGPTAI"
  7. xmlns:converter="clr-namespace:PDF_Master.DataConvert"
  8. xmlns:prism ="http://prismlibrary.com/"
  9. prism:ViewModelLocator.AutoWireViewModel="True"
  10. Background="White" MinWidth="540" MinHeight="460"
  11. mc:Ignorable="d"
  12. d:DesignHeight="760" d:DesignWidth="968"
  13. >
  14. <Grid Margin="32,0,32,0" x:Name="TranslationGrid">
  15. <StackPanel>
  16. <Grid >
  17. <TextBlock Text="AI Translation" FontFamily="Segoe UI" Margin="0,16,0,0"
  18. FontSize="20"
  19. FontWeight="Bold"
  20. Foreground="{StaticResource color.sys.text.neutral.lv1}" Height="28"></TextBlock>
  21. <Border Background="{StaticResource color.sys.layout.dark.bg}" Width="312" Height="40" HorizontalAlignment="Center" VerticalAlignment="Center" CornerRadius="4" Visibility="{Binding ErrorTipVisible}">
  22. <StackPanel Orientation="Horizontal">
  23. <Grid Width="16" Height="16" Margin="16,0,8,0">
  24. <Ellipse Width="14" Height="14" Fill="#F3465B"></Ellipse>
  25. <Path Data="M7.25 4V9H8.75V4H7.25ZM7.25 10.5V12H8.75L8.75 10.5H7.25Z" Fill="white"/>
  26. </Grid>
  27. <TextBlock Text="{Binding ErrorTipText}" FontSize="14" FontFamily="SF Pro Text" Foreground="White" VerticalAlignment="Center"></TextBlock>
  28. </StackPanel>
  29. </Border>
  30. </Grid>
  31. <Border Margin="0,16,0,0" Width="{Binding ElementName=TranslationGrid,Path=ActualWidth}" Height="400" CornerRadius="8" BorderThickness="1" HorizontalAlignment="Left">
  32. <Border.BorderBrush>
  33. <VisualBrush>
  34. <VisualBrush.Visual>
  35. <Rectangle StrokeDashArray="4 2" RadiusX="8" RadiusY="8" Stroke="{StaticResource color.sys.border.neutral.lv1}"
  36. Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
  37. Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}">
  38. </Rectangle>
  39. </VisualBrush.Visual>
  40. </VisualBrush>
  41. </Border.BorderBrush>
  42. <Grid AllowDrop="True"
  43. Background="Transparent"
  44. Drop="Grid_Drop"
  45. DragEnter="MainPage_DragEnter"
  46. DragOver="MainPage_DragOver"
  47. DragLeave="MainPage_DragLeave">
  48. <StackPanel>
  49. <StackPanel Margin="0,72,0,0">
  50. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  51. <Image
  52. Width="28"
  53. Height="28"
  54. Source="pack://application:,,,/PDF Master;component/Resources/HomeTools/Translation.png" />
  55. <TextBlock Text="Support PDF and Word file" FontFamily="Segoe UI"
  56. FontSize="20"
  57. FontWeight="Bold"
  58. Foreground="{StaticResource color.sys.text.neutral.lv1}" Height="28"></TextBlock>
  59. </StackPanel>
  60. <TextBlock
  61. Margin="0,8,0,0"
  62. HorizontalAlignment="Center"
  63. FontFamily="Segoe UI"
  64. FontSize="12"
  65. Foreground="#94989C"
  66. Text="Limit document size to 10M, document page number to 30, 10w characters per month
  67. &#13;Scanning PDF file is not supported!"
  68. TextAlignment="Center"
  69. TextWrapping="Wrap"
  70. />
  71. </StackPanel>
  72. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,40,0,0">
  73. <TextBlock Text="Translation Language:" Height="22"></TextBlock>
  74. <ComboBox Width="200" Height="40" Margin="12,0,0,0" ItemsSource="{Binding FromlanguageFamily}" SelectedIndex="{Binding FromlanguageIndex}"></ComboBox>
  75. <Path Width="24" Height="24" Margin="8,0,8,0" Data="M15.7071 2.79289C15.3166 2.40237 14.6834 2.40237 14.2929 2.79289C13.9024 3.18342 13.9024 3.81658 14.2929 4.20711L18.5858 8.5H3C2.44772 8.5 2 8.94772 2 9.5C2 10.0523 2.44772 10.5 3 10.5H21C21.1374 10.5 21.2683 10.4723 21.3874 10.4222C21.4946 10.3772 21.5955 10.3127 21.6848 10.2288C21.6999 10.2145 21.7147 10.1998 21.7289 10.1846C21.8115 10.0968 21.8753 9.99761 21.9201 9.89233C21.9715 9.77187 22 9.63926 22 9.5C22 9.36074 21.9715 9.22813 21.9201 9.10767C21.8753 9.00239 21.8115 8.90324 21.7289 8.81538C21.721 8.80691 21.7129 8.79858 21.7046 8.7904L15.7071 2.79289ZM18.9852 15.5L14.6923 19.7929C14.3018 20.1834 14.3018 20.8166 14.6923 21.2071C15.0828 21.5976 15.716 21.5976 16.1065 21.2071L22.1065 15.2071C22.497 14.8166 22.497 14.1834 22.1065 13.7929C21.9973 13.6837 21.8691 13.605 21.7325 13.5568C21.6283 13.52 21.5161 13.5 21.3993 13.5H21.399H3.39928C2.84699 13.5 2.39928 13.9477 2.39928 14.5C2.39928 15.0523 2.84699 15.5 3.39928 15.5H18.9852Z" Fill="#CED0D4"></Path>
  76. <ComboBox Width="200" Height="40" ItemsSource="{Binding TolanguageFamily}" SelectedIndex="{Binding TolanguageIndex}"></ComboBox>
  77. </StackPanel>
  78. <Button Width="300" Height="48" Style="{StaticResource Btn.cta}" Margin="0,40,0,0" Command="{Binding SelectFilesCommand}">
  79. <StackPanel Orientation="Horizontal">
  80. <Path Data="M6.39722 5.50001L5.95192 4.83206L4.82691 3.14454C4.80836 3.11672 4.77714 3.10001 4.74371 3.10001H1.6C1.54477 3.10001 1.5 3.14478 1.5 3.20001V12.8C1.5 12.8552 1.54477 12.9 1.6 12.9H14.4C14.4552 12.9 14.5 12.8552 14.5 12.8V5.60001C14.5 5.54478 14.4552 5.50001 14.4 5.50001H7.2H6.39722ZM1.6 1.60001C0.716345 1.60001 0 2.31635 0 3.20001V12.8C0 13.6837 0.716345 14.4 1.6 14.4H14.4C15.2837 14.4 16 13.6837 16 12.8V5.60001C16 4.71635 15.2837 4.00001 14.4 4.00001H7.2L6.07499 2.31249C5.77824 1.86737 5.27867 1.60001 4.74371 1.60001H1.6Z" Fill="{StaticResource color.btn.brand.text.def}"></Path>
  81. <TextBlock Text="Select Your Files" Foreground="{StaticResource color.btn.brand.text.def}" Margin="12,0,0,0"></TextBlock>
  82. </StackPanel>
  83. </Button>
  84. <TextBlock
  85. Margin="0,8,0,0"
  86. HorizontalAlignment="Center"
  87. FontFamily="Segoe UI"
  88. FontSize="12"
  89. Foreground="#94989C"
  90. Text="or drop file here"
  91. TextAlignment="Center"
  92. TextWrapping="Wrap"
  93. />
  94. </StackPanel>
  95. </Grid>
  96. </Border>
  97. </StackPanel>
  98. </Grid>
  99. </UserControl>