NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 20 21 22 23 24 … 93 Next »
WizTools - 1.x Plugin Development Toolkit

 
  • 0 Vote(s) - 0 Average
WizTools - 1.x Plugin Development Toolkit
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#101
2008-01-01, 05:09 PM
idkpmiller Wrote:First off the andatory, Happy New Year!
Big Grin

JavaWiz if you have time could you post a routine to handle files in your list I am trying to add two properties @text which I use to store the filename without the path and extention (shortname) and @tag which I am using to store the longname this includes the pathand extention.

I would like to display just the shortname but upon selection etrive the shortname and the longname selected.

I am having issues getting this to workas I want it, do you have any example snippets of code that would show me how the uilist works better with multiple properties

Thanks


I do that a little differently. I create a sorted list that contains objects that have both the shortname and longname stored in it. After I create the sortedlist with all of these, I then set the wizlist with

Code:
[SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][SIZE=2] setwizlist()
{
[/SIZE][SIZE=2][COLOR=#2b91af]ArrayList[/COLOR][/SIZE][SIZE=2] itemList = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]ArrayList[/COLOR][/SIZE][SIZE=2]();
[/SIZE][SIZE=2][COLOR=#0000ff]for[/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][SIZE=2] i = 0; i < fileList.Count; i++)

{
[/SIZE][SIZE=2][COLOR=#2b91af]FileObject[/COLOR][/SIZE][SIZE=2] fileObject = ([/SIZE][SIZE=2][COLOR=#2b91af]FileObject[/COLOR][/SIZE][SIZE=2])fileList.GetByIndex(i);
[/SIZE][SIZE=2][COLOR=#2b91af]WizUiList[/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af]WizListItem[/COLOR][/SIZE][SIZE=2] item = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]WizUiList[/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af]WizListItem[/COLOR][/SIZE][SIZE=2]();
item.AddProperty([/SIZE][SIZE=2][COLOR=#a31515]"@text"[/COLOR][/SIZE][SIZE=2], fileObject.Shortname);
[/SIZE][SIZE=2]itemList.Add(item);
}
lstMyList1.setItemList(itemList);
[/SIZE]

text is what gets displayed. I did it this way because there was a lot of legacy code from tmrt that I didn't want to change that referenced the fileobject within the sortedlist
When I have a selected item in the wizuilist, it references the same spot in the other list. This does seem a little redundant but it works..

You could easily change this to add another property to add a longname.


I can post the code that creates the sortedlist if you want too.
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
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#102
2008-01-01, 05:49 PM
Pastro's example is pretty close to what you want. I'll make a small change to it:

Code:
[SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][SIZE=2] SetWizlist()[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#2b91af]ArrayList[/COLOR][/SIZE][SIZE=2] itemList = newArrayList();[/SIZE]
[SIZE=2][COLOR=#0000ff]for[/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][SIZE=2] i = 0; i < fileList.Count; i++)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]  FileObject fileObject = (FileObject)fileList.GetByIndex(i);[/SIZE]
[SIZE=2][COLOR=#2b91af]  WizUiList[/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af]WizListItem[/COLOR][/SIZE][SIZE=2] item = newWizUiList.WizListItem();[/SIZE]
[SIZE=2]  item.AddProperty([/SIZE][SIZE=2][COLOR=#a31515]"@text"[/COLOR][/SIZE][SIZE=2], fileObject.Shortname);[/SIZE]
[SIZE=2]  item.AddProperty([/SIZE][SIZE=2][COLOR=#a31515]"@tag"[/COLOR][/SIZE][SIZE=2], fileObject.Longname);[/SIZE]
[SIZE=2]  itemList.Add(item);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]lstMyList1.setItemList(itemList);[/SIZE]
[SIZE=2]}[/SIZE]

[SIZE=2][COLOR=#008000]// To return the Longname for selected item[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][SIZE=2] getLongName()[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#2b91af]WizUiList[/COLOR][/SIZE][SIZE=2].[/SIZE][SIZE=2][COLOR=#2b91af]WizListItem[/COLOR][/SIZE][SIZE=2] item = lstMyList1.getCurrentItem();[/SIZE]
[SIZE=2][COLOR=#0000ff]return[/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][SIZE=2])item.getProperty([/SIZE][SIZE=2][COLOR=#a31515]"@tag"[/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2]}[/SIZE]

Hope that answers your question.
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#103
2008-01-01, 06:22 PM
JavaWiz Wrote:Pastro's example is pretty close to what you want. I'll make a small change to it:

Code:
[SIZE=2]snip..[/SIZE]

Hope that answers your question.

Good point jw.

Since I store the fileobject in my other list I don't add the property for longname in since it is already in filelist. Your mileage might be different, since you might only need the two things stored.

Here's the code that puts the filenames and directories in the filelist
This code was adapted from tmrt's orignal burndvd code.

Code:
[SIZE=2][COLOR=#0000ff]public[/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]void[/COLOR][/SIZE][SIZE=2] InitFileList()[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2][COLOR=#2b91af]FileObject[/COLOR][/SIZE][SIZE=2] fileObject;[/SIZE]

[SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (fileList == [/SIZE][SIZE=2][COLOR=#0000ff]null[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]fileList = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]SortedList[/COLOR][/SIZE][SIZE=2]();[/SIZE]
[SIZE=2][COLOR=#008000]// Clear the list of files[/COLOR][/SIZE]
[SIZE=2]fileList.Clear();[/SIZE]

[SIZE=2][COLOR=#008000]// Fill the list of files[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#2b91af]Directory[/COLOR][/SIZE][SIZE=2].Exists(m_currPath))  //current path[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]fileObject = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]FileObject[/COLOR][/SIZE][SIZE=2]();[/SIZE]
[SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (!m_currPath.EndsWith([/SIZE][SIZE=2][COLOR=#a31515]"\\"[/COLOR][/SIZE][SIZE=2]))[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]m_currPath = m_currPath + [/SIZE][SIZE=2][COLOR=#a31515]"\\"[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]lblSimple.Text = [/SIZE][SIZE=2][COLOR=#a31515]"File System:"[/COLOR][/SIZE][SIZE=2] + m_currPath;[/SIZE]
[SIZE=2]fileObject.Shortname = [/SIZE][SIZE=2][COLOR=#a31515]"[..] (Go Up a Directory Level)"[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]fileObject.Longname = [/SIZE][SIZE=2][COLOR=#2b91af]Path[/COLOR][/SIZE][SIZE=2].GetFullPath([/SIZE][SIZE=2][COLOR=#2b91af]Path[/COLOR][/SIZE][SIZE=2].Combine(m_currPath, [/SIZE][SIZE=2][COLOR=#a31515]"..\\"[/COLOR][/SIZE][SIZE=2]));[/SIZE]
[SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (fileObject.Longname == m_currPath) fileObject.Longname = [/SIZE][SIZE=2][COLOR=#a31515]""[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]fileObject.IsDir = [/SIZE][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]fileList.Add(fileObject.Longname, fileObject);[/SIZE]

[SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][SIZE=2][] directories = [/SIZE][SIZE=2][COLOR=#2b91af]Directory[/COLOR][/SIZE][SIZE=2].GetDirectories(m_currPath);[/SIZE]
[SIZE=2][COLOR=#0000ff]foreach[/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][SIZE=2] longname [/SIZE][SIZE=2][COLOR=#0000ff]in[/COLOR][/SIZE][SIZE=2] directories)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]fileObject = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]FileObject[/COLOR][/SIZE][SIZE=2]();[/SIZE]
[SIZE=2][COLOR=#2b91af]DirectoryInfo[/COLOR][/SIZE][SIZE=2] dInfo = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]DirectoryInfo[/COLOR][/SIZE][SIZE=2](longname);[/SIZE]
[SIZE=2]fileObject.Shortname = [/SIZE][SIZE=2][COLOR=#a31515]"["[/COLOR][/SIZE][SIZE=2] + dInfo.Name + [/SIZE][SIZE=2][COLOR=#a31515]"]"[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]fileObject.Longname = dInfo.FullName;[/SIZE]
[SIZE=2]fileObject.IsDir = [/SIZE][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2][COLOR=#008000]// Add it to the list sorted by name[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (fileList.ContainsKey(fileObject.Longname) == [/SIZE][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]fileList.Add(fileObject.Longname, fileObject);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#008000]// Get all the mpg files in this directory[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][SIZE=2][] filenames = [/SIZE][SIZE=2][COLOR=#2b91af]Directory[/COLOR][/SIZE][SIZE=2].GetFiles(m_currPath, [/SIZE][SIZE=2][COLOR=#a31515]"*.mpg"[/COLOR][/SIZE][SIZE=2]);[/SIZE]
[SIZE=2][COLOR=#008000]// Add them all to the file list, sorted by name[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]foreach[/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][SIZE=2] longname [/SIZE][SIZE=2][COLOR=#0000ff]in[/COLOR][/SIZE][SIZE=2] filenames)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]fileObject = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]FileObject[/COLOR][/SIZE][SIZE=2]();[/SIZE]
[SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][SIZE=2] shortname;[/SIZE]
[SIZE=2]shortname = [/SIZE][SIZE=2][COLOR=#2b91af]Path[/COLOR][/SIZE][SIZE=2].GetFileName(longname);[/SIZE]
[SIZE=2]fileObject.channel = [/SIZE][SIZE=2][COLOR=#a31515]""[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2][COLOR=#008000]// }[/COLOR][/SIZE]
[SIZE=2]fileObject.Shortname = shortname;[/SIZE]
[SIZE=2]fileObject.Longname = [/SIZE][SIZE=2][COLOR=#2b91af]Path[/COLOR][/SIZE][SIZE=2].GetFullPath(longname);[/SIZE]
[SIZE=2]fileObject.IsDir = [/SIZE][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2][COLOR=#2b91af]FileInfo[/COLOR][/SIZE][SIZE=2] fi = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]FileInfo[/COLOR][/SIZE][SIZE=2](fileObject.Longname);[/SIZE]
[SIZE=2]fileObject.size = fi.Length;[/SIZE]
[SIZE=2][COLOR=#0000ff]string[/COLOR][/SIZE][SIZE=2] testme = fi.CreationTime.ToString();[/SIZE]
[SIZE=2]fileObject.datetime = testme;[/SIZE]
[SIZE=2][COLOR=#008000]// Add it to the list sorted by name[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (fileList.ContainsKey(fileObject.Longname) == [/SIZE][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]fileList.Add(fileObject.Longname, ([/SIZE][SIZE=2][COLOR=#2b91af]FileObject[/COLOR][/SIZE][SIZE=2])fileObject);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#0000ff]else[/COLOR][/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]lblSimple.Text = [/SIZE][SIZE=2][COLOR=#a31515]"File System: At Top Level"[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2][COLOR=#2b91af]DriveInfo[/COLOR][/SIZE][SIZE=2][] drives = [/SIZE][SIZE=2][COLOR=#2b91af]DriveInfo[/COLOR][/SIZE][SIZE=2].GetDrives();[/SIZE]
[SIZE=2][COLOR=#0000ff]foreach[/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#2b91af]DriveInfo[/COLOR][/SIZE][SIZE=2] drive [/SIZE][SIZE=2][COLOR=#0000ff]in[/COLOR][/SIZE][SIZE=2] drives)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]fileObject = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]FileObject[/COLOR][/SIZE][SIZE=2]();[/SIZE]
[SIZE=2]fileObject.Shortname = [/SIZE][SIZE=2][COLOR=#a31515]"["[/COLOR][/SIZE][SIZE=2] + drive.RootDirectory + [/SIZE][SIZE=2][COLOR=#a31515]"]"[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]fileObject.Longname = drive.RootDirectory.FullName;[/SIZE]
[SIZE=2]fileObject.IsDir = [/SIZE][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2][COLOR=#008000]// Add it to the list sorted by name[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (fileList.ContainsKey(fileObject.Longname) == [/SIZE][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]fileList.Add(fileObject.Longname, fileObject);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#008000]// if (startingdir.StartsWith("\\\\"))[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]// {[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] ([/SIZE][SIZE=2][COLOR=#2b91af]Directory[/COLOR][/SIZE][SIZE=2].Exists(startingdir))[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]fileObject = [/SIZE][SIZE=2][COLOR=#0000ff]new[/COLOR][/SIZE][SIZE=2][COLOR=#2b91af]FileObject[/COLOR][/SIZE][SIZE=2]();[/SIZE]
[SIZE=2]fileObject.Shortname = [/SIZE][SIZE=2][COLOR=#a31515]"["[/COLOR][/SIZE][SIZE=2] + startingdir + [/SIZE][SIZE=2][COLOR=#a31515]"]"[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]fileObject.Longname = startingdir;[/SIZE]
[SIZE=2]fileObject.IsDir = [/SIZE][SIZE=2][COLOR=#0000ff]true[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2][COLOR=#008000]// Add it to the list sorted by name[/COLOR][/SIZE]
[SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (fileList.ContainsKey(fileObject.Longname) == [/SIZE][SIZE=2][COLOR=#0000ff]false[/COLOR][/SIZE][SIZE=2])[/SIZE]
[SIZE=2]fileList.Add(fileObject.Longname, fileObject);[/SIZE]
[SIZE=2]}[/SIZE]
[SIZE=2][COLOR=#008000]// }[/COLOR][/SIZE]

[SIZE=2]}[/SIZE]
[SIZE=2]}[/SIZE]


basically in another portion where you select items from the list, this code checks if it is a dir and rewrites the list if it is.
Code:
[SIZE=2][COLOR=#0000ff]int[/COLOR][/SIZE][SIZE=2] index = lstMyList1.getCurrentItemIndex();[/SIZE]
[SIZE=2][COLOR=#2b91af]FileObject[/COLOR][/SIZE][SIZE=2] fo = ([/SIZE][SIZE=2][COLOR=#2b91af]FileObject[/COLOR][/SIZE][SIZE=2])fileList.GetByIndex(index);[/SIZE]
[SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][SIZE=2] (fo.IsDir)[/SIZE]
[SIZE=2]{[/SIZE]
[SIZE=2]txtMultiLine.Text = [/SIZE][SIZE=2][COLOR=#a31515]"Navigate to a file and press OK or Return"[/COLOR][/SIZE][SIZE=2];[/SIZE]
[SIZE=2]m_currPath = fo.Longname;[/SIZE]
[SIZE=2]InitFileList();[/SIZE]
[SIZE=2]setwizlist();[/SIZE]
[SIZE=2]}[/SIZE]

If you want any or all of the code from skipper or burndvdx2 let me know.
I think I still have your email address from gamezone testing.
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
idkpmiller
Offline

Posting Freak

Posts: 817
Threads: 141
Joined: May 2006
#104
2008-01-01, 07:39 PM
Guys,

Thanks alot, I am trying to do as Pastro suggest which is avoid changing alot of legacy code.

The extra routine from JW addresses my issue Big Grin off to play some more.

Thanks Guys.
Let the Games begin...Round 2!
GameZone v2.9.6 - PVRx2 1.4.7 compatible!

[Image: 1299379.png]
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#105
2008-01-01, 07:54 PM
idkpmiller Wrote:Guys,

Thanks alot, I am trying to do as Pastro suggest which is avoid changing alot of legacy code.

The extra routine from JW addresses my issue Big Grin off to play some more.

Thanks Guys.

Yeah, I think that was the primary reason I didn't just use the arraylist for everything.

If you want the class for FileObject let me know.
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
idkpmiller
Offline

Posting Freak

Posts: 817
Threads: 141
Joined: May 2006
#106
2008-01-02, 03:36 AM
Ok my next issue is changing the buttonlist, I want to go from X number of buttons being displayed to Y number of buttons being displayedx, I currently have it so that seems to happen but the number of buttons being displayed doesnt change and neither does the visible button text, it would seem I need to call something to refresh the buttonlist and redisplay the new buttons.

Thanks
Let the Games begin...Round 2!
GameZone v2.9.6 - PVRx2 1.4.7 compatible!

[Image: 1299379.png]
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#107
2008-01-02, 03:50 AM
idkpmiller Wrote:Ok my next issue is changing the buttonlist, I want to go from X number of buttons being displayed to Y number of buttons being displayedx, I currently have it so that seems to happen but the number of buttons being displayed doesnt change and neither does the visible button text, it would seem I need to call something to refresh the buttonlist and redisplay the new buttons.

Thanks
Not sure I totally understand what you are trying to do. I think you are saying, you want to dynamically change the button list and ADD (or perhaps delete) the buttons that are being displayed.

If that is what you are looking for, I don't think the WizControlManager can handle that, but it shouldn't be too hard to modify it to accomodate you.

Let me know if I understand your problem, and I'll provide an update for you.
pastro
Offline

Posting Freak

Posts: 1,885
Threads: 128
Joined: Jul 2006
#108
2008-01-02, 04:19 AM
JavaWiz Wrote:Not sure I totally understand what you are trying to do. I think you are saying, you want to dynamically change the button list and ADD (or perhaps delete) the buttons that are being displayed.

If that is what you are looking for, I don't think the WizControlManager can handle that, but it shouldn't be too hard to modify it to accomodate you.

Let me know if I understand your problem, and I'll provide an update for you.

As an alternative, you could define a set of individual buttons to handle the greatest number of options possible and dynamically change button text/visibility for the emulators that are configured. That way you can dynamically set which buttons are active as well as the text that is displayed.
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
JavaWiz
Offline

Posting Freak

Jacksonville, FL. USA
Posts: 2,522
Threads: 141
Joined: Dec 2006
#109
2008-01-02, 04:57 AM
I've added a method to WizControlManager - UpdateControl(AWizUiControl control).

In the plugin, simply create a new WizUiButtonList, and call ctlMgr.UpdateControl(buttonList); The PlacementName in the new list MUST match the one you are trying to replace.

Attached Zip contains updated WizUiHelper.DLL, WizUiHelperPlugin.DLL and WizUiHelperPluginTask.cs so you can see the code. Look for cmdButtonList, in particular, the Controls_OnKeyDown() method adds and removes a command button ("New Button List", "Old Button List").

Place the WizUiHelper.DLL in common, and the WizUiHelperPlugin.DLL in the WizUiHelper plugin directory.
idkpmiller
Offline

Posting Freak

Posts: 817
Threads: 141
Joined: May 2006
#110
2008-01-02, 08:47 AM (This post was last modified: 2008-01-02, 11:09 AM by idkpmiller.)
[EDIT} I have resolved the issues that were described in points 1 to 9 below, I had to set the focus back to the buttonlist after changing it Big Grin
However really not sure about how to handle the sixing of the text problem (see the end of this post for details). Thanks
/[EDIT]

JW, the new update worked great to solve the issue regarding changing the number of buttons, BUT (why is there always a but Smile )

1. What happens now is I have say 6 buttons.
2. The user selects the 2nd button down.
3. The button list is now updated with the uihelper and provides 3 new buttons for the user to select from they all appear fine.
4. However, the user cannot see their up & down movements (what is actuall handling these?)
5. However, if I press the down button once and select the middle button as if the movement had worked then I see from my log that the correct command reached the control_OnKeyDown routine.
6. Unfortunately the command is not matched against the case as it should be (strange)
7. The command is passed and matched if I use a mouse and click on the same button...
8. If I exit GameZone to the main menu and then re-enter then then I can move up and down the three buttons, the issue described in 4 above.
9. Also after exiting and re-entering Gamezone the commands are now matched correctly, issue described in 6 above.


One other thing I have noticed that the text in the listbox is stretched if I change the size of the listbox, I was expecting that changing the size (wider) would mean I get more characters on screen not for the text to stretch.

Thanks for all your help so far; its really appreciated.

Paul
Let the Games begin...Round 2!
GameZone v2.9.6 - PVRx2 1.4.7 compatible!

[Image: 1299379.png]
« Next Oldest | Next Newest »

Users browsing this thread: 3 Guest(s)

Pages (31): « Previous 1 … 9 10 11 12 13 … 31 Next »
Jump to page 


Possibly Related Threads…
Thread Author Replies Views Last Post
  PIP plugin for Kodi sgilani 2 3,089 2022-10-17, 12:44 AM
Last Post: sgilani
  New Systems Plugin kirschey 10 3,566 2020-11-14, 08:01 PM
Last Post: sub
  Test/Development environment for npvr.db3 scJohn 10 4,596 2020-09-04, 09:14 PM
Last Post: scJohn
  VIdeo playback from plugin mvallevand 5 3,647 2015-08-06, 10:43 PM
Last Post: sub
  Attention Sub: Open TV / Custom Data Grabber plugin Benoire 2 3,012 2014-11-14, 02:05 AM
Last Post: Benoire
  API docs to help with plugin development? McBainUK 3 2,881 2013-06-08, 06:14 PM
Last Post: sub
  Refreshing TV Guide Data (after System plugin EPG update) imilne 13 6,332 2013-03-24, 08:03 PM
Last Post: imilne
  sabnzbd plugin to show processed files Wakalaka 1 2,029 2013-03-12, 06:48 AM
Last Post: psycik
  Integrated Development Environment (IDE) for plugins osx-addict 5 2,867 2012-10-18, 08:35 PM
Last Post: osx-addict
  Plugin problems with started from the command line mvallevand 11 5,256 2012-08-12, 07:56 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