leerform recipe subsystem created

This commit is contained in:
EugeneTes
2026-03-31 13:26:26 +02:00
parent 4bd117af47
commit 1c7a4abd5c
20 changed files with 823 additions and 70 deletions

View File

@@ -0,0 +1,26 @@
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using LindtLeerformPlugin.Views;
using VisionBuilder.UI.Common.ViewModel.Interfaces.UI;
namespace LindtLeerformPlugin;
public class LeerformRecipeCreationTool : IRecipeCreationTool
{
public bool Enabled { get; set; } = true;
public async Task<string?> CreateRecipeAsync()
{
if (Application.Current?.ApplicationLifetime is not IClassicDesktopStyleApplicationLifetime desktop)
return null;
var parent = desktop.MainWindow;
if (parent == null)
return null;
var dialog = new RecipeNameDialog();
var result = await dialog.ShowDialog<string?>(parent);
return string.IsNullOrWhiteSpace(result) ? null : result;
}
}