1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Artemis/src/Avalonia/Artemis.UI.Shared/Plugins/PluginConfigurationViewModel.cs
Robert f38a9e9e55 Rename Avalonia projects
Add Avalonia platform projects
2021-11-18 00:18:13 +01:00

38 lines
1.1 KiB
C#

using System;
using Artemis.Core;
namespace Artemis.UI.Shared
{
/// <summary>
/// Represents a view model for a plugin configuration window
/// </summary>
public abstract class PluginConfigurationViewModel : ViewModelBase, IPluginConfigurationViewModel
{
/// <summary>
/// Creates a new instance of the <see cref="PluginConfigurationViewModel" /> class
/// </summary>
/// <param name="plugin"></param>
protected PluginConfigurationViewModel(Plugin plugin)
{
Plugin = plugin;
}
/// <summary>
/// Gets the plugin this configuration view model is associated with
/// </summary>
public Plugin Plugin { get; }
/// <summary>
/// Closes the window hosting the view model
/// </summary>
public void Close()
{
CloseRequested?.Invoke(this, EventArgs.Empty);
}
/// <summary>
/// Occurs when the the window hosting the view model should close
/// </summary>
public event EventHandler? CloseRequested;
}
}