Try this (in C#)
LauncherDialog.Download += new EventHandler<LauncherDialogEvent>(LauncherDialog_Download);
private void LauncherDialog_Download(object sender, LauncherDialogEvent e)
{
var saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "All files (*.*)|*.*";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
saveFileDialog1.FileName = e.Filename;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
nsILocalFile objTarget = Xpcom.CreateInstance<nsILocalFile>("@mozilla.org/file/local;1");
using (nsAString tmp = new nsAString(saveFileDialog1.FileName))
{
objTarget.InitWithPath(tmp);
}
e.HelperAppLauncher.SaveToDisk(objTarget, false);
}
}