Esempio n. 1
0
        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();
                }
            };
        }
Esempio n. 2
0
        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);
            };
        }