ChatGPTAITranslationContent.xaml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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="0,0,0,0" x:Name="TranslationGrid">
  15. <StackPanel>
  16. <Grid >
  17. <TextBlock Text="{Binding T_Title}" 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. <Grid>
  36. <Rectangle Name="NormalColorBorder" StrokeDashArray="4 2" RadiusX="8" RadiusY="8" Stroke="{StaticResource color.sys.border.neutral.lv1}"
  37. Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
  38. Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" Visibility="{Binding ElementName=DropColorBorder,Path=Visibility,Converter={StaticResource UnvisibleConvert}}">
  39. </Rectangle>
  40. <Rectangle Name="DropColorBorder" RadiusX="8" RadiusY="8" Stroke="{StaticResource color.btn.cta.bg.hov}"
  41. Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualWidth}"
  42. Height="{Binding RelativeSource={RelativeSource AncestorType={x:Type Border}}, Path=ActualHeight}" Visibility="Collapsed">
  43. </Rectangle>
  44. </Grid>
  45. </VisualBrush.Visual>
  46. </VisualBrush>
  47. </Border.BorderBrush>
  48. <Grid AllowDrop="True"
  49. Background="Transparent"
  50. Drop="Grid_Drop"
  51. DragEnter="MainPage_DragEnter"
  52. DragOver="MainPage_DragOver"
  53. DragLeave="MainPage_DragLeave">
  54. <StackPanel>
  55. <StackPanel Margin="0,72,0,0">
  56. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
  57. <Image
  58. Margin="0,0,12,0"
  59. Width="28"
  60. Height="28"
  61. Source="pack://application:,,,/PDF Master;component/Resources/HomeTools/Translation.png" />
  62. <TextBlock Text="{Binding T_SupportTip}" FontFamily="Segoe UI"
  63. FontSize="20"
  64. FontWeight="Bold"
  65. Foreground="{StaticResource color.sys.text.neutral.lv1}" Height="28"></TextBlock>
  66. </StackPanel>
  67. <TextBlock
  68. Margin="0,8,0,0"
  69. HorizontalAlignment="Center"
  70. FontFamily="Segoe UI"
  71. FontSize="12"
  72. Foreground="#94989C"
  73. Text="{Binding T_LimitTip}"
  74. TextAlignment="Center"
  75. TextWrapping="Wrap"
  76. />
  77. </StackPanel>
  78. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,40,0,0">
  79. <TextBlock Text="{Binding T_TranslationLanguage}" Height="22"></TextBlock>
  80. <ComboBox Width="200" Height="40" Margin="12,0,0,0" ItemsSource="{Binding FromlanguageFamily}" SelectedIndex="{Binding FromlanguageIndex}"></ComboBox>
  81. <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>
  82. <ComboBox Width="200" Height="40" ItemsSource="{Binding TolanguageFamily}" SelectedIndex="{Binding TolanguageIndex}"></ComboBox>
  83. </StackPanel>
  84. <Button Width="300" Height="48" Style="{StaticResource Btn.cta}" Margin="0,40,0,0" Command="{Binding SelectFilesCommand}">
  85. <StackPanel Orientation="Horizontal">
  86. <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>
  87. <TextBlock Text="{Binding T_SelectFileBtn}" Foreground="{StaticResource color.btn.brand.text.def}" Margin="12,0,0,0"></TextBlock>
  88. </StackPanel>
  89. </Button>
  90. <TextBlock
  91. Margin="0,8,0,0"
  92. HorizontalAlignment="Center"
  93. FontFamily="Segoe UI"
  94. FontSize="12"
  95. Foreground="#94989C"
  96. Text="{Binding T_DropTip}"
  97. TextAlignment="Center"
  98. TextWrapping="Wrap"
  99. />
  100. </StackPanel>
  101. </Grid>
  102. </Border>
  103. </StackPanel>
  104. </Grid>
  105. </UserControl>