Exemplo n.º 1
0
        public void WriteDataFile(string filePath)
        {
            string fileName   = PathHelper.Path2Name(filePath);
            string samePath   = PathHelper.GetSamePart(filePath, ProjectPathConfig.externalTablePath);
            string externPath = "";// PathHelper.GetParentDir(filePath.Substring(samePath.Length)); ;

            if (!string.Equals(samePath, ProjectPathConfig.externalTablePath))
            {
                externPath = PathHelper.GetParentDir(filePath.Substring(samePath.Length));
            }

            fileName = fileName.Substring(0, 1).ToUpper() + fileName.Substring(1);
            DataTable mSheet   = mResultSet.Tables[0];
            int       rowCount = mSheet.Rows.Count;
            int       colCount = mSheet.Columns.Count;

            if (mSheet.Rows.Count <= 4)
            {
                return;
            }
            CreateTDData(fileName, externPath, mSheet, rowCount, colCount);
            CreateTDDataTable(fileName, externPath, mSheet, rowCount, colCount);
            CreateTDDataExtend(fileName, externPath, mSheet, rowCount, colCount);
            CreateTDDataTableExtend(fileName, externPath, mSheet, rowCount, colCount);
        }
Exemplo n.º 2
0
        public void RemoveFolderData(string path)
        {
            //Load();
            string     assetKey = PathHelper.Path2Name(path);
            FolderData data     = null;

            if (!m_FolderDataMap.TryGetValue(assetKey, out data))
            {
                Log.e("#Not Find Asset In" + path);
                return;
            }
            m_FolderDataLst.Remove(data);
            m_FolderDataMap.Remove(assetKey);
            //Save();
            // Save();
        }
Exemplo n.º 3
0
        public void AddFolderData(string path)
        {
            string assetKey = PathHelper.Path2Name(path);

            assetKey = assetKey.ToLower();
            FolderData data = null;

            if (m_FolderDataMap.TryGetValue(assetKey, out data))
            {
                Log.e("#Already Add Asset In" + path);
                return;
            }
            data = new FolderData(assetKey, path);
            m_FolderDataLst.Add(data);
            m_FolderDataMap.Add(assetKey, data);
            //Save();
        }