private void XmlToAlgIni(string path) { List <string> paramclasslist = ParamSetMgr.GetInstance().GetParamClassList(); Dictionary <string, ParamSet> allparams = ParamSetMgr.GetInstance().GetAllParam(); string strName = ""; try { foreach (var temp in allparams) { if (temp.Value._ParamClass == "算法参数") { if (temp.Key.Contains("] ") && temp.Key.Contains("[")) { string A = temp.Key.Replace(" ", ""); A = temp.Key.Replace("[", ""); string[] value = A.Split(']'); INIHelper.WriteToIni(value[0].Trim(), value[1].Trim(), temp.Value._strParamVal.ToString(), path); } } } } catch (Exception e) { MessageBox.Show($"{strName} 参数异常:{e.Message}", "Warn", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly); } }