NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 19 20 21 22 23 … 93 Next »
NPVR NewStyleButtonListPlugin request

 
  • 0 Vote(s) - 0 Average
NPVR NewStyleButtonListPlugin request
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#1
2010-06-16, 03:18 PM (This post was last modified: 2010-06-16, 03:41 PM by whurlston.)
Would it be possible to get an Initialise(UiList.ViewMode viewMode) override so that the list does not have to be populated twice if you want to start in ViewMode.COVERS? Or is there a better way to do this?

Code:
protected override void Initialise()
{
    base.Initialise(); // PopulateList called here.
    uiList.SetViewMode(UiList.ViewMode.COVERS);
    PopulateList(); // refresh list after changing viewmode.
}
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,666
Threads: 767
Joined: Nov 2003
#2
2010-06-16, 04:43 PM
Its not cleaner, but you could save yourselve a few cycles by doing something like the follow. It may help if its CPU or Disk intenstive to load the contents of your list.

Code:
protected override void Initialise()
{
    base.Initialise(); // PopulateList called here.

    List<UiList.ListObject> objects = uiList.GetListObjects();
    uiList.SetViewMode(UiList.ViewMode.COVERS);
    uiList.SetListObjects(objects)
}

I could add a variable like 'base.initialListView' which you can set prior to calling "base.Initialise();"
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#3
2010-06-16, 06:20 PM
sub Wrote:Its not cleaner, but you could save yourselve a few cycles by doing something like the follow. It may help if its CPU or Disk intenstive to load the contents of your list.
Good point. I don't actually need to populate it in PopulateList do I.
sub Wrote:I could add a variable like 'base.initialListView' which you can set prior to calling "base.Initialise();"

I'm good now so only add it if you want to do so.

On to my next question:

Is there any way to update a single item in uiList's ListObjects without having to update the entire list?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,666
Threads: 767
Joined: Nov 2003
#4
2010-06-16, 06:26 PM
Sure, you can call 'List<UiList.ListObject> objects = uiList.GetListObjects();' and do something with one of those items (and not have to call SetListObjects() again). Next renderer will pickup that change.
whurlston
Offline

Posting Freak

Posts: 7,885
Threads: 102
Joined: Nov 2006
#5
2010-06-16, 06:49 PM
I was attempting that in the but I couldn't get it to work in getrenderlist() before calling base.GetRenderList but it didn't work. It does seem to be working in the onKeyDown though.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Way to tell programmatically if channel load in from NPVR has finished... gdogg371 3 2,347 2021-03-11, 03:59 PM
Last Post: mvallevand
  Plugins and NPVR. Where do we start? sub 80 68,259 2020-11-26, 10:02 PM
Last Post: mandai
  Test/Development environment for npvr.db3 scJohn 10 4,255 2020-09-04, 09:14 PM
Last Post: scJohn
  API request returns xml on error scJohn 4 1,872 2020-08-25, 05:41 PM
Last Post: sub
  How to extract M3U8 and get matching XMLTV guide data from NPVR almightyj 0 3,400 2018-10-23, 07:24 AM
Last Post: almightyj
  ios app to control npvr ui idea jnbooker15 4 3,571 2015-09-21, 10:19 PM
Last Post: sub
  ios app to control npvr ui idea jnbooker15 0 2,454 2015-09-21, 06:39 PM
Last Post: jnbooker15
  Couple of questions about hacking npvr.db3 drmargarit 6 4,229 2014-09-08, 02:22 AM
Last Post: sub
  high res (256x256+) npvr icon? reven 15 5,799 2013-09-01, 05:13 AM
Last Post: psycik
  trying to fake npvr database for unit tests reven 3 2,248 2013-05-20, 08:53 AM
Last Post: reven

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

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

Linear Mode
Threaded Mode