Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
OriginalGriff22-Nov-16 0:24
mveOriginalGriff22-Nov-16 0:24 
AnswerRe: How to compress png, bitmap ,or cr2 image file using huffman and RLE with c# Pin
Patrice T22-Nov-16 11:27
mvePatrice T22-Nov-16 11:27 
QuestionWindows Media Player - Play MP3. Pin
ngogiatuong20-Nov-16 20:19
ngogiatuong20-Nov-16 20:19 
AnswerRe: Windows Media Player - Play MP3. Pin
Afzaal Ahmad Zeeshan20-Nov-16 21:11
professionalAfzaal Ahmad Zeeshan20-Nov-16 21:11 
GeneralRe: Windows Media Player - Play MP3. Pin
ngogiatuong20-Nov-16 22:14
ngogiatuong20-Nov-16 22:14 
GeneralRe: Windows Media Player - Play MP3. Pin
Afzaal Ahmad Zeeshan21-Nov-16 1:23
professionalAfzaal Ahmad Zeeshan21-Nov-16 1:23 
AnswerRe: Windows Media Player - Play MP3. Pin
RichardGrimmer21-Nov-16 4:42
RichardGrimmer21-Nov-16 4:42 
QuestionNetwork File Path Problem Pin
Kevin Marois18-Nov-16 10:30
professionalKevin Marois18-Nov-16 10:30 
I am using a hyperlink in a datagrid. When clicked I want to open the file with Process.Start:
private void DG_Hyperlink_Click(object sender, RoutedEventArgs e)
{
    Hyperlink link = (Hyperlink)e.OriginalSource;
    var fileName = link.NavigateUri.AbsolutePath;
    fileName = fileName.Replace("file:///", "");
    fileName = Uri.UnescapeDataString(fileName);

    Process.Start("notepad.exe", fileName);
}

For local files this works fine. With network files the path is different:

/n/folder/folder/folder/thefile.txt

The file is on the N: share. The path is somehow formatted to start with 'n/'.

What's wrong here?

Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: Network File Path Problem Pin
OriginalGriff18-Nov-16 21:44
mveOriginalGriff18-Nov-16 21:44 
AnswerRe: Network File Path Problem Pin
Bernhard Hiller20-Nov-16 21:10
Bernhard Hiller20-Nov-16 21:10 
AnswerRe: Network File Path Problem Pin
Richard Deeming21-Nov-16 2:58
mveRichard Deeming21-Nov-16 2:58 
GeneralRe: Network File Path Problem Pin
Kevin Marois21-Nov-16 4:43
professionalKevin Marois21-Nov-16 4:43 
QuestionHow To Refactor This Pin
Kevin Marois18-Nov-16 4:48
professionalKevin Marois18-Nov-16 4:48 
AnswerRe: How To Refactor This Pin
Pete O'Hanlon18-Nov-16 5:41
mvePete O'Hanlon18-Nov-16 5:41 
GeneralRe: How To Refactor This Pin
Kevin Marois18-Nov-16 6:03
professionalKevin Marois18-Nov-16 6:03 
GeneralRe: How To Refactor This Pin
Gerry Schmitz18-Nov-16 7:49
mveGerry Schmitz18-Nov-16 7:49 
GeneralRe: How To Refactor This Pin
Kevin Marois18-Nov-16 9:03
professionalKevin Marois18-Nov-16 9:03 
GeneralRe: How To Refactor This Pin
Gerry Schmitz18-Nov-16 10:44
mveGerry Schmitz18-Nov-16 10:44 
QuestionSaving Datagridview Pin
Member 1285691017-Nov-16 12:23
Member 1285691017-Nov-16 12:23 
AnswerRe: Saving Datagridview Pin
Dave Kreskowiak17-Nov-16 13:00
mveDave Kreskowiak17-Nov-16 13:00 
QuestionWinForm Installation Config files directory .. Pin
JP9017-Nov-16 6:05
JP9017-Nov-16 6:05 
AnswerRe: WinForm Installation Config files directory .. Pin
OriginalGriff17-Nov-16 6:38
mveOriginalGriff17-Nov-16 6:38 
Questionenquary Pin
Ramesh_sahu16-Nov-16 22:22
Ramesh_sahu16-Nov-16 22:22 
AnswerRe: enquary PinPopular
Richard MacCutchan16-Nov-16 22:27
mveRichard MacCutchan16-Nov-16 22:27 
GeneralRe: enquary Pin
Pete O'Hanlon16-Nov-16 22:55
mvePete O'Hanlon16-Nov-16 22:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.