示例#1
0
        void TestSelectAngle()
        {
            int     hr;
            IDvdCmd ppCmd;
            int     avail, current;

            AllowPlay();
            hr = m_idc2.PlayChapterInTitle(1, 2, DvdCmdFlags.Flush | DvdCmdFlags.SendEvents, out ppCmd);
            DsError.ThrowExceptionForHR(hr);

            Thread.Sleep(500);

            hr = m_idi2.GetCurrentAngle(out avail, out current);
            DsError.ThrowExceptionForHR(hr);

            hr = m_idc2.SelectAngle(avail, DvdCmdFlags.None, out ppCmd);
            DsError.ThrowExceptionForHR(hr);

            hr = m_idi2.GetCurrentAngle(out avail, out current);
            DsError.ThrowExceptionForHR(hr);

            Debug.Assert(current == avail, "SelectAngle");

            hr = m_idc2.Stop();
            DsError.ThrowExceptionForHR(hr);
        }
示例#2
0
        /// <summary>
        /// The SelectAngle method sets the new angle when the DVD Navigator is in an angle block
        /// </summary>
        /// <param name="angle">Value of the new angle, which must be from 1 through 9</param>
        public void SelectAngle(int angle)
        {
            VerifyAccess();

            if (m_dvdControl == null)
            {
                return;
            }

            IDvdCmd cmd;

            m_dvdControl.SelectAngle(angle, DvdCmdFlags.None, out cmd);

            if (cmd != null)
            {
                Marshal.ReleaseComObject(cmd);
            }
        }