Skip to content

Commit

Permalink
refactor: transfer ownership
Browse files Browse the repository at this point in the history
  • Loading branch information
AuroraZiling committed Jun 8, 2024
1 parent d5d2040 commit a97724f
Show file tree
Hide file tree
Showing 130 changed files with 1,106 additions and 1,037 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<br />
<div align="center">
<a href="https://github.com/AuroraZiling/PipManager">
<img src="https://raw.githubusercontent.com/AuroraZiling/PipManager/main/src/PipManager/Assets/icon.png" alt="Logo" width="80" height="80">
<a href="https://github.com/Pip-Manager/PipManager.Wpf">
<img src="https://raw.githubusercontent.com/Pip-Manager/PipManager.Wpf/main/src/PipManager/Assets/icon.png" alt="Logo" width="80" height="80">
</a>

<h3 align="center">Pip Manager</h3>
Expand All @@ -14,11 +14,11 @@
<a href="https://pipmanager.dev"><strong>Explore the docs (Chinese Simplified) »</strong></a>
<br />
<br />
<a href="https://github.com/AuroraZiling/PipManager?tab=readme-ov-file#screenshots">Screenshots</a>
<a href="https://github.com/Pip-Manager/PipManager.Wpf?tab=readme-ov-file#screenshots">Screenshots</a>
·
<a href="https://github.com/AuroraZiling/PipManager/issues">Report Bug</a>
<a href="https://github.com/Pip-Manager/PipManager.Wpf/issues">Report Bug</a>
·
<a href="https://github.com/AuroraZiling/PipManager/pulls">Request Feature</a>
<a href="https://github.com/Pip-Manager/PipManager.Wpf/pulls">Request Feature</a>
</p>
</div>

Expand Down Expand Up @@ -76,7 +76,7 @@ Double click `PipManager.exe` or `PipManager_withRuntime.exe` *If you have not i

<p align="right">(<a href="#readme-top">back to top</a>)</p>

