Beispiel #1
0
        /// <summary>
        /// Callback for resizing of the main form.
        /// </summary>
        /// <param name="sender">sender object</param>
        /// <param name="e">ResizeEventArgs data</param>
        protected void ResizeFormCallback(object sender, ResizeEventArgs e)
        {
            if (e.ResizeDelta == 0.0F)
            {
                // Nothing to do so we return.
                return;
            }

            if (this.ScaleOnResize)
            {
                float scale;
                if (e.ResizeDelta == 1.0F)
                {
                    scale = e.ResizeDelta;
                }
                else
                {
                    scale = UIService.UI.Scale + e.ResizeDelta;
                }

                if (scale < 0.39F || scale > 2.01F)
                {
                    return;
                }

                this.ScaleForm(scale, false);
            }

            this.LastFormSize = this.Size;
        }
Beispiel #2
0
 /// <summary>
 /// Resize Form Callback
 /// </summary>
 /// <param name="sender">sender object</param>
 /// <param name="e">ResizeEventArgs data</param>
 protected void ResizeFormCallback(object sender, ResizeEventArgs e)
 {
     this.OnResizeForm(sender, e);
 }