private void Button_Click(object sender, RoutedEventArgs e) { String filename = TextBoxFileName.Text; String path = Properties.Settings.Default.SearchPath + filename + ".PDF"; if (filename.Equals("")) { MessageBox.Show("Ingresa nombre de archivo"); TextBoxFileName.Focus(); return; } if (!System.IO.File.Exists(path)) { MessageBox.Show("No existe el archivo " + path); return; } ProcessStartInfo processStartInfo = new ProcessStartInfo(); processStartInfo.FileName = Properties.Settings.Default.BatFilePath; processStartInfo.CreateNoWindow = true; processStartInfo.UseShellExecute = false; processStartInfo.Arguments = "\"" + path + "\""; Process.Start(processStartInfo); //WindowShowDocument winShowDoc = new WindowShowDocument(); //winShowDoc.WindowStartupLocation = WindowStartupLocation.CenterScreen; //winShowDoc.Height = System.Windows.SystemParameters.WorkArea.Height - 50; //winShowDoc.Width = System.Windows.SystemParameters.WorkArea.Width - 50; //winShowDoc.WebBrowserShowDocument.Navigate(path); //winShowDoc.Show(); }
public MainWindow() { InitializeComponent(); TextBoxFileName.Focus(); }
private void ButtonNewApplication_Click(object sender, EventArgs e) { TextBoxFileName.Text = ""; TextBoxFileLocation.Text = ""; _ = TextBoxFileName.Focus(); }