- shit: Cleanup this mess

This commit is contained in:
2025-01-14 22:10:16 +03:00
parent a0b2cfd677
commit 08e518602b
71 changed files with 1022 additions and 943 deletions

View File

@@ -2,7 +2,6 @@ using System;
using System.Reflection;
using Avalonia.Controls;
using Avalonia.Controls.Templates;
using Nebula.Launcher.ViewHelper;
using Nebula.Launcher.ViewModels;
namespace Nebula.Launcher;
@@ -13,15 +12,12 @@ public class ViewLocator : IDataTemplate
{
if (param is null)
return null;
var type = param.GetType().GetCustomAttribute<ViewModelRegisterAttribute>()?.Type;
if (type != null)
{
return (Control)Activator.CreateInstance(type)!;
}
if (type != null) return (Control)Activator.CreateInstance(type)!;
return new TextBlock { Text = "Not Found: " + param.GetType()};
return new TextBlock { Text = "Not Found: " + param.GetType() };
}
public bool Match(object? data)