Routine in Oberfläche
+ Commands reaktiviert + Speichern erkennen
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using BS.Shared.Interface;
|
||||
using DevExpress.DataAccess.DataFederation;
|
||||
using DevExpress.Xpf.Bars.Native;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BS.Shared.Extensions.CustomInterfaces
|
||||
{
|
||||
public static class IAiPromptbausteinTreeExtension
|
||||
{
|
||||
public static bool IsExecutable(this IAiPromptbaustein aiPromptbaustein)
|
||||
=> aiPromptbaustein.IsPrompt() || aiPromptbaustein.IsKette();
|
||||
|
||||
|
||||
public static bool IsOrdner(this IAiPromptbaustein aiPromptbaustein)
|
||||
=> aiPromptbaustein.hasPrompttype(AiPromptbausteinType.Ordner);
|
||||
|
||||
public static bool IsKette(this IAiPromptbaustein aiPromptbaustein)
|
||||
=> aiPromptbaustein.hasPrompttype(AiPromptbausteinType.Kette);
|
||||
|
||||
public static bool IsPrompt(this IAiPromptbaustein aiPromptbaustein)
|
||||
=> aiPromptbaustein.hasPrompttype(AiPromptbausteinType.Prompt);
|
||||
|
||||
|
||||
|
||||
private static bool hasPrompttype(this IAiPromptbaustein aiPromptbaustein, AiPromptbausteinType aiPromptbausteinType)
|
||||
=> aiPromptbaustein.isObject() && aiPromptbaustein.PromptbausteinType == aiPromptbausteinType;
|
||||
|
||||
private static bool isObject(this IAiPromptbaustein aiPromptbaustein)
|
||||
=> aiPromptbaustein != null;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user