Esempio n. 1
0
        void EnableFormEvents()
        {
            _form = CoreUtil.GetParent <FormEx>(this);

            if (_form != null)
            {
                CoreUtil.AdjustImages(this, ref _dpiOld, _form.DpiNew);
            }
        }
Esempio n. 2
0
        protected virtual void AdjustFont(float factor)
        {
            if (Util.DesignMode)
            {
                return;
            }

            var dic = GetChildControlFontSizes(this);

            CoreUtil.ScaleFont(this, factor);

            foreach (var item in dic)
            {
                // not affected by parent font?
                if (item.Key.Font.Size == item.Value)
                {
                    CoreUtil.ScaleFont(item.Key, factor);
                    continue;
                }
            }
        }
Esempio n. 3
0
 protected override void ScaleControl(System.Drawing.SizeF factor, BoundsSpecified specified)
 {
     base.ScaleControl(factor, specified);
     CoreUtil.AdjustImages(this, ref _dpiOld, _form.DpiNew);
 }