Commit 9b9a2658 authored by Rabbit's avatar Rabbit
Browse files

主页背景预览

完成管理存储空间窗口
修复了在自定义随机背景图片,随机目录为GenshinNormal的问题
parent 6aa27a31
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@
                <value>False</value>
            </setting>
            <setting name="HomePreview" serializeAs="String">
                <value>False</value>
                <value>True</value>
            </setting>
            <setting name="UpdateTip" serializeAs="String">
                <value>True</value>
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ using System.Windows;
//
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
[assembly: AssemblyVersion("1.2.5.*")]
[assembly: AssemblyVersion("1.4.0.*")]

/// <summary>
/// 使用此类前需要把[assembly: ComVisible(false)]改为true
+92 −81
Original line number Diff line number Diff line
@@ -895,6 +895,8 @@ namespace CountDownList.Class
        /// </param>
        /// <returns>文件内图片画刷随机结果</returns>
        public static Brush GenerateRandomImage(ExtraMode ExtraMode)
        {
            try
            {
                switch (ExtraMode)
                {
@@ -957,7 +959,7 @@ namespace CountDownList.Class
                        return mcYs;
                    case ExtraMode.Custom:
                        //获取文件列表
                    string imageSourceDir = $"Data\\RandomImg\\GenshinExtra";
                        string imageSourceDir = $"Data\\RandomImg\\Custom";
                        System.IO.DirectoryInfo directoryc = new System.IO.DirectoryInfo(imageSourceDir);
                        var filesc = directoryc.GetFiles("*.*", System.IO.SearchOption.TopDirectoryOnly);
                        List<string> ImgListc = filesc.Select(s => s.FullName).ToList();
@@ -980,6 +982,15 @@ namespace CountDownList.Class
                        return mcO2;
                }
            }
            catch
            {
                ImageBrush notFoundReturn = new();
                notFoundReturn.ImageSource = new BitmapImage(new Uri($@"UI\test.png", UriKind.Relative));
                notFoundReturn.Stretch = Stretch.UniformToFill;

                return notFoundReturn;
            }
        }
    }

    public enum ExtraMode
+103 −34
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
    <SignAssembly>True</SignAssembly>
    <AssemblyOriginatorKeyFile>C:\Users\haora\source\repos\CountDownList\CountDownList.snk</AssemblyOriginatorKeyFile>
    <PlatformTarget>AnyCPU</PlatformTarget>
    <ApplicationManifest>app.manifest</ApplicationManifest>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
    <Deterministic>False</Deterministic>
@@ -590,43 +591,111 @@
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Resource Include="UI\[email protected]" />
    <Resource Include="UI\WindowFrame\Help\Res\2401b5dc1d03cce83d442af8060b924.png" />
    <Resource Include="UI\WindowFrame\Help\Res\5280700c5150427034f28c238b98732.png" />
    <Resource Include="UI\WindowFrame\Help\Res\6bc2f0a427a0607b57e66bd13e4d4d1.png" />
    <Resource Include="UI\WindowFrame\Help\Res\982e86ee3f0a261a4dee5df5fc0f5bb.png" />
    <Resource Include="UI\WindowFrame\Help\Res\a433352aec18943991b4ced53c52dbd.png" />
    <Resource Include="UI\WindowFrame\Help\Res\d1bc7804f2620ed6d7bdd4d494216bc.png" />
    <Content Include="UI\WindowFrame\Help\Res\2401b5dc1d03cce83d442af8060b924.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\5280700c5150427034f28c238b98732.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\6bc2f0a427a0607b57e66bd13e4d4d1.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\982e86ee3f0a261a4dee5df5fc0f5bb.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\a433352aec18943991b4ced53c52dbd.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\d1bc7804f2620ed6d7bdd4d494216bc.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\Doc1.rtf">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Resource Include="UI\WindowFrame\Help\Res\f2d1545fcd5c61361743d3576476878.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-11-46.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-12-16.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-12-39.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-12-59.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-13-27.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-13-50.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-14-13.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-14-59.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-16-47.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-17-06.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-17-32.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-18-06.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-20-17.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-30-35.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-30-57.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-32-08.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-33-07.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-33-19.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-33-42.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-34-01.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-34-24.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-34-42.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-35-23.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-35-58.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-36-20.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-36-44.png" />
    <Resource Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-37-08.png" />
    <Content Include="UI\WindowFrame\Help\Res\f2d1545fcd5c61361743d3576476878.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-11-46.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-12-16.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-12-39.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-12-59.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-13-27.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-13-50.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-14-13.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-14-59.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-16-47.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-17-06.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-17-32.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-18-06.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-20-17.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-30-35.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-30-57.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-32-08.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-33-07.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-33-19.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-33-42.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-34-01.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-34-24.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-34-42.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-35-23.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-35-58.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-36-20.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-36-44.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="UI\WindowFrame\Help\Res\PixPin_2024-12-31_16-37-08.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
  </ItemGroup>
  <ItemGroup>
    <Compile Update="MiscSetting.Designer.cs">
+1 −1
Original line number Diff line number Diff line
@@ -145,7 +145,7 @@ namespace CountDownList {
        
        [global::System.Configuration.UserScopedSettingAttribute()]
        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [global::System.Configuration.DefaultSettingValueAttribute("False")]
        [global::System.Configuration.DefaultSettingValueAttribute("True")]
        public bool HomePreview {
            get {
                return ((bool)(this["HomePreview"]));
Loading