⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rearrangehash.cs

📁 破解的飞信源代码
💻 CS
字号:
namespace Imps.Client.Pc.Controls
{
    using System;
    using System.Collections.Generic;

    public class ReArrangeHash
    {
        public static void Add(Dictionary<int, char> rawHash, int hashKey, char hashValue)
        {
            if (hashKey >= rawHash.get_Count())
            {
                rawHash.Add(hashKey, hashValue);
            }
            else
            {
                for (int i = rawHash.get_Count() - 1; i >= hashKey; i--)
                {
                    char ch;
                    rawHash.TryGetValue(i, ref ch);
                    rawHash.Remove(i);
                    rawHash.Add(i + 1, ch);
                }
                rawHash.Add(hashKey, hashValue);
            }
        }

        public static void Remove(Dictionary<int, char> rawHash, int hashKey)
        {
            Remove(rawHash, hashKey, 1);
        }

        public static void Remove(Dictionary<int, char> rawHash, int startHashKey, int selectedHashCount)
        {
            int num = rawHash.get_Count();
            if ((startHashKey + selectedHashCount) >= num)
            {
                for (int i = num - 1; i >= startHashKey; i--)
                {
                    rawHash.Remove(i);
                }
            }
            else
            {
                for (int j = startHashKey; j <= ((startHashKey + selectedHashCount) - 1); j++)
                {
                    rawHash.Remove(j);
                }
                for (int k = startHashKey + selectedHashCount; k < num; k++)
                {
                    char ch;
                    rawHash.TryGetValue(k, ref ch);
                    rawHash.Remove(k);
                    rawHash.Add(k - selectedHashCount, ch);
                }
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -