ChatGPTAIRewritingContent.xaml 7.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <UserControl x:Class="PDF_Master.Views.HomePanel.ChatGPTAI.ChatGPTAIRewritingContent"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:convert="clr-namespace:PDF_Master.DataConvert"
  4. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  5. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  9. xmlns:converter="clr-namespace:PDF_Master.DataConvert"
  10. xmlns:prism ="http://prismlibrary.com/"
  11. prism:ViewModelLocator.AutoWireViewModel="True"
  12. Background="White" MinWidth="540" MinHeight="460"
  13. mc:Ignorable="d"
  14. d:DesignHeight="760" d:DesignWidth="1032"
  15. >
  16. <UserControl.Resources>
  17. <ResourceDictionary>
  18. <convert:SizeBrushConvert x:Key="SizeBrushConvert" />
  19. <convert:SizeToBoolConvert x:Key="SizeToBoolConvert"/>
  20. </ResourceDictionary>
  21. </UserControl.Resources>
  22. <StackPanel Margin="0,0,0,0">
  23. <StackPanel>
  24. <Grid >
  25. <StackPanel HorizontalAlignment="Left">
  26. <TextBlock Text="{Binding T_Title}" FontFamily="Segoe UI" Margin="0,16,0,0"
  27. FontSize="20"
  28. FontWeight="Bold"
  29. Foreground="{StaticResource color.sys.text.neutral.lv1}" Height="28" HorizontalAlignment="Left"></TextBlock>
  30. <TextBlock
  31. HorizontalAlignment="Center"
  32. FontFamily="Segoe UI"
  33. FontSize="14"
  34. Foreground="#94989C"
  35. Text="{Binding T_LimitTip}"
  36. TextAlignment="Center"
  37. TextWrapping="Wrap"
  38. />
  39. </StackPanel>
  40. <Button HorizontalAlignment="Right" Width="104" Height="32" Content="{Binding T_RewritingBtn}" VerticalAlignment="Bottom" Style="{StaticResource Btn.cta}" Command="{Binding RewriteCommand}" IsEnabled="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length, Converter={StaticResource SizeToBoolConvert}}"></Button>
  41. </Grid>
  42. <Grid Height="260" Margin="0,12,0,0" >
  43. <cus:TextBoxEx x:Name="textBoxEnterCharacters" Height="260" Text="{Binding InputText}" FontFamily="Segoe UI" ShowClose="False" PlaceholderText="{Binding T_TextBoxWatermark}" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" Padding="8">
  44. <i:Interaction.Triggers>
  45. <i:EventTrigger EventName="TextChanged">
  46. <i:InvokeCommandAction Command="{Binding textBoxEnterCharactersTextChangedCommad}" CommandParameter="{Binding ElementName=textBoxEnterCharacters}" />
  47. </i:EventTrigger>
  48. </i:Interaction.Triggers>
  49. </cus:TextBoxEx>
  50. <TextBlock Text="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length,StringFormat={}{0}/150}" Foreground="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length, Converter={StaticResource SizeBrushConvert}}" Panel.ZIndex="1" Height="22" FontSize="14" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,12,8"/>
  51. </Grid>
  52. </StackPanel>
  53. <StackPanel>
  54. <Grid Height="84" >
  55. <TextBlock Text="{Binding T_Result}" FontFamily="Segoe UI"
  56. FontSize="20"
  57. FontWeight="Bold"
  58. VerticalAlignment="Bottom" Margin="0,0,0,12"
  59. Foreground="{StaticResource color.sys.text.neutral.lv1}" Height="28" HorizontalAlignment="Left"></TextBlock>
  60. <Grid HorizontalAlignment="Right">
  61. <cus:ToastControl
  62. HorizontalAlignment="Center"
  63. VerticalAlignment="Top"
  64. Width="72"
  65. Height="32"
  66. Margin="0,0,0,4"
  67. Padding="0,4,0,0"
  68. Background="{StaticResource color.sys.layout.dark.bg}"
  69. BeginTime="0:0:0:3"
  70. CornerRadius="4"
  71. FontSize="14"
  72. Foreground="White"
  73. StringContent="{Binding T_Copied}"
  74. Visibility="{Binding ShowTip, Mode=TwoWay}"
  75. Duration="0:0:0:3" />
  76. <Button HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,0,12" Width="104" Height="32" Content="{Binding T_Copy}" Background="White" Command="{Binding CopyCommand}" Style="{StaticResource btn.sec}" IsEnabled="{Binding ElementName=RewriteTextBoxEx,Path=Text.Length, Converter={StaticResource SizeToBoolConvert}}"></Button>
  77. </Grid>
  78. </Grid>
  79. <Grid>
  80. <Border Height="260" Panel.ZIndex="1" BorderBrush="{StaticResource color.field.border.error}" Visibility="{Binding ErrorVisible}" BorderThickness="1" CornerRadius="4" >
  81. <StackPanel Orientation="Horizontal" VerticalAlignment="Top" Margin="16">
  82. <Grid Width="16" Height="16" Margin="4,0,8,0">
  83. <Ellipse Width="14" Height="14" Fill="#F3465B"></Ellipse>
  84. <Path Data="M7.25 4V9H8.75V4H7.25ZM7.25 10.5V12H8.75L8.75 10.5H7.25Z" Fill="white"/>
  85. </Grid>
  86. <TextBlock Text="{Binding ErrorTipText}" FontSize="14" FontFamily="SF Pro Text" Foreground="#F3465B" VerticalAlignment="Center"></TextBlock>
  87. </StackPanel>
  88. </Border>
  89. <cus:TextBoxEx x:Name="RewriteTextBoxEx" Height="260" Text="{Binding RewriteText}" FontFamily="Segoe UI" ShowClose="False" VerticalContentAlignment="Top" HorizontalContentAlignment="Left" TextWrapping="Wrap" Padding="8" IsReadOnly="True">
  90. </cus:TextBoxEx>
  91. <Path Visibility="{Binding NullStateVisible}" Data="M34.999 32.1992H76.999C88.597 32.1992 97.999 41.6012 97.999 53.1992V75.5992C97.999 87.1972 88.597 96.5992 76.999 96.5992H34.999C23.401 96.5992 13.999 87.1972 13.999 75.5992V53.1992C13.999 41.6012 23.4011 32.1992 34.999 32.1992ZM34.999 41.9992C28.8134 41.9992 23.799 47.0136 23.799 53.1992V75.5992C23.799 81.7848 29.8144 85.999 36 85.999V90.1792C36 91.0407 36.8809 91.6215 37.6727 91.2822L50 85.999H76.999C83.1846 85.999 88.199 81.7848 88.199 75.5992V53.1992C88.199 47.0136 83.1846 41.9992 76.999 41.9992H34.999ZM103.6 58.7988C103.6 63.2253 103.6 68.1665 103.6 72.7988M8.39941 58.7988C8.39941 63.2253 8.39941 68.1665 8.39941 72.7988M70.2856 18.0194L63.2854 30.1441L56.6426 30.9277L53.9999 24.7831L61.0001 12.6584L70.2856 18.0194ZM72.2856 14.5553L72.604 14.0037C74.0844 11.4396 73.2059 8.16089 70.6418 6.68049C68.0777 5.2001 64.7989 6.07863 63.3185 8.64275L63.0001 9.1943L72.2856 14.5553ZM44 56.1992C44 58.4084 42.2091 60.1992 40 60.1992C37.7909 60.1992 36 58.4084 36 56.1992C36 53.9901 37.7909 52.1992 40 52.1992C42.2091 52.1992 44 53.9901 44 56.1992ZM48 56.1992C48 53.9901 49.7909 52.1992 52 52.1992H72C74.2091 52.1992 76 53.9901 76 56.1992C76 58.4084 74.2091 60.1992 72 60.1992H52C49.7909 60.1992 48 58.4084 48 56.1992ZM44 72.1992C44 74.4084 42.2091 76.1992 40 76.1992C37.7909 76.1992 36 74.4084 36 72.1992C36 69.9901 37.7909 68.1992 40 68.1992C42.2091 68.1992 44 69.9901 44 72.1992ZM48 72.1992C48 69.9901 49.7909 68.1992 52 68.1992H72C74.2091 68.1992 76 69.9901 76 72.1992C76 74.4084 74.2091 76.1992 72 76.1992H52C49.7909 76.1992 48 74.4084 48 72.1992Z" Fill="#F7F8FA" HorizontalAlignment="Center" VerticalAlignment="Center" Panel.ZIndex="1"/>
  92. </Grid>
  93. </StackPanel>
  94. </StackPanel>
  95. </UserControl>