1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00
Artemis/src/Artemis.UI/Screens/SurfaceEditor/Dialogs/SurfaceCreateViewModel.cs
SpoinkyNL f1f0abfec5 Input - Polished up UI
Input - Added events to service
2020-11-23 19:41:48 +01:00

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);
}
}
}