NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 66 67 68 69 70 … 93 Next »
Dynamic DrawText in skin vs. DrawString in code

 
  • 0 Vote(s) - 0 Average
Dynamic DrawText in skin vs. DrawString in code
Spartan
Offline

Senior Member

Posts: 457
Threads: 28
Joined: Mar 2005
#1
2005-10-13, 05:23 PM
All, I am playing around with developing my own system information plugin. Here is what I have thus far:

[Image: sysinfo.JPG]

The problem I am having is making it flexible in terms of skinning. Right now I am using a CompositeImage along with a DrawRoundedRect to draw the rectangle around the drive information -- this part is in the skin.

However, in the code, I have it set to enumerate the drives and their status using absolute positioning. I am using DrawString and DrawRoundRect (from the original sysinfo plugin) to accomplish this.

The problem is that the skin can't know how many drives there are.

To rectify this, I was thinking of manually parsing the skin.xml file and adding my own nodes prior to calling the SkinHelper constructor. At least then, the dynamically created nodes would be relative to the parent CompositeImage/DrawRoundedRect.

Any other ideas?
GBPVR v1.0.16 | Comskip | SportsScores | Weather | I-XmlTV

Server: Tyan Thunder h1000E | 2 x Opteron 2210 | 2GB PC2-5300 DDR2 ECC
LSI MegaRAID 300-8X SATA RAID
1x 73GB SCSI @ 10K RPM (OS)
3x 500GB SATA @ 7.2K RPM (RAID 5) (4 Partitions: Docs, Still Pics, Home Movies, Music)
2x 160GB IDE @ 7.2K RPM (RAID 0) (Recordings)
Hauppauge HVR-1600

Client: Gigabyte GA-MA69GM-S2H | Athlon x2 5000+ BE | 2GB PC-6400 DDR2
1x 320GB SATA @ 7.2K RPM
Antec NSX2480 Case
MCE Remote
Jeff
Offline

Posting Freak

Posts: 1,933
Threads: 69
Joined: Oct 2004
#2
2005-10-13, 06:17 PM
Lots of plug-ins have lists that are vary in size, incldiung recording lists, music lists, tv guide, weather, etc. Typically these are handled in the skin by setting the position of the first item, an image for a list item, and a spacing paramter between items. Your code would then handle the drawing of the items by moving each list item down by the proper spacing. The weather plug-in has an example of this in the skin file and code for the extended forecast.

Jeff
Spartan
Offline

Senior Member

Posts: 457
Threads: 28
Joined: Mar 2005
#3
2005-10-13, 06:25 PM
Jeff Wrote:Lots of plug-ins have lists that are vary in size, incldiung recording lists, music lists, tv guide, weather, etc. Typically these are handled in the skin by setting the position of the first item, an image for a list item, and a spacing paramter between items. Your code would then handle the drawing of the items by moving each list item down by the proper spacing. The weather plug-in has an example of this in the skin file and code for the extended forecast.

Jeff

Nice -- I knew there had to be examples of this somewhere, I just couldn't think of any. :o Does that pattern also handle "scrollable lists"?
GBPVR v1.0.16 | Comskip | SportsScores | Weather | I-XmlTV

Server: Tyan Thunder h1000E | 2 x Opteron 2210 | 2GB PC2-5300 DDR2 ECC
LSI MegaRAID 300-8X SATA RAID
1x 73GB SCSI @ 10K RPM (OS)
3x 500GB SATA @ 7.2K RPM (RAID 5) (4 Partitions: Docs, Still Pics, Home Movies, Music)
2x 160GB IDE @ 7.2K RPM (RAID 0) (Recordings)
Hauppauge HVR-1600

Client: Gigabyte GA-MA69GM-S2H | Athlon x2 5000+ BE | 2GB PC-6400 DDR2
1x 320GB SATA @ 7.2K RPM
Antec NSX2480 Case
MCE Remote
Jeff
Offline

Posting Freak

