Пример #1
0
        /// <summary>
        /// Starts playback
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void buttonPlay_Click(object sender, EventArgs e)
        {
            int    nCurrent, nNext;
            double dblFileTime, dblListTime;

            m_objPlaylist.PlaylistPosGet(out nCurrent, out nNext, out dblFileTime, out dblListTime);

            //Switch to another file if it was selected
            if (getCurrentFile() != nCurrent)
            {
                m_objPlaylist.PlaylistPosSet(getCurrentFile(), 0, 0);
            }

            //Play current file
            m_objPlaylist.FilePlayStart();
        }
        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            double val1;
            string val2;
            MItem  val3;

            myPlaylist.PlaylistGetByIndex(listBox1.SelectedIndex, out val1, out val2, out val3);
            myPlaylist.PlaylistPosSet(listBox1.SelectedIndex, 0, 0);
            int    nCurFile, nNextFile = 0;
            double dblFilePos, dblListPos = 0;

            myPlaylist.PlaylistPosGet(out nCurFile, out nNextFile, out dblFilePos, out dblListPos);
            totalDur = dblListPos;
            myPlaylist.FilePlayStop(0);
            trackBar2.Value = 0;
            label4.Width    = 0;
            double x;
            double y;
            double z;

            val3.FileInOutGet(out x, out y, out z);
            trackBar2.Maximum = Convert.ToInt32(z);
        }