private void FormBook_Shown(object sender, EventArgs e) { FormOptions.SetFontSize(this); cbBookReaderList.Items.Clear(); foreach (string book in CData.fileBook) { cbBookReaderList.Items.Add(book); } UpdateListBox(); if (listBox1.Items.Count > 0) { listBox1.SetSelected(0, true); } }
private void FormPlayer_Shown(object sender, EventArgs e) { FormOptions.SetFontSize(this); cbEngineList.Items.Clear(); cbEngineList.Items.Add("Human"); foreach (CEngine engine in FormChess.engineList.list) { cbEngineList.Items.Add(engine.name); } cbBookList.Items.Clear(); cbBookList.Items.Add("None"); foreach (CBook book in FormChess.bookList.list) { cbBookList.Items.Add(book.name); } UpdateListBox(); if (listBox1.Items.Count > 0) { listBox1.SetSelected(0, true); } }
private void FormEngine_Shown(object sender, EventArgs e) { FormOptions.SetFontSize(this); CData.UpdateFileEngine(); cbFileList.Items.Clear(); foreach (string engine in CData.fileEngine) { cbFileList.Items.Add(engine); } foreach (string engine in CData.fileEngineUci) { cbFileList.Items.Add($@"Uci\{engine}"); } foreach (string engine in CData.fileEngineWb) { cbFileList.Items.Add($@"Winboard\{engine}"); } UpdateListBox(); if (listBox1.Items.Count > 0) { listBox1.SetSelected(0, true); } }