SequenceDialogViewModel.cs 926 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System.Collections.ObjectModel;
  2. using OpenSEMI.ClientBase;
  3. using VirgoUI.Client.Models.Recipe;
  4. namespace VirgoUI.Client.Models.Operate.WaferAssociation
  5. {
  6. public class SequenceDialogViewModel : DialogViewModel<string>
  7. {
  8. public void TreeSelectChanged(FileNode file)
  9. {
  10. this.currentFileNode = file;
  11. }
  12. public void OK()
  13. {
  14. if (this.currentFileNode != null)
  15. {
  16. if (this.currentFileNode.IsFile)
  17. {
  18. this.DialogResult = this.currentFileNode.FullPath;
  19. IsCancel = false;
  20. TryClose(true);
  21. }
  22. }
  23. }
  24. public void Cancel()
  25. {
  26. IsCancel = true;
  27. TryClose(false);
  28. }
  29. public ObservableCollection<FileNode> Files { get; set; }
  30. private FileNode currentFileNode;
  31. }
  32. }