private void AddMeasurementsButton_Click(object sender, RoutedEventArgs e) { int count = AvailableMeasurementsPager.SelectedMeasurements.Count; if (count > 1000) { string message = $"You have selected {count} measurements. " + $"It may take some time to complete this operation. " + $"Would you like to continue?"; if (!m_dataContext.Confirm(message, "Too many measurements")) { return; } } if (AllowedTab.IsSelected) { m_dataContext.AddAllowedMeasurements(AvailableMeasurementsPager.SelectedMeasurements); AllowedMeasurementsPager.ReloadDataGrid(); } else { m_dataContext.AddDeniedMeasurements(AvailableMeasurementsPager.SelectedMeasurements); DeniedMeasurementsPager.ReloadDataGrid(); } AvailableMeasurementsPager.ClearSelections(); }