コード例 #1
0
 private void btnDeleteList_Click(object sender, EventArgs e)
 {
     if (btnDeleteList.BackColor == Variables.enabledColor)
     {
         var frm = new frmDelete(false)
         {
             StartPosition = FormStartPosition.CenterParent
         };
         frm.ShowDialog();
         cbTopic.Items.Remove(frm.Title);
         UpdateComboBox();
         if (Variables.sections.Count > 0)
         {
             cbTopic.SelectedIndex = 0;
         }
         else
         {
             Variables.words        = new List <string>();
             Variables.titleSection = string.Empty;
             lbSection.Text         = string.Empty;
             UpdateButtons();
         }
         FillField(true);
         UpdateLabels();
     }
 }
コード例 #2
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     if (btnDelete.BackColor == Variables.enabledColor)
     {
         var frm = new frmDelete
         {
             StartPosition = FormStartPosition.CenterParent
         };
         frm.ShowDialog();
         FillField(true);
         if (Variables.words.Count == 0)
         {
             btnDelete.BackColor = Variables.disabledColor;
         }
     }
 }