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
Language specific support
Deutsches MediaPortal Forum
Plugins & Skins für das MediaPortal
Plugins & Erweiterungen
Fenster zeigen egal in welchen Screen man ist?
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="MoPhat" data-source="post: 218561" data-attributes="member: 52536"><p>Danke habe mal reingeschaut, habe noch 1,2 Fragen...</p><p></p><p>Zu welcher Assembly (DLL) gehört dieser Namespace "using MediaPortal.Dialogs;"?</p><p></p><p>Wenn ich nur ein "Dialogbox" haben möchte der nur einen Titel und einen Text darstellt dass das Plugin zusammenstellt, wie stelle ich das an - auch das XML file???</p><p></p><p>Habe noch nicht grossartig mit den Skinfiles hantiert.</p><p></p><p>Den Code hier habe ich vom HelpPlugin</p><p></p><p> [CODE] void ShowHelp() {</p><p> // GUIWindowManager.ActiveWindow is the Window</p><p> int WindowId;</p><p> int ControlId = 0;</p><p> GUIWindow Window;</p><p></p><p> string notifyHeading = "Help";</p><p> string helpFile = "";</p><p> string windowHelp = "Sorry no help available for this window.";</p><p> string controlHelp = "";</p><p> string windowName = "";</p><p> string controlName = "";</p><p> string language = "";</p><p></p><p> GlobalServiceProvider.Get<ILog>().Debug("Help Plugin: Starting Help Dialog");</p><p></p><p> if((WindowId = (int)GUIWindowManager.VisibleOsd) == (int)GUIWindow.Window.WINDOW_INVALID)</p><p> WindowId = GUIWindowManager.ActiveWindow;</p><p> Window = GUIWindowManager.GetWindow(WindowId);</p><p> if(Window != null) {</p><p> ControlId = Window.GetFocusControlId();</p><p></p><p> using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config,"MediaPortal.xml")))</p><p> {</p><p> language = xmlreader.GetValueAsString("skin", "language", "English");</p><p> }</p><p></p><p> helpFile = Config.GetFile(Config.Dir.Language,language,"help.xml");</p><p> if(!File.Exists(helpFile))</p><p> helpFile = Config.GetFile(Config.Dir.Language,"English","help.xml");</p><p> if(File.Exists(helpFile)) {</p><p> XmlDocument help = new XmlDocument();</p><p> help.Load(helpFile);</p><p> try {</p><p> windowHelp = help.SelectSingleNode("/helpfile/window[id=" + WindowId + "]/help/text()").Value;</p><p> windowName = help.SelectSingleNode("/helpfile/window[id=" + WindowId + "]/name/text()").Value;</p><p> } catch {</p><p> GlobalServiceProvider.Get<ILog>().Warn("HelpPlugin: Could not find window " + WindowId + " in helpfile " + helpFile);</p><p> }</p><p> try {</p><p> controlHelp = help.SelectSingleNode("/helpfile/window[id=" + WindowId + "]/control[id=" + ControlId + "]/help/text()").Value;</p><p> controlName = help.SelectSingleNode("/helpfile/window[id=" + WindowId + "]/control[id=" + ControlId + "]/name/text()").Value;</p><p> } catch {</p><p> GlobalServiceProvider.Get<ILog>().Warn("HelpPlugin: Could not find control " + ControlId + " for window " + WindowId + " in helpfile " + helpFile);</p><p> }</p><p> } else {</p><p> GlobalServiceProvider.Get<ILog>().Error("HelpPlugin: Could not find helpfile " + helpFile);</p><p> }</p><p> }</p><p> // Dialog Text popup</p><p> GUIDialogText dlgText = (GUIDialogText)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_TEXT);</p><p> if(dlgText != null) {</p><p> notifyHeading += " for " + windowName; // 1023 Incoming call</p><p> if(controlName != "")</p><p> notifyHeading += " (" + controlName + ")";</p><p> GlobalServiceProvider.Get<ILog>().Debug("HelpPlugin: Showing Help for " + WindowId + " control " + ControlId);</p><p> dlgText.SetHeading(notifyHeading);</p><p> //dlgText.SetImage("");</p><p> string HelpText = "Window Help:\n\n" + windowHelp;</p><p> try {</p><p> HelpText += GetRemoteMappings();</p><p> } catch {</p><p> GlobalServiceProvider.Get<ILog>().Error("HelpPlugin: Could not get Remote Control Help. Wrong RemotePlugin.dll");</p><p> }</p><p> HelpText += GetKeyMappings(WindowId);</p><p> if(controlHelp.Length > 0)</p><p> HelpText += "\n\nControl Help:\n\n" + controlHelp;</p><p> dlgText.SetText(HelpText);</p><p> dlgText.DoModal(GUIWindowManager.ActiveWindow);</p><p> }</p><p> GlobalServiceProvider.Get<ILog>().Debug("Help Plugin: Finished Help Dialog");</p><p> }[/CODE]</p><p></p><p>Ich bräuchte wirklich nur das minimum, Titel und Text wird per Dialogbox in MP eingeblendet und soll dann nach paar Sekunden wieder geschlossen.</p><p></p><p></p><p></p><p>Danke für deine Hilfe</p><p>MoPhat</p></blockquote><p></p>
[QUOTE="MoPhat, post: 218561, member: 52536"] Danke habe mal reingeschaut, habe noch 1,2 Fragen... Zu welcher Assembly (DLL) gehört dieser Namespace "using MediaPortal.Dialogs;"? Wenn ich nur ein "Dialogbox" haben möchte der nur einen Titel und einen Text darstellt dass das Plugin zusammenstellt, wie stelle ich das an - auch das XML file??? Habe noch nicht grossartig mit den Skinfiles hantiert. Den Code hier habe ich vom HelpPlugin [CODE] void ShowHelp() { // GUIWindowManager.ActiveWindow is the Window int WindowId; int ControlId = 0; GUIWindow Window; string notifyHeading = "Help"; string helpFile = ""; string windowHelp = "Sorry no help available for this window."; string controlHelp = ""; string windowName = ""; string controlName = ""; string language = ""; GlobalServiceProvider.Get<ILog>().Debug("Help Plugin: Starting Help Dialog"); if((WindowId = (int)GUIWindowManager.VisibleOsd) == (int)GUIWindow.Window.WINDOW_INVALID) WindowId = GUIWindowManager.ActiveWindow; Window = GUIWindowManager.GetWindow(WindowId); if(Window != null) { ControlId = Window.GetFocusControlId(); using (MediaPortal.Profile.Settings xmlreader = new MediaPortal.Profile.Settings(Config.GetFile(Config.Dir.Config,"MediaPortal.xml"))) { language = xmlreader.GetValueAsString("skin", "language", "English"); } helpFile = Config.GetFile(Config.Dir.Language,language,"help.xml"); if(!File.Exists(helpFile)) helpFile = Config.GetFile(Config.Dir.Language,"English","help.xml"); if(File.Exists(helpFile)) { XmlDocument help = new XmlDocument(); help.Load(helpFile); try { windowHelp = help.SelectSingleNode("/helpfile/window[id=" + WindowId + "]/help/text()").Value; windowName = help.SelectSingleNode("/helpfile/window[id=" + WindowId + "]/name/text()").Value; } catch { GlobalServiceProvider.Get<ILog>().Warn("HelpPlugin: Could not find window " + WindowId + " in helpfile " + helpFile); } try { controlHelp = help.SelectSingleNode("/helpfile/window[id=" + WindowId + "]/control[id=" + ControlId + "]/help/text()").Value; controlName = help.SelectSingleNode("/helpfile/window[id=" + WindowId + "]/control[id=" + ControlId + "]/name/text()").Value; } catch { GlobalServiceProvider.Get<ILog>().Warn("HelpPlugin: Could not find control " + ControlId + " for window " + WindowId + " in helpfile " + helpFile); } } else { GlobalServiceProvider.Get<ILog>().Error("HelpPlugin: Could not find helpfile " + helpFile); } } // Dialog Text popup GUIDialogText dlgText = (GUIDialogText)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_TEXT); if(dlgText != null) { notifyHeading += " for " + windowName; // 1023 Incoming call if(controlName != "") notifyHeading += " (" + controlName + ")"; GlobalServiceProvider.Get<ILog>().Debug("HelpPlugin: Showing Help for " + WindowId + " control " + ControlId); dlgText.SetHeading(notifyHeading); //dlgText.SetImage(""); string HelpText = "Window Help:\n\n" + windowHelp; try { HelpText += GetRemoteMappings(); } catch { GlobalServiceProvider.Get<ILog>().Error("HelpPlugin: Could not get Remote Control Help. Wrong RemotePlugin.dll"); } HelpText += GetKeyMappings(WindowId); if(controlHelp.Length > 0) HelpText += "\n\nControl Help:\n\n" + controlHelp; dlgText.SetText(HelpText); dlgText.DoModal(GUIWindowManager.ActiveWindow); } GlobalServiceProvider.Get<ILog>().Debug("Help Plugin: Finished Help Dialog"); }[/CODE] Ich bräuchte wirklich nur das minimum, Titel und Text wird per Dialogbox in MP eingeblendet und soll dann nach paar Sekunden wieder geschlossen. Danke für deine Hilfe MoPhat [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Language specific support
Deutsches MediaPortal Forum
Plugins & Skins für das MediaPortal
Plugins & Erweiterungen
Fenster zeigen egal in welchen Screen man ist?
Contact us
RSS
Top
Bottom