plugin system docs
custom buttons for plugins calibration functions for Leeform
This commit is contained in:
@@ -3,6 +3,7 @@ using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using CommunityToolkit.Mvvm.Input;
|
||||
using VisionBuilder.UI.Common.Commands;
|
||||
using VisionBuilder.UI.Common.Commands.Interfaces;
|
||||
using VisionBuilder.UI.Common.ViewModel.Classes;
|
||||
using VisionBuilder.UI.Common.ViewModel.Interfaces.UI;
|
||||
|
||||
namespace VisionBuilder.UI.Common.ViewModel;
|
||||
@@ -25,6 +26,27 @@ public partial class MainWindowVM:ObservableObject
|
||||
public ObservableCollection<SingleCameraVM> SingleCameraVms { get; set; } =
|
||||
new ObservableCollection<SingleCameraVM>();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
[RelayCommand]
|
||||
public async Task Settings()
|
||||
|
||||
Reference in New Issue
Block a user