예제 #1
0
 public void TempUsePara(IPara para)
 {
     if (map.ContainsKey(DEFAULT))
     {
         map[DEFAULT].GetParameters().TempUse(para);
     }
 }
예제 #2
0
    public CharacterPlayer loadDictionaries(List <NewSkill> heroskills, List <NewSkill> enemyskills, List <AbnormalStatus> abs)
    {
        foreach (NewSkill _tempSkill in heroskills)
        {
            if (!newSkillDic.ContainsKey("Skill" + _tempSkill.data["idInit"].AsInt))
            {
                newSkillDic.Add("Skill" + _tempSkill.data["idInit"].AsInt, _tempSkill.clone());
                newSkillDicOfCharacter.Add("Skill" + _tempSkill.data["idInit"].AsInt, _tempSkill.clone());
            }
        }

        foreach (NewSkill _tempSkill in enemyskills)
        {
            if (!newSkillDic.ContainsKey("Skill" + _tempSkill.data["idInit"].AsInt))
            {
                newSkillDic.Add("Skill" + _tempSkill.data["idInit"].AsInt, _tempSkill.clone());
            }
        }

        foreach (AbnormalStatus _tempAbs in abs)
        {
            abDic.Add("AS" + _tempAbs.data["idInit"].AsInt, _tempAbs.clone());
        }
        return(this);
    }
예제 #3
0
        public void PomakniFlote()
        {
            foreach (PokretnaFlota flota in flotePokretne)
            {
                double brzina = procjenaBrzineFlote(flota.brodovi.Values);
                if (flota.polaznaZvj.crvotocine.Contains(flota.odredisnaZvj))
                {
                    brzina += efekti["BRZINA_CRVOTOCINA"];
                }

                if (flota.primakniCilju(brzina))
                {
                    if (floteStacionarne.ContainsKey(flota.odredisnaZvj))
                    {
                        floteStacionarne[flota.odredisnaZvj].dodajBrodove(flota);
                    }
                    else
                    {
                        Flota flotaStac = new Flota(flota.odredisnaZvj, noviIdFlote());
                        flotaStac.dodajBrodove(flota);
                        floteStacionarne.Add(flota.odredisnaZvj, flotaStac);
                    }
                    posjeceneZvjezde.Add(flota.odredisnaZvj);
                    flotePokretne.PendRemove(flota);
                }
            }
            flotePokretne.ApplyRemove();

            prebrojiBrodove();
        }
예제 #4
0
 public virtual void AddEffect(ISkillEffect effect)
 {
     if (!map.ContainsKey(effect.GetKey()))
     {
         map[effect.GetKey()] = new EffectSet();
     }
     map[effect.GetKey()].AddSkillEffect(effect);
 }
예제 #5
0
    void Start()
    {
        d.Add("test1", null);
        d.Add("test2", null);

        Debug.Log(d.ContainsKey("test1"));
        Debug.Log(d.ContainsKey("test2"));
        Debug.Log(d.ContainsKey("test3"));
    }
예제 #6
0
        public void AddField(string name, string field, string alias)
        {
            if (!fieldDic.ContainsKey(name))
            {
                fieldDic[name] = new MyDictionary <string, string>();
            }

            fieldDic[name][alias] = field;
        }
예제 #7
0
        public void AddAttribue(string name, string field, string alias)
        {
            if (!attrDic.ContainsKey(name))
            {
                attrDic[name] = new MyDictionary <string, string>();
            }

            attrDic[name][alias] = field;
        }
예제 #8
0
        public virtual void AddTrigger(GameTrigger trigger)
        {
            if (!triggers.ContainsKey(trigger.GetKey()))
            {
                triggers[trigger.GetKey()] = new List <GameTrigger>();
            }
            IList <GameTrigger> tList = triggers[trigger.GetKey()];

            tList.Add(trigger);
        }
예제 #9
0
        public void AddItems_Test()
        {
            dict.Add(0, 00);
            dict.Add(1, 11);
            dict.Add(2, 22);

            Assert.AreEqual(3, dict.Count);
            Assert.AreEqual(true, dict.ContainsKey(0));
            Assert.AreEqual(true, dict.ContainsKey(1));
            Assert.AreEqual(true, dict.ContainsKey(2));
        }
