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
MediaPortal 1 Plugins
Preventing a window from closing
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="petemod" data-source="post: 342000" data-attributes="member: 82901"><p>Hi,</p><p></p><p>I am trying to prevent my plugin from closing or in other words the user navigating away from the window.</p><p>From what I understand, when a user switches to a new screen the OnPageDestroy method gets called. Therefore I thought the following code would work (id 7856 is my plugin/window)</p><p>[CODE]</p><p>protected override void OnPageDestroy(int newWindowId)</p><p> {</p><p> if(locked == true && newWindowId != 7856)</p><p> GUIWindowManager.ActivateWindow(7856);</p><p> }</p><p>[/CODE]</p><p>Now given locked is true, and the user presses 'h' (to go to home) the plugin should instead activate window 7856, however this is not happening?</p><p></p><p>Thanks in advance</p><p></p><p>Peter</p></blockquote><p></p>
[QUOTE="petemod, post: 342000, member: 82901"] Hi, I am trying to prevent my plugin from closing or in other words the user navigating away from the window. From what I understand, when a user switches to a new screen the OnPageDestroy method gets called. Therefore I thought the following code would work (id 7856 is my plugin/window) [CODE] protected override void OnPageDestroy(int newWindowId) { if(locked == true && newWindowId != 7856) GUIWindowManager.ActivateWindow(7856); } [/CODE] Now given locked is true, and the user presses 'h' (to go to home) the plugin should instead activate window 7856, however this is not happening? Thanks in advance Peter [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
Preventing a window from closing
Contact us
RSS
Top
Bottom