Files
manos555555--PS5-Suite/client-android/PS5SuiteAndroid/ViewLocator.cs
T
ManosandDevin 7d48ae610b v7.2.3: Android client, controller bridge, console LED, App Manager v2
- New Android app (Avalonia, shared protocol) with full desktop parity,
  hamburger navigation and signed APK — replaces the old android stub
- App Manager v2: real per-app info, per-process CPU%, suspend/resume/
  kill/coredump; serial-protocol lag fixed via ki_stat + appinfo cache
- DualSense state/info/lightbar via SceShellUI remote bridge
  (ptrace + kernel proc copyin/out); vibration removed (non-foreground)
- Console LED colors + effects via /dev/icc_indicator (3 channels,
  hardware-verified)
- Homebrew Store (pkg-zone catalog), saves/media, screenshots, shell,
  file search, memory tools, kernel log, PKG streaming installs
- Fix progress bar freeze + "0 active connections" counter (#7)
- Fix macOS ENOBUFS: chunked socket writes + socket buffer clamp (#6)
- Version unified to 7.2.3 across payload, desktop and Android

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-10-06 11:50:55 +03:00

37 lines
1009 B
C#

using System;
using System.Diagnostics.CodeAnalysis;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using PS5SuiteAndroid.ViewModels;
namespace PS5SuiteAndroid;
/// <summary>
/// Given a view model, returns the corresponding view if possible.
/// </summary>
[RequiresUnreferencedCode(
"Default implementation of ViewLocator involves reflection which may be trimmed away.",
Url = "https://docs.avaloniaui.net/docs/concepts/view-locator")]
public class ViewLocator : IDataTemplate
{
public Control? Build(object? param)
{
if (param is null)
return null;
var name = param.GetType().FullName!.Replace("ViewModel", "View", StringComparison.Ordinal);
var type = Type.GetType(name);
if (type != null)
{
return (Control)Activator.CreateInstance(type)!;
}
return new TextBlock { Text = "Not Found: " + name };
}
public bool Match(object? data)
{
return data is ViewModelBase;
}
}