finished project
This commit is contained in:
		@ -32,6 +32,10 @@ namespace VCRlogic
 | 
			
		||||
            _concreteState = e;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static StateTape getState()
 | 
			
		||||
        {
 | 
			
		||||
            return _concreteState;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public static void insertTape()
 | 
			
		||||
        {
 | 
			
		||||
@ -81,7 +85,6 @@ namespace VCRlogic
 | 
			
		||||
 | 
			
		||||
    public class StapeNoTapeIn : StateTape
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public StapeNoTapeIn()
 | 
			
		||||
        {
 | 
			
		||||
            Debug.Print("NoTapeIn\n");
 | 
			
		||||
@ -89,6 +92,7 @@ namespace VCRlogic
 | 
			
		||||
            // sub to event
 | 
			
		||||
            SMtape.evIntape += evIntape;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void evIntape()
 | 
			
		||||
        {
 | 
			
		||||
            //unsub
 | 
			
		||||
@ -103,24 +107,22 @@ namespace VCRlogic
 | 
			
		||||
 | 
			
		||||
        public override void evEndtape()
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void evNotendtape()
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public class StapeTapeInNotEnd : StateTape
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        public StapeTapeInNotEnd()
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            Debug.Print("TapeInNotEnd\n");
 | 
			
		||||
 | 
			
		||||
            SMvcr.tapeBeginn();
 | 
			
		||||
 | 
			
		||||
            //sub
 | 
			
		||||
            SMtape.evOuttape += evOuttape;
 | 
			
		||||
            SMtape.evEndtape += evEndtape;
 | 
			
		||||
@ -148,28 +150,24 @@ namespace VCRlogic
 | 
			
		||||
 | 
			
		||||
        public override void evNotendtape()
 | 
			
		||||
        {
 | 
			
		||||
            
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
       
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public class StapeTapeInEnd : StateTape
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        public StapeTapeInEnd()
 | 
			
		||||
        {
 | 
			
		||||
            Debug.Print("TapeInEnd\n");
 | 
			
		||||
 | 
			
		||||
            SMvcr.tapeEnd();
 | 
			
		||||
 | 
			
		||||
            SMtape.evOuttape += evOuttape;
 | 
			
		||||
            SMtape.evNoendtape += evNotendtape;
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void evIntape()
 | 
			
		||||
        {
 | 
			
		||||
     
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void evOuttape()
 | 
			
		||||
@ -181,7 +179,6 @@ namespace VCRlogic
 | 
			
		||||
 | 
			
		||||
        public override void evEndtape()
 | 
			
		||||
        {
 | 
			
		||||
         
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        public override void evNotendtape()
 | 
			
		||||
 | 
			
		||||
@ -5,6 +5,7 @@ using System.Diagnostics;
 | 
			
		||||
using System.Linq;
 | 
			
		||||
using System.Text;
 | 
			
		||||
using System.Threading.Tasks;
 | 
			
		||||
using VCRlogic;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
public static class SMvcr
 | 
			
		||||
@ -65,33 +66,62 @@ public static class SMvcr
 | 
			
		||||
 | 
			
		||||
    public static void record()
 | 
			
		||||
    {
 | 
			
		||||
        if (evRecordbutton != null)
 | 
			
		||||
        if (SMtape.getState() is StapeTapeInNotEnd)
 | 
			
		||||
        {
 | 
			
		||||
            evRecordbutton();
 | 
			
		||||
            if (evRecordbutton != null)
 | 
			
		||||
            {
 | 
			
		||||
                evRecordbutton();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void play()
 | 
			
		||||
    {
 | 
			
		||||
        if (evPlaybutton != null)
 | 
			
		||||
        if (SMtape.getState() is StapeTapeInNotEnd)
 | 
			
		||||
        {
 | 
			
		||||
            evPlaybutton();
 | 
			
		||||
            if (evPlaybutton != null)
 | 
			
		||||
            {
 | 
			
		||||
                evPlaybutton();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void rewind()
 | 
			
		||||
    {
 | 
			
		||||
        if (evRewindbutton != null)
 | 
			
		||||
        if (SMtape.getState() is StapeTapeInEnd)
 | 
			
		||||
        {
 | 
			
		||||
            evRewindbutton();
 | 
			
		||||
            if (evRewindbutton != null)
 | 
			
		||||
            {
 | 
			
		||||
                evRewindbutton();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void fastforward()
 | 
			
		||||
    {
 | 
			
		||||
        if (evFastforwardbutton != null)
 | 
			
		||||
        if (SMtape.getState() is StapeTapeInNotEnd)
 | 
			
		||||
        {
 | 
			
		||||
            evFastforwardbutton();
 | 
			
		||||
            if (evFastforwardbutton != null)
 | 
			
		||||
            {
 | 
			
		||||
                evFastforwardbutton();
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    public static void tapeEnd()
 | 
			
		||||
    {
 | 
			
		||||
        if (evEndtape != null)
 | 
			
		||||
        {
 | 
			
		||||
            evEndtape();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public static void tapeBeginn()
 | 
			
		||||
    {
 | 
			
		||||
        if (evBeginningtape != null)
 | 
			
		||||
        {
 | 
			
		||||
            evBeginningtape();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										7
									
								
								winVCR/winVCR/Form1.Designer.cs
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										7
									
								
								winVCR/winVCR/Form1.Designer.cs
									
									
									
										generated
									
									
									
								
							@ -89,12 +89,13 @@
 | 
			
		||||
            // 
 | 
			
		||||
            this.statusLabel.AutoSize = true;
 | 
			
		||||
            this.statusLabel.Font = new System.Drawing.Font("Arial", 36F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
 | 
			
		||||
            this.statusLabel.Location = new System.Drawing.Point(242, 230);
 | 
			
		||||
            this.statusLabel.Location = new System.Drawing.Point(267, 223);
 | 
			
		||||
            this.statusLabel.MinimumSize = new System.Drawing.Size(200, 50);
 | 
			
		||||
            this.statusLabel.Name = "statusLabel";
 | 
			
		||||
            this.statusLabel.Size = new System.Drawing.Size(291, 55);
 | 
			
		||||
            this.statusLabel.Size = new System.Drawing.Size(200, 55);
 | 
			
		||||
            this.statusLabel.TabIndex = 5;
 | 
			
		||||
            this.statusLabel.Text = "Status Label";
 | 
			
		||||
            this.statusLabel.Text = "Standby";
 | 
			
		||||
            this.statusLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
 | 
			
		||||
            // 
 | 
			
		||||
            // btnInsertTape
 | 
			
		||||
            // 
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user