Skip to content

Commit bee88fe

Browse files
committed
bump v2
1 parent f60566d commit bee88fe

21 files changed

+746
-730
lines changed

HandyWinGet/App.xaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<Application x:Class="HandyWinGet.App"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:local="clr-namespace:HandyWinGet"
54
xmlns:ui="http://schemas.modernwpf.com/2019"
65
xmlns:hc="https://handyorg.github.io/handycontrol">
76
<Application.Resources>

HandyWinGet/App.xaml.cs

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
using HandyControl.Controls;
1+
using System;
2+
using System.ComponentModel;
3+
using System.Diagnostics;
4+
using System.IO;
5+
using System.Runtime;
6+
using System.Windows;
7+
using HandyControl.Controls;
28
using HandyControl.Data;
39
using HandyControl.Themes;
410
using HandyControl.Tools;
@@ -7,27 +13,18 @@
713
using Microsoft.AppCenter.Analytics;
814
using Microsoft.AppCenter.Crashes;
915
using ModernWpf;
10-
using System;
11-
using System.ComponentModel;
12-
using System.Diagnostics;
13-
using System.IO;
14-
using System.Runtime;
15-
using System.Windows;
1616

1717
namespace HandyWinGet
1818
{
1919
/// <summary>
20-
/// Interaction logic for App.xaml
20+
/// Interaction logic for App.xaml
2121
/// </summary>
2222
public partial class App : Application
2323
{
2424
public App()
2525
{
2626
var cachePath = $"{AppDomain.CurrentDomain.BaseDirectory}Cache";
27-
if (!Directory.Exists(cachePath))
28-
{
29-
Directory.CreateDirectory(cachePath);
30-
}
27+
if (!Directory.Exists(cachePath)) Directory.CreateDirectory(cachePath);
3128

3229
ProfileOptimization.SetProfileRoot(cachePath);
3330
ProfileOptimization.StartProfile("Profile");
@@ -38,9 +35,7 @@ protected override void OnStartup(StartupEventArgs e)
3835
base.OnStartup(e);
3936
GlobalDataHelper<AppConfig>.Init($"{AppDomain.CurrentDomain.BaseDirectory}AppConfig.json");
4037
if (GlobalDataHelper<AppConfig>.Config.Skin != SkinType.Default)
41-
{
4238
UpdateSkin(GlobalDataHelper<AppConfig>.Config.Skin);
43-
}
4439

4540
var boot = new Bootstrapper();
4641
boot.Run();
@@ -55,13 +50,9 @@ public void UpdateSkin(SkinType skin)
5550
ResourceHelper.GetTheme("hcTheme", Resources).Skin = skin;
5651

5752
if (skin == SkinType.Dark)
58-
{
5953
ThemeManager.Current.ApplicationTheme = ApplicationTheme.Dark;
60-
}
6154
else
62-
{
6355
ThemeManager.Current.ApplicationTheme = ApplicationTheme.Light;
64-
}
6556

6657
Current.MainWindow?.OnApplyTemplate();
6758
}
@@ -70,7 +61,7 @@ public bool IsWingetInstalled()
7061
{
7162
try
7263
{
73-
Process proc = new Process
64+
var proc = new Process
7465
{
7566
StartInfo = new ProcessStartInfo
7667
{

HandyWinGet/Bootstrapper.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
using HandyWinGet.Views;
1+
using System.Windows;
2+
using HandyWinGet.Views;
23
using Prism.DryIoc;
34
using Prism.Ioc;
45
using Prism.Regions;
5-
using System.Windows;
66

77
namespace HandyWinGet
88
{
@@ -24,6 +24,7 @@ protected override void RegisterTypes(IContainerRegistry containerRegistry)
2424
containerRegistry.RegisterForNavigation<CreatePackage>();
2525
containerRegistry.RegisterForNavigation<Packages>();
2626
containerRegistry.RegisterForNavigation<Settings>();
27+
containerRegistry.RegisterForNavigation<PackageManager>();
2728
}
2829
}
2930
}

HandyWinGet/Data/AppConfig.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
using HandyControl.Controls;
1+
using System;
2+
using HandyControl.Controls;
23
using HandyControl.Data;
34
using ModernWpf.Controls;
4-
using System;
55

66
namespace HandyWinGet.Data
77
{
@@ -16,4 +16,4 @@ internal class AppConfig : GlobalDataHelper<AppConfig>
1616
public IdentifyPackageMode IdentifyPackageMode { get; set; } = IdentifyPackageMode.Off;
1717
public SkinType Skin { get; set; } = SkinType.Default;
1818
}
19-
}
19+
}
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
using HandyControl.Tools.Converter;
2-
using System.ComponentModel;
1+
using System.ComponentModel;
2+
using HandyControl.Tools.Converter;
33

44
namespace HandyWinGet.Data
55
{
66
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
77
public enum IdentifyPackageMode
88
{
9-
[Description("Off (Fast)")]
10-
Off,
9+
[Description("Off (Fast)")] Off,
10+
1111
[Description("Internal Method (Normal)")]
1212
Internal,
13+
1314
[Description("Winget-cli Method (Slow)")]
1415
Wingetcli
1516
}
16-
}
17+
}

HandyWinGet/Data/InstallMode.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
using HandyControl.Tools.Converter;
2-
using System.ComponentModel;
1+
using System.ComponentModel;
2+
using HandyControl.Tools.Converter;
33

44
namespace HandyWinGet.Data
55
{
66
[TypeConverter(typeof(EnumDescriptionTypeConverter))]
77
public enum InstallMode
88
{
9-
[Description("Winget-cli")]
10-
Wingetcli,
9+
[Description("Winget-cli")] Wingetcli,
10+
1111
[Description("Internal (Manual installation)")]
1212
Internal
1313
}
14-
}
14+
}

