using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using WeifenLuo.WinFormsUI.Docking; using XKRS.Common.Interface; namespace XKRS.UI.Model.Winform { public partial class MenuFormBase : DockContent { public Action OnUploadProcess { get; set; } public event Action OnIsLoginChanged; public string Id { get; set; } = Guid.NewGuid().ToString(); private IProcess process = null; public IProcess Process { get => process; set { if (process != value) { process = value; OnProcessUpdated(); } } } public MenuFormBase() { InitializeComponent(); } #region IProcessObserver public virtual void OnProcessUpdated() { } public virtual void DownloadProcess(IProcess process) { Process = process; } #endregion #region Login protected virtual bool IsLogin { get; set; } public virtual void SetLoginStatus(bool isLogin) { IsLogin = isLogin; OnIsLoginChanged?.Invoke(IsLogin); } #endregion } }