formMain.xaml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <Window
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:my="clr-namespace:pcl" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="formMain"
  5. Title="Plain Craft Launcher" ResizeMode="NoResize" WindowStyle="None" Background="{x:Null}" Icon="/pcl;component/Images/icon.ico" WindowStartupLocation="CenterScreen" AllowsTransparency="True" FontFamily="Microsoft YaHei" x:Name="wind">
  6. <Window.CommandBindings>
  7. <CommandBinding Command="MediaCommands.Play" Executed="CommandBinding_Executed" CanExecute="CommandBinding_CanExecute"/>
  8. </Window.CommandBindings>
  9. <Window.TaskbarItemInfo>
  10. <TaskbarItemInfo ThumbnailClipMargin="{Binding Margin, ElementName=panBack}">
  11. <TaskbarItemInfo.ThumbButtonInfos>
  12. <ThumbButtonInfo ImageSource="/pcl;component/Images/Block-CommandBlock.png" Description="运行 Minecraft" Command="MediaCommands.Play" CommandTarget="{Binding ElementName=btnEvent}" DismissWhenClicked="True" />
  13. </TaskbarItemInfo.ThumbButtonInfos>
  14. </TaskbarItemInfo>
  15. </Window.TaskbarItemInfo>
  16. <Grid x:Name="panAllBack" Width="760" Height="435" UseLayoutRounding="True" RenderTransformOrigin="0.5,0.5">
  17. <Grid.RenderTransform>
  18. <ScaleTransform ScaleX="1" ScaleY="1"/>
  19. </Grid.RenderTransform>
  20. <Rectangle Stroke="{x:Null}" StrokeThickness="0.0001" Height="10" VerticalAlignment="Top" Margin="10,0">
  21. <Rectangle.Fill>
  22. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  23. <GradientStop Color="#21000000" Offset="1" />
  24. <GradientStop Color="#00000000" Offset="0" />
  25. </LinearGradientBrush>
  26. </Rectangle.Fill>
  27. </Rectangle>
  28. <Rectangle Stroke="{x:Null}" StrokeThickness="0.0001" Height="10" VerticalAlignment="Bottom" Margin="10,0">
  29. <Rectangle.Fill>
  30. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  31. <GradientStop Color="#21000000" Offset="0" />
  32. <GradientStop Color="#00000000" Offset="1" />
  33. </LinearGradientBrush>
  34. </Rectangle.Fill>
  35. </Rectangle>
  36. <Rectangle HorizontalAlignment="Right" Margin="0,10" Stroke="{x:Null}" StrokeThickness="0.0001" Width="10">
  37. <Rectangle.Fill>
  38. <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
  39. <GradientStop Color="#21000000" Offset="0" />
  40. <GradientStop Color="#00000000" Offset="1" />
  41. </LinearGradientBrush>
  42. </Rectangle.Fill>
  43. </Rectangle>
  44. <Rectangle HorizontalAlignment="Left" Stroke="{x:Null}" Width="10" Margin="0,10" StrokeThickness="0.0001">
  45. <Rectangle.Fill>
  46. <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
  47. <GradientStop Color="#21000000" Offset="1" />
  48. <GradientStop Color="#00000000" Offset="0" />
  49. </LinearGradientBrush>
  50. </Rectangle.Fill>
  51. </Rectangle>
  52. <Rectangle HorizontalAlignment="Left" Stroke="{x:Null}" Width="10" StrokeThickness="0.0001" VerticalAlignment="Top" Height="10" Opacity="0.8">
  53. <Rectangle.Fill>
  54. <RadialGradientBrush Center="1,1" GradientOrigin="1,1" RadiusX="1" RadiusY="1">
  55. <GradientStop Color="#21000000" Offset="0" />
  56. <GradientStop Color="#00000000" Offset="1" />
  57. </RadialGradientBrush>
  58. </Rectangle.Fill>
  59. </Rectangle>
  60. <Rectangle HorizontalAlignment="Left" Stroke="{x:Null}" Width="10" StrokeThickness="0.0001" VerticalAlignment="Bottom" Height="10" Opacity="0.8">
  61. <Rectangle.Fill>
  62. <RadialGradientBrush Center="1,0" GradientOrigin="1,0" RadiusX="1" RadiusY="1">
  63. <GradientStop Color="#21000000" Offset="0" />
  64. <GradientStop Color="#00000000" Offset="1" />
  65. </RadialGradientBrush>
  66. </Rectangle.Fill>
  67. </Rectangle>
  68. <Rectangle HorizontalAlignment="Right" Stroke="{x:Null}" Width="10" StrokeThickness="0.0001" VerticalAlignment="Bottom" Height="10" Opacity="0.8">
  69. <Rectangle.Fill>
  70. <RadialGradientBrush Center="0,0" GradientOrigin="0,0" RadiusX="1" RadiusY="1">
  71. <GradientStop Color="#21000000" Offset="0" />
  72. <GradientStop Color="#00000000" Offset="1" />
  73. </RadialGradientBrush>
  74. </Rectangle.Fill>
  75. </Rectangle>
  76. <Rectangle HorizontalAlignment="Right" Stroke="{x:Null}" Width="10" StrokeThickness="0.0001" VerticalAlignment="Top" Height="10" Opacity="0.8">
  77. <Rectangle.Fill>
  78. <RadialGradientBrush Center="0,1" GradientOrigin="0,1" RadiusX="1" RadiusY="1">
  79. <GradientStop Color="#21000000" Offset="0" />
  80. <GradientStop Color="#00000000" Offset="1" />
  81. </RadialGradientBrush>
  82. </Rectangle.Fill>
  83. </Rectangle>
  84. <Border Width="740" Height="415">
  85. <Border Width="740.001" Height="415.001" UseLayoutRounding="False">
  86. <Grid Width="740" Height="415" UseLayoutRounding="False">
  87. <Grid Width="740" Height="415" UseLayoutRounding="True" x:Name="panBack" AllowDrop="True" Background="White">
  88. <Grid.RowDefinitions>
  89. <RowDefinition Height="Auto" />
  90. <RowDefinition Height="Auto" />
  91. <RowDefinition Height="305*" />
  92. </Grid.RowDefinitions>
  93. <Grid Grid.Row="2" Margin="0,92,0,0" HorizontalAlignment="Left" Height="323" VerticalAlignment="Top" Width="740">
  94. <Image HorizontalAlignment="Right" x:Name="imgMainBg" VerticalAlignment="Bottom" IsHitTestVisible="False" Stretch="None" />
  95. </Grid>
  96. <Grid Grid.Row="2" x:Name="panMain" Margin="0,92,0,0" HorizontalAlignment="Left" Height="323" VerticalAlignment="Top" Width="740" RenderTransformOrigin="0.5,0.5">
  97. <Grid.ColumnDefinitions>
  98. <ColumnDefinition Width="Auto" />
  99. <ColumnDefinition Width="677*" />
  100. </Grid.ColumnDefinitions>
  101. <Grid HorizontalAlignment="Left" x:Name="panHostLeft" VerticalAlignment="Top" />
  102. <Grid HorizontalAlignment="Stretch" x:Name="panHostRight" VerticalAlignment="Top" Grid.Column="1" UseLayoutRounding="False" />
  103. </Grid>
  104. <Grid Grid.Row="2" x:Name="panGuild" Margin="0,40,0,0" HorizontalAlignment="Left" Height="375" VerticalAlignment="Top" Width="740" RenderTransformOrigin="0.5,0.5"/>
  105. <Grid x:Name="panTop" VerticalAlignment="Top" Height="40" UseLayoutRounding="False" Grid.Row="2">
  106. <Grid.Background>
  107. <ImageBrush ImageSource="/pcl;component/Images/LeftBar-BG_Blue.png" Stretch="None" TileMode="Tile" Viewport="0,0,91.9885004432045,91.9885004432045" ViewportUnits="Absolute" />
  108. </Grid.Background>
  109. <WebBrowser Height="24" HorizontalAlignment="Left" Margin="551,10,0,0" x:Name="webData" VerticalAlignment="Top" Width="21" IsHitTestVisible="False" Visibility="Collapsed" />
  110. <Image Height="40" HorizontalAlignment="Right" VerticalAlignment="Top" Width="35" Opacity="0.35" x:Name="imgTopClose" Margin="0,0,5,0" Source="/pcl;component/Images/imgTopClose.png" UseLayoutRounding="True" />
  111. <Image Height="40" HorizontalAlignment="Right" Margin="0,0,40,0" VerticalAlignment="Top" Width="35" Opacity="0.35" x:Name="imgTopMin" Source="/pcl;component/Images/imgTopMin.png" UseLayoutRounding="True" />
  112. <Image Height="40" HorizontalAlignment="Right" Margin="0,0,75,0" VerticalAlignment="Top" Width="35" Opacity="0.35" x:Name="imgTopMusic" Source="/pcl;component/Images/imgMusic.png" UseLayoutRounding="True" />
  113. <StackPanel HorizontalAlignment="Center" Margin="0,19,0,0" x:Name="panTopSelect" VerticalAlignment="Top" Orientation="Horizontal">
  114. <Grid x:Name="btnTopMain" Width="70" HorizontalAlignment="Left" Height="55" Background="#01FFFFFF" Opacity="0.35" Tag="首页">
  115. <Label x:Name="labTest" Content="首页" HorizontalAlignment="Center" VerticalAlignment="Bottom" Foreground="#FFE5E5E5" FontSize="14" Padding="1,0,0,0" IsHitTestVisible="False" UseLayoutRounding="True" />
  116. <Path HorizontalAlignment="Center" VerticalAlignment="Top" Margin="8,2,8,0" IsHitTestVisible="False" Opacity="1" Data="F1M24.0033,56.0078L24.0033,38.0053 22.0031,40.0056 19.0027,35.0049 38.0053,20.0028 57.008,35.0049 54.0075,40.0056 52.0073,38.0053 52.0073,56.0078 24.0033,56.0078z M38.0053,26.9204L27.0038,36.005 27.0038,53.0074 49.0068,53.0074 49.0068,36.005 38.0053,26.9204z" Width="30" Height="29" Fill="White" Stretch="Fill" />
  117. </Grid>
  118. <Grid Background="#01FFFFFF" Height="55" x:Name="btnTopManage" Width="70" Opacity="0.35" Tag="管理" Visibility="Collapsed">
  119. <Label Content="管理" FontSize="14" Foreground="#FFE5E5E5" HorizontalAlignment="Center" IsHitTestVisible="False" Padding="1,0,0,0" VerticalAlignment="Bottom" UseLayoutRounding="True" />
  120. </Grid>
  121. <Grid Background="#01FFFFFF" Height="55" x:Name="btnTopDown" Width="70" Opacity="0.35" Tag="下载">
  122. <Label Content="下载" FontSize="14" Foreground="#FFE5E5E5" HorizontalAlignment="Center" IsHitTestVisible="False" Padding="1,0,0,0" VerticalAlignment="Bottom" UseLayoutRounding="True" />
  123. <Path HorizontalAlignment="Center" IsHitTestVisible="False" Margin="21,3,21,0" VerticalAlignment="Top" Opacity="1" Stretch="Fill" Data="F1M37.2083,42.75L28.5,31.6667 33.25,31.6667 33.25,19 42.75,19 42.75,31.6667 47.5,31.6667 38.7917,42.75 37.2083,42.75z M19,38L23.75,26.9167 29.6875,26.9167 29.6875,30.0833 26.125,30.0833 22.9583,38 30.875,38C30.875,41.935 34.065,45.125 38,45.125 41.935,45.125 45.125,41.935 45.125,38L53.0417,38 49.875,30.0833 46.3125,30.0833 46.3125,26.9167 52.25,26.9167 57,38 57,53.8333 19,53.8333 19,38z" Width="28" Height="27" Fill="White" />
  124. </Grid>
  125. <Grid Background="#01FFFFFF" Height="55" x:Name="btnTopHelp" Width="70" Opacity="0.35" Tag="帮助" Visibility="Collapsed">
  126. <Label Content="帮助" FontSize="14" Foreground="#FFE5E5E5" HorizontalAlignment="Center" IsHitTestVisible="False" Padding="1,0,0,0" VerticalAlignment="Bottom" UseLayoutRounding="True" />
  127. </Grid>
  128. <Grid Background="#01FFFFFF" Height="55" x:Name="btnTopSetup" Width="70" Opacity="0.35" Tag="设置">
  129. <Label Content="设置" FontSize="14" Foreground="#FFE5E5E5" HorizontalAlignment="Center" IsHitTestVisible="False" Padding="1,0,0,0" VerticalAlignment="Bottom" UseLayoutRounding="True" />
  130. <Path HorizontalAlignment="Center" IsHitTestVisible="False" Margin="1,3,0,0" VerticalAlignment="Top" Stretch="Fill" Data="F1 M 38,23.5C 38.8643,23.5 39.7109,23.5756 40.5337,23.7206L 42.6275,18.5381L 48.1901,20.787L 46.0964,25.9692C 47.6473,27.0149 48.9851,28.3527 50.0308,29.9036L 55.213,27.8099L 57.4619,33.3725L 52.2794,35.4664C 52.4244,36.2891 52.5,37.1357 52.5,38C 52.5,38.8643 52.4244,39.7109 52.2794,40.5337L 57.4619,42.6275L 55.213,48.1901L 50.0308,46.0964C 49.0795,47.5073 47.8865,48.7418 46.5112,49.7405L 48.7844,54.8462L 43.3041,57.2891L 41.0307,52.1828C 40.0533,52.3906 39.0394,52.5 38,52.5C 37.1357,52.5 36.2891,52.4244 35.4664,52.2794L 33.3725,57.462L 27.8099,55.213L 29.9036,50.0309C 28.3527,48.9851 27.0149,47.6473 25.9691,46.0964L 20.787,48.1901L 18.538,42.6275L 23.7206,40.5336C 23.5756,39.7109 23.5,38.8643 23.5,38C 23.5,37.1357 23.5756,36.2891 23.7206,35.4664L 18.538,33.3725L 20.787,27.8099L 25.9691,29.9036C 26.9205,28.4927 28.1135,27.2582 29.4889,26.2594L 27.2157,21.1537L 32.6959,18.7109L 34.9694,23.8172C 35.9468,23.6094 36.9606,23.5 38,23.5 Z M 38,28C 32.4771,28 28,32.4772 28,38C 28,43.5229 32.4771,48 38,48C 43.5228,48 48,43.5229 48,38C 48,32.4772 43.5228,28 38,28 Z" Width="29" Height="29" Fill="White" />
  131. <!-- <Grid.Triggers>
  132. <EventTrigger RoutedEvent="UIElement.MouseLeftButtonDown">
  133. <BeginStoryboard>
  134. <Storyboard>
  135. <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="0.95" Duration="0:0:0.15" />
  136. <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="0.95" Duration="0:0:0.15" />
  137. </Storyboard>
  138. </BeginStoryboard>
  139. </EventTrigger>
  140. <EventTrigger RoutedEvent="UIElement.MouseLeave">
  141. <BeginStoryboard>
  142. <Storyboard>
  143. <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0:0:0.15" />
  144. <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0:0:0.15" />
  145. </Storyboard>
  146. </BeginStoryboard>
  147. </EventTrigger>
  148. <EventTrigger RoutedEvent="UIElement.MouseLeftButtonUp">
  149. <BeginStoryboard>
  150. <Storyboard>
  151. <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleX" To="1" Duration="0:0:0.15" />
  152. <DoubleAnimation Storyboard.TargetProperty="RenderTransform.ScaleY" To="1" Duration="0:0:0.15" />
  153. </Storyboard>
  154. </BeginStoryboard>
  155. </EventTrigger>
  156. </Grid.Triggers>
  157. <Grid.RenderTransform>
  158. <ScaleTransform ScaleX="1" ScaleY="1" CenterX="35" CenterY="30"></ScaleTransform>
  159. </Grid.RenderTransform>-->
  160. </Grid>
  161. </StackPanel>
  162. <Label x:Name="labTopVer" VerticalAlignment="Bottom" Foreground="White" Opacity="0.233" HorizontalAlignment="Right" Padding="7,7,10,7" UseLayoutRounding="True" Background="#016C6C6C" />
  163. <my:Timer HorizontalAlignment="Left" Margin="10,10,0,0" x:Name="timerRuntimeCheck" VerticalAlignment="Top" Width="89" IsEnabled="False" Interval="100" />
  164. <Label x:Name="labFirst" Content="设置向导" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="#A5FFFFFF" FontSize="17" Padding="0" IsHitTestVisible="False"/>
  165. </Grid>
  166. <StackPanel Grid.Row="2" HorizontalAlignment="Left" x:Name="panHint" VerticalAlignment="Bottom" IsHitTestVisible="False"/>
  167. <Button Grid.Row="2" HorizontalAlignment="Left" Margin="100,30,0,0" x:Name="btnEvent" VerticalAlignment="Top" Command="MediaCommands.Play" Visibility="Collapsed" />
  168. </Grid>
  169. <Grid Grid.Row="2" x:Name="panDrag" IsHitTestVisible="False" Background="#75000000" Opacity="0" d:IsHidden="True">
  170. <Label Content="拖拽想要自动安装的文件/文件夹到这里" x:Name="labDrag" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White" FontSize="25" FontWeight="Bold" Margin="0,0,0,24" />
  171. <Label Content="暂支持存档、版本文件与资源包,更多功能将逐渐开放" FontSize="15" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,43,0,0" />
  172. </Grid>
  173. </Grid>
  174. </Border>
  175. </Border>
  176. </Grid>
  177. </Window>