|
-
Jun 30th, 2008, 08:37 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [3.0/linq]
Hi,
im trying to build a uri and heres what i have :
C# Code:
Uri Path= new Uri(PathString) ;
Player.Source=Path;
''Just to check what did the uri come up with
Label1.content= Player.Source.Tostring() ;
the path string is equal to :
D:\Documents and Settings\Prox-Yd\Mis documentos\Mi música\Pablo\carlos santana & everlast - supernatural - turn your lights on.mp3
and what the uri came up with its :
file:///D:\Documents and Settings\Prox-Yd\Mis documentos\Mi música\Pablo\carlos santana & everlast - supernatural - turn your lights on.mp3
So Player cant find the path of what the uri came up with so i cant use that, how can i remove the file:/// ?
thanks
-
Jun 30th, 2008, 08:46 AM
#2
Fanatic Member
Re: [3.0/linq]
Have you tried using Path.LocalPath?
C#.net, VB, C++, Java, VS 2005/2008
Dont' forget to rate posts that are helpful to you.
-
Jun 30th, 2008, 08:54 AM
#3
Thread Starter
Hyperactive Member
Re: [3.0/linq]
Path its a variable in my appliacation
Path.LocalPath, im not using any of those beacuse, what i need to come up with its a uri containg the path of the file droped by the user, but ive already done that, the problem is if i use Path.LocalPath ill come up with a string and when i turn that into a uri it comes out with the file:/// before, so i dont know how to remove the f:///
Last edited by Pac_741; Jun 30th, 2008 at 08:58 AM.
-
Jun 30th, 2008, 09:02 AM
#4
Fanatic Member
Re: [3.0/linq]
What kind of object is Player? Can it only take a Uri as the parameter for the path?
C#.net, VB, C++, Java, VS 2005/2008
Dont' forget to rate posts that are helpful to you.
-
Jun 30th, 2008, 09:12 AM
#5
Thread Starter
Hyperactive Member
Re: [3.0/linq]
Im using MediaElement a WPF control, and yes it can only take Uri as path
-
Jun 30th, 2008, 09:27 AM
#6
Thread Starter
Hyperactive Member
Re: [3.0/linq]
I was trying to create some Uris in other applications and all of them turned out like this one, Steve_F do you have the same problem ? or does anyone else has the same problem ?? i didnt have this problem before i installed 3.5 service pack 1 and i dont know if that caused the problem
-
Jun 30th, 2008, 09:32 AM
#7
Fanatic Member
Re: [3.0/linq]
Yeah I tried to create some and they all have the file://. It dind't have the prefix when I tried using a URL as a parameter. So the method must take the format of the passed string into consideration. Im just not sure how to let it know youre using a directory as a parameter...
C#.net, VB, C++, Java, VS 2005/2008
Dont' forget to rate posts that are helpful to you.
-
Jun 30th, 2008, 09:41 AM
#8
Fanatic Member
Re: [3.0/linq]
The constructor for a Uri is overloaded, the solution might be something with that, im trying now.
C#.net, VB, C++, Java, VS 2005/2008
Dont' forget to rate posts that are helpful to you.
-
Jun 30th, 2008, 09:50 AM
#9
Thread Starter
Hyperactive Member
Re: [3.0/linq]
i got it, for some reason .net 3.5 service pack 1 was causing the problem thats what i think, i uninstalled it the problem was gone
-
Jun 30th, 2008, 10:01 AM
#10
Thread Starter
Hyperactive Member
Re: [3.0/linq]
when i create uris for other objects it doenst contain the f:/// but when i use them for the media element the uri turns out wiht a f:///
-
Jun 30th, 2008, 05:49 PM
#11
Thread Starter
Hyperactive Member
Re: [3.0/linq]
Steve_F, thank you very much for your time
the problem wasnt .Net 3.5 service pack 1, nor the uris the problem was i was using windows xp without windows media player 10 or greater, so the media control just works with media player 10 or greater so that was the problem
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|