예제 #10
0
        public void ContanceKeyTest()
        {
            MyDictionary <int, int> dictionary = new MyDictionary <int, int>();

            dictionary.Add(10, 25);
            dictionary.Add(15, 50);
            dictionary.Add(20, 99);
            Assert.IsTrue(dictionary.ContainsKey(10));
            Assert.IsTrue(dictionary.ContainsKey(15));
            Assert.IsTrue(dictionary.ContainsKey(20));
            Assert.IsFalse(dictionary.ContainsKey(50));
            Assert.IsFalse(dictionary.ContainsKey(0));
        }
예제 #11
0
        public void ContainsKeyWorks()
        {
            var d = new MyDictionary(new Dictionary <int, string> {
                { 3, "b" }, { 6, "z" }, { 9, "x" }
            });
            var di2 = (IDictionary <int, string>)d;

            Assert.True(d.ContainsKey(9));
            Assert.True(di2.ContainsKey(3));

            Assert.False(d.ContainsKey(923));
            Assert.False(di2.ContainsKey(353));
        }
    // Use this for initialization
    void Start()
    {
        myDict = new MyDictionary <string, float>();

        myDict.Add("Test1", 1f);
        myDict.Add("Test2", 2f);

        Debug.Log(myDict.ContainsKey("Test1"));
        Debug.Log(myDict.ContainsKey("Nope"));

        Debug.Log(myDict["Test1"]);
        Debug.Log(myDict[2]);
    }
예제 #13
0
        public static ItemDrop[] GetDropItems(string cat, int count, int mapId)
        {
            Initial(mapId);

            List <ItemDrop> items = new List <ItemDrop>();

            if (catDic.ContainsKey(cat))
            {
                return(catDic[cat].GetItems(count));
            }

            return(new ItemDrop[0]);
        }
예제 #14
0
        public virtual IParable RemovePara(string key)
        {
            IParable para = this.map[key];

            this.map.Remove(key);

            this.directMap.Remove(key);
            if (temp.ContainsKey(key))
            {
                this.temp.Remove(key);
            }

            return(para);
        }
예제 #15
0
 public virtual IPara GetValue(string key)
 {
     if (!map.ContainsKey(key))
     {
         if (!number)
         {
             map[key] = new StringPara(key, "null");
         }
         else
         {
             map[key] = new IntPara(key, 0);
         }
     }
     return(map[key]);
 }
예제 #16
0
        public static List <ItemDrop> GetExtraItems(ItemDrop item)
        {
            List <ItemDrop> list = new List <ItemDrop>();

            if (extraDic.ContainsKey(item.cat) && extraDic[item.cat].ContainsKey(item.id))
            {
                CatPriority cp   = extraDic[item.cat][item.id];
                int[]       cats = cp.GetCats(1);
                for (int i = 0; i < cats.Length; i++)
                {
                    if (catDic.ContainsKey(cp.cats[cats[i]]))
                    {
                        int          index        = cats[i];
                        ItemPriority itemPriority = catDic[cp.cats[index]];
                        int          count        = cp.counts[index];

                        for (int j = 0; j < count; j++)
                        {
                            foreach (ItemDrop drop in itemPriority.GetItems(1))
                            {
                                list.Add(drop);
                            }
                        }
                    }
                }
            }

            return(list);
        }
예제 #17
0
        protected internal override void SetIndex(int[] r, int index, object v, MyDictionary <string, int> set)
        {
            Prepare();
            string s = v.ToString();

            if (map.Count == 1 && map.Keys.Iterator().Next().Equals("true"))
            {
                if (!StringUtil.IsNullOrEmpty(s) && !s.Equals("null") && !s.Equals("false"))
                {
                    r[index] = 0;
                }
                else
                {
                    r[index] = -1;
                }
            }
            if (map.ContainsKey(s))
            {
                r[index] = map[s];
            }
            else
            {
                r[index] = REMOVE;
            }
        }
예제 #18
0
 public void LoadEquipmentLevelupConfig(string file, string root)
 {
     m_EquipmentLevelupConfigMgr.CollectDataFromDBC(file, root);
     foreach (EquipmentLevelupConfig cfg in m_EquipmentLevelupConfigMgr.GetData().Values)
     {
         if (m_EquipmentLevelupConfigByTypeLevel.ContainsKey(cfg.m_Type))
         {
             MyDictionary <int, EquipmentLevelupConfig> cfgDict = m_EquipmentLevelupConfigByTypeLevel[cfg.m_Type];
             if (cfgDict.ContainsKey(cfg.m_Level))
             {
                 cfgDict[cfg.m_Level] = cfg;
             }
             else
             {
                 cfgDict.Add(cfg.m_Level, cfg);
             }
         }
         else
         {
             MyDictionary <int, EquipmentLevelupConfig> cfgDict = new MyDictionary <int, EquipmentLevelupConfig>();
             cfgDict.Add(cfg.m_Level, cfg);
             m_EquipmentLevelupConfigByTypeLevel.Add(cfg.m_Type, cfgDict);
         }
     }
 }
