//============================================================ // <T>打开数据内容。</T> //============================================================ public void Open() { if (!_opened) { if (null != _texture) { _texture.Open(); } _opened = true; } }
//============================================================ // <T>加载纹理。</T> // // @prama texture 纹理对象 //============================================================ public void LoadTexture(FDrTexture texture) { texture.Open(); _texture = texture; // 加载光照纹理 if (_texture is FDrColorTexture) { LoadLightTexture(_texture as FDrColorTexture); } // 加载剪辑纹理 if (_texture is FDrClipTexture) { LoadClipTexture(_texture as FDrClipTexture); } // 加载分层纹理 if (_texture is FDrLayerTexture) { LoadLayerTexture(_texture as FDrLayerTexture); } Invalidate(); }
//============================================================ //<T>展现纹理图片<T> //============================================================ private void TextureImage(FCfgFolder fol) { FDrTexture text = fol.Tag as FDrTexture; ListViewGroup group = new ListViewGroup(); text.Open(); string diePath = RContent3dManager.TempDirectory + "\\icon\\" + text.Name; int count = 0; foreach (FDrTextureBitmap bit in text.Bitmaps) { //if (bit.Bool != null && bit.Bool.Equals("Y")) { // string Spath = diePath + "\\" + bit.Source; // string Opath = text.Path + "\\" + bit.Source; // if (!Directory.Exists(diePath)) { // Directory.CreateDirectory(diePath); // } // DirectoryInfo directoryinfo = new DirectoryInfo(Spath); // DateTime date = directoryinfo.LastWriteTime; // DateTime now = DateTime.Now; // TimeSpan ts = now.Subtract(date); // if (ts.Hours > 0 || ts.Minutes > 10) { // _sizeChange.CreateIcon(Opath, Spath, 128, 128); // } // if (RFile.Exists(Spath)) { // count = GetImage(count, bit, Spath); // } else { // _sizeChange.CreateIcon(Opath, Spath, 128, 128); // count = GetImage(count, bit, Spath); // } //} } group.Tag = text; group.Name = fol.Label + "-" + count.ToString(); listView1.Groups.Add(group); }