using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; using System.Text; using System.Threading.Tasks; namespace EPD.Data { public class StepItem: NotifyObject { private string index; public string Index { get => index; set => Set(ref index, value, "Index"); } private bool running = false; public bool Running { get => running; set => Set(ref running, value, "Running"); } public string Name { get; set; } public int SelectedEndByIndex { get; set; } private List configs; public List Configs { get => configs; set => Set(ref configs, value, "Configs"); } public string SelectedConfig { get; set; } private double currentTime; public double CurrentTime { get => currentTime; set => Set(ref currentTime, value, "CurrentTime"); } public string MaxTime { get; set; } public string Time { get; set; } public bool ErrorIfNoEPD { get; set; } private int epdStatus; public int EPDStatus { get => epdStatus; set => Set(ref epdStatus, value, "EPDStatus"); } public StepItem(string name) { Name = name; SelectedEndByIndex = 0; MaxTime = "10"; } public static void Sort(Collection items) { for (int i = 0; i < items.Count; i++) items[i].Index = $"Step {i + 1}"; } public static void UpdateConfigs(Collection items, List configs) { for (int i = 0; i < items.Count; i++) items[i].Configs = configs; } } }