/// <summary> /// Saves all unsaved values in the grid /// </summary> public override void UpdateContent() { if (upperBox.IsFocused && changeUpper != null) { CheckCorrectMultiplicity(upperBox, null); BindingExpression be = upperBox.GetBindingExpression(TextBox.TextProperty); be.UpdateSource(); } else if (lowerBox.IsFocused && changeLower != null) { CheckCorrectMultiplicity(lowerBox, null); BindingExpression be = lowerBox.GetBindingExpression(TextBox.TextProperty); be.UpdateSource(); } changeLower = null; changeUpper = null; njGrid.UpdateContent(); }
/// <summary> /// Displays selected PSM Association /// </summary> /// <param name="p"></param> public void Display(PSM_Association p) { IDictionaryEnumerator ie = grid.Resources.GetEnumerator(); while (ie.MoveNext()) { if (ie.Key.ToString() == "changePSMLowerConverter") { changeLower = (ChangePSMLowerConverter)ie.Value; changeLower.controller = p.Controller; } else if (ie.Key.ToString() == "changePSMUpperConverter") { changeUpper = (ChangePSMUpperConverter)ie.Value; changeUpper.controller = p.Controller; } } lowerBox.DataContext = p.Association; upperBox.DataContext = p.Association; njGrid.njsBox.DataContext = p.Association.NestingJoins; }