trigger some vcr events
This commit is contained in:
@ -8,7 +8,6 @@ using System.Threading.Tasks;
|
||||
|
||||
public static class SMvcr
|
||||
{
|
||||
|
||||
private static StateVCR _concreteState;
|
||||
|
||||
public delegate void VCREventHandler();
|
||||
@ -38,6 +37,45 @@ public static class SMvcr
|
||||
_concreteState = e;
|
||||
}
|
||||
|
||||
public static void stop()
|
||||
{
|
||||
if (evStopbutton != null)
|
||||
{
|
||||
evStopbutton();
|
||||
}
|
||||
}
|
||||
|
||||
public static void record()
|
||||
{
|
||||
if (evRecordbutton != null)
|
||||
{
|
||||
evRecordbutton();
|
||||
}
|
||||
}
|
||||
|
||||
public static void play()
|
||||
{
|
||||
if (evPlaybutton != null)
|
||||
{
|
||||
evPlaybutton();
|
||||
}
|
||||
}
|
||||
|
||||
public static void rewind()
|
||||
{
|
||||
if (evRewindbutton != null)
|
||||
{
|
||||
evRewindbutton();
|
||||
}
|
||||
}
|
||||
|
||||
public static void fastforward()
|
||||
{
|
||||
if (evFastforwardbutton != null)
|
||||
{
|
||||
evFastforwardbutton();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -54,7 +92,6 @@ public abstract class StateVCR
|
||||
|
||||
public class SvcrStandBy : StateVCR
|
||||
{
|
||||
|
||||
public SvcrStandBy()
|
||||
{
|
||||
Debug.Print("Standby\n");
|
||||
@ -62,16 +99,14 @@ public class SvcrStandBy : StateVCR
|
||||
SMvcr.evRecordbutton += evRecordbutton;
|
||||
SMvcr.evPlaybutton += evPlaybutton;
|
||||
SMvcr.evRewindbutton += evRewindbutton;
|
||||
|
||||
}
|
||||
|
||||
public override void evStopbutton()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void evEndtape()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void evRecordbutton()
|
||||
@ -94,7 +129,6 @@ public class SvcrStandBy : StateVCR
|
||||
|
||||
public override void evBeginningtape()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void evRewindbutton()
|
||||
@ -108,7 +142,6 @@ public class SvcrStandBy : StateVCR
|
||||
|
||||
public override void evFastforwardbutton()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,6 +156,7 @@ public class SvcrPlay : StateVCR
|
||||
SMvcr.evRewindbutton += evRewindbutton;
|
||||
SMvcr.evFastforwardbutton += evFastforwardbutton;
|
||||
}
|
||||
|
||||
public override void evStopbutton()
|
||||
{
|
||||
SMvcr.evStopbutton -= evStopbutton;
|
||||
@ -145,17 +179,14 @@ public class SvcrPlay : StateVCR
|
||||
|
||||
public override void evRecordbutton()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void evPlaybutton()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void evBeginningtape()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override void evRewindbutton()
|
||||
@ -181,7 +212,6 @@ public class SvcrPlay : StateVCR
|
||||
|
||||
public class SvcrRewind : StateVCR
|
||||
{
|
||||
|
||||
public SvcrRewind()
|
||||
{
|
||||
Debug.Print("Rewind\n");
|
||||
@ -191,6 +221,7 @@ public class SvcrRewind : StateVCR
|
||||
SMvcr.evPlaybutton += evPlaybutton;
|
||||
SMvcr.evFastforwardbutton += evFastforwardbutton;
|
||||
}
|
||||
|
||||
public override void evStopbutton()
|
||||
{
|
||||
SMvcr.evStopbutton -= evStopbutton;
|
||||
@ -254,6 +285,7 @@ public class SvcrFastForward : StateVCR
|
||||
SMvcr.evEndtape += evEndtape;
|
||||
SMvcr.evRewindbutton += evRewindbutton;
|
||||
}
|
||||
|
||||
public override void evStopbutton()
|
||||
{
|
||||
SMvcr.evStopbutton -= evStopbutton;
|
||||
@ -307,6 +339,7 @@ public class SvcrRecord : StateVCR
|
||||
SMvcr.evStopbutton += evStopbutton;
|
||||
SMvcr.evEndtape += evEndtape;
|
||||
}
|
||||
|
||||
public override void evStopbutton()
|
||||
{
|
||||
SMvcr.evStopbutton -= evStopbutton;
|
||||
@ -342,6 +375,4 @@ public class SvcrRecord : StateVCR
|
||||
public override void evFastforwardbutton()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user