Beispiel #1
0
        /** 写信息到文件 */
        public void write()
        {
            XML xml = new XML();

            xml.name = "infoBase";
            xml.setProperty("version", _version);

            foreach (string k in _dic.getSortedMapKeys())
            {
                FileRecordData data = _dic.get(k);

                XML xl = new XML();
                xl.name = "info";
                xl.setProperty("path", k);
                xl.setProperty("lastModified", Convert.ToString(data.lastModified));
                xl.setProperty("length", Convert.ToString(data.length));
                xl.setProperty("md5", data.md5);
                xl.setProperty("ex", data.ex);
                xl.setProperty("ex2", data.ex2);
                xl.setProperty("ex3", data.ex3);
                xl.setProperty("ex4", data.ex4);

                xml.appendChild(xl);
            }

            FileUtils.writeFileForXML(_path, xml);
        }
Beispiel #2
0
        private static void writeBytes()
        {
            BytesWriteStream stream = new BytesWriteStream();

            stream.writeLen(_uiElementDic.size());

            foreach (string name in _uiElementDic.getSortedMapKeys())
            {
                _uiElementDic.get(name).writeBytesSimple(stream);
            }

            stream.writeLen(_uiModelDic.size());

            foreach (string name in _uiModelDic.getSortedMapKeys())
            {
                _uiModelDic.get(name).writeBytesSimple(stream);
            }

            FileUtils.writeFileForBytes(ShineToolGlobal.clientTempPath + "/uiInfo.bin", stream);
        }