X
xucheng
When using the SaveFileDialog to overwrite an existing
file, I'm asked whether to replace the existing file.
I click the "Yes" button,System hang .
I'm using .Net Compact Framework sp2 .
my code is here.
private bool ActionSave(){
SaveFileDialog saveWav=new SaveFileDialog();
saveWav.Filter="Sounds (.wav)|*.wav|All Files|*.*";
saveWav.InitialDirectory=
OpenNETCF.EnvironmentEx.GetFolderPath(OpenNETCF.EnvironmentEx.SpecialFolder.Personal);
saveWav.FilterIndex=1;
DialogResult dl1=saveWav.ShowDialog();
if (dl1==DialogResult.OK){
if (saveWav.FileName.IndexOf(".")<0)
saveWav.FileName=saveWav.FileName+".wav";
File.Move(tmpFilename,saveWav.FileName);
return true;
}else{
return false;
}
}
file, I'm asked whether to replace the existing file.
I click the "Yes" button,System hang .
I'm using .Net Compact Framework sp2 .
my code is here.
private bool ActionSave(){
SaveFileDialog saveWav=new SaveFileDialog();
saveWav.Filter="Sounds (.wav)|*.wav|All Files|*.*";
saveWav.InitialDirectory=
OpenNETCF.EnvironmentEx.GetFolderPath(OpenNETCF.EnvironmentEx.SpecialFolder.Personal);
saveWav.FilterIndex=1;
DialogResult dl1=saveWav.ShowDialog();
if (dl1==DialogResult.OK){
if (saveWav.FileName.IndexOf(".")<0)
saveWav.FileName=saveWav.FileName+".wav";
File.Move(tmpFilename,saveWav.FileName);
return true;
}else{
return false;
}
}