From 9b49fb877924c126a4fc50b0d223554eeb33a4fd Mon Sep 17 00:00:00 2001 From: jpbruyere Date: Thu, 10 Sep 2015 10:07:04 +0200 Subject: [PATCH] ImagePath -> Image --- src/GraphicObjects/Image.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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; + } } } -- 2.47.3