From: jpbruyere Date: Thu, 10 Sep 2015 08:07:04 +0000 (+0200) Subject: ImagePath -> Image X-Git-Tag: 0.2~46 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=9b49fb877924c126a4fc50b0d223554eeb33a4fd;p=jp%2Fcrow.git ImagePath -> Image --- diff --git a/src/GraphicObjects/Image.cs b/src/GraphicObjects/Image.cs index 9806c992..587ca20d 100755 --- a/src/GraphicObjects/Image.cs +++ b/src/GraphicObjects/Image.cs @@ -7,6 +7,7 @@ using System.IO; using System.Runtime.InteropServices; using System.Xml.Serialization; using System.ComponentModel; +using System.Diagnostics; namespace go { @@ -16,11 +17,16 @@ namespace go string _svgSub; [XmlAttributeAttribute("Path")] - public string ImagePath { + public string Path { get { return _pic == null ? null : _pic.Path; } - set { - LoadImage (value); - _pic.KeepProportions = true; + set { + try { + LoadImage (value); + _pic.KeepProportions = true; + } catch (Exception ex) { + Debug.WriteLine (ex.Message); + _pic = null; + } } }