Esempio n. 1
0
        private void _menuItemAnimationLoop_Click(object sender, EventArgs e)
        {
            RasterPictureBoxAnimationMode mode = RasterPictureBoxAnimationMode.Infinite;

            _menuItemAnimationLoop.Checked = !_menuItemAnimationLoop.Checked;
            if (!_menuItemAnimationLoop.Checked)
            {
                mode = RasterPictureBoxAnimationMode.UseImageGlobalLoop;
            }

            foreach (ViewerForm i in MdiChildren)
            {
                i.Viewer.AnimationMode = mode;
            }

            _animationMode = mode;
        }
Esempio n. 2
0
        public void Initialize(ImageInformation info, RasterPaintProperties paintProperties, bool animateRegions, bool snap, bool useDpi, RasterPictureBoxAnimationMode animationMode)
        {
            _viewer.BeginUpdate();
            UpdatePaintProperties(paintProperties);
            _viewer.Image         = info.Image;
            _viewer.UseDpi        = useDpi;
            _viewer.AnimationMode = animationMode;
            if (_viewer.Image != null)
            {
                _viewer.Image.Changed += new EventHandler <RasterImageChangedEventArgs>(Image_Changed);
            }

            if (Image.Width > this.Viewer.Size.Width || Image.Height > this.Viewer.Size.Height)
            {
                this.Viewer.SizeMode = RasterPictureBoxSizeMode.Fit;
            }

            _name = info.Name;
            UpdateCaption();
            _viewer.EndUpdate();
        }