private void PropertyValueExcluderTrigger_Click(object sender, RoutedEventArgs e) { if (PropertyValueExcluder_Cb.SelectedIndex != -1 && !string.IsNullOrEmpty(PropertyToExclude_tb.Text)) { Excluders.Add(syntaxWriter.WritePropertyValueExcluder(PropertyValueExcluder_Cb.Text, PropertyToExclude_tb.Text)); UIInstructions.Add(syntaxWriter.WritePropertyValueExcluder(PropertyValueExcluder_Cb.Text, PropertyToExclude_tb.Text)); PropertyValueExcluder_Cb.ItemsSource = new List <string>(); PropertyToExclude_tb.Text = ""; MapperGrid.Visibility = Visibility.Visible; PropertyValueExcluderGrid.Visibility = Visibility.Hidden; MapBtn.IsEnabled = true; } }
private void PropertyMapTrigger_Click(object sender, RoutedEventArgs e) { if (PropertyMapCSV_Cb.SelectedIndex != -1 && PropertyMapProp_Cb.SelectedIndex != -1) { Instructions.Add(syntaxWriter.WritePropertyMap(PropertyMapProp_Cb.Text, PropertyMapCSV_Cb.Text)); UIInstructions.Add(syntaxWriter.WritePropertyMap(PropertyMapProp_Cb.Text, PropertyMapCSV_Cb.Text)); PropertyMapCSV_Cb.ItemsSource = new List <string>(); PropertyMapProp_Cb.ItemsSource = new List <string>(); MapperGrid.Visibility = Visibility.Visible; PropertyMapGrid.Visibility = Visibility.Hidden; MapBtn.IsEnabled = true; } }
private void LoadRule_Click(object sender, RoutedEventArgs e) { List <string> loadedRules = new List <string>(ruleService.LoadRules()); UIInstructions.Clear(); loadedRules.ForEach(rule => UIInstructions.Add(rule)); Excluders = loadedRules.FindAll(excludeRule => excludeRule.Contains("Excluder")); loadedRules.RemoveAll(rule => Excluders.Contains(rule)); Instructions = loadedRules; if (UIInstructions.Count > 0) { MapBtn.IsEnabled = true; } }
private void SiblingColumnMapTrigger_Click(object sender, RoutedEventArgs e) { if (SiblingColumnMapCSV_Cb.SelectedIndex != -1 && SiblingColumnMapProp_Cb.SelectedIndex != -1 && SiblingColumnNameCSV_Cb.SelectedIndex != -1 && !string.IsNullOrEmpty(SiblingColumnMapReplaceValue.Text)) { Instructions.Add(syntaxWriter.WriteSiblingColumnPropertyMap(SiblingColumnMapProp_Cb.Text, SiblingColumnMapCSV_Cb.Text, SiblingColumnNameCSV_Cb.Text, SiblingColumnMapReplaceValue.Text)); UIInstructions.Add(syntaxWriter.WriteSiblingColumnPropertyMap(SiblingColumnMapProp_Cb.Text, SiblingColumnMapCSV_Cb.Text, SiblingColumnNameCSV_Cb.Text, SiblingColumnMapReplaceValue.Text)); SiblingColumnMapCSV_Cb.ItemsSource = new List <string>(); SiblingColumnMapProp_Cb.ItemsSource = new List <string>(); SiblingColumnNameCSV_Cb.ItemsSource = new List <string>(); SiblingColumnMapReplaceValue.Text = ""; MapperGrid.Visibility = Visibility.Visible; SiblingColumnMapGrid.Visibility = Visibility.Hidden; MapBtn.IsEnabled = true; } }
private void SiblingMapTrigger_Click(object sender, RoutedEventArgs e) { if (SiblingName_Cb.SelectedIndex != -1 && SiblingMapCSV_Cb.SelectedIndex != -1 && SiblingMapProp_Cb.SelectedIndex != -1) { string[] siblings = SiblingName_Cb.Text.Split('.'); string sibling = siblings[siblings.Length - 1]; Instructions.Add(syntaxWriter.WriteSiblingPropertyMap(SiblingMapProp_Cb.Text, SiblingMapCSV_Cb.Text, sibling, SiblingMapReplaceValue.Text)); UIInstructions.Add(syntaxWriter.WriteSiblingPropertyMap(SiblingMapProp_Cb.Text, SiblingMapCSV_Cb.Text, sibling, SiblingMapReplaceValue.Text)); SiblingMapCSV_Cb.ItemsSource = new List <string>(); SiblingMapProp_Cb.ItemsSource = new List <string>(); SiblingName_Cb.ItemsSource = new List <string>(); SiblingMapReplaceValue.Text = ""; MapperGrid.Visibility = Visibility.Visible; SiblingMapGrid.Visibility = Visibility.Hidden; MapBtn.IsEnabled = true; } }