예제 #1
0
        public void ShowParentListValues(object sender, RoutedEventArgs e)
        {
            try
            {
                var obj      = (Button)sender;
                var listInfo = ((ListInfo)obj.DataContext);

                EditParentListView listEditDlg = new EditParentListView(listInfo.listsValues.ToList(), listInfo.TaskID, listInfo.list.ID);
                listEditDlg.ShowDialog();
                listInfo.listsValues = listEditDlg.NameList;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Ошибка");
            }
        }
예제 #2
0
        public void ShowParentListValues(object sender, RoutedEventArgs e)
        {
            try
            {
                var obj = (Button)sender;
                var pvi = (PropValueInfo)obj.DataContext;
                EditParentListView listEditDlg = new EditParentListView(pvi.listsValues.ToList(), pvi.parentListTaskID, (int)pvi.propVal.Property.ListID);
                listEditDlg.ShowDialog();

                pvi.listsValues = listEditDlg.NameList;
                var listComboBox = FindVisualChild <ComboBox>(obj.Parent); //ищем ComboBox со списков в текущей панельке
                BindingExpression bindingExpr = BindingOperations.GetBindingExpression(listComboBox, ComboBox.ItemsSourceProperty);
                bindingExpr.UpdateTarget();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Ошибка");
            }
        }