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.Operations { public class BoatElevatorParametersViewModel : FurnaceUIViewModelBase { public int point1Count { get; set; } public int point2Count { get; set; } public int point3Count { get; set; } public int point4Count { get; set; } public int point5Count { get; set; } public int point6Count { get; set; } private bool _RecipeControl1; public bool RecipeControl1 { get => _RecipeControl1; set { _RecipeControl1 = value; NotifyOfPropertyChange("RecipeControl1"); } } private bool _RecipeControl2; public bool RecipeControl2 { get => _RecipeControl2; set { _RecipeControl2 = value; NotifyOfPropertyChange("RecipeControl2"); } } private bool _RecipeControl3; public bool RecipeControl3 { get => _RecipeControl3; set { _RecipeControl3 = value; NotifyOfPropertyChange("RecipeControl3"); } } private bool _RecipeControl4; public bool RecipeControl4 { get => _RecipeControl4; set { _RecipeControl4 = value; NotifyOfPropertyChange("RecipeControl4"); } } private bool _RecipeControl5; public bool RecipeControl5 { get => _RecipeControl5; set { _RecipeControl5 = value; NotifyOfPropertyChange("RecipeControl5"); } } private bool _RecipeControl6; public bool RecipeControl6 { get => _RecipeControl6; set { _RecipeControl6 = value; NotifyOfPropertyChange("RecipeControl6"); } } public void RecipeControlCheck(string value) { switch (value) { case "1": point1Count++; if (point1Count % 2 == 0) RecipeControl1 = false; else RecipeControl1 = true; break; case "2": point2Count++; if (point2Count % 2 == 0) RecipeControl2 = false; else RecipeControl2 = true; break; case "3": point3Count++; if (point3Count % 2 == 0) RecipeControl3 = false; else RecipeControl3 = true; break; case "4": point4Count++; if (point4Count % 2 == 0) RecipeControl4 = false; else RecipeControl4 = true; break; case "5": point5Count++; if (point5Count % 2 == 0) RecipeControl5 = false; else RecipeControl5 = true; break; case "6": point6Count++; if (point6Count % 2 == 0) RecipeControl6 = false; else RecipeControl6 = true; break; default: break; } } public void Close() { ((Window)GetView())?.Close(); } } }