private void setButtonValue(FormRegistrationDoctor_3 form, string gridName, string lablename, string lableTitle, string imgname, string timename, string namevalue, string titlevalue, string imgurl, string timevalue) { ((Grid)(form.FindName(gridName))).Visibility = Visibility.Visible; ((Label)(form.FindName(lablename))).Content = namevalue; ((Label)(form.FindName(lableTitle))).Content = titlevalue; ((Image)(form.FindName(imgname))).Source = new BitmapImage(new Uri(imgurl)); ((Label)(form.FindName(timename))).Content = timevalue; }
private void setShowGrid(FormRegistrationDoctor_3 from, string Gridname, bool isShow) { if (isShow) { ((Grid)(from.FindName(Gridname))).Visibility = Visibility.Visible; } else { ((Grid)(from.FindName(Gridname))).Visibility = Visibility.Hidden; } }
/// <summary> /// 设置按钮 /// </summary> /// <param name="form"></param> /// <param name="gridName"></param> /// <param name="TextBlockName"></param> /// <param name="value"></param> private void setButton(FormRegistrationDoctor_3 form, string gridName, string lablename, string lableTitle, string imgname, string timename, string namevalue, string titlevalue, string imgurl, string timevalue) { this.Dispatcher.Invoke(new setButtonValueDelegate(setButtonValue), form, gridName, lablename, lableTitle, imgname, timename, namevalue, titlevalue, imgurl, timevalue); }