Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6fdc3e6
Add Community Toolkit packages
tajbender Jun 6, 2026
623a1ff
Add dummy `SettingsCard`s
tajbender Jun 6, 2026
07eebeb
Remove explicit `WebView2` package references and refactor
tajbender Jun 6, 2026
4661634
Little Refactoring
tajbender Jun 6, 2026
1f89715
Fix namespaces
tajbender Jun 6, 2026
0c9dae4
Refactor
tajbender Jun 6, 2026
a1fa140
Overhaul Navigation
tajbender Jun 6, 2026
c686dd8
Add some dummy stuff to `SettingsPage.xaml`
tajbender Jun 6, 2026
8d4e17c
Add constant `defaultNavigationTarget`
tajbender Jun 6, 2026
be0ef8c
Some Prototyping in `FloatingStatusBar`
tajbender Jun 6, 2026
5070037
Some Prototyping in `FloatingStatusBar`
tajbender Jun 6, 2026
206f873
Merge
tajbender Jun 6, 2026
5242f33
Cleanup
tajbender Jun 7, 2026
2465e5d
Set `defaultNavigationTarget` to `INavigationService.Area.Utilities`
tajbender Jun 7, 2026
fdd5f90
Add more Community Toolkit packages, including `Ribbon` out of the Labs
tajbender Jun 7, 2026
c654191
Add Ribbon prototype
tajbender Jun 7, 2026
cf32578
Add more buttons to the dummy Ribbon.
tajbender Jun 7, 2026
14a9d8a
Add `UtilitiesAreaViewModel`
tajbender Jun 7, 2026
a6219e9
Load NuGets page as default
tajbender Jun 7, 2026
057f6a6
Correct spelling of `Jñāna`
tajbender Jun 7, 2026
bbc6bc1
Prepare `NuGetsPage` for GUI-Overhaul
tajbender Jun 7, 2026
c90143e
Remove orphaned `AssemblyLoaderService.cs`
tajbender Jun 7, 2026
61c8c23
Add prototypes to `NuGetsAreaViewModel`
tajbender Jun 7, 2026
a21cdc1
Add asset
tajbender Jun 7, 2026
0b6606d
Add `NuGetDiscoveryService.cs`
tajbender Jun 7, 2026
8eb35af
Implement `NuGetDiscoveryService`
tajbender Jun 8, 2026
cdc9c16
Add `NuGetCatalogService` and load Vanara Packages
tajbender Jun 9, 2026
001ae5a
Add `NuGetCatalogCache`
tajbender Jun 9, 2026
2c828a9
Add `NuGetCatalogDiskCache`.
tajbender Jun 9, 2026
7b8fcb7
Replace `ItemsRepeater` by `TreeView` for showing packages
tajbender Jun 9, 2026
43b6e33
Cleanup
tajbender Jun 9, 2026
492bd9d
Add `ImageExtensions.cs` Helper
tajbender Jun 10, 2026
e79ef75
Add Icon to `PackageContent` and `PackageVersionInfo`
tajbender Jun 10, 2026
ab7207f
Add `NuGetPackageDetailViewModel` and prepare Details View for data b…
tajbender Jun 10, 2026
112dbae
Add `SelectVersionCommand` to `NuGetsPage`
tajbender Jun 10, 2026
414d1cc
Add `NuGetPackageDetailViewModel` to `NuGetsAreaViewModel`
tajbender Jun 10, 2026
ebfbc2a
Move `SelectVersionCommand` to `NuGetsAreaViewModel` and fix Binding
tajbender Jun 10, 2026
69f4254
Add `MarkdownTextBlock` for rendering the README
tajbender Jun 10, 2026
f86c059
Overhaul `VoidPage`
tajbender Jun 10, 2026
1009279
On `VoidPage`, overhaul GitHub pane
tajbender Jun 10, 2026
feff559
Add `StandardUICommand` for Area Navigation with `FeatureTile`
tajbender Jun 11, 2026
7fe9a4a
Move `INavigationService` to `Models`.
tajbender Jun 11, 2026
0b79d5a
Add Navigation stuff
tajbender Jun 11, 2026
115ffe9
Cleanup
tajbender Jun 11, 2026
93e0f25
Cleanup
tajbender Jun 11, 2026
d63b101
Add `SynchronizePackageCacheAsync()` stub to `NuGetsAreaViewModel`
tajbender Jun 11, 2026
f504d86
Remove temporary page header from `NuGetsPage`
tajbender Jun 11, 2026
d523062
prj: Upgrade ro `"Microsoft.WindowsAppSDK" Version="2.2.0"`
tajbender Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Vanara-Jnana/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Jnana;
using Microsoft.UI.Windowing;
using Microsoft.UI.Xaml;
//using LaunchActivatedEventArgs = Windows.ApplicationModel.Activation.LaunchActivatedEventArgs;
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion Vanara-Jnana/Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<Project>
<ItemGroup>
<PackageVersion Include="Microsoft.Web.WebView2" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.8.0" />
</ItemGroup>
</Project>
25 changes: 25 additions & 0 deletions Vanara-Jnana/Helpers/ImageExtensions.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using Microsoft.UI.Xaml.Media.Imaging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Jnana.Helpers;

