diff --git a/ErgometerDoctorApplication/Client/PanelClientData.cs b/ErgometerDoctorApplication/Client/PanelClientData.cs index c8cad32..076d6cb 100644 --- a/ErgometerDoctorApplication/Client/PanelClientData.cs +++ b/ErgometerDoctorApplication/Client/PanelClientData.cs @@ -15,11 +15,13 @@ namespace ErgometerDoctorApplication private int min; private int max; + private string name; public PanelClientData(string name, int min, int max) : base() { this.min = min; this.max = max; + this.name = name; this.metingName = new System.Windows.Forms.Label(); this.progressBarMeting = new System.Windows.Forms.ProgressBar(); @@ -30,7 +32,8 @@ namespace ErgometerDoctorApplication this.BackColor = System.Drawing.SystemColors.ControlLightLight; this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.Controls.Add(this.labelMetingCurrentValue); - this.Controls.Add(this.progressBarMeting); + if (name != "Tijd") + 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); @@ -74,8 +77,16 @@ namespace ErgometerDoctorApplication public void updateValue(int value) { - this.labelMetingCurrentValue.Text = value.ToString(); - this.progressBarMeting.Value = ValueToPercentage(value); + if (name == "Tijd") + { + this.labelMetingCurrentValue.Text = (value / 60) + ":" + (value % 60); + } + else + { + this.labelMetingCurrentValue.Text = value.ToString(); + this.progressBarMeting.Value = ValueToPercentage(value); + } + } public void updateValue(double value) diff --git a/ErgometerDoctorApplication/Client/SessionWindow.Designer.cs b/ErgometerDoctorApplication/Client/SessionWindow.Designer.cs index 8e4b8f2..60a8354 100644 --- a/ErgometerDoctorApplication/Client/SessionWindow.Designer.cs +++ b/ErgometerDoctorApplication/Client/SessionWindow.Designer.cs @@ -51,6 +51,7 @@ namespace ErgometerDoctorApplication this.power = new PanelClientData("Weerstand", 25, 400); this.energy = new PanelClientData("Energie", 0, 200); this.actualpower = new PanelClientData("Absolute Weerstand", 0, 400); + this.time = new PanelClientData("Tijd", 0, 400); this.panelClientContainer.SuspendLayout(); this.panelTopBar.SuspendLayout(); @@ -83,6 +84,7 @@ namespace ErgometerDoctorApplication this.panelDataViewLeft.Controls.Add(power); this.panelDataViewLeft.Controls.Add(energy); this.panelDataViewLeft.Controls.Add(actualpower); + this.panelDataViewLeft.Controls.Add(time); // @@ -155,7 +157,7 @@ namespace ErgometerDoctorApplication private System.Windows.Forms.Panel panelTopBar; private System.Windows.Forms.Label labelUsername; private System.Windows.Forms.Label labelHallo; - public PanelClientData heartBeat, RPM, speed, distance, power, energy, seconds, actualpower; + public PanelClientData heartBeat, RPM, speed, distance, power, energy, seconds, actualpower, time; public PanelClientSetData panelClientSetData; private void createTitle() diff --git a/ErgometerDoctorApplication/Client/SessionWindow.cs b/ErgometerDoctorApplication/Client/SessionWindow.cs index 64c3513..43bb154 100644 --- a/ErgometerDoctorApplication/Client/SessionWindow.cs +++ b/ErgometerDoctorApplication/Client/SessionWindow.cs @@ -84,6 +84,7 @@ namespace ErgometerDoctorApplication power.updateValue(m.Power); energy.updateValue(m.Energy); actualpower.updateValue(m.ActualPower); + time.updateValue(m.Seconds); if (count >= 10) { diff --git a/ErgometerDoctorApplication/ConClientData.cs b/ErgometerDoctorApplication/ConClientData.cs index 221de0b..293d3b4 100644 --- a/ErgometerDoctorApplication/ConClientData.cs +++ b/ErgometerDoctorApplication/ConClientData.cs @@ -69,7 +69,7 @@ namespace ErgometerDoctorApplication this.listUsers.Location = new System.Drawing.Point(20, -150); this.listUsers.Name = "listUsers"; this.listUsers.Size = new System.Drawing.Size(200, 280); - this.listUsers.Items.Add("No Users"); + this.listUsers.Items.Add("Geen gebruikers"); // // newPassword //