예제 #1
0
        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);
        }
예제 #2
0
        public void RenameFile(string orgName, string newName)
        {
            TableBaseItem file = EnumInfoCollection.GetByName(orgName);

            if (file != null)
            {
                file.Name = newName;
                RemoveFiles.Add(orgName);
            }
        }
예제 #3
0
        public EnumInfo GetEnum(string name)
        {
            TableBaseItem tableBase = EnumInfoCollection.GetByName(name);

            return(tableBase as EnumInfo);
        }