コード例 #1
0
        private void Mode_auto_Click(object sender, RoutedEventArgs e)
        {
            if (port.GetMode_Auto_Etat() == false)
            {
                mode_auto.Background = new SolidColorBrush(Color.FromArgb(127, 255, 0, 0));
                mode_auto.Content    = "Mode Automatique : activé";
                port.SetMode_Auto_Etat(true);
                port.allumerGpio();
            }

            else
            {
                mode_auto.Background = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0));
                mode_auto.Content    = "Mode Automatique : désactivé";
                port.SetMode_Auto_Etat(false);
                port.eteindreGpio();
            }
        }