コード例 #1
0
ファイル: ViewManager.cs プロジェクト: khanhduy94/jobzoom
        /// <summary>
        /// this function make a zoom out action
        /// </summary>
        public void ZoomOut()
        {
            this.currentZoom = this.currentZoom - 3;

            if (this.currentZoom < 0)
            {
                this.currentZoom = 0;
            }

            if (this.currentScaleChangeEffect != null)
            {
                this.currentScaleChangeEffect.End();
            }

            this.currentScaleChangeEffect = this.settings.ChangeScale(this, this.arrayZoom[this.currentZoom]);
            this.currentScaleChangeEffect.Begin();
        }
コード例 #2
0
ファイル: ViewManager.cs プロジェクト: khanhduy94/jobzoom
        /// <summary>
        /// this function changes the zoom value by creating an animation
        /// </summary>
        /// <param name="ratio">the final zoom ratio</param>
        public void Zoom(int ratio)
        {
            lock (this)
            {
                this.currentZoom = ratio;

                if (this.currentScaleChangeEffect != null)
                {
                    this.currentScaleChangeEffect.End();
                }

                this.currentScaleChangeEffect = this.settings.ChangeScale(this, this.arrayZoom[this.currentZoom]);
                this.currentScaleChangeEffect.Begin();
            }
        }