123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using FurnaceUI.Models;
- using MECF.Framework.UI.Client.CenterViews.Editors.Recipe;
- using System.Windows;
- namespace FurnaceUI.Views.Editors
- {
- public class RecipeHeaderViewModel : FurnaceUIViewModelBase
- {
- public bool IsSave { get; set; }
- public RecipeHeaderViewModel()
- {
- }
- public Combination CombinationData { get; set; } = new Combination();
- public bool IsEnable => CGlobal.RecipeProcessEditViewEnable;//是否是View模式
- public string RecipeType { get; set; }
- private string _cmbN2Purge;
- public string CmbN2Purge
- {
- get => _cmbN2Purge;
- set
- {
- _cmbN2Purge = value;
- NotifyOfPropertyChange(nameof(CmbN2Purge));
- }
- }
- protected override void OnViewLoaded(object view)
- {
- base.OnViewLoaded(view);
- LoadData();
- }
- private void LoadData()
- {
- if (CombinationData != null)
- {
- CmbN2Purge = CombinationData.N2PurgeMode;
- }
- }
- public void TempSetSave()
- {
- IsSave = true;
- if (CombinationData != null)
- {
- CombinationData.N2PurgeMode = CmbN2Purge;
- }
- ((Window)GetView()).DialogResult = true;
- }
- public void TempSetCancel()
- {
- IsSave = false;
- ((Window)GetView()).DialogResult = false;
- }
- }
- }
|