2 Commits
Author SHA1 Message Date
kennyboy55 acfcdbe12d Merge pull request #2 from KettlerX7AvansA5/develop
Version 1.0
2015-09-07 13:31:24 +02:00
kennyboy55 d1c7640851 Merge pull request #1 from KettlerX7AvansA5/develop
Merge new version into master
2015-09-05 21:47:15 +02:00
4 changed files with 107 additions and 545 deletions
@@ -8,6 +8,7 @@ namespace ErgometerSimulator
{ {
class CommandParser class CommandParser
{ {
private Random rand = new Random();
private DataGenerator dg; private DataGenerator dg;
public CommandParser(DataGenerator dg) public CommandParser(DataGenerator dg)
@@ -22,10 +23,8 @@ namespace ErgometerSimulator
switch(input) switch(input)
{ {
case "CM": case "CM":
break;
case "RS": case "RS":
response = "ACK"; response = "ACK";
dg.Reset();
break; break;
case "ST": case "ST":
response += dg.HeartBeat.currentvalue + "\t"; //Heartbeat response += dg.HeartBeat.currentvalue + "\t"; //Heartbeat
@@ -40,30 +39,7 @@ namespace ErgometerSimulator
default: default:
break; break;
} }
if (input.StartsWith("PT"))
{
dg.Time.currentvalue = int.Parse(input.Substring(3, 2)) * 60 + int.Parse(input.Substring(5, 2));
dg.Time = new ValueSetting(true, int.Parse(input.Substring(3, 2)) * 60 + int.Parse(input.Substring(5, 2)), 0);
Console.WriteLine(dg.Time.currentvalue);
}
else if (input.StartsWith("PD"))
{
dg.Distance.currentvalue = int.Parse(input.Substring(3));
dg.Distance.value1 = int.Parse(input.Substring(3));
Console.WriteLine(dg.Distance.currentvalue);
}
else if (input.StartsWith("PW"))
{
dg.Power.currentvalue = int.Parse(input.Substring(3));
dg.Power.value1 = int.Parse(input.Substring(3));
Console.WriteLine(dg.Power.currentvalue);
}
else if (input.StartsWith("PE"))
{
dg.Energy.currentvalue = int.Parse(input.Substring(3));
dg.Energy.value1 = int.Parse(input.Substring(3));
Console.WriteLine(dg.Energy.currentvalue);
}
return response; return response;
} }
} }
@@ -36,19 +36,7 @@ namespace ErgometerSimulator
lastTime = (DateTime.Now - DateTime.Parse("1/1/1870 0:0:0")).TotalMilliseconds; lastTime = (DateTime.Now - DateTime.Parse("1/1/1870 0:0:0")).TotalMilliseconds;
} }
public void Reset()
{
HeartBeat = new ValueSetting(false, 0, 0);
RPM = new ValueSetting(false, 0, 0);
Speed = new ValueSetting(false, 0, 0);
Distance = new ValueSetting(false, 0, 0);
Power = new ValueSetting(false, 0, 0);
Energy = new ValueSetting(false, 0, 0);
ActualPower = new ValueSetting(false, 0, 0);
Time = new ValueSetting(false, 0, 0);
lastTime = (DateTime.Now - DateTime.Parse("1/1/1870 0:0:0")).TotalMilliseconds;
}
public void Update() public void Update()
{ {
@@ -81,38 +81,13 @@ namespace ErgometerSimulator
this.label4 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label();
this.labelCurrentTime = new System.Windows.Forms.Label(); this.labelCurrentTime = new System.Windows.Forms.Label();
this.updateTimer = new System.Windows.Forms.Timer(this.components); this.updateTimer = new System.Windows.Forms.Timer(this.components);
this.heartbeatMinLbl = new System.Windows.Forms.Label();
this.heartbeatMaxLbl = new System.Windows.Forms.Label();
this.rpmMinLbl = new System.Windows.Forms.Label();
this.rpmMaxLbl = new System.Windows.Forms.Label();
this.speedMinLbl = new System.Windows.Forms.Label();
this.speedMaxLbl = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.heartbeatCurLbl = new System.Windows.Forms.Label();
this.rpmCurLbl = new System.Windows.Forms.Label();
this.speedCurLbl = new System.Windows.Forms.Label();
this.distanceMinLbl = new System.Windows.Forms.Label();
this.distanceMaxLbl = new System.Windows.Forms.Label();
this.distanceCurLbl = new System.Windows.Forms.Label();
this.powerMinLbl = new System.Windows.Forms.Label();
this.powerMaxLbl = new System.Windows.Forms.Label();
this.powerCurLbl = new System.Windows.Forms.Label();
this.energyMinLbl = new System.Windows.Forms.Label();
this.energyMaxLbl = new System.Windows.Forms.Label();
this.energyCurLbl = new System.Windows.Forms.Label();
this.actpowerMinLbl = new System.Windows.Forms.Label();
this.actpowerMaxLbl = new System.Windows.Forms.Label();
this.actpowerCurLbl = new System.Windows.Forms.Label();
this.SuspendLayout(); this.SuspendLayout();
// //
// connectButton // connectButton
// //
this.connectButton.Location = new System.Drawing.Point(113, 248); this.connectButton.Location = new System.Drawing.Point(151, 305);
this.connectButton.Margin = new System.Windows.Forms.Padding(2);
this.connectButton.Name = "connectButton"; this.connectButton.Name = "connectButton";
this.connectButton.Size = new System.Drawing.Size(76, 22); this.connectButton.Size = new System.Drawing.Size(101, 27);
this.connectButton.TabIndex = 0; this.connectButton.TabIndex = 0;
this.connectButton.Text = "Connect"; this.connectButton.Text = "Connect";
this.connectButton.UseVisualStyleBackColor = true; this.connectButton.UseVisualStyleBackColor = true;
@@ -121,24 +96,20 @@ namespace ErgometerSimulator
// ComPortBox // ComPortBox
// //
this.ComPortBox.FormattingEnabled = true; this.ComPortBox.FormattingEnabled = true;
this.ComPortBox.Items.AddRange(SerialPort.GetPortNames()); this.ComPortBox.Items.AddRange(new object[] {
if (ComPortBox.Items.Count > 0) "COM8",
this.ComPortBox.SelectedIndex = 0; "COM9"});
if (ComPortBox.Items.Count > 1) this.ComPortBox.Location = new System.Drawing.Point(15, 308);
this.ComPortBox.SelectedIndex = 1;
this.ComPortBox.Location = new System.Drawing.Point(11, 250);
this.ComPortBox.Margin = new System.Windows.Forms.Padding(2);
this.ComPortBox.Name = "ComPortBox"; this.ComPortBox.Name = "ComPortBox";
this.ComPortBox.Size = new System.Drawing.Size(92, 21); this.ComPortBox.Size = new System.Drawing.Size(121, 24);
this.ComPortBox.TabIndex = 1; this.ComPortBox.TabIndex = 1;
// //
// labelHeartBeat // labelHeartBeat
// //
this.labelHeartBeat.AutoSize = true; this.labelHeartBeat.AutoSize = true;
this.labelHeartBeat.Location = new System.Drawing.Point(9, 22); this.labelHeartBeat.Location = new System.Drawing.Point(12, 27);
this.labelHeartBeat.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labelHeartBeat.Name = "labelHeartBeat"; this.labelHeartBeat.Name = "labelHeartBeat";
this.labelHeartBeat.Size = new System.Drawing.Size(54, 13); this.labelHeartBeat.Size = new System.Drawing.Size(71, 17);
this.labelHeartBeat.TabIndex = 2; this.labelHeartBeat.TabIndex = 2;
this.labelHeartBeat.Text = "Heartbeat"; this.labelHeartBeat.Text = "Heartbeat";
// //
@@ -146,10 +117,9 @@ namespace ErgometerSimulator
// //
this.randomHeartBeat.AutoSize = true; this.randomHeartBeat.AutoSize = true;
this.randomHeartBeat.Enabled = false; this.randomHeartBeat.Enabled = false;
this.randomHeartBeat.Location = new System.Drawing.Point(86, 23); this.randomHeartBeat.Location = new System.Drawing.Point(114, 28);
this.randomHeartBeat.Margin = new System.Windows.Forms.Padding(2);
this.randomHeartBeat.Name = "randomHeartBeat"; this.randomHeartBeat.Name = "randomHeartBeat";
this.randomHeartBeat.Size = new System.Drawing.Size(15, 14); this.randomHeartBeat.Size = new System.Drawing.Size(18, 17);
this.randomHeartBeat.TabIndex = 3; this.randomHeartBeat.TabIndex = 3;
this.randomHeartBeat.UseVisualStyleBackColor = true; this.randomHeartBeat.UseVisualStyleBackColor = true;
this.randomHeartBeat.CheckedChanged += new System.EventHandler(this.randomHeartBeat_CheckedChanged); this.randomHeartBeat.CheckedChanged += new System.EventHandler(this.randomHeartBeat_CheckedChanged);
@@ -157,28 +127,25 @@ namespace ErgometerSimulator
// text1HeartBeat // text1HeartBeat
// //
this.text1HeartBeat.Enabled = false; this.text1HeartBeat.Enabled = false;
this.text1HeartBeat.Location = new System.Drawing.Point(113, 20); this.text1HeartBeat.Location = new System.Drawing.Point(151, 24);
this.text1HeartBeat.Margin = new System.Windows.Forms.Padding(2);
this.text1HeartBeat.Name = "text1HeartBeat"; this.text1HeartBeat.Name = "text1HeartBeat";
this.text1HeartBeat.Size = new System.Drawing.Size(76, 20); this.text1HeartBeat.Size = new System.Drawing.Size(100, 22);
this.text1HeartBeat.TabIndex = 4; this.text1HeartBeat.TabIndex = 4;
// //
// text2HeartBeat // text2HeartBeat
// //
this.text2HeartBeat.Enabled = false; this.text2HeartBeat.Enabled = false;
this.text2HeartBeat.Location = new System.Drawing.Point(193, 20); this.text2HeartBeat.Location = new System.Drawing.Point(257, 24);
this.text2HeartBeat.Margin = new System.Windows.Forms.Padding(2);
this.text2HeartBeat.Name = "text2HeartBeat"; this.text2HeartBeat.Name = "text2HeartBeat";
this.text2HeartBeat.Size = new System.Drawing.Size(76, 20); this.text2HeartBeat.Size = new System.Drawing.Size(100, 22);
this.text2HeartBeat.TabIndex = 5; this.text2HeartBeat.TabIndex = 5;
// //
// setHeartBeat // setHeartBeat
// //
this.setHeartBeat.Enabled = false; this.setHeartBeat.Enabled = false;
this.setHeartBeat.Location = new System.Drawing.Point(272, 20); this.setHeartBeat.Location = new System.Drawing.Point(363, 24);
this.setHeartBeat.Margin = new System.Windows.Forms.Padding(2);
this.setHeartBeat.Name = "setHeartBeat"; this.setHeartBeat.Name = "setHeartBeat";
this.setHeartBeat.Size = new System.Drawing.Size(56, 19); this.setHeartBeat.Size = new System.Drawing.Size(75, 23);
this.setHeartBeat.TabIndex = 6; this.setHeartBeat.TabIndex = 6;
this.setHeartBeat.Text = "Set"; this.setHeartBeat.Text = "Set";
this.setHeartBeat.UseVisualStyleBackColor = true; this.setHeartBeat.UseVisualStyleBackColor = true;
@@ -187,10 +154,9 @@ namespace ErgometerSimulator
// setRPM // setRPM
// //
this.setRPM.Enabled = false; this.setRPM.Enabled = false;
this.setRPM.Location = new System.Drawing.Point(272, 41); this.setRPM.Location = new System.Drawing.Point(363, 50);
this.setRPM.Margin = new System.Windows.Forms.Padding(2);
this.setRPM.Name = "setRPM"; this.setRPM.Name = "setRPM";
this.setRPM.Size = new System.Drawing.Size(56, 19); this.setRPM.Size = new System.Drawing.Size(75, 23);
this.setRPM.TabIndex = 11; this.setRPM.TabIndex = 11;
this.setRPM.Text = "Set"; this.setRPM.Text = "Set";
this.setRPM.UseVisualStyleBackColor = true; this.setRPM.UseVisualStyleBackColor = true;
@@ -199,29 +165,26 @@ namespace ErgometerSimulator
// text2RPM // text2RPM
// //
this.text2RPM.Enabled = false; this.text2RPM.Enabled = false;
this.text2RPM.Location = new System.Drawing.Point(193, 41); this.text2RPM.Location = new System.Drawing.Point(257, 50);
this.text2RPM.Margin = new System.Windows.Forms.Padding(2);
this.text2RPM.Name = "text2RPM"; this.text2RPM.Name = "text2RPM";
this.text2RPM.Size = new System.Drawing.Size(76, 20); this.text2RPM.Size = new System.Drawing.Size(100, 22);
this.text2RPM.TabIndex = 10; this.text2RPM.TabIndex = 10;
// //
// text1RPM // text1RPM
// //
this.text1RPM.Enabled = false; this.text1RPM.Enabled = false;
this.text1RPM.Location = new System.Drawing.Point(113, 41); this.text1RPM.Location = new System.Drawing.Point(151, 50);
this.text1RPM.Margin = new System.Windows.Forms.Padding(2);
this.text1RPM.Name = "text1RPM"; this.text1RPM.Name = "text1RPM";
this.text1RPM.Size = new System.Drawing.Size(76, 20); this.text1RPM.Size = new System.Drawing.Size(100, 22);
this.text1RPM.TabIndex = 9; this.text1RPM.TabIndex = 9;
// //
// randomRPM // randomRPM
// //
this.randomRPM.AutoSize = true; this.randomRPM.AutoSize = true;
this.randomRPM.Enabled = false; this.randomRPM.Enabled = false;
this.randomRPM.Location = new System.Drawing.Point(86, 44); this.randomRPM.Location = new System.Drawing.Point(114, 54);
this.randomRPM.Margin = new System.Windows.Forms.Padding(2);
this.randomRPM.Name = "randomRPM"; this.randomRPM.Name = "randomRPM";
this.randomRPM.Size = new System.Drawing.Size(15, 14); this.randomRPM.Size = new System.Drawing.Size(18, 17);
this.randomRPM.TabIndex = 8; this.randomRPM.TabIndex = 8;
this.randomRPM.UseVisualStyleBackColor = true; this.randomRPM.UseVisualStyleBackColor = true;
this.randomRPM.CheckedChanged += new System.EventHandler(this.randomRPM_CheckedChanged); this.randomRPM.CheckedChanged += new System.EventHandler(this.randomRPM_CheckedChanged);
@@ -229,20 +192,18 @@ namespace ErgometerSimulator
// labelRPM // labelRPM
// //
this.labelRPM.AutoSize = true; this.labelRPM.AutoSize = true;
this.labelRPM.Location = new System.Drawing.Point(9, 43); this.labelRPM.Location = new System.Drawing.Point(12, 53);
this.labelRPM.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labelRPM.Name = "labelRPM"; this.labelRPM.Name = "labelRPM";
this.labelRPM.Size = new System.Drawing.Size(31, 13); this.labelRPM.Size = new System.Drawing.Size(38, 17);
this.labelRPM.TabIndex = 7; this.labelRPM.TabIndex = 7;
this.labelRPM.Text = "RPM"; this.labelRPM.Text = "RPM";
// //
// setSpeed // setSpeed
// //
this.setSpeed.Enabled = false; this.setSpeed.Enabled = false;
this.setSpeed.Location = new System.Drawing.Point(272, 63); this.setSpeed.Location = new System.Drawing.Point(363, 78);
this.setSpeed.Margin = new System.Windows.Forms.Padding(2);
this.setSpeed.Name = "setSpeed"; this.setSpeed.Name = "setSpeed";
this.setSpeed.Size = new System.Drawing.Size(56, 19); this.setSpeed.Size = new System.Drawing.Size(75, 23);
this.setSpeed.TabIndex = 16; this.setSpeed.TabIndex = 16;
this.setSpeed.Text = "Set"; this.setSpeed.Text = "Set";
this.setSpeed.UseVisualStyleBackColor = true; this.setSpeed.UseVisualStyleBackColor = true;
@@ -251,29 +212,26 @@ namespace ErgometerSimulator
// text2Speed // text2Speed
// //
this.text2Speed.Enabled = false; this.text2Speed.Enabled = false;
this.text2Speed.Location = new System.Drawing.Point(193, 63); this.text2Speed.Location = new System.Drawing.Point(257, 78);
this.text2Speed.Margin = new System.Windows.Forms.Padding(2);
this.text2Speed.Name = "text2Speed"; this.text2Speed.Name = "text2Speed";
this.text2Speed.Size = new System.Drawing.Size(76, 20); this.text2Speed.Size = new System.Drawing.Size(100, 22);
this.text2Speed.TabIndex = 15; this.text2Speed.TabIndex = 15;
// //
// text1Speed // text1Speed
// //
this.text1Speed.Enabled = false; this.text1Speed.Enabled = false;
this.text1Speed.Location = new System.Drawing.Point(113, 63); this.text1Speed.Location = new System.Drawing.Point(151, 78);
this.text1Speed.Margin = new System.Windows.Forms.Padding(2);
this.text1Speed.Name = "text1Speed"; this.text1Speed.Name = "text1Speed";
this.text1Speed.Size = new System.Drawing.Size(76, 20); this.text1Speed.Size = new System.Drawing.Size(100, 22);
this.text1Speed.TabIndex = 14; this.text1Speed.TabIndex = 14;
// //
// randomSpeed // randomSpeed
// //
this.randomSpeed.AutoSize = true; this.randomSpeed.AutoSize = true;
this.randomSpeed.Enabled = false; this.randomSpeed.Enabled = false;
this.randomSpeed.Location = new System.Drawing.Point(86, 67); this.randomSpeed.Location = new System.Drawing.Point(114, 82);
this.randomSpeed.Margin = new System.Windows.Forms.Padding(2);
this.randomSpeed.Name = "randomSpeed"; this.randomSpeed.Name = "randomSpeed";
this.randomSpeed.Size = new System.Drawing.Size(15, 14); this.randomSpeed.Size = new System.Drawing.Size(18, 17);
this.randomSpeed.TabIndex = 13; this.randomSpeed.TabIndex = 13;
this.randomSpeed.UseVisualStyleBackColor = true; this.randomSpeed.UseVisualStyleBackColor = true;
this.randomSpeed.CheckedChanged += new System.EventHandler(this.randomSpeed_CheckedChanged); this.randomSpeed.CheckedChanged += new System.EventHandler(this.randomSpeed_CheckedChanged);
@@ -281,20 +239,18 @@ namespace ErgometerSimulator
// labelSpeed // labelSpeed
// //
this.labelSpeed.AutoSize = true; this.labelSpeed.AutoSize = true;
this.labelSpeed.Location = new System.Drawing.Point(9, 66); this.labelSpeed.Location = new System.Drawing.Point(12, 81);
this.labelSpeed.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labelSpeed.Name = "labelSpeed"; this.labelSpeed.Name = "labelSpeed";
this.labelSpeed.Size = new System.Drawing.Size(38, 13); this.labelSpeed.Size = new System.Drawing.Size(49, 17);
this.labelSpeed.TabIndex = 12; this.labelSpeed.TabIndex = 12;
this.labelSpeed.Text = "Speed"; this.labelSpeed.Text = "Speed";
// //
// setDistance // setDistance
// //
this.setDistance.Enabled = false; this.setDistance.Enabled = false;
this.setDistance.Location = new System.Drawing.Point(272, 88); this.setDistance.Location = new System.Drawing.Point(363, 108);
this.setDistance.Margin = new System.Windows.Forms.Padding(2);
this.setDistance.Name = "setDistance"; this.setDistance.Name = "setDistance";
this.setDistance.Size = new System.Drawing.Size(56, 19); this.setDistance.Size = new System.Drawing.Size(75, 23);
this.setDistance.TabIndex = 21; this.setDistance.TabIndex = 21;
this.setDistance.Text = "Set"; this.setDistance.Text = "Set";
this.setDistance.UseVisualStyleBackColor = true; this.setDistance.UseVisualStyleBackColor = true;
@@ -303,29 +259,26 @@ namespace ErgometerSimulator
// text2Distance // text2Distance
// //
this.text2Distance.Enabled = false; this.text2Distance.Enabled = false;
this.text2Distance.Location = new System.Drawing.Point(193, 88); this.text2Distance.Location = new System.Drawing.Point(257, 108);
this.text2Distance.Margin = new System.Windows.Forms.Padding(2);
this.text2Distance.Name = "text2Distance"; this.text2Distance.Name = "text2Distance";
this.text2Distance.Size = new System.Drawing.Size(76, 20); this.text2Distance.Size = new System.Drawing.Size(100, 22);
this.text2Distance.TabIndex = 20; this.text2Distance.TabIndex = 20;
// //
// text1Distance // text1Distance
// //
this.text1Distance.Enabled = false; this.text1Distance.Enabled = false;
this.text1Distance.Location = new System.Drawing.Point(113, 88); this.text1Distance.Location = new System.Drawing.Point(151, 108);
this.text1Distance.Margin = new System.Windows.Forms.Padding(2);
this.text1Distance.Name = "text1Distance"; this.text1Distance.Name = "text1Distance";
this.text1Distance.Size = new System.Drawing.Size(76, 20); this.text1Distance.Size = new System.Drawing.Size(100, 22);
this.text1Distance.TabIndex = 19; this.text1Distance.TabIndex = 19;
// //
// randomDistance // randomDistance
// //
this.randomDistance.AutoSize = true; this.randomDistance.AutoSize = true;
this.randomDistance.Enabled = false; this.randomDistance.Enabled = false;
this.randomDistance.Location = new System.Drawing.Point(86, 91); this.randomDistance.Location = new System.Drawing.Point(114, 112);
this.randomDistance.Margin = new System.Windows.Forms.Padding(2);
this.randomDistance.Name = "randomDistance"; this.randomDistance.Name = "randomDistance";
this.randomDistance.Size = new System.Drawing.Size(15, 14); this.randomDistance.Size = new System.Drawing.Size(18, 17);
this.randomDistance.TabIndex = 18; this.randomDistance.TabIndex = 18;
this.randomDistance.UseVisualStyleBackColor = true; this.randomDistance.UseVisualStyleBackColor = true;
this.randomDistance.CheckedChanged += new System.EventHandler(this.randomDistance_CheckedChanged); this.randomDistance.CheckedChanged += new System.EventHandler(this.randomDistance_CheckedChanged);
@@ -333,20 +286,18 @@ namespace ErgometerSimulator
// labelDistance // labelDistance
// //
this.labelDistance.AutoSize = true; this.labelDistance.AutoSize = true;
this.labelDistance.Location = new System.Drawing.Point(9, 90); this.labelDistance.Location = new System.Drawing.Point(12, 111);
this.labelDistance.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labelDistance.Name = "labelDistance"; this.labelDistance.Name = "labelDistance";
this.labelDistance.Size = new System.Drawing.Size(49, 13); this.labelDistance.Size = new System.Drawing.Size(63, 17);
this.labelDistance.TabIndex = 17; this.labelDistance.TabIndex = 17;
this.labelDistance.Text = "Distance"; this.labelDistance.Text = "Distance";
// //
// setPower // setPower
// //
this.setPower.Enabled = false; this.setPower.Enabled = false;
this.setPower.Location = new System.Drawing.Point(272, 111); this.setPower.Location = new System.Drawing.Point(363, 137);
this.setPower.Margin = new System.Windows.Forms.Padding(2);
this.setPower.Name = "setPower"; this.setPower.Name = "setPower";
this.setPower.Size = new System.Drawing.Size(56, 19); this.setPower.Size = new System.Drawing.Size(75, 23);
this.setPower.TabIndex = 26; this.setPower.TabIndex = 26;
this.setPower.Text = "Set"; this.setPower.Text = "Set";
this.setPower.UseVisualStyleBackColor = true; this.setPower.UseVisualStyleBackColor = true;
@@ -355,29 +306,26 @@ namespace ErgometerSimulator
// text2Power // text2Power
// //
this.text2Power.Enabled = false; this.text2Power.Enabled = false;
this.text2Power.Location = new System.Drawing.Point(193, 111); this.text2Power.Location = new System.Drawing.Point(257, 137);
this.text2Power.Margin = new System.Windows.Forms.Padding(2);
this.text2Power.Name = "text2Power"; this.text2Power.Name = "text2Power";
this.text2Power.Size = new System.Drawing.Size(76, 20); this.text2Power.Size = new System.Drawing.Size(100, 22);
this.text2Power.TabIndex = 25; this.text2Power.TabIndex = 25;
// //
// text1Power // text1Power
// //
this.text1Power.Enabled = false; this.text1Power.Enabled = false;
this.text1Power.Location = new System.Drawing.Point(113, 111); this.text1Power.Location = new System.Drawing.Point(151, 137);
this.text1Power.Margin = new System.Windows.Forms.Padding(2);
this.text1Power.Name = "text1Power"; this.text1Power.Name = "text1Power";
this.text1Power.Size = new System.Drawing.Size(76, 20); this.text1Power.Size = new System.Drawing.Size(100, 22);
this.text1Power.TabIndex = 24; this.text1Power.TabIndex = 24;
// //
// randomPower // randomPower
// //
this.randomPower.AutoSize = true; this.randomPower.AutoSize = true;
this.randomPower.Enabled = false; this.randomPower.Enabled = false;
this.randomPower.Location = new System.Drawing.Point(86, 115); this.randomPower.Location = new System.Drawing.Point(114, 141);
this.randomPower.Margin = new System.Windows.Forms.Padding(2);
this.randomPower.Name = "randomPower"; this.randomPower.Name = "randomPower";
this.randomPower.Size = new System.Drawing.Size(15, 14); this.randomPower.Size = new System.Drawing.Size(18, 17);
this.randomPower.TabIndex = 23; this.randomPower.TabIndex = 23;
this.randomPower.UseVisualStyleBackColor = true; this.randomPower.UseVisualStyleBackColor = true;
this.randomPower.CheckedChanged += new System.EventHandler(this.randomPower_CheckedChanged); this.randomPower.CheckedChanged += new System.EventHandler(this.randomPower_CheckedChanged);
@@ -385,20 +333,18 @@ namespace ErgometerSimulator
// labelPower // labelPower
// //
this.labelPower.AutoSize = true; this.labelPower.AutoSize = true;
this.labelPower.Location = new System.Drawing.Point(9, 114); this.labelPower.Location = new System.Drawing.Point(12, 140);
this.labelPower.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labelPower.Name = "labelPower"; this.labelPower.Name = "labelPower";
this.labelPower.Size = new System.Drawing.Size(37, 13); this.labelPower.Size = new System.Drawing.Size(47, 17);
this.labelPower.TabIndex = 22; this.labelPower.TabIndex = 22;
this.labelPower.Text = "Power"; this.labelPower.Text = "Power";
// //
// setEnergy // setEnergy
// //
this.setEnergy.Enabled = false; this.setEnergy.Enabled = false;
this.setEnergy.Location = new System.Drawing.Point(272, 135); this.setEnergy.Location = new System.Drawing.Point(363, 166);
this.setEnergy.Margin = new System.Windows.Forms.Padding(2);
this.setEnergy.Name = "setEnergy"; this.setEnergy.Name = "setEnergy";
this.setEnergy.Size = new System.Drawing.Size(56, 19); this.setEnergy.Size = new System.Drawing.Size(75, 23);
this.setEnergy.TabIndex = 31; this.setEnergy.TabIndex = 31;
this.setEnergy.Text = "Set"; this.setEnergy.Text = "Set";
this.setEnergy.UseVisualStyleBackColor = true; this.setEnergy.UseVisualStyleBackColor = true;
@@ -407,29 +353,26 @@ namespace ErgometerSimulator
// text2Energy // text2Energy
// //
this.text2Energy.Enabled = false; this.text2Energy.Enabled = false;
this.text2Energy.Location = new System.Drawing.Point(193, 135); this.text2Energy.Location = new System.Drawing.Point(257, 166);
this.text2Energy.Margin = new System.Windows.Forms.Padding(2);
this.text2Energy.Name = "text2Energy"; this.text2Energy.Name = "text2Energy";
this.text2Energy.Size = new System.Drawing.Size(76, 20); this.text2Energy.Size = new System.Drawing.Size(100, 22);
this.text2Energy.TabIndex = 30; this.text2Energy.TabIndex = 30;
// //
// text1Energy // text1Energy
// //
this.text1Energy.Enabled = false; this.text1Energy.Enabled = false;
this.text1Energy.Location = new System.Drawing.Point(113, 135); this.text1Energy.Location = new System.Drawing.Point(151, 166);
this.text1Energy.Margin = new System.Windows.Forms.Padding(2);
this.text1Energy.Name = "text1Energy"; this.text1Energy.Name = "text1Energy";
this.text1Energy.Size = new System.Drawing.Size(76, 20); this.text1Energy.Size = new System.Drawing.Size(100, 22);
this.text1Energy.TabIndex = 29; this.text1Energy.TabIndex = 29;
// //
// randomEnergy // randomEnergy
// //
this.randomEnergy.AutoSize = true; this.randomEnergy.AutoSize = true;
this.randomEnergy.Enabled = false; this.randomEnergy.Enabled = false;
this.randomEnergy.Location = new System.Drawing.Point(86, 138); this.randomEnergy.Location = new System.Drawing.Point(114, 170);
this.randomEnergy.Margin = new System.Windows.Forms.Padding(2);
this.randomEnergy.Name = "randomEnergy"; this.randomEnergy.Name = "randomEnergy";
this.randomEnergy.Size = new System.Drawing.Size(15, 14); this.randomEnergy.Size = new System.Drawing.Size(18, 17);
this.randomEnergy.TabIndex = 28; this.randomEnergy.TabIndex = 28;
this.randomEnergy.UseVisualStyleBackColor = true; this.randomEnergy.UseVisualStyleBackColor = true;
this.randomEnergy.CheckedChanged += new System.EventHandler(this.randomEnergy_CheckedChanged); this.randomEnergy.CheckedChanged += new System.EventHandler(this.randomEnergy_CheckedChanged);
@@ -437,20 +380,18 @@ namespace ErgometerSimulator
// labelEnergy // labelEnergy
// //
this.labelEnergy.AutoSize = true; this.labelEnergy.AutoSize = true;
this.labelEnergy.Location = new System.Drawing.Point(9, 137); this.labelEnergy.Location = new System.Drawing.Point(12, 169);
this.labelEnergy.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labelEnergy.Name = "labelEnergy"; this.labelEnergy.Name = "labelEnergy";
this.labelEnergy.Size = new System.Drawing.Size(40, 13); this.labelEnergy.Size = new System.Drawing.Size(53, 17);
this.labelEnergy.TabIndex = 27; this.labelEnergy.TabIndex = 27;
this.labelEnergy.Text = "Energy"; this.labelEnergy.Text = "Energy";
// //
// setActualPower // setActualPower
// //
this.setActualPower.Enabled = false; this.setActualPower.Enabled = false;
this.setActualPower.Location = new System.Drawing.Point(272, 159); this.setActualPower.Location = new System.Drawing.Point(363, 196);
this.setActualPower.Margin = new System.Windows.Forms.Padding(2);
this.setActualPower.Name = "setActualPower"; this.setActualPower.Name = "setActualPower";
this.setActualPower.Size = new System.Drawing.Size(56, 19); this.setActualPower.Size = new System.Drawing.Size(75, 23);
this.setActualPower.TabIndex = 36; this.setActualPower.TabIndex = 36;
this.setActualPower.Text = "Set"; this.setActualPower.Text = "Set";
this.setActualPower.UseVisualStyleBackColor = true; this.setActualPower.UseVisualStyleBackColor = true;
@@ -459,29 +400,26 @@ namespace ErgometerSimulator
// text2ActualPower // text2ActualPower
// //
this.text2ActualPower.Enabled = false; this.text2ActualPower.Enabled = false;
this.text2ActualPower.Location = new System.Drawing.Point(193, 159); this.text2ActualPower.Location = new System.Drawing.Point(257, 196);
this.text2ActualPower.Margin = new System.Windows.Forms.Padding(2);
this.text2ActualPower.Name = "text2ActualPower"; this.text2ActualPower.Name = "text2ActualPower";
this.text2ActualPower.Size = new System.Drawing.Size(76, 20); this.text2ActualPower.Size = new System.Drawing.Size(100, 22);
this.text2ActualPower.TabIndex = 35; this.text2ActualPower.TabIndex = 35;
// //
// text1ActualPower // text1ActualPower
// //
this.text1ActualPower.Enabled = false; this.text1ActualPower.Enabled = false;
this.text1ActualPower.Location = new System.Drawing.Point(113, 159); this.text1ActualPower.Location = new System.Drawing.Point(151, 196);
this.text1ActualPower.Margin = new System.Windows.Forms.Padding(2);
this.text1ActualPower.Name = "text1ActualPower"; this.text1ActualPower.Name = "text1ActualPower";
this.text1ActualPower.Size = new System.Drawing.Size(76, 20); this.text1ActualPower.Size = new System.Drawing.Size(100, 22);
this.text1ActualPower.TabIndex = 34; this.text1ActualPower.TabIndex = 34;
// //
// randomActualPower // randomActualPower
// //
this.randomActualPower.AutoSize = true; this.randomActualPower.AutoSize = true;
this.randomActualPower.Enabled = false; this.randomActualPower.Enabled = false;
this.randomActualPower.Location = new System.Drawing.Point(86, 162); this.randomActualPower.Location = new System.Drawing.Point(114, 200);
this.randomActualPower.Margin = new System.Windows.Forms.Padding(2);
this.randomActualPower.Name = "randomActualPower"; this.randomActualPower.Name = "randomActualPower";
this.randomActualPower.Size = new System.Drawing.Size(15, 14); this.randomActualPower.Size = new System.Drawing.Size(18, 17);
this.randomActualPower.TabIndex = 33; this.randomActualPower.TabIndex = 33;
this.randomActualPower.UseVisualStyleBackColor = true; this.randomActualPower.UseVisualStyleBackColor = true;
this.randomActualPower.CheckedChanged += new System.EventHandler(this.randomActualPower_CheckedChanged); this.randomActualPower.CheckedChanged += new System.EventHandler(this.randomActualPower_CheckedChanged);
@@ -489,20 +427,18 @@ namespace ErgometerSimulator
// labelActualPower // labelActualPower
// //
this.labelActualPower.AutoSize = true; this.labelActualPower.AutoSize = true;
this.labelActualPower.Location = new System.Drawing.Point(9, 162); this.labelActualPower.Location = new System.Drawing.Point(12, 199);
this.labelActualPower.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labelActualPower.Name = "labelActualPower"; this.labelActualPower.Name = "labelActualPower";
this.labelActualPower.Size = new System.Drawing.Size(70, 13); this.labelActualPower.Size = new System.Drawing.Size(90, 17);
this.labelActualPower.TabIndex = 32; this.labelActualPower.TabIndex = 32;
this.labelActualPower.Text = "Actual Power"; this.labelActualPower.Text = "Actual Power";
// //
// setTime // setTime
// //
this.setTime.Enabled = false; this.setTime.Enabled = false;
this.setTime.Location = new System.Drawing.Point(272, 213); this.setTime.Location = new System.Drawing.Point(363, 262);
this.setTime.Margin = new System.Windows.Forms.Padding(2);
this.setTime.Name = "setTime"; this.setTime.Name = "setTime";
this.setTime.Size = new System.Drawing.Size(56, 19); this.setTime.Size = new System.Drawing.Size(75, 23);
this.setTime.TabIndex = 41; this.setTime.TabIndex = 41;
this.setTime.Text = "Set"; this.setTime.Text = "Set";
this.setTime.UseVisualStyleBackColor = true; this.setTime.UseVisualStyleBackColor = true;
@@ -511,20 +447,18 @@ namespace ErgometerSimulator
// text1Time // text1Time
// //
this.text1Time.Enabled = false; this.text1Time.Enabled = false;
this.text1Time.Location = new System.Drawing.Point(113, 213); this.text1Time.Location = new System.Drawing.Point(151, 262);
this.text1Time.Margin = new System.Windows.Forms.Padding(2);
this.text1Time.Name = "text1Time"; this.text1Time.Name = "text1Time";
this.text1Time.Size = new System.Drawing.Size(77, 20); this.text1Time.Size = new System.Drawing.Size(101, 22);
this.text1Time.TabIndex = 39; this.text1Time.TabIndex = 39;
// //
// countTime // countTime
// //
this.countTime.AutoSize = true; this.countTime.AutoSize = true;
this.countTime.Enabled = false; this.countTime.Enabled = false;
this.countTime.Location = new System.Drawing.Point(58, 214); this.countTime.Location = new System.Drawing.Point(77, 263);
this.countTime.Margin = new System.Windows.Forms.Padding(2);
this.countTime.Name = "countTime"; this.countTime.Name = "countTime";
this.countTime.Size = new System.Drawing.Size(54, 17); this.countTime.Size = new System.Drawing.Size(65, 21);
this.countTime.TabIndex = 38; this.countTime.TabIndex = 38;
this.countTime.Text = "Down"; this.countTime.Text = "Down";
this.countTime.UseVisualStyleBackColor = true; this.countTime.UseVisualStyleBackColor = true;
@@ -532,10 +466,9 @@ namespace ErgometerSimulator
// labelTime // labelTime
// //
this.labelTime.AutoSize = true; this.labelTime.AutoSize = true;
this.labelTime.Location = new System.Drawing.Point(9, 215); this.labelTime.Location = new System.Drawing.Point(12, 265);
this.labelTime.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labelTime.Name = "labelTime"; this.labelTime.Name = "labelTime";
this.labelTime.Size = new System.Drawing.Size(30, 13); this.labelTime.Size = new System.Drawing.Size(39, 17);
this.labelTime.TabIndex = 37; this.labelTime.TabIndex = 37;
this.labelTime.Text = "Time"; this.labelTime.Text = "Time";
// //
@@ -543,10 +476,9 @@ namespace ErgometerSimulator
// //
this.label9.AutoSize = true; this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label9.Location = new System.Drawing.Point(9, 3); this.label9.Location = new System.Drawing.Point(12, 4);
this.label9.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label9.Name = "label9"; this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(39, 13); this.label9.Size = new System.Drawing.Size(49, 17);
this.label9.TabIndex = 42; this.label9.TabIndex = 42;
this.label9.Text = "Name"; this.label9.Text = "Name";
// //
@@ -554,10 +486,9 @@ namespace ErgometerSimulator
// //
this.label10.AutoSize = true; this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label10.Location = new System.Drawing.Point(56, 3); this.label10.Location = new System.Drawing.Point(75, 4);
this.label10.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label10.Name = "label10"; this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(53, 13); this.label10.Size = new System.Drawing.Size(67, 17);
this.label10.TabIndex = 43; this.label10.TabIndex = 43;
this.label10.Text = "Random"; this.label10.Text = "Random";
// //
@@ -565,10 +496,9 @@ namespace ErgometerSimulator
// //
this.label11.AutoSize = true; this.label11.AutoSize = true;
this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label11.Location = new System.Drawing.Point(111, 3); this.label11.Location = new System.Drawing.Point(148, 4);
this.label11.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label11.Name = "label11"; this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(27, 13); this.label11.Size = new System.Drawing.Size(33, 17);
this.label11.TabIndex = 44; this.label11.TabIndex = 44;
this.label11.Text = "Min"; this.label11.Text = "Min";
// //
@@ -576,10 +506,9 @@ namespace ErgometerSimulator
// //
this.label12.AutoSize = true; this.label12.AutoSize = true;
this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label12.Location = new System.Drawing.Point(190, 3); this.label12.Location = new System.Drawing.Point(254, 4);
this.label12.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label12.Name = "label12"; this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(30, 13); this.label12.Size = new System.Drawing.Size(36, 17);
this.label12.TabIndex = 45; this.label12.TabIndex = 45;
this.label12.Text = "Max"; this.label12.Text = "Max";
// //
@@ -587,10 +516,9 @@ namespace ErgometerSimulator
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(111, 194); this.label2.Location = new System.Drawing.Point(148, 239);
this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(39, 13); this.label2.Size = new System.Drawing.Size(49, 17);
this.label2.TabIndex = 48; this.label2.TabIndex = 48;
this.label2.Text = "Value"; this.label2.Text = "Value";
// //
@@ -598,10 +526,9 @@ namespace ErgometerSimulator
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(56, 194); this.label3.Location = new System.Drawing.Point(75, 239);
this.label3.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(40, 13); this.label3.Size = new System.Drawing.Size(50, 17);
this.label3.TabIndex = 47; this.label3.TabIndex = 47;
this.label3.Text = "Count"; this.label3.Text = "Count";
// //
@@ -609,20 +536,18 @@ namespace ErgometerSimulator
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(9, 194); this.label4.Location = new System.Drawing.Point(12, 239);
this.label4.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(39, 13); this.label4.Size = new System.Drawing.Size(49, 17);
this.label4.TabIndex = 46; this.label4.TabIndex = 46;
this.label4.Text = "Name"; this.label4.Text = "Name";
// //
// labelCurrentTime // labelCurrentTime
// //
this.labelCurrentTime.AutoSize = true; this.labelCurrentTime.AutoSize = true;
this.labelCurrentTime.Location = new System.Drawing.Point(194, 214); this.labelCurrentTime.Location = new System.Drawing.Point(258, 264);
this.labelCurrentTime.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.labelCurrentTime.Name = "labelCurrentTime"; this.labelCurrentTime.Name = "labelCurrentTime";
this.labelCurrentTime.Size = new System.Drawing.Size(34, 13); this.labelCurrentTime.Size = new System.Drawing.Size(44, 17);
this.labelCurrentTime.TabIndex = 49; this.labelCurrentTime.TabIndex = 49;
this.labelCurrentTime.Text = "00:00"; this.labelCurrentTime.Text = "00:00";
// //
@@ -631,281 +556,11 @@ namespace ErgometerSimulator
this.updateTimer.Interval = 200; this.updateTimer.Interval = 200;
this.updateTimer.Tick += new System.EventHandler(this.updateTimer_Tick); this.updateTimer.Tick += new System.EventHandler(this.updateTimer_Tick);
// //
// heartbeatMinLbl
//
this.heartbeatMinLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.heartbeatMinLbl.AutoSize = true;
this.heartbeatMinLbl.Location = new System.Drawing.Point(334, 24);
this.heartbeatMinLbl.Name = "heartbeatMinLbl";
this.heartbeatMinLbl.Size = new System.Drawing.Size(13, 13);
this.heartbeatMinLbl.TabIndex = 50;
this.heartbeatMinLbl.Text = "0";
//
// heartbeatMaxLbl
//
this.heartbeatMaxLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.heartbeatMaxLbl.AutoSize = true;
this.heartbeatMaxLbl.Location = new System.Drawing.Point(366, 23);
this.heartbeatMaxLbl.Name = "heartbeatMaxLbl";
this.heartbeatMaxLbl.Size = new System.Drawing.Size(13, 13);
this.heartbeatMaxLbl.TabIndex = 51;
this.heartbeatMaxLbl.Text = "0";
//
// rpmMinLbl
//
this.rpmMinLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.rpmMinLbl.AutoSize = true;
this.rpmMinLbl.Location = new System.Drawing.Point(334, 47);
this.rpmMinLbl.Name = "rpmMinLbl";
this.rpmMinLbl.Size = new System.Drawing.Size(13, 13);
this.rpmMinLbl.TabIndex = 52;
this.rpmMinLbl.Text = "0";
//
// rpmMaxLbl
//
this.rpmMaxLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.rpmMaxLbl.AutoSize = true;
this.rpmMaxLbl.Location = new System.Drawing.Point(366, 47);
this.rpmMaxLbl.Name = "rpmMaxLbl";
this.rpmMaxLbl.Size = new System.Drawing.Size(13, 13);
this.rpmMaxLbl.TabIndex = 53;
this.rpmMaxLbl.Text = "0";
//
// speedMinLbl
//
this.speedMinLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.speedMinLbl.AutoSize = true;
this.speedMinLbl.Location = new System.Drawing.Point(334, 69);
this.speedMinLbl.Name = "speedMinLbl";
this.speedMinLbl.Size = new System.Drawing.Size(13, 13);
this.speedMinLbl.TabIndex = 54;
this.speedMinLbl.Text = "0";
//
// speedMaxLbl
//
this.speedMaxLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.speedMaxLbl.AutoSize = true;
this.speedMaxLbl.Location = new System.Drawing.Point(366, 69);
this.speedMaxLbl.Name = "speedMaxLbl";
this.speedMaxLbl.Size = new System.Drawing.Size(13, 13);
this.speedMaxLbl.TabIndex = 55;
this.speedMaxLbl.Text = "0";
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(334, 3);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(27, 13);
this.label1.TabIndex = 56;
this.label1.Text = "Min";
//
// label5
//
this.label5.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(366, 3);
this.label5.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(30, 13);
this.label5.TabIndex = 57;
this.label5.Text = "Max";
//
// label6
//
this.label6.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label6.Location = new System.Drawing.Point(400, 3);
this.label6.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(26, 13);
this.label6.TabIndex = 58;
this.label6.Text = "Cur";
//
// heartbeatCurLbl
//
this.heartbeatCurLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.heartbeatCurLbl.AutoSize = true;
this.heartbeatCurLbl.Location = new System.Drawing.Point(403, 22);
this.heartbeatCurLbl.Name = "heartbeatCurLbl";
this.heartbeatCurLbl.Size = new System.Drawing.Size(13, 13);
this.heartbeatCurLbl.TabIndex = 59;
this.heartbeatCurLbl.Text = "0";
//
// rpmCurLbl
//
this.rpmCurLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.rpmCurLbl.AutoSize = true;
this.rpmCurLbl.Location = new System.Drawing.Point(403, 47);
this.rpmCurLbl.Name = "rpmCurLbl";
this.rpmCurLbl.Size = new System.Drawing.Size(13, 13);
this.rpmCurLbl.TabIndex = 60;
this.rpmCurLbl.Text = "0";
//
// speedCurLbl
//
this.speedCurLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.speedCurLbl.AutoSize = true;
this.speedCurLbl.Location = new System.Drawing.Point(403, 69);
this.speedCurLbl.Name = "speedCurLbl";
this.speedCurLbl.Size = new System.Drawing.Size(13, 13);
this.speedCurLbl.TabIndex = 61;
this.speedCurLbl.Text = "0";
//
// distanceMinLbl
//
this.distanceMinLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.distanceMinLbl.AutoSize = true;
this.distanceMinLbl.Location = new System.Drawing.Point(334, 94);
this.distanceMinLbl.Name = "distanceMinLbl";
this.distanceMinLbl.Size = new System.Drawing.Size(13, 13);
this.distanceMinLbl.TabIndex = 62;
this.distanceMinLbl.Text = "0";
//
// distanceMaxLbl
//
this.distanceMaxLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.distanceMaxLbl.AutoSize = true;
this.distanceMaxLbl.Location = new System.Drawing.Point(366, 94);
this.distanceMaxLbl.Name = "distanceMaxLbl";
this.distanceMaxLbl.Size = new System.Drawing.Size(13, 13);
this.distanceMaxLbl.TabIndex = 63;
this.distanceMaxLbl.Text = "0";
//
// distanceCurLbl
//
this.distanceCurLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.distanceCurLbl.AutoSize = true;
this.distanceCurLbl.Location = new System.Drawing.Point(403, 94);
this.distanceCurLbl.Name = "distanceCurLbl";
this.distanceCurLbl.Size = new System.Drawing.Size(13, 13);
this.distanceCurLbl.TabIndex = 64;
this.distanceCurLbl.Text = "0";
//
// powerMinLbl
//
this.powerMinLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.powerMinLbl.AutoSize = true;
this.powerMinLbl.Location = new System.Drawing.Point(334, 115);
this.powerMinLbl.Name = "powerMinLbl";
this.powerMinLbl.Size = new System.Drawing.Size(13, 13);
this.powerMinLbl.TabIndex = 65;
this.powerMinLbl.Text = "0";
//
// powerMaxLbl
//
this.powerMaxLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.powerMaxLbl.AutoSize = true;
this.powerMaxLbl.Location = new System.Drawing.Point(366, 116);
this.powerMaxLbl.Name = "powerMaxLbl";
this.powerMaxLbl.Size = new System.Drawing.Size(13, 13);
this.powerMaxLbl.TabIndex = 66;
this.powerMaxLbl.Text = "0";
//
// powerCurLbl
//
this.powerCurLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.powerCurLbl.AutoSize = true;
this.powerCurLbl.Location = new System.Drawing.Point(403, 115);
this.powerCurLbl.Name = "powerCurLbl";
this.powerCurLbl.Size = new System.Drawing.Size(13, 13);
this.powerCurLbl.TabIndex = 67;
this.powerCurLbl.Text = "0";
//
// energyMinLbl
//
this.energyMinLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.energyMinLbl.AutoSize = true;
this.energyMinLbl.Location = new System.Drawing.Point(334, 139);
this.energyMinLbl.Name = "energyMinLbl";
this.energyMinLbl.Size = new System.Drawing.Size(13, 13);
this.energyMinLbl.TabIndex = 68;
this.energyMinLbl.Text = "0";
//
// energyMaxLbl
//
this.energyMaxLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.energyMaxLbl.AutoSize = true;
this.energyMaxLbl.Location = new System.Drawing.Point(366, 138);
this.energyMaxLbl.Name = "energyMaxLbl";
this.energyMaxLbl.Size = new System.Drawing.Size(13, 13);
this.energyMaxLbl.TabIndex = 69;
this.energyMaxLbl.Text = "0";
//
// energyCurLbl
//
this.energyCurLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.energyCurLbl.AutoSize = true;
this.energyCurLbl.Location = new System.Drawing.Point(403, 139);
this.energyCurLbl.Name = "energyCurLbl";
this.energyCurLbl.Size = new System.Drawing.Size(13, 13);
this.energyCurLbl.TabIndex = 70;
this.energyCurLbl.Text = "0";
//
// actpowerMinLbl
//
this.actpowerMinLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.actpowerMinLbl.AutoSize = true;
this.actpowerMinLbl.Location = new System.Drawing.Point(334, 162);
this.actpowerMinLbl.Name = "actpowerMinLbl";
this.actpowerMinLbl.Size = new System.Drawing.Size(13, 13);
this.actpowerMinLbl.TabIndex = 71;
this.actpowerMinLbl.Text = "0";
//
// actpowerMaxLbl
//
this.actpowerMaxLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.actpowerMaxLbl.AutoSize = true;
this.actpowerMaxLbl.Location = new System.Drawing.Point(366, 162);
this.actpowerMaxLbl.Name = "actpowerMaxLbl";
this.actpowerMaxLbl.Size = new System.Drawing.Size(13, 13);
this.actpowerMaxLbl.TabIndex = 72;
this.actpowerMaxLbl.Text = "0";
//
// actpowerCurLbl
//
this.actpowerCurLbl.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.actpowerCurLbl.AutoSize = true;
this.actpowerCurLbl.Location = new System.Drawing.Point(403, 162);
this.actpowerCurLbl.Name = "actpowerCurLbl";
this.actpowerCurLbl.Size = new System.Drawing.Size(13, 13);
this.actpowerCurLbl.TabIndex = 73;
this.actpowerCurLbl.Text = "0";
//
// ErgometerSimulator // ErgometerSimulator
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(428, 276); this.ClientSize = new System.Drawing.Size(452, 344);
this.Controls.Add(this.actpowerCurLbl);
this.Controls.Add(this.actpowerMaxLbl);
this.Controls.Add(this.actpowerMinLbl);
this.Controls.Add(this.energyCurLbl);
this.Controls.Add(this.energyMaxLbl);
this.Controls.Add(this.energyMinLbl);
this.Controls.Add(this.powerCurLbl);
this.Controls.Add(this.powerMaxLbl);
this.Controls.Add(this.powerMinLbl);
this.Controls.Add(this.distanceCurLbl);
this.Controls.Add(this.distanceMaxLbl);
this.Controls.Add(this.distanceMinLbl);
this.Controls.Add(this.speedCurLbl);
this.Controls.Add(this.rpmCurLbl);
this.Controls.Add(this.heartbeatCurLbl);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label1);
this.Controls.Add(this.speedMaxLbl);
this.Controls.Add(this.speedMinLbl);
this.Controls.Add(this.rpmMaxLbl);
this.Controls.Add(this.rpmMinLbl);
this.Controls.Add(this.heartbeatMaxLbl);
this.Controls.Add(this.heartbeatMinLbl);
this.Controls.Add(this.labelCurrentTime); this.Controls.Add(this.labelCurrentTime);
this.Controls.Add(this.label2); this.Controls.Add(this.label2);
this.Controls.Add(this.label3); this.Controls.Add(this.label3);
@@ -955,9 +610,6 @@ namespace ErgometerSimulator
this.Controls.Add(this.labelHeartBeat); this.Controls.Add(this.labelHeartBeat);
this.Controls.Add(this.ComPortBox); this.Controls.Add(this.ComPortBox);
this.Controls.Add(this.connectButton); this.Controls.Add(this.connectButton);
this.Margin = new System.Windows.Forms.Padding(2);
this.MaximumSize = new System.Drawing.Size(444, 315);
this.MinimumSize = new System.Drawing.Size(444, 315);
this.Name = "ErgometerSimulator"; this.Name = "ErgometerSimulator";
this.Text = "Ergometer Simulator"; this.Text = "Ergometer Simulator";
this.ResumeLayout(false); this.ResumeLayout(false);
@@ -1017,30 +669,6 @@ namespace ErgometerSimulator
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label labelCurrentTime; private System.Windows.Forms.Label labelCurrentTime;
private System.Windows.Forms.Timer updateTimer; private System.Windows.Forms.Timer updateTimer;
private System.Windows.Forms.Label heartbeatMinLbl;
private System.Windows.Forms.Label heartbeatMaxLbl;
private System.Windows.Forms.Label rpmMinLbl;
private System.Windows.Forms.Label rpmMaxLbl;
private System.Windows.Forms.Label speedMinLbl;
private System.Windows.Forms.Label speedMaxLbl;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label heartbeatCurLbl;
private System.Windows.Forms.Label rpmCurLbl;
private System.Windows.Forms.Label speedCurLbl;
private System.Windows.Forms.Label distanceMinLbl;
private System.Windows.Forms.Label distanceMaxLbl;
private System.Windows.Forms.Label distanceCurLbl;
private System.Windows.Forms.Label powerMinLbl;
private System.Windows.Forms.Label powerMaxLbl;
private System.Windows.Forms.Label powerCurLbl;
private System.Windows.Forms.Label energyMinLbl;
private System.Windows.Forms.Label energyMaxLbl;
private System.Windows.Forms.Label energyCurLbl;
private System.Windows.Forms.Label actpowerMinLbl;
private System.Windows.Forms.Label actpowerMaxLbl;
private System.Windows.Forms.Label actpowerCurLbl;
} }
} }
@@ -58,38 +58,8 @@ namespace ErgometerSimulator
private void updateTimer_Tick(object sender, EventArgs e) private void updateTimer_Tick(object sender, EventArgs e)
{ {
dg.Update();
labelCurrentTime.Text = dg.Time.currentvalue / 60 + ":" + dg.Time.currentvalue % 60; labelCurrentTime.Text = dg.Time.currentvalue / 60 + ":" + dg.Time.currentvalue % 60;
dg.Update();
heartbeatMinLbl.Text = dg.HeartBeat.value1 + "";
heartbeatMaxLbl.Text = dg.HeartBeat.value2 + "";
heartbeatCurLbl.Text = dg.HeartBeat.currentvalue + "";
rpmMinLbl.Text = dg.RPM.value1 + "";
rpmMaxLbl.Text = dg.RPM.value2 + "";
rpmCurLbl.Text = dg.RPM.currentvalue + "";
speedMinLbl.Text = dg.Speed.value1 + "";
speedMaxLbl.Text = dg.Speed.value2 + "";
speedCurLbl.Text = dg.Speed.currentvalue + "";
distanceMinLbl.Text = dg.Distance.value1 + "";
distanceMaxLbl.Text = dg.Distance.value2 + "";
distanceCurLbl.Text = dg.Distance.currentvalue + "";
powerMinLbl.Text = dg.Power.value1 + "";
powerMaxLbl.Text = dg.Power.value2 + "";
powerCurLbl.Text = dg.Power.currentvalue + "";
energyMinLbl.Text = dg.Energy.value1 + "";
energyMaxLbl.Text = dg.Energy.value2 + "";
energyCurLbl.Text = dg.Energy.currentvalue + "";
actpowerMinLbl.Text = dg.ActualPower.value1 + "";
actpowerMaxLbl.Text = dg.ActualPower.value2 + "";
actpowerCurLbl.Text = dg.ActualPower.currentvalue + "";
} }
private void setHeartBeat_Click(object sender, EventArgs e) private void setHeartBeat_Click(object sender, EventArgs e)