private void setShowGrid(FormSelectAmout 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(FormSelectAmout form, string gridName, string TextBlockName, string value, string amountTextBlockName, string amountValue) { ((Grid)(form.FindName(gridName))).Visibility = Visibility.Visible; ((Label)(form.FindName(TextBlockName))).Content = value; ((Label)(form.FindName(amountTextBlockName))).Content = amountValue; }
/// <summary> /// 设置按钮 /// </summary> /// <param name="form"></param> /// <param name="gridName"></param> /// <param name="TextBlockName"></param> /// <param name="value"></param> private void setButton(FormSelectAmout form, string gridName, string TextBlockName, string value, string amountTextBlockName, string amountValue) { this.Dispatcher.Invoke(new setButtonValueDelegate(setButtonValue), form, gridName, TextBlockName, value, amountTextBlockName, amountValue); }