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