private static void refreshAllConfList(ConfListChangeType type, string confName, string oldName = "") { for (int i = 0; i < formList.Count; i++) { TransferForm form = formList[i]; form.refreshConfList(type, confName, oldName); } }
private void refreshConfList(ConfListChangeType type, string confName, string oldName = "") { if (type == ConfListChangeType.Add) { confList.Items.Add(confName); } else if (type == ConfListChangeType.Delete) { confList.Items.Remove(confName); } else if (type == ConfListChangeType.Rename) { int index = confList.Items.IndexOf(oldName); if (index != -1) { confList.Items[index] = confName; } } }