using System; using System.Collections.Generic; using System.Windows; using System.Windows.Controls; using System.Windows.Media; namespace Dominion.NET_WPF.Controls.GameLog { public class LogSection : UserControl, IDisposable { public string LogFile = string.Empty; public StackPanel SpContainer { get; set; } public virtual void TearDown() { } #region IDisposable variables, properties, & methods // Track whether Dispose has been called. protected bool Disposed; public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { // Check to see if Dispose has already been called. if (!Disposed) { // If disposing equals true, dispose all managed // and unmanaged resources. if (disposing) { // Dispose managed resources. } // Call the appropriate methods to clean up // unmanaged resources here. // If disposing is false, // only the following code is executed. // Note disposing has been done. Disposed = true; } } ~LogSection() { Dispose(false); } #endregion public virtual bool IsExpanded { get { return false; } set { } } public virtual void New(string title) { } public virtual void New(DominionBase.IPlayer player, List playerBrushes, DominionBase.IDisplayable grantedBy) { } public virtual void Push() { } public virtual void Pop() { } public virtual void End() { BorderThickness = new Thickness(1, 2, 1, 2); } public virtual void Log(params object[] items) { } public virtual void Log(DominionBase.IPlayer player, List playerBrushes, params object[] items) { } public virtual void Log(DominionBase.Visual.VisualPlayer player, List playerBrushes, params object[] items) { } } }