public void RunChemicalCycle() { Task.Factory.StartNew(() => { ChemicalCycleRunning = true; Jet1 = JetSpeed.One; // Put jets 1 into speed 1 Jet2 = JetSpeed.One; // Turn jets 2 on Console.WriteLine("Jets turned onto speed 1"); Thread.Sleep(10000); Console.WriteLine("Sleeping 5 mins for cycle to complete"); Thread.Sleep(int.Parse(new TimeSpan(0, 0, 2, 0).TotalMilliseconds.ToString())); Jet1 = JetSpeed.Two; Thread.Sleep(int.Parse(new TimeSpan(0, 0, 1, 0).TotalMilliseconds.ToString())); Jet1 = JetSpeed.One; Thread.Sleep(int.Parse(new TimeSpan(0, 0, 2, 0).TotalMilliseconds.ToString())); Jet1 = JetSpeed.Off; Jet2 = JetSpeed.Off; Console.WriteLine("Jet cycle complete"); ChemicalCycleRunning = false; }); }
public BalboaHotTub Set_Jet2(string value) { Jet2 = (JetSpeed)Enum.Parse(typeof(JetSpeed), value); _panelInfoRawData = null; return(this); }