using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; using BPASmartClient.Message; using Microsoft.Toolkit.Mvvm.ComponentModel; namespace BPASmartClient.CustomResource.Pages.ViewModel { public class DebugLogViewModel : ObservableObject { public DebugLogViewModel() { MessageLog.GetInstance.DebugLog = new Action((o) => { Message = MessageLog.GetInstance.DebugLogInfo; }); } public static string Message { get { return _mMessage; } set { _mMessage = value; OnStaticPropertyChanged(); } } private static string _mMessage = string.Empty; public static event EventHandler StaticPropertyChanged; private static void OnStaticPropertyChanged([CallerMemberName] string PropName = "") { StaticPropertyChanged?.Invoke(null, new PropertyChangedEventArgs(PropName)); } } }