Workspace.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <Page x:Class="WechatBakTool.Pages.Workspace"
  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:WechatBakTool.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="720"
  9. Title="Workspace" Background="White">
  10. <Page.Resources>
  11. <Style x:Key="RepeatButtonTransparent" TargetType="{x:Type RepeatButton}">
  12. <Setter Property="OverridesDefaultStyle" Value="true"/>
  13. <Setter Property="Background" Value="#2775b6"/>
  14. <Setter Property="Focusable" Value="false"/>
  15. <Setter Property="IsTabStop" Value="false"/>
  16. <Setter Property="Template">
  17. <Setter.Value>
  18. <ControlTemplate TargetType="{x:Type RepeatButton}">
  19. <Border Background="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" CornerRadius="4"/>
  20. </ControlTemplate>
  21. </Setter.Value>
  22. </Setter>
  23. </Style>
  24. <!-- 这里是listview滚动条的滑动块部分样式-->
  25. <Style x:Key="ScrollBarThumbVertical" TargetType="{x:Type Thumb}">
  26. <Setter Property="OverridesDefaultStyle" Value="true"/>
  27. <Setter Property="IsTabStop" Value="false"/>
  28. <Setter Property="Template">
  29. <Setter.Value>
  30. <ControlTemplate TargetType="{x:Type Thumb}">
  31. <Border x:Name="rectangle" Background="#BB2775b6" Height="{TemplateBinding Height}" SnapsToDevicePixels="True" Width="{TemplateBinding Width}" CornerRadius="4"/>
  32. <ControlTemplate.Triggers>
  33. <Trigger Property="IsMouseOver" Value="true">
  34. <Setter Property="Background" TargetName="rectangle" Value="#772775b6"/>
  35. </Trigger>
  36. <Trigger Property="IsDragging" Value="true">
  37. <Setter Property="Background" TargetName="rectangle" Value="#772775b6"/>
  38. </Trigger>
  39. </ControlTemplate.Triggers>
  40. </ControlTemplate>
  41. </Setter.Value>
  42. </Setter>
  43. </Style>
  44. <DataTemplate x:Key="ListViewItemContentTemplate">
  45. <Grid Margin="0">
  46. <Image Width="40" Height="40" Margin="10" VerticalAlignment="Top" HorizontalAlignment="Left" Source="{Binding Avatar}" />
  47. <Label Margin="60,8,0,0" FontWeight="Bold" VerticalAlignment="Top" HorizontalAlignment="Left" Content="{Binding NickName}" Width="130"/>
  48. <Label Margin="60,25,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="140" Content="{Binding LastMsg}"/>
  49. </Grid>
  50. </DataTemplate>
  51. <DataTemplate x:Key="MsgText">
  52. <Grid Margin="0">
  53. <Label Margin="60,8,0,0" FontWeight="Bold" VerticalAlignment="Top" Content="{Binding NickName}"/>
  54. <Label Margin="60,25,0,8" VerticalAlignment="Top" HorizontalAlignment="Left" Width="380">
  55. <TextBlock Text="{Binding StrContent}" TextWrapping="Wrap" />
  56. </Label>
  57. </Grid>
  58. </DataTemplate>
  59. <DataTemplate x:Key="MsgImage">
  60. <Grid Margin="0">
  61. <Image Width="40" Height="40" Margin="10" VerticalAlignment="Top" HorizontalAlignment="Left" Source="{Binding Avatar}" />
  62. <Label Margin="60,8,0,0" FontWeight="Bold" VerticalAlignment="Top" HorizontalAlignment="Left" Content="{Binding NickName}" Width="130"/>
  63. <Label Margin="60,25,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="140" Content="{Binding LastMsg}"/>
  64. </Grid>
  65. </DataTemplate>
  66. <DataTemplate x:Key="MsgAudio">
  67. <Grid Margin="0">
  68. <Image Width="40" Height="40" Margin="10" VerticalAlignment="Top" HorizontalAlignment="Left" Source="{Binding Avatar}" />
  69. <Label Margin="60,8,0,0" FontWeight="Bold" VerticalAlignment="Top" HorizontalAlignment="Left" Content="{Binding NickName}" Width="130"/>
  70. <Label Margin="60,25,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="140" Content="{Binding LastMsg}"/>
  71. </Grid>
  72. </DataTemplate>
  73. </Page.Resources>
  74. <Grid>
  75. <!--
  76. <Label FontSize="20" Margin="30,15" Content="工作台" HorizontalAlignment="Left" VerticalAlignment="Top" />
  77. <Label Name="lab_status" Margin="30,45,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Content="当前工作区还未解密,请先解密。"></Label>
  78. <Button Name="btn_decrypt" Margin="35,80,0,0" Width="60" Height="30" Content="解密" Foreground="White" Background="#2775b6" BorderThickness="0" HorizontalAlignment="Left" VerticalAlignment="Top" Click="btn_decrypt_Click">
  79. <Button.Resources>
  80. <Style TargetType="{x:Type Border}">
  81. <Setter Property="CornerRadius" Value="3" />
  82. </Style>
  83. </Button.Resources>
  84. </Button>
  85. <Button Name="btn_read" Margin="125,80,0,0" Width="60" Height="30" Content="读取" IsEnabled="False" Foreground="White" Background="#2775b6" BorderThickness="0" HorizontalAlignment="Left" VerticalAlignment="Top" Click="btn_read_Click">
  86. <Button.Resources>
  87. <Style TargetType="{x:Type Border}">
  88. <Setter Property="CornerRadius" Value="3" />
  89. </Style>
  90. </Button.Resources>
  91. </Button>
  92. -->
  93. <TextBox Name="txt_find_user" Padding="10,0" Height="30" VerticalAlignment="Top" VerticalContentAlignment="Center" FontSize="14" HorizontalAlignment="Left" Width="230" BorderThickness="0,0,10,1" BorderBrush="#2775b6" TextChanged="txt_find_user_TextChanged" GotFocus="txt_find_user_GotFocus" Text="{Binding SearchString, Mode=TwoWay}" />
  94. <ListView Margin="0,30,0,0" Background="Transparent" HorizontalAlignment="Left" Width="230" Name="list_users" ItemTemplate="{DynamicResource ListViewItemContentTemplate}" BorderThickness="0,0,1,0" BorderBrush="#2775b6" SelectionChanged="list_users_SelectionChanged" ItemsSource="{Binding Contacts}">
  95. <ListView.Resources>
  96. <Style TargetType="{x:Type ScrollBar}">
  97. <Setter Property="Background" Value="Transparent"/>
  98. <Setter Property="BorderBrush" Value="Transparent"/>
  99. <Setter Property="BorderThickness" Value="0" />
  100. <Setter Property="Template">
  101. <Setter.Value>
  102. <ControlTemplate TargetType="{x:Type ScrollBar}">
  103. <Grid x:Name="Bg" SnapsToDevicePixels="true" Width="8" HorizontalAlignment="Right">
  104. <Grid.RowDefinitions>
  105. <RowDefinition Height="0"/>
  106. <RowDefinition Height="1*"/>
  107. <RowDefinition Height="0"/>
  108. </Grid.RowDefinitions>
  109. <Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Row="1" CornerRadius="5"/>
  110. <Track x:Name="PART_Track" IsDirectionReversed="true" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="1">
  111. <Track.DecreaseRepeatButton>
  112. <RepeatButton Command="{x:Static ScrollBar.PageUpCommand}" Style="{StaticResource RepeatButtonTransparent}" HorizontalAlignment="Right" Width="8"/>
  113. </Track.DecreaseRepeatButton>
  114. <Track.IncreaseRepeatButton>
  115. <RepeatButton Command="{x:Static ScrollBar.PageDownCommand}" Style="{StaticResource RepeatButtonTransparent}" HorizontalAlignment="Right" Width="8"/>
  116. </Track.IncreaseRepeatButton>
  117. <Track.Thumb>
  118. <Thumb Style="{StaticResource ScrollBarThumbVertical}" Width="8" />
  119. </Track.Thumb>
  120. </Track>
  121. </Grid>
  122. </ControlTemplate>
  123. </Setter.Value>
  124. </Setter>
  125. </Style>
  126. </ListView.Resources>
  127. </ListView>
  128. <Label Content="{Binding WXContact.NickName}" HorizontalAlignment="Left" Margin="258,21,0,0" VerticalAlignment="Top"/>
  129. <ListView x:Name="list_msg" Margin="230,60,0,60" Background="Transparent" BorderThickness="0,1,0,1" BorderBrush="#BB2775b6" ItemTemplate="{DynamicResource MsgText}">
  130. </ListView>
  131. <Button Name="btn_export" Width="90" Height="30" Content="导出HTML" BorderBrush="Transparent" BorderThickness="0" Background="#2775b6" Foreground="White" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="20,15" Click="btn_export_Click" IsEnabled="{Binding SelectContact}">
  132. <Button.Resources>
  133. <Style TargetType="{x:Type Border}">
  134. <Setter Property="CornerRadius" Value="3"/>
  135. </Style>
  136. </Button.Resources>
  137. </Button>
  138. <Button x:Name="btn_open_workspace" Width="80" Height="30" Content="打开文件夹" BorderBrush="Transparent" BorderThickness="0" Background="#2775b6" Foreground="White" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,390,15" Click="btn_open_workspace_Click">
  139. <Button.Resources>
  140. <Style TargetType="{x:Type Border}">
  141. <Setter Property="CornerRadius" Value="3"/>
  142. </Style>
  143. </Button.Resources>
  144. </Button>
  145. <Button x:Name="btn_analyse" Width="80" Height="30" Content="旧版消息工具" BorderBrush="Transparent" BorderThickness="0" Background="#2775b6" Foreground="White" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,292,15" Click="btn_analyse_Click" >
  146. <Button.Resources>
  147. <Style TargetType="{x:Type Border}">
  148. <Setter Property="CornerRadius" Value="3"/>
  149. </Style>
  150. </Button.Resources>
  151. </Button>
  152. </Grid>
  153. </Page>