NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 45 46 47 48 49 … 93 Next »
c# question from GbpvrUiElementsExamplePlugin

 
  • 0 Vote(s) - 0 Average
c# question from GbpvrUiElementsExamplePlugin
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#1
2007-03-18, 10:28 PM
Ok I'm not a c# programmer...
This code was cut out of GbpvrUiElementsExamplePlugin source, and is probably a question for McBainUK since he wrote it.

Hashtable displayArgs = new Hashtable();
displayArgs["@animalName"] = animal1.Name;
displayArgs["@animalType"] = animal1.AnimalType;
customListExample.Add(displayArgs,animal1);

I understand what a hashtable is used for but I don't get what the line:

displayArgs["@animalName"] = animal1.Name;

is actually doing besides somehow intializing the index in the hashtable.
I know animal1.Name returns a string, but what does ["@animalName"] do?


And somehow the next line
displayArgs["@animalType"] = animal1.AnimalType;

Inits the value?
GBpvr PC: Intel Celeron 1.8 Ghz. 768 Mb WinXp Home Sp2
Video: Diamond 128 Mb 9550
Capture Cards: PVR-150 & PVR-150 MCE w/fm + 2x MVP
Author of: BurnDVDX2 and Skiptool
Jeff
Offline

Posting Freak

Posts: 1,933
Threads: 69
Joined: Oct 2004
#2
2007-03-19, 12:42 AM
If you look in the example skin file you should see a parameter in the skin names @animalName as well. This is how plug-ins pass variable information into a skin. The GBPVR skin helper substitutes the text from animal1.Name into the specified field in the skin.

Jeff
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#3
2007-03-19, 02:17 AM
Jeff Wrote:If you look in the example skin file you should see a parameter in the skin names @animalName as well. This is how plug-ins pass variable information into a skin. The GBPVR skin helper substitutes the text from animal1.Name into the specified field in the skin.

Jeff

ok that makes sense. I was actually stuck on the syntax of the expression.
I did a little reading on the MS site and I think I understand what is gonig on.


displayArgs2["@animalName"] = animal2.Name;
displayArgs2["@animalType"] = animal2.AnimalType;

sets the first two elements of displayargs2 since they were not already in the hashtable.

I haven't seen the syntax displayArgs2["@animalName"] before and from my mostly c background, I didn't know what the expression was actually doing.
I guess it's time to read the c# pdf that I have..
GBpvr PC: Intel Celeron 1.8 Ghz. 768 Mb WinXp Home Sp2
Video: Diamond 128 Mb 9550
Capture Cards: PVR-150 & PVR-150 MCE w/fm + 2x MVP
Author of: BurnDVDX2 and Skiptool
McBainUK
Offline

Posting Freak

Posts: 4,711
Threads: 429
Joined: Sep 2005
#4
2007-03-19, 08:51 AM
This maybe a good start

http://msdn.microsoft.com/library/defaul..._start.asp
Wiki profile
My Projects
Programs Plugin [SIZE=2](retired)
| Volume OSD Plugin (retired) | Documentation Wiki (retired)
[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Web API only_new Question Gazavant 6 2,740 2021-04-04, 06:54 PM
Last Post: sub
  Another Artwork question scJohn 15 8,297 2019-09-10, 05:33 PM
Last Post: nonob
  WEB API GuidService/Listing question(s) scJohn 6 4,351 2017-08-09, 02:18 PM
Last Post: scJohn
  skin question pBS 2 3,363 2016-06-18, 07:03 PM
Last Post: pBS
  Another SQL question bgowland 15 7,366 2014-05-21, 08:09 AM
Last Post: bgowland
  Timing.Info question mvallevand 2 2,104 2013-04-19, 03:54 AM
Last Post: mvallevand
  N-PVR db3 EPG_EVENT time format question bgowland 3 2,137 2011-03-12, 05:26 AM
Last Post: bgowland
  Ping UncleJohnsBand (question about npvr soap) ioan 2 2,085 2011-02-18, 01:12 AM
Last Post: UncleJohnsBand
  Skin question - how to centre a list UiList control on screen? McBainUK 2 1,879 2011-02-17, 08:46 AM
Last Post: McBainUK
  Skin question for "Visible" 7ore 14 5,417 2010-09-22, 09:04 PM
Last Post: sub

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode