Beispiel #1
0
 private void OkButton_Click(object sender, EventArgs e) //Знаю
 {
     Global.QSet[i].ratio = string.Concat(Global.QSet[i].ratio, "Y");
     if (Global.QSet[i].ratio.Length > 4)
     {
         Global.QSet[i].ratio = Global.QSet[i].ratio.Remove(0, 1);
     }
     if (Global.QSet[i].Queue_name == "A")
     {
         Global.CorrectErrorInQueue("A", 1);
         Global.QSet[i].Queue_place = Global.LastPlaceInQueue("B");
         Global.QSet[i].Queue_name  = "B";
     }
     else
     {
         Global.CorrectErrorInQueue(Global.QSet[i].Queue_name, 1);
         Global.QSet[i].Queue_name  = "Debug";
         Global.QSet[i].Queue_place = Global.LastPlaceInQueue("C");
         Global.QSet[i].Queue_name  = "C";
     }
     i = ChooseQuestion();
     QuestionShow.Text = Global.QSet[i].Text;//+"/" + Global.QSet[i].Queue_name+ "-" + Global.QSet[i].Queue_place + "-" + Global.QSet[i].ratio + "-" + Global.GetRatio(Global.QSet[i].ratio);
     NQ.Text           = "Вопрос №" + Global.QSet[i].id;
     showRating.Text   = "Выучен на: " + Global.GetRatio(Global.QSet[i].ratio);
 }
Beispiel #2
0
 private void Delete_Click(object sender, EventArgs e)
 {
     foreach (DataGridViewRow r in dataGridView1.SelectedRows)
     {
         string          ind = r.Cells[0].Value.ToString();
         Global.Question New = new Global.Question();
         New = Global.QSet.Find(p => p.id == ind);
         dataGridView1.Rows.Remove(r);
         Global.CorrectErrorInQueue(New.Queue_name, New.Queue_place);
         Global.QSet.Remove(New);
     }
     textBox1.Text = (MaxIndex(Global.QSet) + 1) + "";
     if (Global.QSet.Count == 0)
     {
         Delete.BackColor = Color.Gray;
         Delete.Enabled   = false;
         Change.BackColor = Color.Gray;
         Change.Enabled   = false;
     }
 }