Esempio n. 1
0
        void OnItemPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            ExerciseMap item = sender as ExerciseMap;

            if (item != null)
            {
                db_.Update(item);
            }
        }
Esempio n. 2
0
 public override void Init(SQLiteConnection db)
 {
     // Change the word.
     if (exercises_.Count == 0)
     {
         currentExercise_ = nullExercise_;
     }
     else
     {
         currentExercise_ = exercises_[rand_.Next(exercises_.Count)];
     }
 }
        private void Add_Exercise_Click(object sender, RoutedEventArgs e)
        {
            string
                s1 = TB_Add2.Text.Trim();

            if (s1.Length != 0)
            {
                var
                    todb = new ExerciseMap {
                    Exercise = s1
                };
                words_.InsertSorted(todb, x => x.Exercise);
            }
            TB_Add2.Text = "";
            TB_Add2.Focus();
        }