|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WorkCardDemo
{
public abstract class WorkCardSwipeMessageBase
{
public string Name { get; private set; }
protected WorkCardSwipeMessageBase(string name)
{
Name = name;
}
public override string ToString()
{
return String.Format("Message : Worker Name = {0}", Name);
}
}
public class CorrectPinMessage : WorkCardSwipeMessageBase
{
public CorrectPinMessage(string name)
: base(name)
{
}
public override string ToString()
{
return String.Format("PIN Success {0}", base.ToString());
}
}
public class WrongPinMessage : WorkCardSwipeMessageBase
{
public string _door { get; private set; }
public WrongPinMessage(string name,string door)
: base(name)
{
_door = door;
}
public override string ToString()
{
return String.Format("PIN Failure {0} @ {1}", base.ToString(), _door);
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.