diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-10 10:07:04 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-10 10:07:04 +0200 |
| commit | 9b49fb877924c126a4fc50b0d223554eeb33a4fd (patch) | |
| tree | cdb4970a199a11ed4b634cc7eaff67c7422ae268 /src/GraphicObjects/Image.cs | |
| parent | e36790a44bc8dab94b54c80a172cbac1c7b6dd9e (diff) | |
ImagePath -> Image
Diffstat (limited to 'src/GraphicObjects/Image.cs')
| -rwxr-xr-x | src/GraphicObjects/Image.cs | 14 |
1 files 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;
+ }
}
}
|