trigger some vcr events

This commit is contained in:
test
2019-04-09 18:41:49 +02:00
parent 6953c604f3
commit 9984eca5ff
3 changed files with 94 additions and 25 deletions

View File

@ -38,6 +38,8 @@
this.btnEjectTape = new System.Windows.Forms.Button();
this.btnEndTape = new System.Windows.Forms.Button();
this.btnNotEndTape = new System.Windows.Forms.Button();
this.btnFastForward = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
@ -54,11 +56,11 @@
// btnPlay
//
this.btnPlay.BackColor = System.Drawing.Color.Transparent;
this.btnPlay.Location = new System.Drawing.Point(636, 117);
this.btnPlay.Location = new System.Drawing.Point(625, 102);
this.btnPlay.Name = "btnPlay";
this.btnPlay.Size = new System.Drawing.Size(75, 23);
this.btnPlay.TabIndex = 1;
this.btnPlay.Text = "Play/Pause";
this.btnPlay.Text = "Play";
this.btnPlay.UseVisualStyleBackColor = false;
this.btnPlay.Click += new System.EventHandler(this.BtnPlay_Click);
//
@ -74,12 +76,13 @@
//
// btnRecord
//
this.btnRecord.Location = new System.Drawing.Point(667, 157);
this.btnRecord.BackColor = System.Drawing.Color.DarkRed;
this.btnRecord.Location = new System.Drawing.Point(706, 89);
this.btnRecord.Name = "btnRecord";
this.btnRecord.Size = new System.Drawing.Size(76, 25);
this.btnRecord.Size = new System.Drawing.Size(52, 25);
this.btnRecord.TabIndex = 4;
this.btnRecord.Text = "Record";
this.btnRecord.UseVisualStyleBackColor = true;
this.btnRecord.UseVisualStyleBackColor = false;
this.btnRecord.Click += new System.EventHandler(this.BtnRecord_Click);
//
// statusLabel
@ -133,11 +136,34 @@
this.btnNotEndTape.UseVisualStyleBackColor = true;
this.btnNotEndTape.Click += new System.EventHandler(this.BtnNotEndTape_Click);
//
// btnFastForward
//
this.btnFastForward.Location = new System.Drawing.Point(667, 159);
this.btnFastForward.Name = "btnFastForward";
this.btnFastForward.Size = new System.Drawing.Size(75, 23);
this.btnFastForward.TabIndex = 10;
this.btnFastForward.Text = "FastForward";
this.btnFastForward.UseVisualStyleBackColor = true;
this.btnFastForward.Click += new System.EventHandler(this.BtnFastForward_Click);
//
// btnStop
//
this.btnStop.BackColor = System.Drawing.Color.Transparent;
this.btnStop.Location = new System.Drawing.Point(625, 130);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(75, 23);
this.btnStop.TabIndex = 11;
this.btnStop.Text = "Stop";
this.btnStop.UseVisualStyleBackColor = false;
this.btnStop.Click += new System.EventHandler(this.BtnStop_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.btnStop);
this.Controls.Add(this.btnFastForward);
this.Controls.Add(this.btnNotEndTape);
this.Controls.Add(this.btnEndTape);
this.Controls.Add(this.btnEjectTape);
@ -167,6 +193,8 @@
private System.Windows.Forms.Button btnEjectTape;
private System.Windows.Forms.Button btnEndTape;
private System.Windows.Forms.Button btnNotEndTape;
private System.Windows.Forms.Button btnFastForward;
private System.Windows.Forms.Button btnStop;
}
}

View File

@ -17,17 +17,13 @@ namespace winVCR
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
SMtape.initSMtape();
SMvcr.initSMvcr();
}
@ -41,14 +37,18 @@ namespace winVCR
private void BtnPlay_Click(object sender, EventArgs e)
{
SMvcr.play();
}
private void Rewind_Click(object sender, EventArgs e)
{
SMvcr.rewind();
}
private void BtnRecord_Click(object sender, EventArgs e)
{
SMvcr.record();
}
private void Power_Click(object sender, EventArgs e)
@ -74,5 +74,15 @@ namespace winVCR
{
SMtape.endTape();
}
private void BtnFastForward_Click(object sender, EventArgs e)
{
SMvcr.fastforward();
}
private void BtnStop_Click(object sender, EventArgs e)
{
SMvcr.stop();
}
}
}