Posts: 1,933
Threads: 69
Joined: Oct 2004
#4
2005-10-13, 06:41 PM
No, it does not. However, the example posted at http://gbpvr.com/pmwiki/uploads/Developm...eleton.zip does.

Jeff
jorm
Offline

Posting Freak

Posts: 2,014
Threads: 109
Joined: Aug 2004
#5
2005-10-13, 06:48 PM
cool plugin other useful info would be

displaying the status of each tuner card.
and the number of days of epg.
WinXP Home
3 X MVPs
Hauppauge 250 MCE
Hauppauge 150
P-4 2.4 GHz / 768 megs Ram
610 Gigs Of Media Storage
Spartan
Offline

Senior Member

Posts: 457
Threads: 28
Joined: Mar 2005
#6
2005-10-13, 07:02 PM
jorm Wrote:cool plugin other useful info would be

displaying the status of each tuner card.
and the number of days of epg.

Right -- time permitting I will do something like that.

Originally I had started looking at the other new SystemInfo plugin out there (which does list the EPG data), but since it was written in VB.net (which I absolutely cannot stand), I decided to hack up the archaic sysinfo plug-in (C#) from about a year ago.

My main goal was to have a screen where I could view the status of my hard drives graphically on a single page.
GBPVR v1.0.16 | Comskip | SportsScores | Weather | I-XmlTV

Server: Tyan Thunder h1000E | 2 x Opteron 2210 | 2GB PC2-5300 DDR2 ECC
LSI MegaRAID 300-8X SATA RAID
1x 73GB SCSI @ 10K RPM (OS)
3x 500GB SATA @ 7.2K RPM (RAID 5) (4 Partitions: Docs, Still Pics, Home Movies, Music)
2x 160GB IDE @ 7.2K RPM (RAID 0) (Recordings)
Hauppauge HVR-1600

Client: Gigabyte GA-MA69GM-S2H | Athlon x2 5000+ BE | 2GB PC-6400 DDR2
1x 320GB SATA @ 7.2K RPM
Antec NSX2480 Case
MCE Remote
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#7
2005-10-13, 07:05 PM
Jorm, my plugin shows information on the EPG content...just not all the drive information that Spartan has - http://forums.nextpvr.com/showthread.php?t=9320

There were 2 releases so ge the second one.
psycik
Offline

Posting Freak

Posts: 5,210
Threads: 424
Joined: Sep 2005
#8
2005-10-13, 07:06 PM (This post was last modified: 2005-10-13, 07:11 PM by psycik.)
Spartan, forgive me for writing in VB.net. It was my first, and VB is much more native to me.

You'll be pleased to know that any of my subsequent plugins shall be C#.

Maybe I should recode that one.....Smile
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Remote control example code? drmargarit 4 3,891 2018-04-21, 11:24 PM
Last Post: drmargarit
  Skin help (correct location?) SFX Group 4 3,945 2018-01-24, 07:42 AM
Last Post: pBS
  Looking for C# UPnP Media Server code bgowland 5 7,737 2016-12-16, 08:25 PM
Last Post: mvallevand
  skin question pBS 2 3,382 2016-06-18, 07:03 PM
Last Post: pBS
  Skin - view further into the future, scale the guide Vitenka 5 3,373 2014-11-26, 07:28 PM
Last Post: Vitenka
  Weird Code problem - serialisation (I'll spell it the proper way!!"0 psycik 22 6,397 2011-11-25, 03:16 AM
Last Post: whurlston
  sample video overlay plugin source code? reven 2 2,434 2011-10-03, 12:42 AM
Last Post: reven
  Skin element Details in NowNext Jaggy 2 1,838 2011-09-19, 11:50 PM
Last Post: Jaggy
  C# code to get data directory? McBainUK 2 2,820 2011-09-19, 07:57 PM
Last Post: McBainUK
  Skin Help with Line Drawing Northpole 2 1,980 2011-07-19, 05:14 PM
Last Post: Northpole

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

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

Linear Mode
Threaded Mode