See the [Open Issues](https://github.com/AuroraZiling/PipManager/issues) for a full list of proposed features (and known issues).
See the [Open Issues](https://github.com/Pip-Manager/PipManager.Wpf/issues) for a full list of proposed features (and known issues).


## Contributing
Expand All @@ -95,14 +95,14 @@ Kawaii `C#` Logo in [Technology Stack](#technology-stack) is created by [SAWATSU

<p align="right">(<a href="#readme-top">back to top</a>)</p>

[github-downloads-shield]: https://img.shields.io/github/downloads/AuroraZiling/PipManager/total.svg?style=for-the-badge&color=blue
[github-downloads-url]: https://github.com/AuroraZiling/PipManager/releases
[stars-shield]: https://img.shields.io/github/stars/AuroraZiling/PipManager.svg?style=for-the-badge
[stars-url]: https://github.com/AuroraZiling/PipManager/stargazers
[issues-shield]: https://img.shields.io/github/issues/AuroraZiling/PipManager.svg?style=for-the-badge
[issues-url]: https://github.com/AuroraZiling/PipManager/issues
[license-shield]: https://img.shields.io/github/license/AuroraZiling/PipManager.svg?style=for-the-badge
[license-url]: https://github.com/AuroraZiling/PipManager/blob/master/LICENSE.txt
[github-downloads-shield]: https://img.shields.io/github/downloads/Pip-Manager/PipManager.Wpf/total.svg?style=for-the-badge&color=blue
[github-downloads-url]: https://github.com/Pip-Manager/PipManager.Wpf/releases
[stars-shield]: https://img.shields.io/github/stars/Pip-Manager/PipManager.Wpf.svg?style=for-the-badge
[stars-url]: https://github.com/Pip-Manager/PipManager.Wpf/stargazers
[issues-shield]: https://img.shields.io/github/issues/Pip-Manager/PipManager.Wpf.svg?style=for-the-badge
[issues-url]: https://github.com/Pip-Manager/PipManager.Wpf/issues
[license-shield]: https://img.shields.io/github/license/Pip-Manager/PipManager.Wpf.svg?style=for-the-badge
[license-url]: https://github.com/Pip-Manager/PipManager.Wpf/blob/master/LICENSE.txt
[screenshot]: images/screenshot.png
[.NET Core]: https://img.shields.io/badge/.NET_Core-512BD4?style=for-the-badge&logo=dotnet&logoColor=white
[.NET-url]: https://dotnet.microsoft.com/
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions src/PipManager/App.xaml → src/PipManager.Windows/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
DispatcherUnhandledException="OnDispatcherUnhandledException"
Exit="OnExit"
Startup="OnStartup"
x:Class="PipManager.App"
x:Class="PipManager.Windows.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
xmlns:valueConverters="clr-namespace:ValueConverters;assembly=ValueConverters"
Expand All @@ -15,8 +15,8 @@
<ui:ControlsDictionary />

<ResourceDictionary Source="/Resources/Animations.xaml" />
<ResourceDictionary Source="/PipManager;component/Resources/Library/LibraryStyles.xaml" />
<ResourceDictionary Source="/PipManager;component/Resources/FluentDesignComplements.xaml" />
<ResourceDictionary Source="/PipManager.Windows;component/Resources/Library/LibraryStyles.xaml" />
<ResourceDictionary Source="/PipManager.Windows;component/Resources/FluentDesignComplements.xaml" />
</ResourceDictionary.MergedDictionaries>

<!-- Mask -->
Expand Down
74 changes: 40 additions & 34 deletions src/PipManager/App.xaml.cs → src/PipManager.Windows/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,53 @@
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using PipManager.PackageSearch;
using PipManager.Services;
using PipManager.Services.Action;
using PipManager.Services.Configuration;
using PipManager.Services.Environment;
using PipManager.Services.Mask;
using PipManager.Services.Toast;
using PipManager.ViewModels.Pages.Action;
using PipManager.ViewModels.Pages.Environment;
using PipManager.ViewModels.Pages.Lab;
using PipManager.ViewModels.Pages.Library;
using PipManager.ViewModels.Pages.Search;
using PipManager.ViewModels.Pages.Tools;
using PipManager.ViewModels.Windows;
using PipManager.Views.Pages.About;
using PipManager.Views.Pages.Action;
using PipManager.Views.Pages.Environment;
using PipManager.Views.Pages.Lab;
using PipManager.Views.Pages.Library;
using PipManager.Views.Pages.Search;
using PipManager.Views.Pages.Settings;
using PipManager.Views.Pages.Tools;
using PipManager.Views.Windows;
using Serilog;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Runtime.InteropServices;
using System.Windows.Threading;
using PipManager.Services.Overlay;
using PipManager.ViewModels.Pages.Overlay;
using PipManager.ViewModels.Pages.Scenario;
using PipManager.Views.Pages.Overlay;
using PipManager.Views.Pages.Scenario;
using PipManager.Windows.Services;
using PipManager.Windows.Services.Action;
using PipManager.Windows.Services.Configuration;
using PipManager.Windows.Services.Environment;
using PipManager.Windows.Services.Mask;
using PipManager.Windows.Services.Overlay;
using PipManager.Windows.Services.Toast;
using PipManager.Windows.ViewModels.Pages.Action;
using PipManager.Windows.ViewModels.Pages.Environment;
using PipManager.Windows.ViewModels.Pages.Lab;
using PipManager.Windows.ViewModels.Pages.Library;
using PipManager.Windows.ViewModels.Pages.Overlay;
using PipManager.Windows.ViewModels.Pages.Scenario;
using PipManager.Windows.ViewModels.Pages.Search;
using PipManager.Windows.ViewModels.Pages.Tools;
using PipManager.Windows.ViewModels.Windows;
using PipManager.Windows.Views.Pages.About;
using PipManager.Windows.Views.Pages.Action;
using PipManager.Windows.Views.Pages.Environment;
using PipManager.Windows.Views.Pages.Lab;
using PipManager.Windows.Views.Pages.Library;
using PipManager.Windows.Views.Pages.Overlay;
using PipManager.Windows.Views.Pages.Scenario;
using PipManager.Windows.Views.Pages.Search;
using PipManager.Windows.Views.Pages.Settings;
using PipManager.Windows.Views.Pages.Tools;
using PipManager.Windows.Views.Windows;
using Wpf.Ui;
using AboutViewModel = PipManager.ViewModels.Pages.About.AboutViewModel;
using ActionViewModel = PipManager.ViewModels.Pages.Action.ActionViewModel;
using LibraryViewModel = PipManager.ViewModels.Pages.Library.LibraryViewModel;
using SearchViewModel = PipManager.ViewModels.Pages.Search.SearchViewModel;
using SettingsViewModel = PipManager.ViewModels.Pages.Settings.SettingsViewModel;
using AboutViewModel = PipManager.Windows.ViewModels.Pages.About.AboutViewModel;
using ActionViewModel = PipManager.Windows.ViewModels.Pages.Action.ActionViewModel;
using LibraryViewModel = PipManager.Windows.ViewModels.Pages.Library.LibraryViewModel;
using SearchViewModel = PipManager.Windows.ViewModels.Pages.Search.SearchViewModel;
using SettingsViewModel = PipManager.Windows.ViewModels.Pages.Settings.SettingsViewModel;

namespace PipManager;
namespace PipManager.Windows;

using AboutViewModel = ViewModels.Pages.About.AboutViewModel;
using ActionViewModel = ViewModels.Pages.Action.ActionViewModel;
using LibraryViewModel = ViewModels.Pages.Library.LibraryViewModel;
using SearchViewModel = ViewModels.Pages.Search.SearchViewModel;
using SettingsViewModel = ViewModels.Pages.Settings.SettingsViewModel;

/// <summary>
/// Interaction logic for App.xaml
Expand All @@ -65,7 +71,7 @@ public partial class App
services.AddTransient(_ =>
{
var client = new HttpClient(new HttpClientHandler { AutomaticDecompression = DecompressionMethods.All }) { DefaultRequestVersion = HttpVersion.Version20 };
client.DefaultRequestHeaders.Add("User-Agent", $"PipManager/{AppInfo.AppVersion}");
client.DefaultRequestHeaders.Add("User-Agent", $"PipManager.Windows/{AppInfo.AppVersion}");
client.Timeout = TimeSpan.FromSeconds(6);
return client;
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.IO;
using System.Reflection;

namespace PipManager;
namespace PipManager.Windows;

public static class AppInfo
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using PipManager.Models;
using PipManager.Services.Configuration;
using PipManager.Windows.Services.Configuration;
using Serilog;
using System.Globalization;
using System.IO;
using System.Runtime.InteropServices;
using PipManager.Helpers;
using PipManager.Windows.Helpers;
using PipManager.Windows.Models;

namespace PipManager;
namespace PipManager.Windows;

public partial class AppStarting
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using PipManager.Languages;
using PipManager.Windows.Languages;
using Wpf.Ui;

namespace PipManager.Controls;
namespace PipManager.Windows.Controls;

public static class ContentDialogCreateOptions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Windows.Controls;

namespace PipManager.Controls.Mask;
namespace PipManager.Windows.Controls.Mask;

public class MaskPresenter : ContentPresenter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
<UserControl
x:Class="PipManager.Controls.Toast"
Focusable="False"
MaxHeight="500"
MaxWidth="1500"
MinHeight="50"
MinWidth="100"
MouseLeftButtonDown="UserControl_MouseLeftButtonDown"
d:DesignHeight="48"
d:DesignWidth="200"
mc:Ignorable="d"
x:Class="PipManager.Windows.Controls.Toast"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
MinWidth="100"
MinHeight="50"
MaxWidth="1500"
MaxHeight="500"
d:DesignHeight="48"
d:DesignWidth="200"
Focusable="False"
MouseLeftButtonDown="UserControl_MouseLeftButtonDown"
mc:Ignorable="d">
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Border
Margin="1"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{Binding Background}"
BorderBrush="{Binding BorderBrush}"
BorderThickness="{Binding BorderThickness}"
CornerRadius="5">
CornerRadius="5"
HorizontalAlignment="Stretch"
Margin="1"
VerticalAlignment="Stretch">

<Grid
x:Name="Grid"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch">
VerticalAlignment="Stretch"
x:Name="Grid">

<StackPanel
Margin="10,0,10,0"
HorizontalAlignment="Left"
Margin="10,0,10,0"
Orientation="Horizontal">
<ui:SymbolIcon
x:Name="IconToast"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Filled="True"
FontSize="24"
Foreground="{Binding IconForeground}"
Symbol="{Binding Icon}" />
<ui:TextBlock
x:Name="ToastTitle"
MaxWidth="{Binding TextWidth}"
Margin="12,0,0,0"
HorizontalAlignment="Left"
HorizontalAlignment="Center"
Symbol="{Binding Icon}"
VerticalAlignment="Center"
x:Name="IconToast" />
<ui:TextBlock
FontFamily="{Binding FontFamily}"
FontTypography="BodyStrong"
Foreground="{Binding Foreground}"
Text="{Binding Title}" />
HorizontalAlignment="Left"
Margin="12,0,0,0"
MaxWidth="{Binding TextWidth}"
Text="{Binding Title}"
VerticalAlignment="Center"
x:Name="ToastTitle" />

<ui:TextBlock
x:Name="ToastMessage"
Margin="10,-2,0,0"
HorizontalAlignment="{Binding HorizontalContentAlignment}"
VerticalAlignment="Center"
FontFamily="{Binding FontFamily}"
FontTypography="Body"
FontWeight="{Binding FontWeight}"
Foreground="{Binding Foreground}"
Text="{Binding Message}" />
HorizontalAlignment="{Binding HorizontalContentAlignment}"
Margin="10,-2,0,0"
Text="{Binding Message}"
VerticalAlignment="Center"
x:Name="ToastMessage" />
</StackPanel>
</Grid>
</Border>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Wpf.Ui.Appearance;
using Wpf.Ui.Controls;

namespace PipManager.Controls
namespace PipManager.Windows.Controls
{
public class ToastOptions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using PipManager.Models.Package;
using System.Globalization;
using System.Globalization;
using System.Windows.Data;
using PipManager.Windows.Models.Package;

namespace PipManager.Converters;
namespace PipManager.Windows.Converters;

internal class PackageSourceEnumToBooleanConverter : IValueConverter
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Globalization;
using System.Windows.Data;

namespace PipManager.Converters;
namespace PipManager.Windows.Converters;

internal class ThemeEnumToBooleanConverter : IValueConverter
{
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using PipManager.Models.Package;
using System.Text.RegularExpressions;
using System.Text.RegularExpressions;
using PipManager.Windows.Models.Package;

namespace PipManager.Helpers;
namespace PipManager.Windows.Helpers;

public static partial class PackageValidator
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Serilog.Core;
using Serilog.Events;

namespace PipManager.Helpers;
namespace PipManager.Windows.Helpers;

internal class ThreadIdEnricher : ILogEventEnricher
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace PipManager.Languages;
namespace PipManager.Windows.Languages;

public static class GetLanguage
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
Loading

0 comments on commit a97724f

Please sign in to comment.