private void ButtonLoadModel_Click(object sender, RoutedEventArgs e) { var openFileDialog = FileDialogHelper.CreateOpenEstimatorConfigurationFileDialog(); if (openFileDialog.ShowDialog() != true) { return; } var converter = PoiOnDisplayEstimatorHelper.LoadEstimator(openFileDialog.FileName); TabItemTest.DataContext = converter; }
private void ButtonSetEstimator_Click(object sender, RoutedEventArgs e) { var openFileDialog = FileDialogHelper.CreateOpenEstimatorConfigurationFileDialog(); if (openFileDialog.ShowDialog() == true) { try { Component.Estimator = PoiOnDisplayEstimatorHelper.LoadEstimator(openFileDialog.FileName); TextBlockEstimatorNotification.Visibility = Visibility.Collapsed; MessageBox.Show("Loaded"); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Failed to load estimator", MessageBoxButton.OK, MessageBoxImage.Error); } } }