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();
        }
        private void AddMeasurementsButton_Click(object sender, RoutedEventArgs e)
        {
            if (AllowedTab.IsSelected)
            {
                m_dataContext.AddAllowedMeasurements(AvailableMeasurementsPager.SelectedMeasurements);
                AllowedMeasurementsPager.ReloadDataGrid();
            }
            else
            {
                m_dataContext.AddDeniedMeasurements(AvailableMeasurementsPager.SelectedMeasurements);
                DeniedMeasurementsPager.ReloadDataGrid();
            }

            AvailableMeasurementsPager.ClearSelections();
        }
Exemplo n.º 3
0
 private void AddSubscribedMeasurementsButton_Click(object sender, RoutedEventArgs e)
 {
     m_dataContext.AddSubscribedMeasurements(AvailableMeasurementsPager.SelectedMeasurements);
     AvailableMeasurementsPager.ClearSelections();
     SubscribedMeasurementsPager.ReloadDataGrid();
 }