mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
27 lines
662 B
C#
27 lines
662 B
C#
using System;
|
|
using Avalonia.Interactivity;
|
|
using Avalonia.Markup.Xaml;
|
|
using Avalonia.ReactiveUI;
|
|
using Avalonia.Threading;
|
|
|
|
namespace Artemis.UI.Screens.Plugins;
|
|
|
|
public partial class PluginView : ReactiveUserControl<PluginViewModel>
|
|
{
|
|
public PluginView()
|
|
{
|
|
InitializeComponent();
|
|
EnabledToggle.Click += EnabledToggleOnClick;
|
|
}
|
|
|
|
|
|
private void EnabledToggleOnClick(object? sender, RoutedEventArgs e)
|
|
{
|
|
Dispatcher.UIThread.Post(() => ViewModel?.UpdateEnabled(!ViewModel.Plugin.IsEnabled));
|
|
}
|
|
|
|
private void FlyoutBase_OnOpening(object? sender, EventArgs e)
|
|
{
|
|
ViewModel?.CheckPrerequisites();
|
|
}
|
|
} |