1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- using System;
- using System.Windows.Controls;
- namespace MECF.Framework.UI.Client.ClientBase
- {
- public class BusyIndicateableUiViewModelBase : UiViewModelBase
- {
- #region Variables
- private bool _isBusy;
- private string _busyIndicatorMessage;
- #endregion
- #region Properties
- /// <summary>
- /// 返回ViewModel绑定的视图对象。
- /// </summary>
- public UserControl View { get; private set; }
- /// <summary>
- /// 设置或返回忙信息。
- /// </summary>
- public string BusyIndicatorContent
- {
- get => _busyIndicatorMessage;
- set
- {
- _busyIndicatorMessage = value;
- NotifyOfPropertyChange(nameof(BusyIndicatorContent));
- }
- }
- /// <summary>
- /// 设置或返回视图是否正忙。
- /// </summary>
- public bool IsBusy
- {
- get => _isBusy;
- set
- {
- _isBusy = value;
- NotifyOfPropertyChange(nameof(IsBusy));
- }
- }
- #endregion
- #region Methods
- protected override void OnViewLoaded(object _view)
- {
- base.OnViewLoaded(_view);
- View = (UserControl)_view;
- }
- /// <summary>
- /// 取消操作。
- /// </summary>
- /// <exception cref="NotImplementedException"></exception>
- public virtual void Cancel()
- {
- throw new NotImplementedException();
- }
- #endregion
- }
- }
|