Esempio n. 1
0
        /// <summary>
        /// Called while the framerate slider is being dragged.
        /// </summary>
        /// <remarks>
        /// Activates the custom profile.
        /// </remarks>
        private void tbFramerate_Scroll(object sender, EventArgs e)
        {
            VideoFrameRateUnits units = VideoFrameRateUnits.FramesPerSecond;

            if (SelectedProfile != null)
            {
                if (SelectedProfile.Video != null)
                {
                    units = SelectedProfile.Video.FrameRateUnits;
                }
            }
            UpdateFramerateLabel((int)tbFramerate.CurrentValue, units);

            if (SelectedProfileButton != btnCustomProfile)
            {
                CreateCustomProfile();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Called when the framerate slider's value has changed
        /// </summary>
        private void tbFramerate_ValueChanged(object sender, EventArgs e)
        {
            VideoFrameRateUnits units = VideoFrameRateUnits.FramesPerSecond;

            if (SelectedProfile != null)
            {
                if (SelectedProfile.Video != null)
                {
                    units = SelectedProfile.Video.FrameRateUnits;
                }
            }
            UpdateFramerateLabel((int)tbFramerate.Value, units);

            if ((SelectedProfileButton == btnCustomProfile) && (Enabled))
            {
                CustomProfile.Video.FrameRate = (int)tbFramerate.Value;
                NegotiateCustomProfile();
            }
        }
Esempio n. 3
0
 /// <summary>
 /// Updates the framerate fps read-out
 /// </summary>
 /// <param name="frames">value to show in text</param>
 private void UpdateFramerateLabel(int frames, VideoFrameRateUnits units)
 {
     lblFramerateFPS.Text = frames.ToString("0 " + ((units == VideoFrameRateUnits.FramesPerMinute) ? "fpm" : "fps"));
 }
 /// <summary>
 /// Creates a new instance regarding a specific <see cref="T:VideoFrameRateUnits"/> value.
 /// </summary>
 /// <param name="units">the unsupported <see cref="T:VideoFrameRateUnits"/> value</param>
 public UnsupportedFrameRateUnitsException(VideoFrameRateUnits units)
     : base("An unsupported FrameRateUnits '" + units.ToString() + "' was specified")
 {
     _units = units;
 }