예제 #19
0
        public void ContainsKeyExample()
        {
            DictionaryBase <string, int> dictionary = new MyDictionary
            {
                { "cat", 1 },
                { "dog", 2 },
                { "canary", 3 }
            };

            // The dictionary should contain a cat and a dog...
            Assert.IsTrue(dictionary.ContainsKey("cat"));
            Assert.IsTrue(dictionary.ContainsKey("dog"));

            // But definitely not an ostrich.
            Assert.IsFalse(dictionary.ContainsKey("ostrich"));
        }
예제 #20
0
파일: Form1.cs 프로젝트: LinasBushina/repo
 public void take_dictionary()
 {
     using (StreamReader reader = new StreamReader(@".\Словарь.txt", System.Text.Encoding.Default))
     {
         while (!reader.EndOfStream)
         {
             string        buf       = reader.ReadLine();
             char[]        splitchar = { ';', '\n', ' ', '.', '\0', '\r', ',' };
             List <string> foo       = new List <string>(buf.Split(splitchar));
             foreach (string str in foo)
             {
                 if (str.Length == 0 || str == " ")
                 {
                     continue;
                 }
                 char w = str[0];
                 if (!MyDictionary.ContainsKey(w))
                 {
                     MyDictionary[w] = new List <string>();
                     MyDictionary[w].Add(str);
                 }
                 else
                 {
                     MyDictionary[w].Add(str);
                 }
             }
         }
     }
 }
예제 #21
0
        public void RemoveByItem_Test()
        {
            dict = new MyDictionary <int, int>(true);

            dict.Add(0, 00);
            dict.Add(1, 11);
            dict.Add(5, 23);
            dict.Add(7, 7);
            dict.Add(9, 77);
            dict.Add(6, 77);
            dict.Add(5, 22);
            dict.Add(5, 24);

            dict.Remove(new KeyValuePair <int, int>(5, 24));
            dict.Remove(new KeyValuePair <int, int>(5, 22));
            dict.Remove(new KeyValuePair <int, int>(5, 23));

            Assert.AreEqual(5, dict.Count);
            Assert.AreEqual(false, dict.ContainsKey(5), "Contains");
            Assert.AreEqual(true, dict.Contains(new KeyValuePair <int, int>(0, 00)));
            Assert.AreEqual(true, dict.Contains(new KeyValuePair <int, int>(1, 11)));
            Assert.AreEqual(false, dict.Contains(new KeyValuePair <int, int>(5, 22)), "5, 22");
            Assert.AreEqual(false, dict.Contains(new KeyValuePair <int, int>(5, 23)), "5, 23");
            Assert.AreEqual(false, dict.Contains(new KeyValuePair <int, int>(5, 24)), "5, 24");
        }
예제 #22
0
 private void BuildMuzzlePosData(DataTemplateMgr <MuzzlePosConfigData> configData, MyDictionary <int, MyDictionary <int, Vector3> > posData)
 {
     foreach (MuzzlePosConfigData cfg in configData.GetData().Values)
     {
         MyDictionary <int, Vector3> poses = null;
         if (!posData.ContainsKey(cfg.m_UsagerId))
         {
             poses = new MyDictionary <int, Vector3>();
             posData.Add(cfg.m_UsagerId, poses);
         }
         else
         {
             poses = posData[cfg.m_UsagerId];
         }
         if (null != poses)
         {
             if (!poses.ContainsKey(cfg.m_WeaponId))
             {
                 poses.Add(cfg.m_WeaponId, cfg.m_MuzzlePos);
             }
             else
             {
                 poses[cfg.m_WeaponId] = cfg.m_MuzzlePos;
             }
         }
     }
 }
