private void Button_Click_1(object sender, RoutedEventArgs e) { string URL = ConfigurationManager.AppSettings["OODictionarySource"]; Stream s = DownloadOneFileWindow.DownloadFile(URL); if (s == null) { MessageBox.Show(this, Properties.Strings.MessageBoxDictionaryDownloadError, Properties.Strings.MessageBoxDictionaryDownloadErrorCaption, MessageBoxButton.OK, MessageBoxImage.Warning); } else { GetDictionaryFromZip(s); } }
public static Stream DownloadFile(string path) { try { var w = new DownloadOneFileWindow(); w.path = path; w.Title += ": " + path; w.ShowDialog(); if (w.DialogResult == true) { return(w.stream); } } catch { return(null); } return(null); }
public static Stream DownloadFile(string path) { try { var w = new DownloadOneFileWindow(); w.path = path; w.Title += ": " + path; w.ShowDialog(); if (w.DialogResult == true) { return w.stream; } } catch { return null; } return null; }