DYN-5656 Enabling the Dynamo Environment#13973
DYN-5656 Enabling the Dynamo Environment#13973QilongTang merged 3 commits intoDynamoDS:masterfrom jesusalvino:DYN-5656-Pref-Panel-Alert--v2
Conversation
…tead of the Deactivated event
|
|
||
| public void EnableEnvironment(bool isEnabled) | ||
| { | ||
| this.titleBarGrid.IsEnabled = isEnabled; |
There was a problem hiding this comment.
When the pref window is opened, these are already disabled, right? why do we need this method?
There was a problem hiding this comment.
yes, because it was being opened using ShowDialog(), but in this way I couldn't find how to detect when the user click outside the preferences, that's Why I'm using Show() instead so I need to disable/enable the main components of Dynamo explicitly
There was a problem hiding this comment.
so you mean Show() will set PreferencesWindow.IsLoaded to true?
There was a problem hiding this comment.
yes, it does it implicitly, I check the IsLoaded property for visibility purpose because even if we close the preferences view , the field reference preferencesWindow is still alive in the DynamoView class
There was a problem hiding this comment.
it seems to me we are spending extra effort just to get the state of it using WPF API. I feel it's not worth the extra effort, how about when we call ShowDialog(), we set a state boolean under preferencesWindow so we can query the state? Otherwise, everytime we add a new grid, we need to remember to enable/disable this, seems like a pain
There was a problem hiding this comment.
Using the ShowDialog() didn't allow me to detect when the user click outside the preferences view (main goal), when we use it we don't worry about the state because it locks the Dynamo environment.
There was a problem hiding this comment.
Oh you mean even MouseLeftButtonDown event cant be triggered?
There was a problem hiding this comment.
Oh you mean even
MouseLeftButtonDownevent cant be triggered?
exactly, now I'm trying to disable only the mainGrid ( the Dynamo main container) instead of every main part of Dynamo, I will send my findings.
There was a problem hiding this comment.
@QilongTang with my last commit 14c28d2 we won't worry about enable/disable specific Dynamo parts if we add a new grid.
QilongTang
left a comment
There was a problem hiding this comment.
LGTM with one last comment

Purpose
Enabling the Dynamo Environment based on the IsEnabled properties of their main components instead of the Preferences Deactivated Event for the implementation of the improvement https://jira.autodesk.com/browse/DYN-5656.
Declarations
Check these if you believe they are true
*.resxfilesReviewers
@QilongTang
@reddyashish
FYIs
@RobertGlobant20
@Enzo707