예제 #23
0
        public static string Replace(string temple, Dictionary <string, string> map)
        {
            Dictionary <int, string> indexMap = new MyDictionary <int, string>();
            HashSet <int>            set      = new HashSet <int>();

            foreach (string key in map.Keys)
            {
                int index = temple.IndexOf(key);
                if (index >= 0)
                {
                    indexMap[index] = key;
                    for (int i = index; i < index + key.Length; i++)
                    {
                        set.Add(i);
                    }
                }
            }
            string s = string.Empty;

            for (int i_1 = 0; i_1 < temple.Length; i_1++)
            {
                if (!set.Contains(i_1))
                {
                    s = s + temple[i_1];
                }
                else
                {
                    if (indexMap.ContainsKey(i_1))
                    {
                        s = s + map[indexMap[i_1]];
                    }
                }
            }
            return(s);
        }
예제 #24
0
        public static object Decode(byte[] msgbuf)
        {
            int id = (int)(((int)msgbuf[0] << 8) | ((int)msgbuf[1]));

            if (id < 0)
            {
                LogSystem.Debug("decode error:message id({0}) error !!!", id);
                return(null);
            }

            if (m_DicIDMsg.ContainsKey(id))
            {
                Type t = m_DicIDMsg[id];
                m_Stream.SetLength(0);
                m_Stream.Write(msgbuf, 2, msgbuf.Length - 2);
                m_Stream.Position = 0;
                object msg = m_Serializer.Deserialize(m_Stream, null, t);
                if (msg == null)
                {
                    LogSystem.Debug("decode error:can't find id {0}  !!!", id);
                    return(null);
                }
                return(msg);
            }
            return(null);
        }
예제 #25
0
 /// <summary>
 /// 检查prefab是否有更新的bundle
 /// </summary>
 /// <param name="prefabName"></param>
 /// <param name="isScene"></param>
 private static PrefabPathMap CheckPrefabBundle(string prefabName, bool isScene = false)
 {
     if (!m_PrefabPathMap.ContainsKey(prefabName))
     {
         string        assetBundleName;
         PrefabPathMap ppm = new PrefabPathMap();
         if (!isScene)
         {
             assetBundleName = ("Assets/" + prefabName + ".bytes").ToLower();
         }
         else
         {
             assetBundleName = ("Assets/Scene/" + prefabName + ".unity.bytes").ToLower();
         }
         ppm.BundleName = assetBundleName;
         if (!isScene)
         {
             ppm.AssetPath    = "Assets/" + prefabName;
             ppm.ResourcePath = prefabName.Substring(0, prefabName.LastIndexOf("."));
         }
         // 如果外部有,则地址为外部地址.
         if (File.Exists(ViewDefine.DataPathSync + assetBundleName))
         {
             ppm.IsHasBundle = true;
         }
         else
         {
             // 外部没有,则地址为StreamingAssets地址
             ppm.IsHasBundle = false;
         }
         m_PrefabPathMap.Add(prefabName, ppm);
         return(ppm);
     }
     return(m_PrefabPathMap[prefabName]);
 }
예제 #26
0
 public void addHeaders(string _name, string _value)
 {
     if (headers.ContainsKey("_name"))
     {
         headers.Remove("_name");
     }
     headers.Add(_name, _value);
 }
예제 #27
0
        public static void Print()
        {
            var dict = new MyDictionary <int, Guid>();

            for (var i = 0; i < 5; i++)
            {
                dict.Add(new KeyValuePair <int, Guid>(i, Guid.NewGuid()));
            }

            PrintDictionary(dict);

            Console.WriteLine($"Contains key 1? {dict.ContainsKey(1)}");
            Console.WriteLine($"Contains key 11? {dict.ContainsKey(11)}");
            Console.WriteLine($"TryGetValue 1: {dict.TryGetValue(1, out var r1)}, {r1}");
            Console.WriteLine($"TryGetValue 100: {dict.TryGetValue(100, out var r2)}, {r2}");
            Console.WriteLine();
            Console.WriteLine($"Removing key 1? {dict.Remove(1)}");
            Console.WriteLine($"Removing key 11? {dict.Remove(11)}");
            Console.WriteLine($"Removing key 3? {dict.Remove(3)}");
            PrintDictionary(dict);
            Console.WriteLine($"Add existing key 2.");
            dict.Add(2, Guid.NewGuid());
            PrintDictionary(dict);


            Console.WriteLine("Indexers.");
            Console.WriteLine("Adding 5.");
            dict[5] = Guid.NewGuid();
            PrintDictionary(dict);
            Console.WriteLine("Overwrite 5.");
            dict[5] = Guid.NewGuid();
            PrintDictionary(dict);

            Console.WriteLine();
            Console.WriteLine($"\nAdding keys 1 and 11.");
            dict.Add(new KeyValuePair <int, Guid>(1, Guid.NewGuid()));
            dict.Add(new KeyValuePair <int, Guid>(11, Guid.NewGuid()));
            PrintDictionary(dict);
            Console.WriteLine($"\nClearing and reinitializing.");
            dict.Clear();
            for (var i = 0; i < 5; i++)
            {
                dict.Add(new KeyValuePair <int, Guid>(i, Guid.NewGuid()));
            }
            PrintDictionary(dict);
        }
