private void open_Click(object sender, EventArgs e) { try { DialogResult dialogResult = openFileDialog1.ShowDialog(); if (dialogResult.ToString() == "OK") { engine.OpenInspection(openFileDialog1.FileName); InspectionInfo info = engine.GetInspectionInfo(); Path.Text = string.Copy(info.productName); inspect.Enabled = true; } } catch (VBAIException ex) { Path.Text = String.Copy(""); MessageBox.Show(ex.Message); } }
private void Open_inspection_Click(object sender, RoutedEventArgs e) { try { OpenFileDialog openFileDialog = new OpenFileDialog(); if (openFileDialog.ShowDialog() == true) { engine.OpenInspection(openFileDialog.FileName); InspectionInfo info = engine.GetInspectionInfo(); txtInspectionName.Text = info.productName; btnInspect.IsEnabled = true; } } catch (VBAIException ex) { txtInspectionName.Text = ""; MessageBox.Show(ex.Message); } }