private void cbEngineList_SelectedIndexChanged(object sender, EventArgs e) { CEngine engine = FormChess.engineList.GetEngine(cbEngineList.Text); if (engine != null) { locked = true; richTextBox1.Clear(); process.SetProgram($@"{AppDomain.CurrentDomain.BaseDirectory}Engines\{engine.file}", engine.parameters); } }
void SelectEngine() { optionList.list.Clear(); Uciok(); tbEngineName.Text = engine.name; tbParameters.Text = engine.parameters; cbFileList.Text = engine.GetFile(); cbProtocol.Text = CData.ProtocolToStr(engine.protocol); cbModeStandard.Checked = engine.modeStandard; nudElo.Value = Convert.ToInt32(engine.elo); nudTournament.Value = engine.tournament; if ((engine.protocol == CProtocol.uci) && engine.FileExists()) { if (process.SetProgram($@"{AppDomain.CurrentDomain.BaseDirectory}Engines\{engine.file}", engine.parameters) > 0) { process.WriteLine("uci"); } } }