示例#1
0
 private void AddResponseFieldButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         ColumnSelectionDialog dialog = new ColumnSelectionDialog(DataMap.DataSources.ToList(), null, false, DataMappingType.ResponseData);
         dialog.Owner = Window;
         dialog.ShowDialog();
         if (dialog.Result != null)
         {
             DataMap.ResponseDataMappings.Add(dialog.Result);
             if (Window != null)
             {
                 Window.SetChangesMade(DataMap, true);
             }
         }
     }
     catch (Exception ex)
     {
         LogHelper.LogMessage(LogLevel.Error, "Unable to add Response Field", ex);
     }
 }
示例#2
0
 private void EditBenchmarkButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         DataMapping           selectedField = BenchmarkListBox.SelectedItem as DataMapping;
         ColumnSelectionDialog dialog        = new ColumnSelectionDialog(DataMap.DataSources.ToList(), selectedField, DataMappingType.ResponseTiming);
         dialog.Owner = Window;
         dialog.ShowDialog();
         if (dialog.Result != null)
         {
             int index = DataMap.BenchmarkMappings.IndexOf(selectedField);
             DataMap.BenchmarkMappings.Remove(selectedField);
             DataMap.BenchmarkMappings.Insert(index, dialog.Result);
             if (Window != null)
             {
                 Window.SetChangesMade(DataMap, true);
             }
         }
     }
     catch (Exception ex)
     {
         LogHelper.LogMessage(LogLevel.Error, "Unable to edit Response Timing Field", ex);
     }
 }