Exemplo n.º 1
0
 private void butClearHistory_Click(object sender, EventArgs e)
 {
     if (engine != null)
     {
         engine.hisElo.list.Clear();
         engine.SaveToIni();
         int count = CModeTournamentE.tourList.DeletePlayer(engine.name);
         MessageBox.Show($"{count} records have been deleted");
     }
 }
Exemplo n.º 2
0
        void SaveToIni(CEngine e)
        {
            e.name         = tbEngineName.Text;
            e.file         = cbFileList.Text;
            e.protocol     = CData.StrToProtocol(cbProtocol.Text);
            e.parameters   = tbParameters.Text;
            e.modeStandard = cbModeStandard.Checked;
            e.elo          = nudElo.Value.ToString();
            e.tournament   = (int)nudTournament.Value;
            e.options      = GetOptions();
            e.SaveToIni();
            UpdateListBox();
            int index = listBox1.FindString(e.name);

            if (index == -1)
            {
                return;
            }
            listBox1.SetSelected(index, true);
        }