//Add button pressed.. private void AddButton_Click(object sender, RoutedEventArgs e) { leftPanel.IsEnabled = true; toggleRightButtons(false); currentMode = mode.ADD; lblMode.Content = "Mode: " + currentMode.ToString(); }
private void StartEditView(bool newItem) { var trans = SupportFragmentManager.BeginTransaction(); var nextFragment = new EditFragment(); Bundle args = new Bundle(); args.PutBoolean("newItem", newItem); args.PutString("viewMode", viewMode.ToString()); if (!newItem) { args.PutInt("itemId", itemId); } nextFragment.Arguments = args; trans.Replace(Resource.Id.fragmentContainer_activityEditOrView, nextFragment, "ExerciseEditFragment"); if (!newItem) { trans.AddToBackStack(null); } trans.Commit(); }
public bool powerdown(mode m) { String commande; bool retour = false; byte[] buffer = new byte[100]; if (m_port.IsOpen) { commande = m.ToString() + ",powerdown\r\n"; buffer = System.Text.Encoding.UTF8.GetBytes(commande); m_port.Write(buffer, 0, commande.Length); retour = true; } return(retour); }
public bool powerdown(mode m) { //Envoie de la commande pour arrêter les moteurs en mode drive ou Turn String commande; bool retour = false; byte[] buffer = new byte[100]; if (m_port.IsOpen) { commande = m.ToString() + ",powerdown\r\n"; buffer = System.Text.Encoding.UTF8.GetBytes(commande); m_port.Write(buffer, 0, commande.Length); retour = true; } return(retour); }
public void buyCurrent() { var index = PlayerPrefs.GetInt(Mode.ToString(), -1); PlayerPrefs.SetInt(Mode.ToString(), index + 1); }
public void changeMode(mode m) { currMode = m.ToString(); status(); }