using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Text;

namespace WPLog
{

    public class LogSystem
    {
        private static StringBuilder log;
        private static LogSystem instance;

        private LogSystem()
        {
            log = new StringBuilder();
        }

        public static LogSystem Instance 
        {
            get
            {
                if (instance == null)
                {
                    instance = new LogSystem();
                    instance.Write("Log Created Time = " + DateTime.Now.ToString());
                }
                return instance;
            }
        }
        public void Write(string line)
        {
            log.AppendLine(line);
        }

        public string CurrentLog 
        {
            get
            {
                return log.ToString();
            }
            set
            {
                log = new StringBuilder(value);
            }
        }
    }
}
