コード例 #1
0
 void AddingRule(string rule, bool b, int score)
 {
     if (current >= sors.Count || !run)
     {
         return;
     }
     sors[current].Pravila.Add(LastInput = new Pravila()
     {
         Name = rule, Score = score.ToString(), id_uchast = b ? sors[current].White : sors[current].Red, Time = time
     });
     QueryBD.bd.SaveChanges();
     UpdateRules();
 }
コード例 #2
0
 void ResetInput_Click(object o, RoutedEventArgs e)
 {
     if (current >= sors.Count || LastInput == null)
     {
         return;
     }
     sors[current].Pravila.Remove(LastInput);
     LastInput = null;
     QueryBD.bd.SaveChanges();
     UpdateRules();
     if (current < sors.Count)
     {
         QueryBD.champ.Update(sors[current], current + 1 < sors.Count ? sors[current + 1] : null);
     }
 }