public class ImageExtensions
{
public static BitmapImage? ToBitmapImage(byte[]? bytes)
{
if (bytes == null || bytes.Length == 0)
return null;

var bitmap = new BitmapImage();

using var ms = new MemoryStream(bytes);
var ras = ms.AsRandomAccessStream();

bitmap.SetSource(ras);
return bitmap;
}
}
2 changes: 1 addition & 1 deletion Vanara-Jnana/Helpers/WindowsSystemDispatcherQueueHelper.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.UI.Dispatching;

namespace ClassicSamplesBrowser.Helpers;
namespace Jnana.Helpers;

public class WindowsSystemDispatcherQueueHelper
{
Expand Down
14 changes: 12 additions & 2 deletions Vanara-Jnana/Jnana.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,19 @@
<Page Remove="Resources\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="CommunityToolkit.Labs.WinUI.Controls.MarkdownTextBlock" Version="0.1.260529-build.2632" />
<PackageReference Include="CommunityToolkit.Labs.WinUI.Controls.Ribbon" Version="0.1.260529-build.2632" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.4.2" />
<PackageReference Include="Microsoft.Web.WebView2" Version="1.0.3912.50" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.8.260317003" />
<PackageReference Include="CommunityToolkit.WinUI.Behaviors" Version="8.2.251219" />
<PackageReference Include="CommunityToolkit.WinUI.Collections" Version="8.2.251219" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.SettingsControls" Version="8.2.251219" />
<PackageReference Include="CommunityToolkit.WinUI.Controls.Sizers" Version="8.2.251219" />
<PackageReference Include="CommunityToolkit.WinUI.Converters" Version="8.2.251219" />
<PackageReference Include="CommunityToolkit.WinUI.DeveloperTools" Version="8.2.251219" />
<PackageReference Include="CommunityToolkit.WinUI.Extensions" Version="8.2.251219" />
<PackageReference Include="CommunityToolkit.WinUI.Media" Version="8.2.251219" />
<PackageReference Include="CommunityToolkit.WinUI.Triggers" Version="8.2.251219" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="2.2.0" />
<PackageReference Include="NuGet.Common" Version="7.3.1" />
<PackageReference Include="NuGet.Protocol" Version="7.3.1" />
<PackageReference Include="Vanara.Core" Version="5.0.5" />
Expand Down
5 changes: 2 additions & 3 deletions Vanara-Jnana/MainWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<Window
x:Class="ClassicSamplesBrowser.MainWindow"
x:Class="Jnana.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:ClassicSamplesBrowser"
xmlns:controls="using:ClassicSamplesBrowser.Vanara.Controls"
xmlns:local="using:Jnana"
Title="Vanara Jñāna"
Activated="Window_Activated">

Expand Down
14 changes: 6 additions & 8 deletions Vanara-Jnana/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
using ClassicSamplesBrowser.Helpers;
using ClassicSamplesBrowser.Views;
using Jnana.Views;
using Microsoft.UI.Composition.SystemBackdrops;
using Microsoft.UI.Windowing;
using Microsoft.UI.Xaml;
using Microsoft.UI;
using System.Drawing;
using System.Diagnostics;
using Vanara.PInvoke;
using Windows.Graphics;
using WinRT;
using ClassicSamplesBrowser.Services;
using System.Diagnostics;
using Jnana.Helpers;

namespace ClassicSamplesBrowser;
namespace Jnana;

public sealed partial class MainWindow : Window
{
Expand All @@ -28,8 +26,8 @@ public MainWindow()

// _navigationService = new NavigationService(RootFrame);

//var initialSize = ApplicationData.Current.LocalSettings.Values["InitialWindowSize"] as string;
//this.AppWindow.Size = _initialWindowSize;
// var initialSize = ApplicationData.Current.LocalSettings.Values["InitialWindowSize"] as string;
// this.AppWindow.Size = _initialWindowSize;
// AppWindow.Size = new Size() { Width = 800, Height = 600 };

_ = RootFrame.Navigate(typeof(ShellPage));
Expand Down
5 changes: 0 additions & 5 deletions Vanara-Jnana/Models/ApiAssemblyModel.cs

This file was deleted.

5 changes: 0 additions & 5 deletions Vanara-Jnana/Models/ApiEnumModel.cs

This file was deleted.

5 changes: 0 additions & 5 deletions Vanara-Jnana/Models/ApiMethodModel.cs

This file was deleted.

5 changes: 0 additions & 5 deletions Vanara-Jnana/Models/ApiNamespaceModel.cs

This file was deleted.

5 changes: 0 additions & 5 deletions Vanara-Jnana/Models/ApiPropertyModel.cs

This file was deleted.

5 changes: 0 additions & 5 deletions Vanara-Jnana/Models/ApiSampleModel.cs

This file was deleted.

5 changes: 0 additions & 5 deletions Vanara-Jnana/Models/ApiTypeModel.cs

This file was deleted.

23 changes: 23 additions & 0 deletions Vanara-Jnana/Models/INavigationService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Jnana.Models;

public interface INavigationService
{
public enum Area
{
Void,
NuGets,
GitHub,
Samples,
Disassembler,
Utilities,
Settings
}

void NavigateTo(Area area);
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.ComponentModel;

namespace ClassicSamplesBrowser.Services;
namespace Jnana.Models;

public interface ISettingsSerializer : INotifyPropertyChanged
{
Expand Down
36 changes: 36 additions & 0 deletions Vanara-Jnana/Services/INuGetCatalogService.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using Microsoft.UI.Xaml.Media.Imaging;
using NuGet.Versioning;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Jnana.Services;

public record PackageId(string Id);

public record PackageVersionInfo(
string Id,
string Version,
Uri? IconUrl,
string? Description,
string? Summary,
BitmapImage? Icon
);

public record PackageContent(
string Id,
NuGetVersion Version,
IReadOnlyList<string> Assemblies,
string? Readme,
byte[]? IconBytes,
BitmapImage? Icon
);

public interface INuGetCatalogService
{
IAsyncEnumerable<PackageId> SearchPackagesAsync(string prefix, CancellationToken token);
Task<PackageVersionInfo?> GetLatestStableVersionAsync(string packageId, CancellationToken token);
Task<PackageContent> DownloadPackageAsync(string id, NuGetVersion version, CancellationToken token);
}
118 changes: 22 additions & 96 deletions Vanara-Jnana/Services/NavigationService.cs
Original file line number Diff line number Diff line change
@@ -1,125 +1,51 @@
using ClassicSamplesBrowser.Views;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.ComponentModel;
using Jnana.Models;
using Jnana.Views;
using Microsoft.UI.Xaml.Controls;
using Microsoft.Win32;
using System.Diagnostics;
using Vanara.PInvoke;
using static ClassicSamplesBrowser.Services.INavigationService;
using static Jnana.Models.INavigationService;

namespace ClassicSamplesBrowser.Services;

public interface INavigationService
{
public enum Area
{
Void,
NuGets,
GitHub,
Samples,
Disassembler,
Utilities,
Settings
}

void NavigateTo(Area area);
}
namespace Jnana.Services;

public partial class NavigationService : ObservableObject, INavigationService
{
public Area CurrentArea
{
get;
set
{
if (SetProperty(ref field, value))
{
OnPropertyChanged(nameof(CurrentPage));
}
}
} = Area.Void;

public Page CurrentPage => CurrentArea switch
{
Area.GitHub => new GitHubPage(),
Area.NuGets => new NuGetsPage(),
Area.Samples => new SamplesPage(),
Area.Settings => new SettingsPage(),
_ => new VoidPage()
};

private readonly Frame _frame;
private readonly Dictionary<Area, Type> _areaPageMap;

public NavigationService(Frame frame)
{
_frame = frame;
_frame = frame ?? throw new ArgumentNullException(nameof(frame));

_areaPageMap = new()
{
{ Area.Disassembler, typeof(DisassemblerPage) },
{ Area.GitHub, typeof(GitHubPage) },
{ Area.NuGets, typeof(NuGetsPage) },
{ Area.Samples, typeof(SamplesPage) },
{ Area.Settings, typeof(SettingsPage) },
{ Area.Utilities, typeof(UtilitiesPage) },
{ Area.Void, typeof(VoidPage) },
};

// INFO: @dahall - select a default page to navigate to on loading, to ensure the main content area is populated with a page, and to establish a consistent starting point for navigation
//NavigateTo(Area.Void);
//NavigateTo(Area.Settings);
}

// // TODO:
// // public static void Navigate(Shell32.IShellFolder shellFolder)
// // {
// // TryNavigate(shellFolder);
// // }
// public bool TryNavigate(object target, bool allowPageCreation = true)
// {
// try
// {
// var pageType = target switch
// {
// "Assemblies" => typeof(AssembliesPage),
// "GitHub" => typeof(GitHubPage),
// "NuGets" => typeof(NuGetsPage),
// "Samples" => typeof(SamplesPage),
// "Settings" => typeof(SettingsPage),
// "Start" => typeof(StartPage),
// "Utilities" => typeof(UtilitiesPage),
// _ => null
// };
//
// // Check if the page type is null and if page creation is allowed
// if (pageType == null && !allowPageCreation)
// {
// //LogWriter.PrintLine("Page type is null and page creation is not allowed.");
// return false;
// }
//
// // TODO: _frame.Navigate(pageType ?? new UtilitiesPage());
// //return _frame.Navigate(pageType);
// return true;
// }
// catch (Exception ex)
// {
// Debug.Fail(ex.ToString());
// throw;
// }
// }

public static void NavigateBack() { }

public static void Forward() { }

public void NavigateTo(Area area)
{
if (_areaPageMap.TryGetValue(area, out var pageType))
try
{
if (_areaPageMap.TryGetValue(area, out var pageType))
{
Debug.Print($"Navigating to `{area}` page.");
_frame.Navigate(pageType);
}
else
{
Debug.Print($"Failed to get page for `{area}` from PageMap.");
}
}
catch (Exception ex)
{
Debug.Print($"Navigating to `{area}` page.");
_frame.Navigate(pageType);
Debug.Fail(ex.ToString());
throw;
}
}

//public void Navigate(Area area) { CurrentArea = area; }
}
Loading