-
Notifications
You must be signed in to change notification settings - Fork 668
DYN-5656 Enabling the Dynamo Environment #13973
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
DYN-5656 Enabling the Dynamo Environment #13973
Conversation
…tead of the Deactivated event
|
|
||
| public void EnableEnvironment(bool isEnabled) | ||
| { | ||
| this.titleBarGrid.IsEnabled = isEnabled; |
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.
When the pref window is opened, these are already disabled, right? why do we need this method?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so you mean Show() will set PreferencesWindow.IsLoaded to true?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh you mean even MouseLeftButtonDown event cant be triggered?
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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