Main2.xaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <Window x:Class="WechatBakTool.Main2"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:WechatBakTool"
  7. mc:Ignorable="d" WindowStartupLocation="CenterScreen" WindowStyle="None" WindowState="Normal" Background="Transparent" AllowsTransparency="True" ResizeMode="NoResize"
  8. Title="WechatBakTool" Height="550" Width="950" >
  9. <Window.Resources>
  10. <Style TargetType="local:Main2">
  11. <!-- 设置窗体的WindowChrome -->
  12. <Setter Property="WindowChrome.WindowChrome">
  13. <Setter.Value>
  14. <!-- ResizeBorderThickness:拖拽改变窗体大小的边框厚度;-->
  15. <!-- CornerRadius:窗体圆角;-->
  16. <!-- CaptionHeight顶部标题的高度;-->
  17. <!-- GlassFrameThickness:默认边框的大小,0为不使用默认边框(这样定义的圆角才有效),-1为使用默认边框默认值-->
  18. <WindowChrome CornerRadius="5" CaptionHeight="5" GlassFrameThickness="0" />
  19. </Setter.Value>
  20. </Setter>
  21. </Style>
  22. <DrawingImage x:Key="svg_min">
  23. <DrawingImage.Drawing>
  24. <DrawingGroup ClipGeometry="M0,0 V1024 H1024 V0 H0 Z">
  25. <GeometryDrawing Brush="#2775b6" Geometry="F1 M1024,1024z M0,0z M370.752,608L129.6,849.152A32,32,0,0,0,174.848,894.4L416,653.248 416,768A32,32,0,0,0,480,768L480,576A31.904,31.904,0,0,0,448,544L256,544A32,32,0,0,0,256,608L370.752,608z M553.376,470.624A31.904,31.904,0,0,1,544,448L544,256A32,32,0,0,1,608,256L608,370.752 849.152,129.6A32,32,0,1,1,894.4,174.848L653.248,416 768,416A32,32,0,0,1,768,480L576,480A31.904,31.904,0,0,1,553.376,470.624z" />
  26. </DrawingGroup>
  27. </DrawingImage.Drawing>
  28. </DrawingImage>
  29. <DrawingImage x:Key="svg_close">
  30. <DrawingImage.Drawing>
  31. <DrawingGroup ClipGeometry="M0,0 V1024 H1024 V0 H0 Z">
  32. <GeometryDrawing Brush="#2775b6" Geometry="F1 M1024,1024z M0,0z M556.8,512L828.8,240C841.6,227.2 841.6,208 828.8,195.2 816,182.4 796.8,182.4 784,195.2L512,467.2 240,195.2C227.2,182.4 208,182.4 195.2,195.2 182.4,208 182.4,227.2 195.2,240L467.2,512 195.2,784C182.4,796.8 182.4,816 195.2,828.8 208,841.6 227.2,841.6 240,828.8L512,556.8 784,828.8C796.8,841.6 816,841.6 828.8,828.8 841.6,816 841.6,796.8 828.8,784L556.8,512z" />
  33. </DrawingGroup>
  34. </DrawingImage.Drawing>
  35. </DrawingImage>
  36. <DrawingImage x:Key="friends_nums">
  37. <DrawingImage.Drawing>
  38. <DrawingGroup ClipGeometry="M0,0 V1024 H1024 V0 H0 Z">
  39. <GeometryDrawing Brush="#FFF" Geometry="F1 M1024,1024z M0,0z M512.018127441406,140.7236328125C386.078552246094,140.7236328125 283.536560058594,243.226898193359 283.536560058594,369.204376220703 283.536560058594,495.106048583984 386.003570556641,597.648864746094 512.018127441406,597.648864746094 637.994781494141,597.648864746094 740.535949707031,495.106872558594 740.535949707031,369.204376220703 740.535949707031,243.226898193359 637.994781494141,140.7236328125 512.018127441406,140.7236328125z" />
  40. <GeometryDrawing Brush="#FFF" Geometry="F1 M1024,1024z M0,0z M688.11962890625,592.435577392578C639.437561035156,630.917663574219 578.812805175781,654.760192871094 512.018127441406,654.760192871094 445.222625732422,654.760192871094 384.636596679688,630.844329833984 335.842468261719,592.435577392578 243.466674804688,651.248413085937 179.148040771484,754.530334472656 170.313385009766,874.148376464844 202.656860351563,878.545104980469 260.212310791016,883.2763671875 342.347747802734,883.2763671875L681.539367675781,883.2763671875C763.712707519531,883.2763671875 821.304412841797,878.545104980469 853.686614990234,874.148376464844 844.924468994141,754.454528808594 780.606658935547,651.248413085938 688.11962890625,592.435577392578z" />
  41. </DrawingGroup>
  42. </DrawingImage.Drawing>
  43. </DrawingImage>
  44. <DrawingImage x:Key="msg_nums">
  45. <DrawingImage.Drawing>
  46. <DrawingGroup ClipGeometry="M0,0 V1024 H1024 V0 H0 Z">
  47. <GeometryDrawing Brush="#FFF" Geometry="F1 M1024,1024z M0,0z M512,917.333333A308.458667,308.458667,0,0,1,425.941333,908.181333C366.592,890.88 248.298666,903.808 153.365333,922.666667 153.365333,922.666667 145.173333,924.010667 144.661333,924.010667A42.282667,42.282667,0,0,1,103.253333,871.488C123.498666,779.754667,131.306666,670.741333,115.584,596.906667A405.333333,405.333333,0,1,1,512,917.333333z M339.008,640L552.341333,640A32,32,0,1,0,552.341333,576L339.008,576A32,32,0,0,0,339.008,640z M680.341333,405.333333L339.008,405.333333A32,32,0,0,0,339.008,469.333333L680.341333,469.333333A32,32,0,1,0,680.341333,405.333333z" />
  48. </DrawingGroup>
  49. </DrawingImage.Drawing>
  50. </DrawingImage>
  51. <DataTemplate x:Key="ListViewItemContentTemplate">
  52. <Grid Margin="5">
  53. <Label Margin="0" Content="{Binding Account}" FontSize="16" VerticalAlignment="Top" HorizontalAlignment="Left" Foreground="White" />
  54. <Image Source="{StaticResource friends_nums}" Width="15" Height="15" Margin="2,30,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" />
  55. <Label Margin="13,25.5,0,0" Content="{Binding Friends_Number}" VerticalAlignment="Top" HorizontalAlignment="Left" Foreground="White" />
  56. <Image Source="{StaticResource msg_nums}" Width="15" Height="15" Margin="60,30,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" />
  57. <Label Margin="73,25.5,0,0" Content="{Binding Msg_Number}" VerticalAlignment="Top" HorizontalAlignment="Left" Foreground="White" />
  58. <Border Margin="150,25.5,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" CornerRadius="5" BorderThickness="1" Background="White" >
  59. <Label Padding="5" FontSize="8" Content="{Binding DecryptStatus}" Foreground="#2775b6" Background="Transparent" />
  60. </Border>
  61. </Grid>
  62. </DataTemplate>
  63. </Window.Resources>
  64. <Grid Background="White" MouseDown="Grid_MouseDown">
  65. <Image Panel.ZIndex="100" Name="img_btn_min" Source="{StaticResource svg_min}" Width="20" Height="20" HorizontalAlignment="Left" Margin="860,20,0,0" VerticalAlignment="Top" MouseLeftButtonDown="img_btn_min_MouseLeftButtonDown">
  66. <Image.RenderTransform>
  67. <RotateTransform CenterX="0.5" CenterY="0.5" />
  68. </Image.RenderTransform>
  69. <Image.RenderTransformOrigin>
  70. <Point>0.5,0.5</Point>
  71. </Image.RenderTransformOrigin>
  72. <Image.Triggers>
  73. <EventTrigger RoutedEvent="Image.MouseEnter">
  74. <BeginStoryboard>
  75. <Storyboard>
  76. <DoubleAnimation
  77. Storyboard.TargetName="img_btn_min"
  78. Storyboard.TargetProperty="(Image.RenderTransform).(RotateTransform.Angle)"
  79. To="180" Duration="0:0:0.300"/>
  80. </Storyboard>
  81. </BeginStoryboard>
  82. </EventTrigger>
  83. <EventTrigger RoutedEvent="Image.MouseLeave">
  84. <BeginStoryboard>
  85. <Storyboard>
  86. <DoubleAnimation
  87. Storyboard.TargetName="img_btn_min"
  88. Storyboard.TargetProperty="(Image.RenderTransform).(RotateTransform.Angle)"
  89. To="0" Duration="0:0:0.300" />
  90. </Storyboard>
  91. </BeginStoryboard>
  92. </EventTrigger>
  93. </Image.Triggers>
  94. </Image>
  95. <Image Panel.ZIndex="100" Name="img_btn_close" Source="{StaticResource svg_close}" Width="20" Height="20" HorizontalAlignment="Left" Margin="900,20,0,0" VerticalAlignment="Top" MouseLeftButtonDown="img_btn_close_MouseLeftButtonDown">
  96. <Image.RenderTransform>
  97. <RotateTransform CenterX="0.5" CenterY="0.5" />
  98. </Image.RenderTransform>
  99. <Image.RenderTransformOrigin>
  100. <Point>0.5,0.5</Point>
  101. </Image.RenderTransformOrigin>
  102. <Image.Triggers>
  103. <EventTrigger RoutedEvent="Image.MouseEnter">
  104. <BeginStoryboard>
  105. <Storyboard>
  106. <DoubleAnimation
  107. Storyboard.TargetName="img_btn_close"
  108. Storyboard.TargetProperty="(Image.RenderTransform).(RotateTransform.Angle)"
  109. To="90" Duration="0:0:0.200"/>
  110. </Storyboard>
  111. </BeginStoryboard>
  112. </EventTrigger>
  113. <EventTrigger RoutedEvent="Image.MouseLeave">
  114. <BeginStoryboard>
  115. <Storyboard>
  116. <DoubleAnimation
  117. Storyboard.TargetName="img_btn_close"
  118. Storyboard.TargetProperty="(Image.RenderTransform).(RotateTransform.Angle)"
  119. To="0" Duration="0:0:0.200" />
  120. </Storyboard>
  121. </BeginStoryboard>
  122. </EventTrigger>
  123. </Image.Triggers>
  124. </Image>
  125. <Grid Width="230" Background="#2775b6" HorizontalAlignment="Left" IsHitTestVisible="True">
  126. <ListView BorderThickness="0" Background="Transparent" Margin="0,0,0,85" Name="list_workspace" ItemTemplate="{DynamicResource ListViewItemContentTemplate}" SelectionChanged="list_workspace_SelectionChanged">
  127. <ListView.ContextMenu>
  128. <ContextMenu>
  129. <MenuItem Header="查看" Click="MenuItem_Click" />
  130. <MenuItem Header="管理" Click="MenuItem_Click_1" />
  131. </ContextMenu>
  132. </ListView.ContextMenu>
  133. </ListView>
  134. <Grid Name="new_workspace" Width="170" Height="40" VerticalAlignment="Bottom" Margin="30,45" IsHitTestVisible="True">
  135. <Rectangle Name="new_workspace_fill" Fill="Transparent" RadiusX="0" RadiusY="0" Stroke="White" StrokeDashArray="5" MouseDown="new_workspace_fill_MouseDown">
  136. <Rectangle.Triggers>
  137. <EventTrigger RoutedEvent="Rectangle.MouseEnter">
  138. <BeginStoryboard>
  139. <Storyboard>
  140. <ColorAnimation
  141. Storyboard.TargetName="new_workspace_fill"
  142. Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)"
  143. To="White" Duration="0:0:0.300"/>
  144. <ColorAnimation
  145. Storyboard.TargetName="new_workspace_text"
  146. Storyboard.TargetProperty="(Label.Foreground).(SolidColorBrush.Color)"
  147. To="Black" Duration="0:0:0.300"/>
  148. </Storyboard>
  149. </BeginStoryboard>
  150. </EventTrigger>
  151. <EventTrigger RoutedEvent="Rectangle.MouseLeave">
  152. <BeginStoryboard>
  153. <Storyboard>
  154. <ColorAnimation
  155. Storyboard.TargetName="new_workspace_fill"
  156. Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)"
  157. To="Transparent" Duration="0:0:0.300"/>
  158. <ColorAnimation
  159. Storyboard.TargetName="new_workspace_text"
  160. Storyboard.TargetProperty="(Label.Foreground).(SolidColorBrush.Color)"
  161. To="White" Duration="0:0:0.300"/>
  162. </Storyboard>
  163. </BeginStoryboard>
  164. </EventTrigger>
  165. </Rectangle.Triggers>
  166. </Rectangle>
  167. <Label Name="new_workspace_text" Content="新建工作区" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" IsHitTestVisible="False"/>
  168. </Grid>
  169. <Label Name="lab_version" Content="版本:" Margin="10" VerticalAlignment="Bottom" HorizontalAlignment="Center" Foreground="White" />
  170. </Grid>
  171. <Grid Margin="230,0,0,0" Width="720" Background="Transparent" HorizontalAlignment="Left" Panel.ZIndex="1">
  172. <Frame Name="MainFrame" Source="/Pages/Welcome.xaml" NavigationUIVisibility="Hidden" />
  173. </Grid>
  174. </Grid>
  175. </Window>