HandyWinGet/HandyWinGet.csproj

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,51 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<OutputType>WinExe</OutputType>
5-
<TargetFramework>net5.0-windows</TargetFramework>
6-
<UseWPF>true</UseWPF>
7-
<AssemblyVersion>2.0.0.0</AssemblyVersion>
8-
<FileVersion>2.0.0.0</FileVersion>
9-
<Version>2.0.0</Version>
10-
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
11-
<DebugType>embedded</DebugType>
12-
<ApplicationIcon>icon.ico</ApplicationIcon>
13-
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
14-
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
15-
</PropertyGroup>
3+
<PropertyGroup>
4+
<OutputType>WinExe</OutputType>
5+
<TargetFramework>net5.0-windows</TargetFramework>
6+
<UseWPF>true</UseWPF>
7+
<AssemblyVersion>2.0.0.0</AssemblyVersion>
8+
<FileVersion>2.0.0.0</FileVersion>
9+
<Version>2.0.0</Version>
10+
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
11+
<DebugType>embedded</DebugType>
12+
<ApplicationIcon>icon.ico</ApplicationIcon>
13+
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
14+
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
15+
</PropertyGroup>
1616

17-
<ItemGroup>
18-
<Page Include="Properties\DesignTimeResources.xaml" Condition="'$(DesignTime)'=='true' OR ('$(SolutionPath)'!='' AND Exists('$(SolutionPath)') AND '$(BuildingInsideVisualStudio)'!='true' AND '$(BuildingInsideExpressionBlend)'!='true')">
19-
<Generator>MSBuild:Compile</Generator>
20-
<SubType>Designer</SubType>
21-
<ContainsDesignTimeResources>true</ContainsDesignTimeResources>
22-
</Page>
23-
</ItemGroup>
24-
25-
<ItemGroup>
26-
<PackageReference Include="Downloader" Version="2.0.1" />
27-
<PackageReference Include="HandyControls" Version="3.0.0" />
28-
<PackageReference Include="ModernWpfUis" Version="1.0.0" />
29-
<PackageReference Include="Prism.DryIoc" Version="8.0.0.1909" />
17+
<ItemGroup>
18+
<Page Include="Properties\DesignTimeResources.xaml"
19+
Condition="'$(DesignTime)'=='true' OR ('$(SolutionPath)'!='' AND Exists('$(SolutionPath)') AND '$(BuildingInsideVisualStudio)'!='true' AND '$(BuildingInsideExpressionBlend)'!='true')">
20+
<Generator>MSBuild:Compile</Generator>
21+
<SubType>Designer</SubType>
22+
<ContainsDesignTimeResources>true</ContainsDesignTimeResources>
23+
</Page>
24+
</ItemGroup>
3025

31-
<PackageReference Include="LibGit2Sharp" Version="0.27.0-preview-0096" />
32-
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.0.0" />
33-
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.0.0" />
34-
<PackageReference Include="YamlDotNet" Version="9.1.0" />
35-
</ItemGroup>
36-
<ItemGroup>
37-
<None Update="HandyUpdater.dll">
38-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
39-
</None>
40-
<None Update="HandyUpdater.exe">
41-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
42-
</None>
43-
<None Update="HandyUpdater.runtimeconfig.json">
44-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
45-
</None>
46-
<None Update="UnRAR.exe">
47-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
48-
</None>
49-
</ItemGroup>
50-
</Project>
26+
<ItemGroup>
27+
<PackageReference Include="Downloader" Version="2.0.1" />
28+
<PackageReference Include="HandyControls" Version="3.0.0" />
29+
<PackageReference Include="ModernWpfUis" Version="1.0.0" />
30+
<PackageReference Include="Prism.DryIoc" Version="8.0.0.1909" />
31+
32+
<PackageReference Include="LibGit2Sharp" Version="0.27.0-preview-0096" />
33+
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.0.0" />
34+
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.0.0" />
35+
<PackageReference Include="YamlDotNet" Version="9.1.0" />
36+
</ItemGroup>
37+
<ItemGroup>
38+
<None Update="HandyUpdater.dll">
39+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
40+
</None>
41+
<None Update="HandyUpdater.exe">
42+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
43+
</None>
44+
<None Update="HandyUpdater.runtimeconfig.json">
45+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
46+
</None>
47+
<None Update="UnRAR.exe">
48+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
49+
</None>
50+
</ItemGroup>
51+
</Project>

0 commit comments

Comments
 (0)