private void ModResource_DataDragDrop(object sender, DataDragDropEventArgs e)
        {
            var target = ((FrameworkElement)sender).Tag as DEModResource;

            if (target == null)
            {
                return;
            }
            // 如果拖入的是文件列表
            if (e.Data.IsTargetType(DataFormats.FileDrop))
            {
                int insertIndex = ModManager.CurrentModPack.Resources.IndexOf(target);
                if (e.Direction == Direction.Down)
                {
                    insertIndex += 1;
                }
                ModManager.CurrentModPack?.TipToInsertResources(insertIndex, (string[])e.Data.GetData(DataFormats.FileDrop));
                return;
            }
            // 否则视为资源排序
            var source = e.Data.GetData(typeof(DEModResource)) as DEModResource;

            if (source == null)
            {
                return;
            }
            int newIndex = ModManager.CurrentModPack.Resources.IndexOf(target);

            if (e.Direction == Direction.Down)
            {
                newIndex += 1;
            }
            ModManager.CurrentModPack.ResortResource(newIndex, source);
        }
        private void ModPack_DataDragDrop(object sender, DataDragDropEventArgs e)
        {
            var source = e.Data.GetData(typeof(DEModPack)) as DEModPack;

            if (source == null)
            {
                return;
            }
            var target = ((FrameworkElement)sender).Tag as DEModPack;

            if (target == null)
            {
                return;
            }
            int newIndex = ModManager.ModPacks.IndexOf(target);

            switch (e.Direction)
            {
            case Direction.Left:
                break;

            case Direction.Right:
                newIndex += 1;
                break;
            }
            ModManager.ResortModPack(newIndex, source);
        }