예제 #28
0
        /**
         * @brief 获取数据,根据ID
         *
         * @param id
         *
         * @return
         */
        public TData GetDataById(int id)
        {
            if (m_DataContainer.ContainsKey(id))
            {
                return((TData)m_DataContainer[id]);
            }

            return(default(TData));
        }
예제 #29
0
        public static IPara GetPara(string type)
        {
            if (map.ContainsKey(type))
            {
                return(map[type]);
            }

            return(null);
        }
예제 #30
0
        /**
         * @brief 返回文本根据行关键字和列名
         *
         * @param id
         * @param headerName
         *
         * @return
         */
        public string GetField(string id, string headerName)
        {
            if (string.IsNullOrEmpty(id) || string.IsNullOrEmpty(headerName))
            {
                return("");
            }

            if (m_HashData != null && m_HashData.ContainsKey(id))
            {
                DBC_Row row = m_HashData[id];
                if (row != null)
                {
                    return(row.SelectFieldByName(headerName));
                }
            }

            return("");
        }
        static IEnumerable<KeyValue<char, int>> CountSymbols(string text)
        {
            var counter = new MyDictionary<char, int>();
            foreach (var character in text)
            {
                int sequence = 0;
                if (counter.ContainsKey(character))
                {
                    sequence = counter.Get(character);
                }

                counter.AddOrReplace(character, ++sequence);
            }

            return counter;
        }
예제 #32
0
파일: mediana.cs 프로젝트: Rex-Hays/GNIDA2
 private static string AddProc(ulong x, MyDictionary ProcList, Dictionary<ulong, TFunc> NewSubs)
 {
     if (ProcList.ContainsKey(x)) return ProcList[x].FName + "();";
     TFunc tmpfunc = new TFunc(x, 1);
     if (!NewSubs.ContainsKey(x)) NewSubs.Add(x, tmpfunc);
     return "proc_" + x.ToString("X8") + "();";
 }
