public Main(ISyslogDaemon daemon, bool logging) { InitializeComponent(); this._SyslogDaemon = daemon; IServerStatus status = (IServerStatus)daemon; this._Logger = new ServerStatusLogger(ref status, Encoding.Default, true, logging, "syslog.txt"); this._Logger.StatusChanged += new EventHandler<Just.EventArguments.StringEventArgs>(_Logger_StatusChanged); this._SyslogDaemon.SyslogMessageReceived += new EventHandler<Just.EventArguments.GenericEventArgs<SyslogProtocol>>(_SyslogDaemon_SyslogMessageReceived); this._SyslogDaemon.Start(); this.FormClosed += new FormClosedEventHandler(Main_FormClosed); }
public Main(ISyslogDaemon daemon, bool logging) { InitializeComponent(); this._SyslogDaemon = daemon; IServerStatus status = (IServerStatus)daemon; this._Logger = new ServerStatusLogger(ref status, Encoding.Default, true, logging, "syslog.txt"); this._Logger.StatusChanged += new EventHandler <Just.EventArguments.StringEventArgs>(_Logger_StatusChanged); this._SyslogDaemon.SyslogMessageReceived += new EventHandler <Just.EventArguments.GenericEventArgs <SyslogProtocol> >(_SyslogDaemon_SyslogMessageReceived); this._SyslogDaemon.Start(); this.FormClosed += new FormClosedEventHandler(Main_FormClosed); }