InternalAddItem() private method

private InternalAddItem ( List listFrames, string fileName, System.Export type ) : void
listFrames List
fileName string
type System.Export
return void
コード例 #1
0
ファイル: Encoder.xaml.cs プロジェクト: AndriyIl/ScreenToGif
        /// <summary>
        /// Add one list of frames to the encoding batch.
        /// </summary>
        /// <param name="listFrames">The list of frames to be encoded.</param>
        /// <param name="param">Encoding parameters.</param>
        /// <param name="scale">Screen scale.</param>
        public static void AddItem(List <FrameInfo> listFrames, Parameters param, double scale)
        {
            if (_encoder == null)
            {
                Start(scale);
            }

            if (_encoder == null)
            {
                throw new ApplicationException("Error while starting the Encoding window.");
            }

            _encoder.Activate();
            _encoder.InternalAddItem(listFrames, param);
        }
コード例 #2
0
        /// <summary>
        /// Add one list of frames to the encoding batch.
        /// </summary>
        /// <param name="listFrames">The list of frames to be encoded.</param>
        /// <param name="fileName">Final filename.</param>
        /// <param name="scale">Screen scale.</param>
        public static void AddItem(List <FrameInfo> listFrames, string fileName, double scale)
        {
            if (_encoder == null)
            {
                Start(scale);
            }

            if (_encoder == null)
            {
                throw new ApplicationException("Error while starting the Encoding window.");
            }

            var type = fileName.EndsWith(".gif") ? Export.Gif : Export.Avi;

            _encoder.InternalAddItem(listFrames, fileName, type);
        }
コード例 #3
0
ファイル: Encoder.xaml.cs プロジェクト: yhtsnda/ScreenToGif
        /// <summary>
        /// Add one list of frames to the encoding batch.
        /// </summary>
        /// <param name="listFrames">The list of frames to be encoded.</param>
        /// <param name="param">Encoding parameters.</param>
        /// <param name="scale">Screen scale.</param>
        public static void AddItem(List <FrameInfo> listFrames, Parameters param, double scale)
        {
            //Show or restore the encoder window.
            if (_encoder == null)
            {
                Start(scale);
            }
            else if (_encoder.WindowState == WindowState.Minimized)
            {
                _encoder.WindowState = WindowState.Normal;
            }

            if (_encoder == null)
            {
                throw new ApplicationException("Error while starting the Encoding window.");
            }

            _encoder.Activate();
            _encoder.InternalAddItem(listFrames, param);
        }