private void Button_Click(object sender, RoutedEventArgs e) { TBXDatCatWindow tbxWindow = new TBXDatCatWindow(); tbxWindow.Show(); tbxWindow.selected += value => { ItemCollection itemCol = lb_tbx_dcs.Items; if (!Methods.inListBoxItemCollection(ref itemCol, value)) { ListBoxItem item = new ListBoxItem(); item.Content = value; lb_tbx_dcs.Items.Add(item); updateItems(); } }; }
private void dc_tbx_Click(object sender, System.Windows.RoutedEventArgs e) { TBXDatCatWindow tbxWindow = TBXDatCatWindow.Instance; if (dc_tbx.Content.ToString() != "???") { tbxWindow.SelectItem(dc_tbx.Content.ToString()); } tbxWindow.Show(); tbxWindow.Selected += value => { if (value == null) { value = "NONE"; } setMapping(value); }; }