Added project files, source files, and assets.
As long as you have IronPython 2.7.3 you should be able to compile now with this commit.
This commit is contained in:
parent
a62ee2f168
commit
51e217e38c
79 changed files with 6968 additions and 0 deletions
39
code/src/EventRaisingStreamWriter.cs
Normal file
39
code/src/EventRaisingStreamWriter.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FileWatcher
|
||||
{
|
||||
public class EventRaisingStreamWriter : StreamWriter
|
||||
{
|
||||
public event EventHandler<MyEvtArgs<string>> StringWritten;
|
||||
|
||||
public EventRaisingStreamWriter(Stream s)
|
||||
: base(s)
|
||||
{
|
||||
}
|
||||
|
||||
private void LaunchEvent(string txtWritten)
|
||||
{
|
||||
if (StringWritten != null)
|
||||
{
|
||||
StringWritten(this, new MyEvtArgs<string>(txtWritten));
|
||||
}
|
||||
}
|
||||
|
||||
public override void Write(string value)
|
||||
{
|
||||
base.Write(value);
|
||||
LaunchEvent(value);
|
||||
}
|
||||
public override void Write(bool value)
|
||||
{
|
||||
base.Write(value);
|
||||
LaunchEvent(value.ToString());
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue