private void btnOK_Click(object sender, EventArgs e) { EngineManager objEngineManager = new EngineManager(); foreach (var item in lstActiveEngine) { objEngineManager.ActivateEngine(item.EngineTitle); } foreach (var item in lstDeActiveEngine) { objEngineManager.DeActivateEngine(item.EngineTitle); } this.Close(); }