private void Button_Click_1(object sender, RoutedEventArgs e) { //try //{ DocManp d = new DocManp(); DocInputs inputs = d.ReadDoc(FileName.Text); InputWindow iw = new InputWindow(inputs); iw.ShowDialog(); //} //catch(Exception ex) //{ // Logger.Log(ex); //} }
public void GenerateDocument() { Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog(); dlg.DefaultExt = ".docx"; dlg.Filter = "Word documents (.docx)|*.docx"; Nullable <bool> result = dlg.ShowDialog(); if (result == true) { //try //{ string filename = dlg.FileName; DocManp d = new DocManp(); d.CreateDoc(_inputs, FileName.Text, filename); System.Diagnostics.Process.Start(filename); //} //catch (Exception ex) //{ // Logger.Log(ex); //} } DownloadButton.Visibility = Visibility.Hidden; }