private void OnDeleteItem(DetailList_Item obj) { if (DialogHelper.ShowDialog("小提示", "此操作会删除当前层级所有信息,并且暂时没有回退功能!", "删除", "取消")) { uiInfo.layers.Remove(obj.layerInfo); UpdateLists(); if (onLayerDeleted != null) { onLayerDeleted.Invoke(obj.ID); } } }
private void InitDetailItem(int index, DetailList_Item item) { item.onNameChanged = OnItemNameChanged; item.onSelectChanged = OnItemSelected; item.onCreateNewLayerInfo = OnCreateNewLayer; item.onPreview = OnPreviewItem; item.onDelete = OnDeleteItem; item.SetInformation(index, controlTypes, controlDic, uiInfo.layers[index]); if (itemDic.Count > index) { itemDic[index] = item; } else { itemDic.Add(item); } }