diff --git a/ErgometerApplication/ErgometerApplication/ClientApplicatie.Designer.cs b/ErgometerApplication/ErgometerApplication/ClientApplicatie.Designer.cs
index f4d5f0b..faa1183 100644
--- a/ErgometerApplication/ErgometerApplication/ClientApplicatie.Designer.cs
+++ b/ErgometerApplication/ErgometerApplication/ClientApplicatie.Designer.cs
@@ -1,4 +1,5 @@
using System.IO.Ports;
+using System.Windows.Forms;
namespace ErgometerApplication
{
@@ -42,6 +43,15 @@ namespace ErgometerApplication
this.buttonLogOff = new System.Windows.Forms.Button();
this.labelUsername = new System.Windows.Forms.Label();
this.labelHallo = new System.Windows.Forms.Label();
+
+ this.heartBeat = new DataPanel("Hartslag");
+ this.RPM = new DataPanel("RPM");
+ this.speed = new DataPanel("Snelheid");
+ this.distance = new DataPanel("Afstand (km)");
+ this.power = new DataPanel("Weerstand");
+ this.energy = new DataPanel("Energie");
+ this.actualpower = new DataPanel("Absolute Weerstand");
+
this.panelClientContainer.SuspendLayout();
this.panelTopBar.SuspendLayout();
this.SuspendLayout();
@@ -73,6 +83,14 @@ namespace ErgometerApplication
this.panelDataViewLeft.Size = new System.Drawing.Size(18, 600);
this.panelDataViewLeft.TabIndex = 3;
this.panelDataViewLeft.BackColor = System.Drawing.Color.Gray;
+ this.panelDataViewLeft.Controls.Add(heartBeat);
+ this.panelDataViewLeft.Controls.Add(RPM);
+ this.panelDataViewLeft.Controls.Add(speed);
+ this.panelDataViewLeft.Controls.Add(distance);
+ this.panelDataViewLeft.Controls.Add(power);
+ this.panelDataViewLeft.Controls.Add(energy);
+ this.panelDataViewLeft.Controls.Add(actualpower);
+
//
// panelGraphView
//
@@ -172,5 +190,8 @@ namespace ErgometerApplication
private System.Windows.Forms.Button buttonLogOff;
private System.Windows.Forms.Label labelUsername;
private System.Windows.Forms.Label labelHallo;
+ public DataPanel heartBeat, RPM, speed, distance, power, energy, seconds, actualpower;
}
+
+
}
diff --git a/ErgometerApplication/ErgometerApplication/DataPanel.cs b/ErgometerApplication/ErgometerApplication/DataPanel.cs
new file mode 100644
index 0000000..b7ae035
--- /dev/null
+++ b/ErgometerApplication/ErgometerApplication/DataPanel.cs
@@ -0,0 +1,87 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace ErgometerApplication
+{
+ public class DataPanel : Panel
+ {
+ public Label labelMetingCurrentValue;
+ public ProgressBar progressBarMeting;
+ public Label metingName;
+
+ public DataPanel(string name) : base()
+ {
+ this.metingName = new System.Windows.Forms.Label();
+ this.progressBarMeting = new System.Windows.Forms.ProgressBar();
+ this.labelMetingCurrentValue = new System.Windows.Forms.Label();
+ //
+ // initialize panel
+ //
+ this.BackColor = System.Drawing.SystemColors.ControlLightLight;
+ this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.Controls.Add(this.labelMetingCurrentValue);
+ this.Controls.Add(this.progressBarMeting);
+ this.Controls.Add(this.metingName);
+ this.Dock = System.Windows.Forms.DockStyle.Top;
+ this.Location = new System.Drawing.Point(0, 0);
+ this.Name = "panel1";
+ this.Size = new System.Drawing.Size(284, 80);
+ //
+ // metingName
+ //
+ this.metingName.AutoSize = true;
+ this.metingName.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.metingName.Location = new System.Drawing.Point(12, 9);
+ this.metingName.Name = "metingName";
+ this.metingName.Size = new System.Drawing.Size(105, 21);
+ this.metingName.TabIndex = 0;
+ this.metingName.Text = name;
+ //
+ // progressBarMeting
+ //
+ this.progressBarMeting.Location = new System.Drawing.Point(16, 39);
+ this.progressBarMeting.Name = "progressBarMeting";
+ this.progressBarMeting.Size = new System.Drawing.Size(183, 23);
+ this.progressBarMeting.TabIndex = 1;
+ this.progressBarMeting.Value = 50;
+ //
+ // labelMetingCurrentValue
+ //
+ this.labelMetingCurrentValue.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
+ this.labelMetingCurrentValue.AutoSize = true;
+ this.labelMetingCurrentValue.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.labelMetingCurrentValue.Location = new System.Drawing.Point(215, 32);
+ this.labelMetingCurrentValue.Name = "labelMetingCurrentValue";
+ this.labelMetingCurrentValue.Size = new System.Drawing.Size(57, 32);
+ this.labelMetingCurrentValue.TabIndex = 2;
+ this.labelMetingCurrentValue.Text = "255";
+ }
+
+ public void setText(string text)
+ {
+ this.metingName.Text = text;
+ }
+
+ public void updateValue(int value)
+ {
+ this.labelMetingCurrentValue.Text = value.ToString();
+ this.progressBarMeting.Value = value;
+ }
+
+ public void updateValue(double value)
+ {
+ this.labelMetingCurrentValue.Text = value.ToString();
+ this.progressBarMeting.Value = (int)value;
+ }
+
+ public void updateValue(decimal value)
+ {
+ this.labelMetingCurrentValue.Text = value.ToString();
+ this.progressBarMeting.Value = (int)value;
+ }
+ }
+}
diff --git a/ErgometerApplication/ErgometerApplication/ErgometerApplication.csproj b/ErgometerApplication/ErgometerApplication/ErgometerApplication.csproj
index 45c4132..088fb82 100644
--- a/ErgometerApplication/ErgometerApplication/ErgometerApplication.csproj
+++ b/ErgometerApplication/ErgometerApplication/ErgometerApplication.csproj
@@ -54,6 +54,9 @@
+
+ Component
+
Component