NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 78 79 80 81 82 … 93 Next »
Reven

 
  • 0 Vote(s) - 0 Average
Reven
darrin75
Offline

Senior Member

Posts: 558
Threads: 103
Joined: Nov 2004
#1
2005-01-25, 01:11 AM
I have a request i have finally got a plugin going and just wondering how do you implement the ink.txt file into your plugin. Possible to share code for it. I just really like that feature about your plugin...If not thanks for all your help..Answering ? after ? for me...I guess we all got to begin some were. hopefully i will get better the more i practice and write..See ya


Darrin75
reven
Offline

Posting Freak

Posts: 5,782
Threads: 396
Joined: Sep 2004
#2
2005-01-25, 01:50 AM
<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">
StreamReader reader = new StreamReader("filename.link");
while(reader.peek() >0){
    ReadDirectory(reader.readline)
}[/QUOTE]

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">private void ReadDirectory(string directory){
if(!Directory.Exists(directory))
return; // if directory doesnt exist
string[] files = Directory.GetFiles(Directory);
foreach (string str in files){
myFiles.Add(str)
}
}[/QUOTE]
where myFiles is the arraylist or whatever you are using for your original array of files.

you might have to throw a try/catch around some of that code, just incase a read exception occurs.
thats also off the top of my head, some of the methods might need to be altered. eg not sure if directory.getfiles() returns a string array, pretty sure it does, but it might return something else, so directory.getfiles().toarray() might be needed etc.



darrin75
Offline

Senior Member

Posts: 558
Threads: 103
Joined: Nov 2004
#3
2005-01-25, 02:18 AM
Thanks give it a try tonight.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



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

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

Linear Mode
Threaded Mode