Exemple #1
0
        public void Load(byte[] pbXspFile)
        {
            XspArchive a = new XspArchive();

            a.Load(pbXspFile);

            foreach (KeyValuePair <string, byte[]> kvp in a.Items)
            {
                string           str = GetID(kvp.Key);
                ImageArchiveItem it  = new ImageArchiveItem(kvp.Key, kvp.Value);

                Debug.Assert(!m_dItems.ContainsKey(str));
                m_dItems[str] = it;
            }
        }
Exemple #2
0
        public void Load(byte[] pbXspFile)
        {
            XspArchive a = new XspArchive();
            a.Load(pbXspFile);

            foreach(KeyValuePair<string, byte[]> kvp in a.Items)
            {
                string str = GetID(kvp.Key);
                ImageArchiveItem it = new ImageArchiveItem(kvp.Key, kvp.Value);

                Debug.Assert(!m_dItems.ContainsKey(str));
                m_dItems[str] = it;
            }
        }
Exemple #3
0
        private static int CompareByName(ImageArchiveItem a, ImageArchiveItem b)
        {
            if(a == null) { Debug.Assert(false); return -1; }
            if(b == null) { Debug.Assert(false); return 1; }

            return string.Compare(a.Name, b.Name, StrUtil.CaseIgnoreCmp);
        }