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!)
GULISTITEM Question
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="chrisonline" data-source="post: 220558" data-attributes="member: 55093"><p>I try to write my first plugin and have no experience in C# <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p>Perfect situation to begin ;-)</p><p></p><p>First i have made the tutorial plugin successfully and now i want to add an listcontrol to the screen.</p><p>The listcontrol shows up perfectly.</p><p></p><p>When i click on the listcontrol it should play a URL.</p><p></p><p>And this is my problem how could i know which list item is clicked?</p><p>And how could i set an value to every list item (the value should be the url) ?</p><p></p><p>Below theres a code example.</p><p>The popup works but how could i show in the popup the clicked item?</p><p></p><p>----------------------</p><p> protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType)</p><p> {</p><p> if (control == trailerList)</p><p> OnTrailerList();</p><p></p><p> base.OnClicked(controlId, control, actionType);</p><p> }</p><p></p><p> private void OnTrailerList()</p><p> {</p><p> GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow(</p><p> (int)GUIWindow.Window.WINDOW_DIALOG_OK);</p><p> dlg.SetHeading("Trailerlist wurde gedrückt");</p><p> dlg.SetLine(1, "YEAH");</p><p> dlg.DoModal(GUIWindowManager.ActiveWindow);</p><p> }</p><p>..</p><p> trailerList.Add(new GUIListItem("Test"));</p><p> trailerList.Add(new GUIListItem("Test 2"));</p><p>...</p><p>---------------</p><p></p><p>Please help <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="chrisonline, post: 220558, member: 55093"] I try to write my first plugin and have no experience in C# :-) Perfect situation to begin ;-) First i have made the tutorial plugin successfully and now i want to add an listcontrol to the screen. The listcontrol shows up perfectly. When i click on the listcontrol it should play a URL. And this is my problem how could i know which list item is clicked? And how could i set an value to every list item (the value should be the url) ? Below theres a code example. The popup works but how could i show in the popup the clicked item? ---------------------- protected override void OnClicked(int controlId, GUIControl control, MediaPortal.GUI.Library.Action.ActionType actionType) { if (control == trailerList) OnTrailerList(); base.OnClicked(controlId, control, actionType); } private void OnTrailerList() { GUIDialogOK dlg = (GUIDialogOK)GUIWindowManager.GetWindow( (int)GUIWindow.Window.WINDOW_DIALOG_OK); dlg.SetHeading("Trailerlist wurde gedrückt"); dlg.SetLine(1, "YEAH"); dlg.DoModal(GUIWindowManager.ActiveWindow); } .. trailerList.Add(new GUIListItem("Test")); trailerList.Add(new GUIListItem("Test 2")); ... --------------- Please help :-) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
GULISTITEM Question
Contact us
RSS
Top
Bottom