mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
31 lines
705 B
C#
31 lines
705 B
C#
using System.Threading.Tasks;
|
|
using Artemis.UI.Shared.Services;
|
|
using Stylet;
|
|
|
|
namespace Artemis.UI.Screens.SurfaceEditor.Dialogs
|
|
{
|
|
public class SurfaceCreateViewModel : DialogViewModelBase
|
|
{
|
|
private string _surfaceName;
|
|
|
|
public SurfaceCreateViewModel(IModelValidator<SurfaceCreateViewModel> validator) : base(validator)
|
|
{
|
|
}
|
|
|
|
public string SurfaceName
|
|
{
|
|
get => _surfaceName;
|
|
set => SetAndNotify(ref _surfaceName, value);
|
|
}
|
|
|
|
public async Task Accept()
|
|
{
|
|
await ValidateAsync();
|
|
|
|
if (HasErrors)
|
|
return;
|
|
|
|
Session.Close(SurfaceName);
|
|
}
|
|
}
|
|
} |