
- Improved logging, logs now to go the Logs folder and aren't deleted on start - Fixed chat tab not enabling with -autostart - Fixed player list - Watchdog time-out is now configurable in TorchConfig.xml - Fixed infinario log spam - Fixed crash when sending empty message from chat tab - Fixed permissions on Torch commands - Changed plugin StoragePath to the current instance path (per-instance configs)
34 lines
1008 B
C#
34 lines
1008 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Linq;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Torch
|
|
{
|
|
/// <summary>
|
|
/// Provides a method to notify an observer of changes to an object's properties.
|
|
/// </summary>
|
|
public class ViewModel : INotifyPropertyChanged
|
|
{
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
protected virtual void OnPropertyChanged([CallerMemberName] string propName = "")
|
|
{
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propName));
|
|
}
|
|
|
|
/// <summary>
|
|
/// Fires PropertyChanged for all properties.
|
|
/// </summary>
|
|
public void RefreshModel()
|
|
{
|
|
foreach (var propName in GetType().GetProperties().Select(x => x.Name))
|
|
// ReSharper disable once ExplicitCallerInfoArgument
|
|
OnPropertyChanged(propName);
|
|
}
|
|
}
|
|
}
|