This repository has been archived on 2024-01-02. You can view files and clone it, but cannot push or open issues or pull requests.
Sic06/FrameworkLocal/UIClient/CenterViews/Editors/InputFileNameDialogViewMode...

35 lines
876 B
C#

using System.Windows.Input;
using OpenSEMI.ClientBase;
namespace MECF.Framework.UI.Client.CenterViews.Editors
{
public class InputFileNameDialogViewModel : DialogViewModel<string>
{
public InputFileNameDialogViewModel(string dialogName = "")
{
this.DisplayName = dialogName;
}
public string FileName { get; set; }
public void Cancel()
{
IsCancel = true;
TryClose(false);
}
protected override void OnViewLoaded(object view)
{
base.OnViewLoaded(view);
InputFileNameDialogView v = (InputFileNameDialogView)view;
FocusManager.SetFocusedElement(v, v.tbName);
}
public void OK()
{
this.DialogResult = FileName;
IsCancel = false;
TryClose(true);
}
}
}