]> O.S.I.I.S - jp/crow.git/commitdiff
ImagePath -> Image
authorjpbruyere <jp.bruyere@hotmail.com>
Thu, 10 Sep 2015 08:07:04 +0000 (10:07 +0200)
committerjpbruyere <jp.bruyere@hotmail.com>
Thu, 10 Sep 2015 08:07:04 +0000 (10:07 +0200)
src/GraphicObjects/Image.cs

index 9806c9928563f5f3e590f921186ba0e2baff578a..587ca20dd9dcd9316f310319f909a4c24fa7ba89 100755 (executable)
@@ -7,6 +7,7 @@ using System.IO;
 using System.Runtime.InteropServices;\r
 using System.Xml.Serialization;\r
 using System.ComponentModel;\r
+using System.Diagnostics;\r
 \r
 namespace go\r
 {\r
@@ -16,11 +17,16 @@ namespace go
                string _svgSub;\r
 \r
         [XmlAttributeAttribute("Path")]        \r
-               public string ImagePath {\r
+               public string Path {\r
                        get { return _pic == null ? null : _pic.Path; }\r
-                       set {                           \r
-                               LoadImage (value);\r
-                               _pic.KeepProportions = true;\r
+                       set {   \r
+                               try {\r
+                                       LoadImage (value);\r
+                                       _pic.KeepProportions = true;\r
+                               } catch (Exception ex) {\r
+                                       Debug.WriteLine (ex.Message);\r
+                                       _pic = null;\r
+                               }\r
                        }\r
                }\r
 \r