NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 5 6 7 8 9 … 93 Next »
Noobie Here!

 
  • 0 Vote(s) - 0 Average
Noobie Here!
jrockow
Offline

Senior Member

Posts: 713
Threads: 110
Joined: Nov 2005
#11
2014-03-10, 03:34 AM
Also, it appears LoadALL gives me all the records in the table.
What does LoadCompleted get me; those with Status=2?
jrockow
Offline

Senior Member

Posts: 713
Threads: 110
Joined: Nov 2005
#12
2014-03-11, 03:31 AM
Another question.....
How do I go about getting my code to recognize a new listview element I created in the skin file?
jrockow
Offline

Senior Member

Posts: 713
Threads: 110
Joined: Nov 2005
#13
2014-03-11, 10:33 AM
More....
Can you explain "alpha="130", "alpha="200", etc. in the skin file?

Also, I converted the Test3 C# code to Visual Basic.
Everything went well except for 2 items; "IPlugin Callback" and "IPluginConfiguration".
Can you tell me what they are for?
jrockow
Offline

Senior Member

Posts: 713
Threads: 110
Joined: Nov 2005
#14
2014-03-11, 03:03 PM
The more I learn, the less I know! Smile

I've been going over all the skin files trying to figure out how to make things happen.
Some things I can get, others I can't seem to find any info on.
For example, how would I change the overall screen background?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#15
2014-03-11, 04:23 PM
jrockow Wrote:Also, it appears LoadALL gives me all the records in the table.
What does LoadCompleted get me; those with Status=2?
Sorry - didn't see your posts earlier.

Yes, you can use calls like those below to get the list of recordings:

Code:
List<ScheduledRecording> recordings = ScheduledRecording.LoadAll();

Which will give you the list of recordings. The Status attribute can be used like this:

Code:
foreach (ScheduledRecording recording in recordings)
{
    if (recording.Status == RecordingStatus.STATUS_COMPLETED)
    {
          // do something
    }
}
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#16
2014-03-11, 04:25 PM
jrockow Wrote:More....
Can you explain "alpha="130", "alpha="200", etc. in the skin file?
These are how transparent an item is. The range is 0-256.

Quote:Also, I converted the Test3 C# code to Visual Basic.
Everything went well except for 2 items; "IPlugin Callback" and "IPluginConfiguration".
Can you tell me what they are for?
I don't write VB myself, so can't tell you the exact syntax for these. They're definitely possible though, because others have done it in the past.

IPluginConfiguration is used if you wanted to provide a configuration screen in Settings->Plugins.

IPluginCallback is only used if you want to call some other screen or popup, and receive info back from it.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#17
2014-03-11, 04:46 PM
jrockow Wrote:The more I learn, the less I know! Smile

I've been going over all the skin files trying to figure out how to make things happen.
Some things I can get, others I can't seem to find any info on.
For example, how would I change the overall screen background?
You'd need to do a couple of things. Below is code I haven't compiled, but shows the basic steps.

In your skin file add an element that defines the location and size of the thing you want to show, and what you want to show in it (images/text/shapes etc):
Code:
    <Element name="MyElement" location="0,0" size="100,100" >
        <Image source="@myImage" location="0,0" size="100,100" fixedAspectRatio="true" />
    </Element>

In the code, add a private variable for your UIStatic:
Code:
private UiStatic myBackgroundStatic;

In the Activate() method of your plugin, initialise your UIStatic, with any args use specified in the xml file:
Code:
Hashtable args = new Hashtable();
args["@myImage"] = someBitmapObject;
myBackgroundStatic = new UIStatic("MyElement", args, skinHelper);

Override the GetRenderList() method to add your extra item to the render list:
Code:
override List<UIElement> GetRenderList()
{
    List<UIElement> renderList = base.GetRenderList();
    renderList.Insert(0, myBackgroundStatic.GetRenderList());
    return renderList;
}
jrockow
Offline

Senior Member

Posts: 713
Threads: 110
Joined: Nov 2005
#18
2014-03-11, 05:15 PM
OK, I'll dig into the new info you left.

When you get a minute, can you respond to post #10.

Thanx!
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,677
Threads: 767
Joined: Nov 2003
#19
2014-03-11, 05:24 PM
jrockow Wrote:It's going pretty good so far.
Think I'm starting to get the hang of it.

However, I have more questions:
My biggest problem at the moment is not knowing what's available for me to use.
It looks like I figured out how to get the NAME, FILENAME, STATUS, STARTTIME and EVENTOID from the DB.

I don't know how to get the DESCRIPTION or SUBTITLE.
I also don't know how to sort the columns.

With the other plugin I created I made my own call to the DB so I had no problem getting those values.

If you could help me with that I would appreciate it.
As shown in the example above, you can use the ScheduledRecording.LoadAll() method to load the list of recordings.

If you'd like the subtitle, check if it has EPGEvent details, then use that info:
Code:
if (recording.CachedEventDetails != null && recording.CachedEventDetails != "")
                            {
                                EPGEvent epgEvent = EPGEvent.Parse(recording.CachedEventDetails);
                                // use attributes like epgEvent.SubTitle
                            }
It wont have these CachedEventDetails it was a manual recording. ie, just recording a specified channel at a specified time.
jrockow
Offline

Senior Member

Posts: 713
Threads: 110
Joined: Nov 2005
#20
2014-03-11, 07:03 PM
Error Fetching Event Details:

'System.Collections.Generic.List<NUtility.ScheduledRecording>' does not contain a definition for 'CachedEventDetails' and no extension method 'CachedEventDetails' accepting a first argument of type 'System.Collections.Generic.List<NUtility.ScheduledRecording>' could be found (are you missing a using directive or an assembly reference?)

CODE: If recordings. IsNot Nothing AndAlso recordings.CachedEventDetails <> "" Then


Error Loading New Skin Element:

Value of type 'System.Collections.Generic.List(Of NUtility.UiElement)' cannot be converted to 'NUtility.UiElement'.

Code: renderList.Insert(0, descriptionStatic.GetRenderList())
« Next Oldest | Next Newest »

Users browsing this thread: 2 Guest(s)

Pages (17): « Previous 1 2 3 4 5 … 17 Next »
Jump to page 


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

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

Linear Mode
Threaded Mode