public void LoadSounds(string pFile) { try { this.m_SoundNames.Clear(); this.mySound.ClearSounds(); this.mySound = new CSounds(this.m_MapPanel); this.m_SoundNames = new List <string>(); DataSet dataSet = new DataSet(); dataSet.ReadXml(pFile); DataTable dataTable = dataSet.Tables[0]; if (dataTable.Rows.Count > 0) { foreach (DataRow dataRow in dataTable.Rows) { string text = (string)dataRow[0]; this.mySound.LoadSound(text); string soundName = CHelper.GetSoundName(text); this.m_SoundNames.Add(soundName); } } } catch { } }
public CThucHanh(Form pMapPanel, float[,] pheightData, float pSCALE_FACTOR, char pDecSepa, char pGrpSepa) { try { this.m_MapPanel = pMapPanel; this.InitializeDevice(pMapPanel); this.myTerrain = new CTerrainMesh(this.device, pheightData, pSCALE_FACTOR); this.mySound = new CSounds(pMapPanel); this.m_SoundNames = new List <string>(); this.m_BillboardMeshs = new List <CBillboardMesh>(); this.Billboards = new List <CBillboard>(); this.ModelMeshs = new List <CModelMesh>(); this.Models = new List <CModel>(); this.SpriteTexs = new List <CSpriteTex>(); this.SpriteObjs = new List <CSpriteObj>(); this.texObjs = new List <CTexObj>(); this.runactions = new CRunActs(); } catch (Exception ex) { throw ex; } }