private void setShowGrid(FormRegistrationDepartment_2 from, string Gridname, bool isShow) { if (isShow) { ((Grid)(from.FindName(Gridname))).Visibility = Visibility.Visible; } else { ((Grid)(from.FindName(Gridname))).Visibility = Visibility.Hidden; } }
private void setButtonValue(FormRegistrationDepartment_2 form, string gridName, string TextBlockName, string value) { ((Grid)(form.FindName(gridName))).Visibility = Visibility.Visible; ((Label)(form.FindName(TextBlockName))).Content = value; }
/// <summary> /// 设置按钮 /// </summary> /// <param name="form"></param> /// <param name="gridName"></param> /// <param name="TextBlockName"></param> /// <param name="value"></param> private void setButton(FormRegistrationDepartment_2 form, string gridName, string TextBlockName, string value) { this.Dispatcher.Invoke(new setButtonValueDelegate(setButtonValue), form, gridName, TextBlockName, value); }