Sic04/FrameworkLocal/UIClient/CenterViews/Editors/RecipeSequenceSelectDialogV...

42 lines
1.0 KiB
C#

using System.Collections.ObjectModel;
using OpenSEMI.ClientBase;
namespace MECF.Framework.UI.Client.CenterViews.Editors.Sequence
{
public class RecipeSequenceSelectDialogViewModel : DialogViewModel<string>
{
public void TreeSelectChanged(FileNode file)
{
this.currentFileNode = file;
}
public void TreeMouseDoubleClick(FileNode file)
{
this.currentFileNode = file;
OK();
}
public void OK()
{
if (this.currentFileNode!=null)
{
if (this.currentFileNode.IsFile)
{
this.DialogResult = this.currentFileNode.FullPath.Trim();
IsCancel = false;
TryClose(true);
}
}
}
public void Cancel()
{
IsCancel = true;
TryClose(false);
}
public ObservableCollection<FileNode> Files { get; set; }
private FileNode currentFileNode;
}
}