/// <summary> /// 编辑AI参数 /// </summary> /// <param name="currentRow">当前数据行</param> private void EditAIParameter(DataGridViewRow currentRow) { int npcIndex = int.Parse(currentRow.Cells["nIndex"].Value.ToString()); string infoString = ""; baseDoc.DocLogical.GetNpcAIParameterInfo(npcIndex, ref infoString); if (infoString != "") { Hashtable infoTable = new Hashtable(); string[] tempArray = infoString.Split(new char[] { ';' }, StringSplitOptions.RemoveEmptyEntries); foreach (string s in tempArray) { string[] dataArray = s.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); infoTable[dataArray[0]] = dataArray[1]; } AIParametersEditForm aForm = new AIParametersEditForm(npcIndex, infoTable, new AIParametersEditForm.UpdateAIParameter(UpdateNpcAIParameter)); aForm.ShowDialog(); } }