예제 #33
0
파일: GNIDA.cs 프로젝트: Rex-Hays/GNIDA2
        public ulong DisasmFunc(List<Stroka> lst, ulong addr, MyDictionary ProcList)
        {
            //List<Stroka> lst = new List<Stroka>();
            List<ulong> Tasks = new List<ulong>();
            List<ulong> DTasks = new List<ulong>();
            List<int> LabelList = new List<int>();
            ulong StartAdr = addr;
            ulong EndAddr = addr;
            DISASM_INOUT_PARAMS param = new DISASM_INOUT_PARAMS();
            uint Len = 0;
            byte[] sf_prefixes = new byte[Dasmer.MAX_INSTRUCTION_LEN];
            param.arch = Dasmer.ARCH_ALL;
            param.sf_prefixes = sf_prefixes;
            param.mode = DISMODE.DISASSEMBLE_MODE_32;
            param.options = (byte)(Dasmer.DISASM_OPTION_APPLY_REL | Dasmer.DISASM_OPTION_OPTIMIZE_DISP);
            param.bas = assembly.ImageBase()+2000;
            IInstruction instr1 = new mediana.INSTRUCTION();

            Tasks.Add(addr);
            for (uint i = 0; Tasks.Count > 0; i++)
            {
                //instr1 = new mediana.INSTRUCTION();
                Len = MeDisasm.disassemble(Tasks[0], out instr1, ref param);
                if (EndAddr < (Tasks[0] + Len)) EndAddr = Tasks[0] + Len;
                Console.WriteLine(instr1.mnemonic);
                DTasks.Add(Tasks[0]);
                Tasks.Remove(Tasks[0]);
                lst.Add(new Stroka(this, instr1));
                if(Len>0)
                switch (instr1.bytes[0])
                {
                    case 0x0F: switch(instr1.bytes[1])
                        {
                            case 0x84://jz
                            case 0x85://jz
                            case 0x86://jbe
                                int val = (int)((int)instr1.bytes[2] + (int)instr1.Addr + Len);
                                if (!LabelList.Contains(val))
                                {
                                    if ((!DTasks.Contains((uint)val)) && (!Tasks.Contains((uint)val))) Tasks.Add((uint)val);
                                    //Tasks.Add((uint)val);//Add jmp adress to disasm tasks
                                    val = (int)FO2RVA((ulong)val);
                                    instr1.ops[0].value.imm.imm64 = (ulong)val;
                                    LabelList.Add(val);
                                }break;
                        }
                        break;
                    case 0x74://Jz
                    case 0x75://Jnz
                        {
                            int val = (int)((int)instr1.bytes[1] + (int)instr1.Addr + Len);
                            if (!LabelList.Contains(val))
                            {
                                if ((!DTasks.Contains((uint)val)) && (!Tasks.Contains((uint)val))) Tasks.Add((uint)val);
                                //Tasks.Add((uint)val);//Add jmp adress to disasm tasks
                                val = (int)FO2RVA((ulong)val);
                                instr1.ops[0].value.imm.imm64 = (ulong)val;
                                LabelList.Add(val);
                            }
                        } break;
                    case 0xC2://retn XX;
                    case 0xC3://retn
                        goto _end;//Костыль
                        //continue;// Don't disasm after it
                    case 0xE8://Call;
                        int val3 = (int)instr1.bytes[1] + (int)Len + (int)instr1.Addr;
                        val3 = (int)FO2RVA((ulong)val3);
                        instr1.ops[0].value.imm.imm64 = (ulong)val3;
                        break;
                    case 0xEB://jmp;
                        int val1 = (int)instr1.bytes[1] + (int)Len + (int)instr1.Addr;
                        if (!LabelList.Contains(val1))
                        {
                            LabelList.Add(val1);
                            if((!DTasks.Contains((uint)val1)) && (!Tasks.Contains((uint)val1))) Tasks.Add((uint)val1);
                            //Tasks.Add((uint)val1);//Add jmp adress to disasm tasks
                        }
                        continue;// Don't disasm after it
                    case 0xE9://jmp;

                        int val2 = (int)instr1.bytes[1] + (int)Len + (int)instr1.Addr;
                        if (!LabelList.Contains(val2))
                        {
                            if ((!DTasks.Contains((uint)val2)) && (!Tasks.Contains((uint)val2))) Tasks.Add((uint)val2);
                            //Tasks.Add((uint)val2);//Add jmp adress to disasm tasks
                            val2 = (int)FO2RVA((ulong)val2);
                            instr1.ops[0].value.imm.imm64 = (ulong)val2;
                            LabelList.Add(val2);
                        }
                        continue;// Don't disasm after it
                    case 0xFF:
                        if (instr1.bytes[1] == 0x15)//Call
                        {
                                ulong a = instr1.disp.value.d64;
                                Console.WriteLine(a.ToString("X"));
                                if(ProcList.ContainsKey(a))
                                    if(ProcList[a].FName.Contains("ExitProcess"))continue;
                            }
                            break;
                }
                //Tasks.Add( instruction.Offset.FileOffset + (uint)instruction.Size);
                if ((!DTasks.Contains(instr1.Addr + Len)) && (!Tasks.Contains(instr1.Addr + Len)))
                    Tasks.Add(instr1.Addr + Len);
                instr1.Addr = FO2RVA(instr1.Addr);
                //                 += assembly.NTHeader.OptionalHeader.ImageBase;
            }
            _end:
            instr1.Addr = FO2RVA((ulong)instr1.Addr);
            lst.Sort(delegate(Stroka x, Stroka y)
            {
                if (x.addr > y.addr) return 1;
                if (x.addr == y.addr) return 0;
                return -1;
            });
            foreach (uint Addr in LabelList)
            {
                Stroka result = lst.Find(
                     delegate(Stroka sstr){return sstr.addr == Addr;}
                    );
                if (result != null)
                {
                    result.Label = "Loc_" + result.Inst.Addr.ToString("X8").Remove(0, 2);
                }
            }
            return EndAddr-StartAdr;
        }