static void Main(string[] args) { FiFunctions helpers = new FiFunctions(); helpers.ChangeMode(FiFunctions.FiMode.Measuring); while (helpers.GetMode() != "Standby" || !helpers.StartButtonIsEnabled()) { if (helpers.GetMode() == "Standby") { helpers.ResetErrors(); helpers.ChangeMode(FiFunctions.FiMode.Measuring); } Thread.Sleep(TimeSpan.FromSeconds(30)); } }
static void Main(string[] args) { FiFunctions helpers = new FiFunctions(); while (true) { helpers.ChangeMode(FiFunctions.FiMode.Measuring); Thread.Sleep(TimeSpan.FromHours(1)); helpers.ChangeMode(FiFunctions.FiMode.Standby); Thread.Sleep(TimeSpan.FromMinutes(3)); helpers.ChangeMode(FiFunctions.FiMode.Stop, true); Thread.Sleep(TimeSpan.FromMinutes(3)); helpers.ChangeMode(FiFunctions.FiMode.Standby); Thread.Sleep(TimeSpan.FromMinutes(3)); } }