private void Ani_listBox_SelectedIndexChanged(object sender, EventArgs e) { if (Ani_listBox.SelectedIndex < 0) { return; } m_3DEngie.LoadAni(m_AniFilePath[Ani_listBox.SelectedIndex].ToString()); }
private void Form1_Load(object sender, EventArgs e) { //ArrayList[] a = { new ArrayList(), new ArrayList(), new ArrayList(), new ArrayList(), new ArrayList(), new ArrayList() }; //ArrayList elem = (ArrayList)a[0]; //elem.Add("aaa"); m_strSockets = new string[9]; m_strSockets[0] = "s_hat"; m_strSockets[1] = "s_spine2"; m_strSockets[2] = "s_spine"; m_strSockets[3] = "s_rp"; m_strSockets[4] = "s_lp"; m_strSockets[5] = "s_rc"; m_strSockets[6] = "s_lc"; m_strSockets[7] = "s_rh"; m_strSockets[8] = "s_lh"; m_HeadFilePath = new ArrayList(); m_HandFilePath = new ArrayList(); m_LegFilePath = new ArrayList(); m_BodyFilePath = new ArrayList(); m_BeltFilePath = new ArrayList(); m_FaceFilePath = new ArrayList(); m_AniFilePath = new ArrayList(); m_ItemFilePath = new ArrayList(); m_MdlFile = new ArrayList(); m_3DEngie = new Test3DEngine(); m_3DEngie.Init((int)this.pictureBox1.Handle); string DirName = Application.StartupPath; string PlayerName = DirName + "\\Data\\public\\PlayerCheckTool\\Checker.mdl"; // DirName + "\\Data\\public\\PlayerCheckTool\\Checker_skin.ani"; string AniFileName = DirName + "\\data\\source\\player\\F2\\动作\\F2b01aq攻击22.ani"; m_3DEngie.LoadPlayerModel(PlayerName); m_3DEngie.LoadAni(AniFileName); m_PartDirPath = PlayerPathText.Text; FindModelInDirectory(PlayerPathText.Text); for (int i = m_MdlFile.Count - 1; i >= 0; i--) { this.Player_comboBox.Items.Add(m_MdlFile[i]); } ItemsRefresh(); this.Player_comboBox.SelectedIndex = 0; if (Ani_listBox.Items.Count > 0) { this.Ani_listBox.SelectedIndex = 0; } }
private void Form1_Load(object sender, EventArgs e) { //ArrayList[] a = { new ArrayList(), new ArrayList(), new ArrayList(), new ArrayList(), new ArrayList(), new ArrayList() }; //ArrayList elem = (ArrayList)a[0]; //elem.Add("aaa"); m_strSockets = new string[9]; m_strSockets[0] = "s_hat"; m_strSockets[1] = "s_spine2"; m_strSockets[2] = "s_spine"; m_strSockets[3] = "s_rp"; m_strSockets[4] = "s_lp"; m_strSockets[5] = "s_rc"; m_strSockets[6] = "s_lc"; m_strSockets[7] = "s_rh"; m_strSockets[8] = "s_lh"; m_HeadFilePath = new ArrayList(); m_HandFilePath = new ArrayList(); m_LegFilePath = new ArrayList(); m_BodyFilePath = new ArrayList(); m_BeltFilePath = new ArrayList(); m_FaceFilePath = new ArrayList(); m_AniFilePath = new ArrayList(); m_ItemFilePath = new ArrayList(); m_MdlFile = new ArrayList(); m_3DEngie = new Test3DEngine(); m_3DEngie.Init((int)this.pictureBox1.Handle); string DirName = Application.StartupPath; string PlayerName = DirName + "\\Data\\public\\PlayerCheckTool\\Checker.mdl"; // DirName + "\\Data\\public\\PlayerCheckTool\\Checker_skin.ani"; string AniFileName = DirName + "\\data\\source\\player\\F2\\动作\\F2b01aq攻击22.ani"; m_3DEngie.LoadPlayerModel(PlayerName); m_3DEngie.LoadAni(AniFileName); m_PartDirPath = PlayerPathText.Text; FindModelInDirectory(PlayerPathText.Text); for (int i = m_MdlFile.Count-1; i >= 0; i--) this.Player_comboBox.Items.Add(m_MdlFile[i]); ItemsRefresh(); this.Player_comboBox.SelectedIndex = 0; if (Ani_listBox.Items.Count > 0) this.Ani_listBox.SelectedIndex = 0; }