public override object Clone() { var result = new ResourceImageProxy(); result.CopyFrom(this); return(result); }
public virtual void Serialize(object obj, Altaxo.Serialization.Xml.IXmlSerializationInfo info) { ResourceImageProxy s = (ResourceImageProxy)obj; info.AddValue("Url", s._url); info.AddValue("Name", s._name); }
public virtual ResourceImageProxy SDeserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { ResourceImageProxy s = null != o ? (ResourceImageProxy)o : new ResourceImageProxy(); s._url = info.GetString("Url"); s._name = info.GetString("Name"); return(s); }
public new static ImageProxy FromResource(string fullpath) { if (string.IsNullOrEmpty(fullpath)) { throw new ArgumentException("Path is null or empty"); } ResourceImageProxy img = new ResourceImageProxy(); img._url = fullpath; img._name = System.IO.Path.GetFileName(fullpath); return(img); }
private void CopyFrom(ResourceImageProxy obj) { bool isCopied = base.CopyFrom(obj); if (isCopied && !object.ReferenceEquals(this, obj)) { var from = obj as ResourceImageProxy; if (null != from) { _url = from._url; _name = from._name; _imageSizePt = from._imageSizePt; _image = (from._image != null && from._image.IsAlive) ? new WeakReference(from._image.Target) : null; } } }
public new static ImageProxy FromResource(string name, string fullpath) { if (string.IsNullOrEmpty(name)) { throw new ArgumentException("Name is null or empty"); } if (string.IsNullOrEmpty(fullpath)) { throw new ArgumentException("Path is null or empty"); } ResourceImageProxy img = new ResourceImageProxy(); img._url = fullpath; img._name = name; return(img); }
public override object Clone() { ResourceImageProxy result = new ResourceImageProxy(); result.CopyFrom(this); return result; }
public new static ImageProxy FromResource(string name, string fullpath) { if (string.IsNullOrEmpty(name)) throw new ArgumentException("Name is null or empty"); if (string.IsNullOrEmpty(fullpath)) throw new ArgumentException("Path is null or empty"); ResourceImageProxy img = new ResourceImageProxy(); img._url = fullpath; img._name = name; return img; }
public new static ImageProxy FromResource(string fullpath) { if (string.IsNullOrEmpty(fullpath)) throw new ArgumentException("Path is null or empty"); ResourceImageProxy img = new ResourceImageProxy(); img._url = fullpath; img._name = System.IO.Path.GetFileName(fullpath); return img; }
private void CopyFrom(ResourceImageProxy from) { this._url = from._url; this._name = from._name; this._image = from._image; }
private void CopyFrom(ResourceImageProxy obj) { bool isCopied = base.CopyFrom(obj); if (isCopied && !object.ReferenceEquals(this, obj)) { var from = obj as ResourceImageProxy; if (null != from) { this._url = from._url; this._name = from._name; this._imageSizePt = from._imageSizePt; this._image = (from._image != null && from._image.IsAlive) ? new WeakReference(from._image.Target) : null; } } }
public static ImageProxy FromResource(string fullpath) { return(ResourceImageProxy.FromResource(fullpath)); }
public object Deserialize(object o, Altaxo.Serialization.Xml.IXmlDeserializationInfo info, object parent) { ResourceImageProxy s = SDeserialize(o, info, parent); return(s); }