plugin system docs
custom buttons for plugins calibration functions for Leeform
This commit is contained in:
@@ -24,6 +24,27 @@ namespace VisionBuilder.UI.Common
|
||||
public StatisticsVM StatisticsVm { get; private set; }
|
||||
public PreviewVM PreviewVm { get; private set; }
|
||||
|
||||
public ObservableCollection<ButtonDefinition> DynamicButtons { get; } = new();
|
||||
|
||||
public void AddButton(ButtonDefinition button)
|
||||
{
|
||||
DynamicButtons.Add(button);
|
||||
}
|
||||
|
||||
public void SetButtonVisibility(string key, bool isVisible)
|
||||
{
|
||||
var button = DynamicButtons.FirstOrDefault(b => b.Key == key);
|
||||
if (button != null)
|
||||
button.IsVisible = isVisible;
|
||||
}
|
||||
|
||||
public void RemoveButton(string key)
|
||||
{
|
||||
var button = DynamicButtons.FirstOrDefault(b => b.Key == key);
|
||||
if (button != null)
|
||||
DynamicButtons.Remove(button);
|
||||
}
|
||||
|
||||
[ObservableProperty]
|
||||
private string _currentRecipeName = "Select recipe";
|
||||
|
||||
@@ -147,8 +168,6 @@ namespace VisionBuilder.UI.Common
|
||||
public async Task Start()
|
||||
{
|
||||
|
||||
|
||||
|
||||
IsRunning = true;
|
||||
await Task.Run(() => { _recognitionControl.Start(); });
|
||||
_handlingEnabled = true;
|
||||
|
||||
Reference in New Issue
Block a user