Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stage 1 Upgrade to .NET8 Runtime #81

Open
wants to merge 7 commits into
base: framework-upgrade
Choose a base branch
from

Conversation

kingsznhone
Copy link

@kingsznhone kingsznhone commented Mar 1, 2024

After several attempts, I realize that keep multi runtime into single project can be very dangerous. So I do with side by side upgrade.
Here is a new project named WMC3. It have a good starting line based on .NET 8.

What I've done during Stage 1 upgrade :

  1. Out-dated package cleaning. Code analizer is already been integrated in .NET6+
  2. Remove WinForm dependency. Use Hardcodet.NotifyIcon.Wpf instead.
  3. Rewrite view model. Introduce CommunityToolkit.Mvvm framework.
  4. Remove old school manual DI. Use Microsoft.Extensions.DependencyInjection instead.
  5. New C# syntax was deployed in some of the places I observed.
  6. Rewrite WinMemoryCleaner.Localization. with System.Text.Json.

What's the situation after Stage 1:

  1. The Main functionalities are working properly.
  2. TrayIcon style switch is disabled temporarily due to precentage icon generate class is not compatible yet.
  3. ProcessExclusionList temporarily disabled it due to some lingering issues with MVVM framework update.
  4. Theoretically, the minimum system version requirement is windows 7 with manual .NET8 runtime install.
  5. Auto upgrade was disabled for dev.

What are we expect on Stage 2:

  1. Rewrite UI with mordern WPF library and MVVM framework.
  2. Legacy code cleanup
  3. Async UI.

What about those 20year's old windows 2000 machine?
Use legacy version 2.8, or work at McDonald's for a few months to buy a computer with windows 10/11 installed.

@IgorMundstein IgorMundstein changed the base branch from master to framework-upgrade March 1, 2024 03:22
@IgorMundstein IgorMundstein added the enhancement New feature or request label Mar 1, 2024
@kingsznhone
Copy link
Author

kingsznhone commented Mar 2, 2024

Stage 2 is on the go.
I rewrite MainWindow use WPF.UI with minimum functionality.

What I've done:

  1. Eliminate UI callback hell, Use async/await system instead.
  2. Parallel Memory optimizing. About 10x faster than before. Finish just after optimize button was clicked. So I delete useless Progress bar and it's update logic.
  3. Introduce Notification.WPF for notify. But I don't like it's color style, considered to be a temporary resolution.

Suggests:

  1. Rewrite IComputerService. Split it into 2 part. IMemoryOptimizerService, IMemoryMonitorService. move OperationSystem into a singleton instance.
  2. Move Optimize Interval&Usage logics from ViewModel to backend Service.
  3. Eliminate all bit Flag magic, Use struct/class instead, which in OOP best practice.

Preview:
20240302161655

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants