Exemple #1
0
        private void ContactorsButton_Click(object sender, EventArgs e)
        {
            if (batteryService.IsContactorsEngaged)
            {
                batteryService.DisengageContactors();
            }
            else
            {
                batteryService.DisengageContactors();
            }

            UpdateButtonText();
        }
        private async void ContactorsButton_ClickAsync(object sender, EventArgs e)
        {
            if (batteryService.IsContactorsEngaged)
            {
                batteryService.DisengageContactors();
            }
            else
            {
                await batteryService.EngageContactors().ConfigureAwait(false);
            }

            UpdateButtonText();
        }