using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using FurnaceUI.Models; namespace FurnaceUI.Views.Editors { public class RecipeConditionCheckConModeViewModel : FurnaceUIViewModelBase { public string SelectControlMode { get; set; } public bool IsSave { get; set; } = false; public bool IsEnable => CGlobal.RecipeProcessEditViewEnable;//是否是View模式 public bool IsInnerControlChecked { get; set; } public bool IsOutControlChecked { get; set; } protected override void OnInitialize() { base.OnInitialize(); IsInnerControlChecked = SelectControlMode == "Inner Control"; IsOutControlChecked = !IsInnerControlChecked; } public void SelectControlCmd(object cmdName) { SelectControlMode = cmdName.ToString(); } public void Close() { IsSave = false; ((Window)GetView())?.Close(); } public void Accept() { IsSave = true; ((Window)GetView())?.Close(); } } }