-
Notifications
You must be signed in to change notification settings - Fork 677
WIP net10.0 Update #15933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP net10.0 Update #15933
Changes from 4 commits
c7a343f
3fb95cf
c73bb5a
6226959
aff95b3
71d8214
ab7e4a5
ff6d69c
98659d9
39e6f62
2414a9e
d60ed6d
3764d02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,13 +1,14 @@ | ||||||
| using Dynamo.Engine; | ||||||
| using Dynamo.Interfaces; | ||||||
| using Dynamo.Utilities; | ||||||
| using System; | ||||||
| using System.Collections.Generic; | ||||||
| using System.Drawing; | ||||||
| using System.IO; | ||||||
| using System.Linq; | ||||||
| using System.Reflection; | ||||||
| using System.Resources; | ||||||
| using System.Windows.Media; | ||||||
| using Dynamo.Engine; | ||||||
| using Dynamo.Interfaces; | ||||||
| using Dynamo.Utilities; | ||||||
|
|
||||||
| namespace Dynamo.Wpf.Services | ||||||
| { | ||||||
|
|
@@ -80,8 +81,20 @@ internal ImageSource LoadIconInternal(string iconKey) | |||||
| ResourceManager rm = new ResourceManager(assemblyName + imagesSuffix, resourceAssembly); | ||||||
|
|
||||||
| ImageSource bitmapSource = null; | ||||||
| Bitmap source = null; | ||||||
|
|
||||||
| try | ||||||
| { | ||||||
| using (var ms = new MemoryStream(rm.GetObject(iconKey) as byte[])) | ||||||
| { | ||||||
| source = new Bitmap(ms); | ||||||
| } | ||||||
| } | ||||||
| catch(Exception e) | ||||||
| { | ||||||
| //log the error | ||||||
|
||||||
| //log the error | |
| System.Diagnostics.Debug.WriteLine($"Error loading icon '{iconKey}': {e.Message}\n{e.StackTrace}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where we can support some logging or alternative loading option for legacy packages