private void BaseList_DragInsert(object sender, DragInsertEventArgs e) { TableBaseItem dragFrom = e.DragFrom as TableBaseItem; TableBaseItem dragTo = e.DragTo as TableBaseItem; if (dragFrom == null || dragTo == null) { return; } int itemIdx = _ConstructFile.ConstructItems.IndexOf(dragFrom); int pos = _ConstructFile.ConstructItems.IndexOf(dragTo); if (itemIdx < pos) { --pos; } if (!e.IsDropFront) { ++pos; } _ConstructFile.ConstructItems.MovePosToPos(itemIdx, pos); }
public void RenameFile(string orgName, string newName) { TableBaseItem file = EnumInfoCollection.GetByName(orgName); if (file != null) { file.Name = newName; RemoveFiles.Add(orgName); } }
public EnumInfo GetEnum(string name) { TableBaseItem tableBase = EnumInfoCollection.GetByName(name); return(tableBase as EnumInfo); }