コード例 #1
0
        /// <summary>
        /// Rendering of one preview image is ready.
        /// </summary>

        void mPreview1_RenderingEnds()
        {
            if (_currentPreviewStep >= _animationSteps.Steps.Count)
            {
                _inRenderingPreview = false;
                _currentPreviewStep = 0;
                btnPreview.Enabled  = true;
                return;
            }
            if (!_inRenderingPreview)
            {
                return;
            }
            // Load data of currentPreviewStep:
            AnimationPoint   ap = _animationSteps.Steps[_currentPreviewStep];
            ParameterHistory animationHistory = new ParameterHistory();

            _dataPerTime.Load(ap.Time);
            animationHistory.Save();

            PreviewControl mPreview1 = new Fractrace.PreviewControl(0);

            mPreview1.Width    = _previewWidth;
            mPreview1.Height   = _previewHeight;
            mPreview1.Location = new System.Drawing.Point(_previewWidth * _currentPreviewStep, 0);
            pnlPreview.Controls.Add(mPreview1);
            mPreview1.ShowProgressBar = false;
            mPreview1.RenderOnClick   = false;

            AnimationStepPreview stepInfo = new AnimationStepPreview();

            stepInfo.Width    = _previewWidth;
            stepInfo.Height   = 30; // _previewHeight;
            stepInfo.Location = new System.Drawing.Point(_previewWidth * _currentPreviewStep, _previewHeight);
            pnlPreview.Controls.Add(stepInfo);
            int steps = 0;

            if (_animationSteps.Steps.Count > _currentPreviewStep + 1)
            {
                steps = _animationSteps.Steps[_currentPreviewStep + 1].Steps;
            }
            stepInfo.Init(ap.Time, steps);
            _stepPreviewControls[ap.Time] = stepInfo;
            _currentPreviewStep++;
            mPreview1.RenderingEnds += new PictureRenderingIsReady(mPreview1_RenderingEnds);
            mPreview1.Draw();
        }
コード例 #2
0
        /// <summary>
        /// Rendering of one preview image is ready.
        /// </summary>
        void mPreview1_RenderingEnds()
        {
            if (_currentPreviewStep >= _animationSteps.Steps.Count)
            {
                _inRenderingPreview = false;
                _currentPreviewStep = 0;
                btnPreview.Enabled = true;
                return;
            }
            if (!_inRenderingPreview)
                return;
            // Load data of currentPreviewStep:
            AnimationPoint ap = _animationSteps.Steps[_currentPreviewStep];
            ParameterHistory animationHistory = new ParameterHistory();
            _dataPerTime.Load(ap.Time);
            animationHistory.Save();

            PreviewControl mPreview1 = new Fractrace.PreviewControl(0);
            mPreview1.Width = _previewWidth ;
            mPreview1.Height = _previewHeight;
            mPreview1.Location = new System.Drawing.Point(_previewWidth * _currentPreviewStep, 0);
            pnlPreview.Controls.Add(mPreview1);
            mPreview1.ShowProgressBar = false;
            mPreview1.RenderOnClick = false;

            AnimationStepPreview stepInfo = new AnimationStepPreview();
            stepInfo.Width = _previewWidth;
            stepInfo.Height = _previewHeight;
            stepInfo.Location = new System.Drawing.Point(_previewWidth * _currentPreviewStep, _previewHeight);
            pnlPreview.Controls.Add(stepInfo);
            int steps=0;
            if ( _animationSteps.Steps.Count>_currentPreviewStep+1 )
              steps = _animationSteps.Steps[_currentPreviewStep+1].Steps;
            stepInfo.Init(ap.Time, steps);
            _stepPreviewControls[ap.Time] = stepInfo;
            _currentPreviewStep++;
            mPreview1.RenderingEnds += new PictureRenderingIsReady(mPreview1_RenderingEnds);
            mPreview1.Draw();
        }