Beispiel #1
0
        internal ImagePanel(ContextObject context, NConvert meta) : this()
        {
            ContextObject = context;
            Meta          = meta;

            var s = meta.GetSize();

            _minZoomFactor = Math.Min(200d / s.Height, 400d / s.Width);
            _maxZoomFactor = Math.Min(9000d / s.Height, 9000d / s.Width);

            ShowMeta();
            Theme = ContextObject.Theme;
        }
Beispiel #2
0
        public void Prepare(string path, ContextObject context)
        {
            _meta = new NConvert(path);

            var size = _meta.GetSize();

            if (!size.IsEmpty)
            {
                context.SetPreferredSizeFit(size, 0.8);
            }
            else
            {
                context.PreferredSize = new Size(800, 600);
            }

            context.Theme = (Themes)SettingHelper.Get("LastTheme", 1);
        }