home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Plugin Development Question
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="arion_p" data-source="post: 542375" data-attributes="member: 45945"><p>There is always one and only one instance of each window. So when you call GUIWindowManager.GetWindow(ID) to get a reference to the window you want to activate, you can then cast the return value to the correct class and access any public member (property / method) of that class.</p><p></p><p>So if you have the RolodexEditContactWindow class which has a method SetEditMode(bool editing), you would do something like this in your edit button click event:</p><p>[code]RolodexEditContactWindow editWin = (RolodexEditContactWindow)GUIWindowManager.GetWindow(ID_ROLODEX_EDIT_CONTACT);</p><p>editWin.SetMode(true);[/code]but in your new button click event:</p><p>[code]RolodexEditContactWindow editWin = (RolodexEditContactWindow)GUIWindowManager.GetWindow(ID_ROLODEX_EDIT_CONTACT);</p><p>editWin.SetMode(false);[/code]</p></blockquote><p></p>
[QUOTE="arion_p, post: 542375, member: 45945"] There is always one and only one instance of each window. So when you call GUIWindowManager.GetWindow(ID) to get a reference to the window you want to activate, you can then cast the return value to the correct class and access any public member (property / method) of that class. So if you have the RolodexEditContactWindow class which has a method SetEditMode(bool editing), you would do something like this in your edit button click event: [code]RolodexEditContactWindow editWin = (RolodexEditContactWindow)GUIWindowManager.GetWindow(ID_ROLODEX_EDIT_CONTACT); editWin.SetMode(true);[/code]but in your new button click event: [code]RolodexEditContactWindow editWin = (RolodexEditContactWindow)GUIWindowManager.GetWindow(ID_ROLODEX_EDIT_CONTACT); editWin.SetMode(false);[/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Plugin Development Question
Contact us
RSS
Top
Bottom