Example #1
0
        protected override void OnLoad(EventArgs e)
        {
            cbAutoFitImages.Checked      = _imageToVideo.AutoFitImages;
            cbKeepAspectRatio.Checked    = _imageToVideo.KeepAspectRatio;
            btnBackgroundColor.BackColor = ColorTranslator.FromOle((int)_imageToVideo.BackgroundColor);
            tbMovieWidth.Text            = _imageToVideo.OutputWidth.ToString(CultureInfo.InvariantCulture);
            tbMovieHeight.Text           = _imageToVideo.OutputHeight.ToString(CultureInfo.InvariantCulture);

            // Get list of available AVI audio codecs
            for (int i = 0; i < _imageToVideo.AudioCodecsCount; i++)
            {
                cmbAviAudioCodecs.Items.Add(_imageToVideo.GetAudioCodecName(i));
            }
            // Select current AVI audio codec
            cmbAviAudioCodecs.SelectedIndex = _imageToVideo.CurrentAudioCodec;

            // Get list of available AVI video codecs
            for (int i = 0; i < _imageToVideo.VideoCodecsCount; i++)
            {
                cmbAviVideoCodecs.Items.Add(_imageToVideo.GetVideoCodecName(i));
            }
            // Select current AVI video codec
            cmbAviVideoCodecs.SelectedIndex = _imageToVideo.CurrentVideoCodec;

            // Get list of available WMV audio codecs
            for (int i = 0; i < _imageToVideo.WMVAudioCodecsCount; i++)
            {
                cmbWmvAudioCodecs.Items.Add(_imageToVideo.GetWMVAudioCodecName(i));
            }
            // Select current WMV audio codec
            cmbWmvAudioCodecs.SelectedIndex = _imageToVideo.CurrentWMVAudioCodec;

            // Get list of available WMV video codecs
            for (int i = 0; i < _imageToVideo.WMVVideoCodecsCount; i++)
            {
                cmbWmvVideoCodecs.Items.Add(_imageToVideo.GetWMVVideoCodecName(i));
            }
            // Select current WMV video codec
            cmbWmvVideoCodecs.SelectedIndex = _imageToVideo.CurrentWMVVideoCodec;

            tbFPS.Text = _imageToVideo.FPS.ToString(CultureInfo.InvariantCulture);

            base.OnLoad(e);
        }