2011-09-28, 12:24 PM
Is it possible to embed a custom UserControl in a screen? It would just be for dynamic display and not direct user interaction.
2011-09-28, 12:24 PM
Is it possible to embed a custom UserControl in a screen? It would just be for dynamic display and not direct user interaction.
2011-09-28, 12:35 PM
Do you mean a WindowsForm UserControl in the NextPVR screen (not the settings dialog)? If so I don't see how this would be possible.
My Projects
Programs Plugin [SIZE=2](retired) | Volume OSD Plugin (retired) | Documentation Wiki (retired)[/SIZE]
2011-09-28, 12:58 PM
McBainUK Wrote:Do you mean a WindowsForm UserControl in the NextPVR screen (not the settings dialog)? Yes.
2011-09-28, 03:59 PM
You'd only be able to use a custom control on the settings screen.
2011-09-28, 07:26 PM
Ok, but I hope you will consider adding this. I have a Pandora music plugin that I wrote for other programs that could be converted to work in NPVR if I could embed my custom UserControl (essentially displays and interacts with the .NET web browser control). Alternatively, the capability of adding a web browser element to a skin/screen with direct access in code to the underlying browser control would work too.
2011-09-28, 07:46 PM
To be honest, it's unlikely I'd add support for this type of custom control in the core app. The UI is designed to work in a way that makes it compatible with extenders etc, whereas this custom control wouldnt be visible over a network from an extender, so it's not really a path I'd want to go down for the main application.
There are probably still options for you though. If you're not concerned about compatibility with extender clients, you could probably create a form with this control embedded, and overlay it on top of the main application window when the user activates your plugin, and hide the form when the user leaves the plugin. Even if you want leave music playback happening in the background (in hidden form with browser control), there is APIs you can call with current song names etc, so that the 'now playing' field etc show correct info in other NextPVR screens.
2011-09-28, 07:59 PM
sub Wrote:If you're not concerned about compatibility with extender clients, you could probably create a form with this control embedded, and overlay it on top of the main application window when the user activates your plugin, and hide the form when the user leaves the plugin. This will probably work for me. Thanks for the suggestion.
2011-09-28, 08:08 PM
If you know the song names, you can use the PluginHelperFactory.GetPluginHelper().SetAudioDescription(xxxxx) API to tell the application what song is playing. Pass in null when audio stops.
I have an element in my skin to represent a rectangle where my Form should be positioned but I'm having a little trouble. I can get an appropriate rectangle that represents the element when NPVR is fullscreen but the rectangle doesn't take into account the app's location and size if windowed and also doesn't take into account the "UI Zoom Percent". I thought
Code: SkinHelper.GetDisplayRect( skinHelper.GetRelativeElementRectangle("BrowserArea"))
2011-10-02, 08:47 PM
Those APIs are really about rectangles within the current screen, and not about window placement.
There is no API to determine where the window is on the desktop, but you can probably work it out via "Process.GetCurrentProcess().MainWindowHandle", or I can add some API in the next release. |
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Custom recording | tomx | 2 | 86 |
2025-02-07, 09:14 AM Last Post: tomx |
|
custom creation of a recurring error | p37307 | 2 | 2,102 |
2017-12-19, 03:45 AM Last Post: mvallevand |
|
Custom recording rules | mvallevand | 58 | 20,901 |
2014-12-08, 03:28 AM Last Post: mvallevand |
|
Attention Sub: Open TV / Custom Data Grabber plugin | Benoire | 2 | 2,799 |
2014-11-14, 02:05 AM Last Post: Benoire |
|
How to display custom plugin names and descriptions. | whurlston | 29 | 6,922 |
2010-01-03, 08:48 PM Last Post: whurlston |
|
Custom popups? | bgowland | 2 | 1,704 |
2008-05-11, 12:26 AM Last Post: bgowland |
|
custom screen saver, returning to last plugin | reven | 2 | 1,605 |
2006-05-17, 09:21 PM Last Post: sub |
|
skins and custom tasks | stp | 8 | 3,289 |
2004-05-09, 05:42 PM Last Post: stp |