private void buttonParametersSettings_Click(object sender, RoutedEventArgs e) { try { MassParameterWindow paramWindow = new MassParameterWindow(m_app, massConfig); if ((bool)paramWindow.ShowDialog()) { massConfig = paramWindow.MassConfig; if (massConfig.UpdateType == ParameterUpdateType.FromHostToMass) { expanderParameter.Header = "Linked Parameters - (Floors to Masses)"; } else if (massConfig.UpdateType == ParameterUpdateType.FromMassToHost) { expanderParameter.Header = "Linked Parameters - (Masses to Floors)"; } dataGridParameters.ItemsSource = null; dataGridParameters.ItemsSource = massConfig.MassParameters; } } catch (Exception ex) { MessageBox.Show("Failed to set linked parameters.\n" + ex.Message, "Linked Parameters", MessageBoxButton.OK, MessageBoxImage.Warning); } }
private void buttonParametersSettings_Click(object sender, RoutedEventArgs e) { try { var paramWindow = new MassParameterWindow(app, massConfig); if (!(bool)paramWindow.ShowDialog()) { return; } massConfig = paramWindow.MassConfig; if (massConfig.UpdateType == ParameterUpdateType.FromHostToMass) { expanderParameter.Header = "Linked Parameters - (Areas to Masses)"; } else if (massConfig.UpdateType == ParameterUpdateType.FromMassToHost) { expanderParameter.Header = "Linked Parameters - (Masses to Areas)"; } dataGridParameters.ItemsSource = null; dataGridParameters.ItemsSource = massConfig.MassParameters; } catch (Exception ex) { Log.AppendLog(LogMessageType.EXCEPTION, ex.Message); MessageBox.Show("Failed to set linked parameters.\n" + ex.Message, "Linked Parameters", MessageBoxButton.OK, MessageBoxImage.Warning); } }