| | |
| | | namespace HStation.WinFrmUI |
| | | using static HStation.WinFrmUI.UserViewModel; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | /// <summary> |
| | | ///详细信息 |
| | | /// </summary> |
| | | public partial class ViewUserDlg : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | public ViewUserDlg() |
| | | { |
| | | InitializeComponent(); |
| | | this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon; |
| | | this.layoutControl1.SetupLayoutControl(); |
| | | } |
| | | |
| | | private HStation.Vmo.AssetsMeterMainVmo _vmo = null; |
| | | private UserViewModel _model; |
| | | |
| | | /// <summary> |
| | | /// 绑定数据 |
| | | /// </summary> |
| | | public void SetBindingData(HStation.Vmo.AssetsMeterMainVmo vmo) |
| | | public void SetBindingData(UserViewModel rhs) |
| | | { |
| | | if (vmo == null) |
| | | { |
| | | return; |
| | | } |
| | | _vmo = vmo; |
| | | this.txtName.EditValue = vmo.Name; |
| | | this.txtMinorLoss.EditValue = vmo.MinorLoss; |
| | | this.txtKeyWord.EditValue = HStation.Service.Assets.KeyWordHelper.ToString(vmo.KeyWords); |
| | | this.txtFlags.EditValue = Yw.Untity.FlagsHelper.ToString(vmo.Flags); |
| | | this.txtTagName.EditValue = vmo.TagName; |
| | | this.txtDescription.EditValue = vmo.Description; |
| | | _model = rhs; |
| | | InitialUI(_model); |
| | | } |
| | | |
| | | //初始化界面 |
| | | private void InitialUI(UserViewModel model) |
| | | { |
| | | this.NameTextEdit.EditValue = _model.Name; |
| | | this.TxtEditTag.EditValue = _model.Tag; |
| | | this.DescriptionMemoEdit.EditValue = _model.Description; |
| | | } |
| | | } |
| | | } |