RecipeLayoutMonitorWaferReplaceViewModel.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. using Aitex.Core.RT.SCCore;
  2. using Caliburn.Micro;
  3. using Caliburn.Micro.Core;
  4. using MECF.Framework.Common.DataCenter;
  5. using MECF.Framework.Common.RecipeCenter;
  6. using MECF.Framework.UI.Client.CenterViews.Editors.Recipe;
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Collections.ObjectModel;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using System.Windows;
  14. using FurnaceUI.Models;
  15. using FurnaceUI.Views.Parameter;
  16. using FurnaceUI.Views.Recipes;
  17. using System.Windows.Controls;
  18. using FurnaceUI.Views.DataLog;
  19. using FurnaceUI.Client.Dialog;
  20. namespace FurnaceUI.Views.Editors
  21. {
  22. public class RecipeLayoutMonitorWaferReplaceViewModel : FurnaceUIViewModelBase
  23. {
  24. private string _monitorWaferFillReplace = "None";
  25. public string MonitorWaferFillReplace
  26. {
  27. get => _monitorWaferFillReplace;
  28. set
  29. {
  30. _monitorWaferFillReplace = value;
  31. NotifyOfPropertyChange(nameof(MonitorWaferFillReplace));
  32. }
  33. }
  34. private string _monitorWaferShort = "None";
  35. public string MonitorWaferShort
  36. {
  37. get => _monitorWaferShort;
  38. set
  39. {
  40. _monitorWaferShort = value;
  41. NotifyOfPropertyChange(nameof(MonitorWaferShort));
  42. }
  43. }
  44. public bool IsSave { get; set; }
  45. public RecipeLayoutMonitorWaferReplaceViewModel()
  46. {
  47. }
  48. public bool IsEnable => CGlobal.RecipeProcessEditViewEnable;//是否是View模式
  49. public void TextSelectCmdMouseDown(string cmd, object obj)
  50. {
  51. WindowManager wm = new WindowManager();
  52. SelectExistViewModel selectExistViewModel = new SelectExistViewModel();
  53. var ConText = (TextBox)obj;
  54. bool? dialogReturn = wm.ShowDialogWithTitle(selectExistViewModel, null, "Select");
  55. if ((bool)dialogReturn)
  56. {
  57. if (cmd == "WaferFill")
  58. {
  59. MonitorWaferFillReplace = selectExistViewModel.DialogResultString;
  60. }
  61. else if (cmd == "WaferShort")
  62. {
  63. MonitorWaferShort= selectExistViewModel.DialogResultString;
  64. }
  65. }
  66. }
  67. public string RecipeType { get; set; }
  68. protected override void OnViewLoaded(object view)
  69. {
  70. base.OnViewLoaded(view);
  71. LoadData();
  72. }
  73. private void LoadData()
  74. {
  75. }
  76. public void TempSetSave()
  77. {
  78. IsSave = true;
  79. ((Window)GetView()).DialogResult = true;
  80. }
  81. public void TempSetCancel()
  82. {
  83. IsSave = false;
  84. ((Window)GetView()).DialogResult = false;
  85. }
  86. }
  87. }