private void CPV_Command_automode_Click(object sender, RoutedEventArgs e) { if (Tag.get_CPV_automode()) { Tag.CPV_auto_mode_on(false); } else { Tag.CPV_auto_mode_on(true); } }