DocumentaryTranslationDialog.xaml 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <UserControl x:Class="PDF_Master.Views.Dialog.ChatGPTAIDialogs.DocumentaryTranslationDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:convert="clr-namespace:PDF_Master.DataConvert"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:prism="http://prismlibrary.com/" xmlns:chatgptaidialogs="clr-namespace:PDF_Master.ViewModels.Dialog.ChatGPTAIDialogs" d:DataContext="{d:DesignInstance Type=chatgptaidialogs:DocumentaryTranslationDialogViewModel}"
  10. Width="606"
  11. Height="276"
  12. d:DesignHeight="276"
  13. d:DesignWidth="606"
  14. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  15. prism:ViewModelLocator.AutoWireViewModel="True"
  16. mc:Ignorable="d">
  17. <UserControl.Resources>
  18. <ResourceDictionary>
  19. <convert:UnVisibleToBoolConvert x:Key="UnVisibleToBoolConvert" />
  20. </ResourceDictionary>
  21. </UserControl.Resources>
  22. <cus:DialogContent Header="{Binding T_Title}">
  23. <cus:DialogContent.Content>
  24. <Grid Grid.Row="1" >
  25. <Grid.ColumnDefinitions>
  26. <ColumnDefinition Width="*"></ColumnDefinition>
  27. <ColumnDefinition Width="468"></ColumnDefinition>
  28. </Grid.ColumnDefinitions>
  29. <Border x:Name="ProgressBorder" Grid.RowSpan="2" Grid.ColumnSpan="2"
  30. Panel.ZIndex="1" Background="Transparent" Visibility="{Binding ProgressVisible}">
  31. <Border
  32. Width="226"
  33. Height="58"
  34. Background="{StaticResource color.sys.layout.dark.bg}"
  35. BorderThickness="0"
  36. CornerRadius="{StaticResource border-radius.8}"
  37. Effect="{StaticResource shadow.neutral.m}"
  38. >
  39. <Grid Margin="16,13" Background="Transparent">
  40. <StackPanel Orientation="Horizontal">
  41. <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text="Translating..." />
  42. <TextBlock
  43. Foreground="{StaticResource color.sys.text.anti.norm}"
  44. Text="{Binding Value, StringFormat={}({0})}"
  45. Visibility="Collapsed" />
  46. </StackPanel>
  47. <Button
  48. Width="12"
  49. Height="12"
  50. Padding="0,0,1,1"
  51. HorizontalAlignment="Right"
  52. VerticalAlignment="Top"
  53. Background="{StaticResource color.sys.layout.dark.bg}"
  54. BorderThickness="0"
  55. Visibility="Visible"
  56. Command="{Binding CancelProgressCommand}">
  57. <Path Data="M6.00006 7.06072L9.46973 10.5304L10.5304 9.46973L7.06072 6.00006L10.5304 2.53039L9.46973 1.46973L6.00006 4.9394L2.53039 1.46973L1.46973 2.53039L4.9394 6.00006L1.46973 9.46973L2.53039 10.5304L6.00006 7.06072Z" Fill="#CED0D4" />
  58. </Button>
  59. <ProgressBar
  60. Height="4"
  61. Margin="0,0,0,4"
  62. VerticalAlignment="Bottom"
  63. BorderThickness="0"
  64. Foreground="{StaticResource color.slider.track-filled.norm}"
  65. Maximum="{Binding MaxValue}"
  66. Value="{Binding Value}" />
  67. </Grid>
  68. </Border>
  69. </Border>
  70. <Grid>
  71. <ContentControl
  72. Width="106"
  73. Height="140"
  74. HorizontalAlignment="Stretch"
  75. prism:RegionManager.RegionName="{Binding ViewerRegionName}"/>
  76. </Grid>
  77. <Grid Background="{StaticResource color.sys.layout.bg.home}" Width="20"
  78. Height="140" Margin="0,0,15,0"
  79. HorizontalAlignment="Right">
  80. </Grid>
  81. <StackPanel Grid.Column="1" Margin="16,0,0,0">
  82. <TextBlock Text="{Binding T_TranslationLanguage}" Style="{StaticResource PropertyHeaderLv2}" Height="20"></TextBlock>
  83. <StackPanel Orientation="Horizontal" Margin="0,8,0,0" HorizontalAlignment="Left">
  84. <ComboBox Width="200" Height="40" Margin="0,0,0,0" ItemsSource="{Binding FromlanguageFamily}" SelectedIndex="{Binding FromlanguageIndex}"></ComboBox>
  85. <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>
  86. <ComboBox Width="200" Height="40" ItemsSource="{Binding TolanguageFamily}" SelectedIndex="{Binding TolanguageIndex}"></ComboBox>
  87. </StackPanel>
  88. <StackPanel Orientation="Horizontal" Margin="0,16,0,4">
  89. <Grid Width="16" Height="16" >
  90. <Ellipse Width="13" Height="13" Fill="white" Stroke="#CED0D4"/>
  91. <Path Data="M7.4701 8.91H8.5001L8.7601 5.49L8.8101 4H7.1601L7.2101 5.49L7.4701 8.91ZM7.9901 11.58C8.4901 11.58 8.8701 11.21 8.8701 10.69C8.8701 10.17 8.4901 9.81 7.9901 9.81C7.4801 9.81 7.1001 10.17 7.1001 10.69C7.1001 11.21 7.4701 11.58 7.9901 11.58Z" Fill="#94989C"/>
  92. </Grid>
  93. <TextBlock
  94. Margin="4,0,0,0"
  95. FontFamily="Segoe UI"
  96. FontSize="12"
  97. Foreground="#94989C"
  98. Text="{Binding T_SupportedLimitTip}"
  99. Height="20"
  100. />
  101. </StackPanel>
  102. <StackPanel Orientation="Horizontal">
  103. <Grid Width="16" Height="16" VerticalAlignment="Top" Margin="0,2,0,0">
  104. <Ellipse Width="13" Height="13" Fill="white" Stroke="#CED0D4"/>
  105. <Path Data="M7.4701 8.91H8.5001L8.7601 5.49L8.8101 4H7.1601L7.2101 5.49L7.4701 8.91ZM7.9901 11.58C8.4901 11.58 8.8701 11.21 8.8701 10.69C8.8701 10.17 8.4901 9.81 7.9901 9.81C7.4801 9.81 7.1001 10.17 7.1001 10.69C7.1001 11.21 7.4701 11.58 7.9901 11.58Z" Fill="#94989C"/>
  106. </Grid>
  107. <TextBlock
  108. Margin="4,0,0,0"
  109. FontFamily="Segoe UI"
  110. FontSize="12"
  111. Foreground="#94989C"
  112. Text="{Binding T_LimitTip}"
  113. Height="40"
  114. TextWrapping="Wrap"
  115. />
  116. </StackPanel>
  117. </StackPanel>
  118. </Grid>
  119. </cus:DialogContent.Content>
  120. <cus:DialogContent.BottmBar>
  121. <Grid IsEnabled="{Binding ElementName=ProgressBorder,Path=Visibility,Converter={StaticResource UnVisibleToBoolConvert}}">
  122. <Button
  123. Width="98"
  124. Height="32"
  125. Margin="0,0,16,0"
  126. HorizontalAlignment="Right"
  127. Command="{Binding CancelCommand}"
  128. Content="{Binding T_No}"
  129. Style="{StaticResource btn.sec}">
  130. </Button>
  131. <Button
  132. Width="98"
  133. Height="32"
  134. Margin="124,0"
  135. HorizontalAlignment="Right"
  136. Command="{Binding TranslateCommand}"
  137. Content="{Binding T_TranslationBtn}"
  138. Style="{StaticResource Btn.cta}"/>
  139. </Grid>
  140. </cus:DialogContent.BottmBar>
  141. </cus:DialogContent>
  142. </UserControl>