/// <summary> /// Рекурсивный метод обновления надписей и иконок.. /// </summary> private void UpdateExistCaptionAndIcon(TableMemberInfos infos, int level) { foreach (TableMemberInfo info in infos) { TableMemberInfo infoExist = MemberExists.FindInfo(info); if (infoExist != null) { infoExist.Caption = info.Caption; DBInterface.CreateIcon(infoExist.Item, info); if (info.Items.Count > 0) { UpdateExistCaptionAndIcon(info.Items, level + 1); } } } }
/// <summary> /// Обновления надписей и иконок. /// </summary> public void UpdateExistCaptionAndIcon() { foreach (TableMemberInfo info in MemberInits) { TableMemberInfo infoExist = MemberExists.FindInfo(info); if (infoExist != null) { infoExist.Caption = info.Caption; DBInterface.CreateIcon(infoExist.Item, info); if (info.Items.Count > 0) { UpdateExistCaptionAndIcon(info.Items, 1); } } } DBInterface.TableCaption = DBAttribute.GetCaption(DBInterface.TableType); }