private void replay_Load(object sender, EventArgs e) { if (path == null) { Close(); MessageBox.Show("未选择有效文件"); return; } Boolean flag = PlayCtrl.PlayM4_OpenFile(0, path); Console.WriteLine(flag ? "文件打开成功" : "文件打开失败"); PlayCtrl.PlayM4_SetPicQuality(0, 1); PlayCtrl.PlayM4_SetPlayPos(0, 0); label3.Text = GetTime(PlayCtrl.PlayM4_GetFileTime(0)); }
private void timer1_Tick(object sender, EventArgs e) { if (!play || m_bPause) { return; } progressBar1.Value = (int)(PlayCtrl.PlayM4_GetPlayPos(0) * 100); label4.Text = GetTime(PlayCtrl.PlayM4_GetPlayedTime(0)); Console.WriteLine(PlayCtrl.PlayM4_GetPlayedTime(0)); Console.WriteLine(PlayCtrl.PlayM4_GetPlayedTimeEx(0)); Console.WriteLine(PlayCtrl.PlayM4_GetFileTime(0)); if (PlayCtrl.PlayM4_GetPlayedTimeEx(0) >= PlayCtrl.PlayM4_GetFileTime(0) * 1000) { progressBar1.Value = 100; play = false; m_bPause = false; button2_Click(null, null); } }