Exemple #1
0
 private void Button_Clicked(object sender, EventArgs e)
 {
     if (ent_name.Text != null)
     {
         if (!editMode)
         {
             myBaseSqlite.AddPlayer(new Player(ent_name.Text));
             ent_name.Text = String.Empty;
             LoadItemSource();
         }
         else
         {
             editModel.name = ent_name.Text;
             myBaseSqlite._dbconnection.Update(editModel);
             ent_name.Text = String.Empty;
             LoadItemSource();
             editMode = false;
         }
     }
     else
     {
         DisplayAlert("Info", "Brak imienia!", "OK");
     }
 }