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!)
How to override default action with my own?
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="pilehave" data-source="post: 304425" data-attributes="member: 71550"><p>Further investigation suggest that my function actually does get excecuted, but the GUI Dialog is hidden as soon it is shown, because the built-in action (in this case whatever happens when you press "r" on your keyboard), is called.</p><p></p><p>[CODE] //Just testing...</p><p> private void mytest()</p><p> {</p><p> try</p><p> {</p><p> GUIDialogOK pDlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);</p><p> if (pDlgOK == null) return;</p><p> pDlgOK.Reset();</p><p> pDlgOK.SetHeading("meh");//my tv</p><p> Log.Info("PowerPlay - test 2 ok");</p><p> pDlgOK.DoModal(GUIWindowManager.ActiveWindow);</p><p> Log.Info("PowerPlay - test 3 ok");</p><p> </p><p></p><p></p><p> }</p><p> catch (Exception ex)</p><p> {</p><p> Log.Error("PowerPlay - Error(3): " + ex.Message + "( " + ex.StackTrace + " )");</p><p> }</p><p> }[/CODE]</p><p></p><p>This code example works if i I fire it with a key that does not have a built-in fuction mapped to it, in my case the danish characters æ,ø and å are all free, and with these it works (shows the dialog).</p><p></p><p>Both "PowerPlay - test 2 ok" and "PowerPlay - test 3 ok" is logged:</p><p></p><p>[CODE]2008-09-14 22:15:01.500000 [Info.][MPMain]: PowerPlay - test 2 ok</p><p>2008-09-14 22:15:01.500000 [Debug][MPMain]: WindowManager: route TvPlugin.TvFullScreen:602->MediaPortal.Dialogs.GUIDialogOK:2002</p><p>2008-09-14 22:15:01.515625 [Debug][MPMain]: Window: MediaPortal.Dialogs.GUIDialogOK init</p><p>2008-09-14 22:15:01.531250 [Debug][MPMain]: WindowManager: unroute to MediaPortal.Dialogs.GUIDialogOK:2002->TvPlugin.TvFullScreen:602</p><p>2008-09-14 22:15:01.531250 [Debug][MPMain]: WindowManager: route TvPlugin.TvFullScreen:602->MediaPortal.Dialogs.GUIDialogMenuBottomRight:2015</p><p>2008-09-14 22:15:01.546875 [Debug][MPMain]: Window: MediaPortal.Dialogs.GUIDialogMenuBottomRight init</p><p>//</p><p>//Lines with debug and info cut from here, as they are not important</p><p>//</p><p>2008-09-14 22:15:03.265625 [Info.][MPMain]: PowerPlay - test 3 ok[/CODE]</p><p></p><p>So...it's still a matter of overriding the dialog that would normally show. Any suggestions? Please?</p></blockquote><p></p>
[QUOTE="pilehave, post: 304425, member: 71550"] Further investigation suggest that my function actually does get excecuted, but the GUI Dialog is hidden as soon it is shown, because the built-in action (in this case whatever happens when you press "r" on your keyboard), is called. [CODE] //Just testing... private void mytest() { try { GUIDialogOK pDlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK); if (pDlgOK == null) return; pDlgOK.Reset(); pDlgOK.SetHeading("meh");//my tv Log.Info("PowerPlay - test 2 ok"); pDlgOK.DoModal(GUIWindowManager.ActiveWindow); Log.Info("PowerPlay - test 3 ok"); } catch (Exception ex) { Log.Error("PowerPlay - Error(3): " + ex.Message + "( " + ex.StackTrace + " )"); } }[/CODE] This code example works if i I fire it with a key that does not have a built-in fuction mapped to it, in my case the danish characters æ,ø and å are all free, and with these it works (shows the dialog). Both "PowerPlay - test 2 ok" and "PowerPlay - test 3 ok" is logged: [CODE]2008-09-14 22:15:01.500000 [Info.][MPMain]: PowerPlay - test 2 ok 2008-09-14 22:15:01.500000 [Debug][MPMain]: WindowManager: route TvPlugin.TvFullScreen:602->MediaPortal.Dialogs.GUIDialogOK:2002 2008-09-14 22:15:01.515625 [Debug][MPMain]: Window: MediaPortal.Dialogs.GUIDialogOK init 2008-09-14 22:15:01.531250 [Debug][MPMain]: WindowManager: unroute to MediaPortal.Dialogs.GUIDialogOK:2002->TvPlugin.TvFullScreen:602 2008-09-14 22:15:01.531250 [Debug][MPMain]: WindowManager: route TvPlugin.TvFullScreen:602->MediaPortal.Dialogs.GUIDialogMenuBottomRight:2015 2008-09-14 22:15:01.546875 [Debug][MPMain]: Window: MediaPortal.Dialogs.GUIDialogMenuBottomRight init // //Lines with debug and info cut from here, as they are not important // 2008-09-14 22:15:03.265625 [Info.][MPMain]: PowerPlay - test 3 ok[/CODE] So...it's still a matter of overriding the dialog that would normally show. Any suggestions? Please? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
How to override default action with my own?
Contact us
RSS
Top
Bottom