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 2
Plugin Development
Questions on writing my first plugin
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="huha" data-source="post: 890168" data-attributes="member: 63847"><p>It's Working! <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /><img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p> </p><p>Changing the test plugin function to</p><p>[spoiler]public void SlimTv(string text)</p><p>{</p><p>HelloString = "message from slimtv="+text;</p><p>mylogger.Debug("SlimTv called parameter="+text);</p><p>}[/spoiler]</p><p> </p><p>and using</p><p> </p><p>[spoiler]<?xml version="1.0" encoding="utf-8"?></p><p><Include</p><p>xmlns="<a href="https://www.team-mediaportal.com/2008/mpf/directx" target="_blank">www.team-mediaportal.com/2008/mpf/directx</a>"</p><p>xmlns:x="<a href="http://schemas.microsoft.com/winfx/2006/xaml" target="_blank">http://schemas.microsoft.com/winfx/2006/xaml</a>"</p><p>Source="screens\simple_dialog_menu.xaml"</p><p>></p><p><Include.Resources></p><p><Service x:Key="ScreenManager" InterfaceName="ScreenManager"/></p><p> </p><p><!-- Dialog title --></p><p><ResourceWrapper x:Key="Dialog_Header_Text" Resource="[SlimTvClient.ChooseProgramAction]"/></p><p> </p><p><!-- SlimTvMultiChannelGuide model --></p><p><Model x:Key="SlimTvMultiChannelGuide" Id="5054408D-C2A9-451f-A702-E84AFCD29C10"/></p><p><Model x:Key="MyTestPluginSlimTv" Id="023c44f2-3329-4781-9b4a-c974444c0b0d"/></p><p> </p><p> </p><p><!-- Command --></p><p><CommandStencil x:Key="Execute_Command_Stencil"</p><p>Source="{StaticResource SlimTvMultiChannelGuide}" Path="ExecProgramAction"/></p><p> </p><p> </p><p><ControlTemplate x:Key="Contents_Template"></p><p> </p><p> </p><p><DockPanel Context="{Model Id=5054408D-C2A9-451f-A702-E84AFCD29C10}" LastChildFill="False"></p><p> </p><p><Grid HorizontalAlignment="Stretch"></p><p><Grid.ColumnDefinitions></p><p><ColumnDefinition Width="Auto"/></p><p> </p><p></Grid.ColumnDefinitions></p><p><Grid.RowDefinitions></p><p><RowDefinition Height="Auto"/></p><p><RowDefinition Height="*"/></p><p> </p><p></Grid.RowDefinitions></p><p><ListView Name="DialogMenu" Grid.Column="0" Grid.Row="0" ItemsSource="{Binding Source={StaticResource SlimTvMultiChannelGuide},Path=ProgramActions,Mode=OneTime}" Style="{ThemeResource MenuListViewStyle}"></p><p> </p><p></ListView></p><p> </p><p> </p><p><Button Style="{ThemeResource DialogButtonStyle}" Grid.Column="0" Grid.Row="1" Content="TvWish" HorizontalAlignment="Center"></p><p><Button.Command></p><p><CommandList></p><p> </p><p><!--<Command Source="{StaticResource MyTestPluginSlimTv}" Path="SlimTv" Parameters="huhatest"/>--></p><p><!--Parameters="{LateBoundValue BindingValue={Binding Path=SearchCity}}"/>--></p><p> </p><p><Command Source="{StaticResource MyTestPluginSlimTv}" Path="SlimTv" Parameters="{LateBoundValue BindingValue={Binding Source={StaticResource SlimTvMultiChannelGuide},Path=CurrentProgram.Title}}"/></p><p><Command Source="{Service ScreenManager}" Path="CloseTopmostDialog"/></p><p></CommandList></p><p></Button.Command></p><p></Button></p><p> </p><p></Grid></p><p> </p><p></DockPanel></p><p></ControlTemplate></p><p></Include.Resources></p><p></Include>[/spoiler]</p><p> </p><p>is transferring now the selected program title from SlimTv to MyTestplugin via parameters.</p></blockquote><p></p>
[QUOTE="huha, post: 890168, member: 63847"] It's Working! :):):) Changing the test plugin function to [spoiler]public void SlimTv(string text) { HelloString = "message from slimtv="+text; mylogger.Debug("SlimTv called parameter="+text); }[/spoiler] and using [spoiler]<?xml version="1.0" encoding="utf-8"?> <Include xmlns="[URL='https://www.team-mediaportal.com/2008/mpf/directx']www.team-mediaportal.com/2008/mpf/directx[/URL]" xmlns:x="[url]http://schemas.microsoft.com/winfx/2006/xaml[/url]" Source="screens\simple_dialog_menu.xaml" > <Include.Resources> <Service x:Key="ScreenManager" InterfaceName="ScreenManager"/> <!-- Dialog title --> <ResourceWrapper x:Key="Dialog_Header_Text" Resource="[SlimTvClient.ChooseProgramAction]"/> <!-- SlimTvMultiChannelGuide model --> <Model x:Key="SlimTvMultiChannelGuide" Id="5054408D-C2A9-451f-A702-E84AFCD29C10"/> <Model x:Key="MyTestPluginSlimTv" Id="023c44f2-3329-4781-9b4a-c974444c0b0d"/> <!-- Command --> <CommandStencil x:Key="Execute_Command_Stencil" Source="{StaticResource SlimTvMultiChannelGuide}" Path="ExecProgramAction"/> <ControlTemplate x:Key="Contents_Template"> <DockPanel Context="{Model Id=5054408D-C2A9-451f-A702-E84AFCD29C10}" LastChildFill="False"> <Grid HorizontalAlignment="Stretch"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <ListView Name="DialogMenu" Grid.Column="0" Grid.Row="0" ItemsSource="{Binding Source={StaticResource SlimTvMultiChannelGuide},Path=ProgramActions,Mode=OneTime}" Style="{ThemeResource MenuListViewStyle}"> </ListView> <Button Style="{ThemeResource DialogButtonStyle}" Grid.Column="0" Grid.Row="1" Content="TvWish" HorizontalAlignment="Center"> <Button.Command> <CommandList> <!--<Command Source="{StaticResource MyTestPluginSlimTv}" Path="SlimTv" Parameters="huhatest"/>--> <!--Parameters="{LateBoundValue BindingValue={Binding Path=SearchCity}}"/>--> <Command Source="{StaticResource MyTestPluginSlimTv}" Path="SlimTv" Parameters="{LateBoundValue BindingValue={Binding Source={StaticResource SlimTvMultiChannelGuide},Path=CurrentProgram.Title}}"/> <Command Source="{Service ScreenManager}" Path="CloseTopmostDialog"/> </CommandList> </Button.Command> </Button> </Grid> </DockPanel> </ControlTemplate> </Include.Resources> </Include>[/spoiler] is transferring now the selected program title from SlimTv to MyTestplugin via parameters. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Questions on writing my first plugin
Contact us
RSS
Top
Bottom