diff --git a/StabilityMatrix.Avalonia/Controls/SeedCard.axaml b/StabilityMatrix.Avalonia/Controls/SeedCard.axaml new file mode 100644 index 00000000..096d6761 --- /dev/null +++ b/StabilityMatrix.Avalonia/Controls/SeedCard.axaml @@ -0,0 +1,67 @@ + + + + + + + + + diff --git a/StabilityMatrix.Avalonia/Controls/SeedCard.axaml.cs b/StabilityMatrix.Avalonia/Controls/SeedCard.axaml.cs new file mode 100644 index 00000000..f08853dd --- /dev/null +++ b/StabilityMatrix.Avalonia/Controls/SeedCard.axaml.cs @@ -0,0 +1,7 @@ +using Avalonia.Controls.Primitives; + +namespace StabilityMatrix.Avalonia.Controls; + +public class SeedCard : TemplatedControl +{ +} diff --git a/StabilityMatrix.Avalonia/DesignData/DesignData.cs b/StabilityMatrix.Avalonia/DesignData/DesignData.cs index 5d28f978..cf21df26 100644 --- a/StabilityMatrix.Avalonia/DesignData/DesignData.cs +++ b/StabilityMatrix.Avalonia/DesignData/DesignData.cs @@ -10,6 +10,7 @@ using StabilityMatrix.Avalonia.Models; using StabilityMatrix.Avalonia.Services; using StabilityMatrix.Avalonia.ViewModels; using StabilityMatrix.Avalonia.ViewModels.Dialogs; +using StabilityMatrix.Avalonia.ViewModels.Inference; using StabilityMatrix.Core.Api; using StabilityMatrix.Core.Database; using StabilityMatrix.Core.Helper; @@ -334,4 +335,28 @@ public static class DesignData { State = ProgressState.Success }; + + public static SeedCardViewModel SeedCardViewModel => new(); + + public static Indexer Types => new(); + + public class Indexer + { + public object? this[string typeName] + { + get + { + var type = Type.GetType(typeName) ?? + throw new ArgumentException($"Type {typeName} not found"); + try + { + return Services.GetService(type); + } + catch (InvalidOperationException) + { + return Activator.CreateInstance(type); + } + } + } + } }