Toasts – Diff between revs 56 and 57
?pathlinks?
Rev 56 | Rev 57 | |||
---|---|---|---|---|
Line 80... | Line 80... | |||
80 | /// |
80 | /// |
|
81 | /// </summary> |
81 | /// </summary> |
|
82 | /// <remarks>clone the image for safety</remarks> |
82 | /// <remarks>clone the image for safety</remarks> |
|
83 | public Image Image |
83 | public Image Image |
|
84 | { |
84 | { |
|
- | 85 | get |
||
- | 86 | { |
||
85 | get => _image; |
87 | if(_image == null) |
|
- | 88 | { |
||
- | 89 | return null; |
||
- | 90 | } |
||
- | 91 | |
||
- | 92 | var binaryFormatter = new BinaryFormatter(); |
||
- | 93 | using (var memoryStream = new MemoryStream()) |
||
- | 94 | { |
||
- | 95 | binaryFormatter.Serialize(memoryStream, _image); |
||
- | 96 | memoryStream.Position = 0L; |
||
- | 97 | return (Bitmap)binaryFormatter.Deserialize(memoryStream); |
||
- | 98 | } |
||
- | 99 | } |
||
86 | set |
100 | set |
|
87 | { |
101 | { |
|
88 | if (value == _image) |
102 | if (value == _image) |
|
89 | { |
103 | { |
|
90 | return; |
104 | return; |