示例#1
0
        public void LoadImage(string path)
        {
            if (path.EndsWith(".svg", true, System.Globalization.CultureInfo.InvariantCulture))
            {
                _pic = new SvgPicture();
            }
            else
            {
                _pic = new BmpPicture();
            }

            _pic.LoadImage(path);
            RegisterForGraphicUpdate();
            RegisterForLayouting(LayoutingType.Sizing);
        }
示例#2
0
        public static object Parse(string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                return(null);
            }

            Picture _pic = null;

            if (path.EndsWith(".svg", true, System.Globalization.CultureInfo.InvariantCulture))
            {
                _pic = new SvgPicture();
            }
            else
            {
                _pic = new BmpPicture();
            }

            _pic.LoadImage(path);

            return(_pic);
        }