Added time panel

This commit is contained in:
2015-10-21 16:49:05 +02:00
parent e94a6d331a
commit b99449a4cf
4 changed files with 19 additions and 5 deletions
@@ -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)
+3 -1
View File
@@ -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()
@@ -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)
{
+1 -1
View File
@@ -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
//