private void AddItems(List <Json.DataObject> objs, int index, bool select, bool report = true) { IList list = CurrentList; if (objs.Count == 0 || list == null) { return; } CreateEditAction action = new CreateEditAction(true, Index.RemoveNext(), Index.RemoveNext()); foreach (Json.DataObject item in objs) { CurrentList.Insert(index, item); listBoxList.Items.Insert(index, SafeName(item)); action.objects.Add(index, item); index++; } index--; if (select) { listBoxList.SelectedIndices.Clear(); this.listBoxList.SelectedIndex = index; } action.Index1.itemIndex = index; if (report && OnObjectEdited != null) { OnObjectEdited(this, action); } }