Skip to content

Commit

Permalink
v0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rayenghanmi committed Jan 12, 2024
1 parent 9c33de5 commit 37e2ebe
Show file tree
Hide file tree
Showing 15 changed files with 89 additions and 22 deletions.
2 changes: 1 addition & 1 deletion App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static T GetService<T>()
public App()
{
InitializeComponent();
LogHelper.Log("Initializing App");
LogHelper.Log("___________ New Session ___________");
Host = Microsoft.Extensions.Hosting.Host.
CreateDefaultBuilder().
UseContentRoot(AppContext.BaseDirectory).
Expand Down
16 changes: 13 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,24 @@

All notable changes to this branch will be documented in this file.

## 0.7 - Work In Progress
## 0.7.1 - Released

## Added
### Added

- Version number is now displayed the taskbar.

### Fixes

- Crashing when exiting the app while fetching installed apps.

## 0.7.0 - Unreleased

### Added

- Error Logging for better debugging.
- New `View Logs` HyperLink in Settings Page.

## Changes
### Changes

- Minor UI improvements and fixes.
- Better exception handling.
Expand Down
2 changes: 1 addition & 1 deletion Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<Identity
Name="Rayen.RyTuneX"
Publisher="CN=Ghanmi"
Version="0.7.0.0" />
Version="0.7.1.0" />

<mp:PhoneIdentity PhoneProductId="593c7ba8-f1c9-47cf-a952-7c22b10aac3a" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>

Expand Down
6 changes: 4 additions & 2 deletions RyTuneX.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
<GenerateTestArtifacts>True</GenerateTestArtifacts>
<AppxBundle>Never</AppxBundle>
<WindowsPackageType>MSIX</WindowsPackageType>
<AssemblyVersion>0.6.0.0</AssemblyVersion>
<FileVersion>0.6.0.0</FileVersion>
<PackageCertificateThumbprint>1D92A91C88A122BB200B96F35A8311064D7AD1CE</PackageCertificateThumbprint>
<StartupObject>RyTuneX.Program</StartupObject>
<PackageReadmeFile>README.md</PackageReadmeFile>
Expand All @@ -31,6 +29,7 @@
</PropertyGroup>
<ItemGroup>
<None Remove="Assets\WindowIcon.ico" />
<None Remove="Views\BenchmarkPage.xaml" />
<None Remove="Views\DebloatSystemPage.xaml" />
</ItemGroup>

Expand Down Expand Up @@ -80,6 +79,9 @@
<Page Update="Views\DebloatSystemPage.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Update="Views\BenchmarkPage.xaml">
<XamlRuntime>$(DefaultXamlRuntime)</XamlRuntime>
</Page>
</ItemGroup>

<ItemGroup Condition="'$(DisableMsixProjectCapabilityAddedByProject)'!='true' and '$(EnableMsixTooling)'=='true'">
Expand Down
1 change: 1 addition & 0 deletions Services/PageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public class PageService : IPageService
public PageService()
{
Configure<HomePage>();
Configure<BenchmarkPage>();
Configure<DebloatSystemPage>();
Configure<SystemInfoPage>();
Configure<OptimizeSystemPage>();
Expand Down
3 changes: 3 additions & 0 deletions Strings/ar-tn/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,7 @@
<data name="UninstallTip" xml:space="preserve">
<value>حدد التطبيقات التي ترغب في إزالتها واضغط على إلغاء التثبيت</value>
</data>
<data name="Shell_Benchmark.Content" xml:space="preserve">
<value>قياس الأداء</value>
</data>
</root>
3 changes: 3 additions & 0 deletions Strings/en-us/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,7 @@
<data name="UninstallTip" xml:space="preserve">
<value>Select apps that you want to remove and hit uninstall</value>
</data>
<data name="Shell_Benchmark.Content" xml:space="preserve">
<value>Benchmark</value>
</data>
</root>
3 changes: 3 additions & 0 deletions Strings/fr-fr/Resources.resw
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,7 @@
<data name="UninstallTip" xml:space="preserve">
<value>Sélectionnez les applications que vous souhaitez supprimer et appuyez sur Désinstaller</value>
</data>
<data name="Shell_Benchmark.Content" xml:space="preserve">
<value>Performance</value>
</data>
</root>
14 changes: 14 additions & 0 deletions Views/BenchmarkPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Page
x:Class="RyTuneX.Views.BenchmarkPage"
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"
mc:Ignorable="d">
<ScrollView x:Name="ContentArea" HorizontalScrollMode="Disabled" Margin="-20,0,-20,10" Padding="0,5,0,5">
<StackPanel>
<TextBlock x:Name="CpuUsage"/>
</StackPanel>

</ScrollView>
</Page>
14 changes: 14 additions & 0 deletions Views/BenchmarkPage.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using Microsoft.UI.Xaml.Controls;


namespace RyTuneX.Views;

public sealed partial class BenchmarkPage : Page
{

public BenchmarkPage()
{
InitializeComponent();
LogHelper.Log("Initializing BenchmarkPage");
}
}
22 changes: 15 additions & 7 deletions Views/DebloatSystemPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Windows.UI.Notifications;
using CommunityToolkit.WinUI.Behaviors;
using System.Threading;
using Windows.ApplicationModel.Core;

namespace RyTuneX.Views;

Expand Down Expand Up @@ -45,18 +46,19 @@ private void appTreeView_DragItemsStarting(TreeView sender, TreeViewDragItemsSta

private async void LoadInstalledApps(bool uninstallableOnly = true, CancellationToken cancellationToken = default)
{
await Task.Run(() =>
try
{
LogHelper.Log("Loading InstalledApps");
await LogHelper.Log("Loading InstalledApps");

// Check for cancellation request
cancellationToken.ThrowIfCancellationRequested();

var installedApps = OptimizationOptions.GetUWPApps(uninstallableOnly);
var installedApps = await Task.Run(() => OptimizationOptions.GetUWPApps(uninstallableOnly), cancellationToken);
var numberOfInstalledApps = installedApps.Count;

DispatcherQueue.TryEnqueue(() =>
await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
// fetching installed apps data & hiding ui elements
// fetching installed apps data & hiding UI elements
AppList.Clear();
gettingAppsLoading.Visibility = Visibility.Visible;
appTreeView.Visibility = Visibility.Collapsed;
Expand All @@ -68,10 +70,12 @@ await Task.Run(() =>
uninstallingStatusBar.Visibility = Visibility.Collapsed;
showAll.Visibility = Visibility.Collapsed;
uninstallButton.Visibility = Visibility.Collapsed;

foreach (var app in installedApps)
{
AppList.Add(app);
}

// showing the installed apps data after fetching
installedAppsCount.Text = $"Total: {numberOfInstalledApps} Apps";
installedAppsCount.Visibility = Visibility.Visible;
Expand All @@ -82,10 +86,14 @@ await Task.Run(() =>
uninstallButton.IsEnabled = true;
gettingAppsLoading.Visibility = Visibility.Collapsed;
uninstallingStatusBar.ShowError = false;

});
}, cancellationToken);
}
catch (OperationCanceledException ex)
{
await LogHelper.Log(ex.ToString());
}
}

private async void UninstallSelectedApp_Click(object sender, RoutedEventArgs e)
{
// Check if at least one item is selected
Expand Down
4 changes: 2 additions & 2 deletions Views/SettingsPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ private string GetVersionDescription()
{
var packageVersion = Package.Current.Id.Version;

version = new(packageVersion.Major, packageVersion.Minor, packageVersion.Build, packageVersion.Revision);
version = new(packageVersion.Major, packageVersion.Minor, packageVersion.Build);
}
else
{
version = typeof(SettingsPage).Assembly.GetName().Version!;
}
return $"{"AppDisplayName".GetLocalized()} - {version.Major}.{version.Minor}.{version.Build}.{version.Revision}";
return $"{"AppDisplayName".GetLocalized()} - {version.Major}.{version.Minor}.{version.Build}";
}
public ElementTheme ElementTheme
{
Expand Down
11 changes: 11 additions & 0 deletions Views/ShellPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
Margin="34,0,0,0"
TextWrapping="NoWrap"
Style="{StaticResource CaptionTextBlockStyle}"/>
<TextBlock x:Name="AppTitleBarVersion"
VerticalAlignment="Center"
Margin="86,0,0,0"
TextWrapping="NoWrap"
FontSize="11"
Opacity="0.75"/>
</Grid>
<NavigationView
x:Name="NavigationViewControl"
Expand All @@ -41,6 +47,11 @@
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xE80F;"/>
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem x:Uid="Shell_Benchmark" helpers:NavigationHelper.NavigateTo="RyTuneX.Views.BenchmarkPage">
<NavigationViewItem.Icon>
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xE770;"/>
</NavigationViewItem.Icon>
</NavigationViewItem>
<NavigationViewItem x:Uid="Shell_OptimizeSystem" helpers:NavigationHelper.NavigateTo="RyTuneX.Views.OptimizeSystemPage">
<NavigationViewItem.Icon>
<FontIcon FontFamily="{StaticResource SymbolThemeFontFamily}" Glyph="&#xF259;"/>
Expand Down
8 changes: 3 additions & 5 deletions Views/ShellPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using RyTuneX.Contracts.Services;
using RyTuneX.Helpers;
using RyTuneX.ViewModels;

using Windows.ApplicationModel;
using Windows.System;

namespace RyTuneX.Views;
Expand All @@ -26,10 +26,8 @@ public ShellPage(ShellViewModel viewModel)
LogHelper.Log("Initializing ShellPage");
ViewModel.NavigationService.Frame = NavigationFrame;
ViewModel.NavigationViewService.Initialize(NavigationViewControl);

// TODO: Set the title bar icon by updating /Assets/WindowIcon.ico.
// A custom title bar is required for full window theme and Mica support.
// https://docs.microsoft.com/windows/apps/develop/title-bar?tabs=winui3#full-customization
var packageVersion = Package.Current.Id.Version;
AppTitleBarVersion.Text = $"{packageVersion.Major}.{packageVersion.Minor}";
App.MainWindow.ExtendsContentIntoTitleBar = true;
App.MainWindow.SetTitleBar(AppTitleBar);
App.MainWindow.Activated += MainWindow_Activated;
Expand Down
2 changes: 1 addition & 1 deletion app.manifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="0.6.0.0" name="RyTuneX.app"/>
<assemblyIdentity version="0.7.1.0" name="RyTuneX.app"/>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
Expand Down

0 comments on commit 37e2ebe

Please sign in to comment.