Added time panel
This commit is contained in:
@@ -15,11 +15,13 @@ namespace ErgometerDoctorApplication
|
|||||||
|
|
||||||
private int min;
|
private int min;
|
||||||
private int max;
|
private int max;
|
||||||
|
private string name;
|
||||||
|
|
||||||
public PanelClientData(string name, int min, int max) : base()
|
public PanelClientData(string name, int min, int max) : base()
|
||||||
{
|
{
|
||||||
this.min = min;
|
this.min = min;
|
||||||
this.max = max;
|
this.max = max;
|
||||||
|
this.name = name;
|
||||||
|
|
||||||
this.metingName = new System.Windows.Forms.Label();
|
this.metingName = new System.Windows.Forms.Label();
|
||||||
this.progressBarMeting = new System.Windows.Forms.ProgressBar();
|
this.progressBarMeting = new System.Windows.Forms.ProgressBar();
|
||||||
@@ -30,7 +32,8 @@ namespace ErgometerDoctorApplication
|
|||||||
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
|
||||||
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||||
this.Controls.Add(this.labelMetingCurrentValue);
|
this.Controls.Add(this.labelMetingCurrentValue);
|
||||||
this.Controls.Add(this.progressBarMeting);
|
if (name != "Tijd")
|
||||||
|
this.Controls.Add(this.progressBarMeting);
|
||||||
this.Controls.Add(this.metingName);
|
this.Controls.Add(this.metingName);
|
||||||
this.Dock = System.Windows.Forms.DockStyle.Top;
|
this.Dock = System.Windows.Forms.DockStyle.Top;
|
||||||
this.Location = new System.Drawing.Point(0, 0);
|
this.Location = new System.Drawing.Point(0, 0);
|
||||||
@@ -74,8 +77,16 @@ namespace ErgometerDoctorApplication
|
|||||||
|
|
||||||
public void updateValue(int value)
|
public void updateValue(int value)
|
||||||
{
|
{
|
||||||
this.labelMetingCurrentValue.Text = value.ToString();
|
if (name == "Tijd")
|
||||||
this.progressBarMeting.Value = ValueToPercentage(value);
|
{
|
||||||
|
this.labelMetingCurrentValue.Text = (value / 60) + ":" + (value % 60);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.labelMetingCurrentValue.Text = value.ToString();
|
||||||
|
this.progressBarMeting.Value = ValueToPercentage(value);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateValue(double value)
|
public void updateValue(double value)
|
||||||
|
|||||||
+3
-1
@@ -51,6 +51,7 @@ namespace ErgometerDoctorApplication
|
|||||||
this.power = new PanelClientData("Weerstand", 25, 400);
|
this.power = new PanelClientData("Weerstand", 25, 400);
|
||||||
this.energy = new PanelClientData("Energie", 0, 200);
|
this.energy = new PanelClientData("Energie", 0, 200);
|
||||||
this.actualpower = new PanelClientData("Absolute Weerstand", 0, 400);
|
this.actualpower = new PanelClientData("Absolute Weerstand", 0, 400);
|
||||||
|
this.time = new PanelClientData("Tijd", 0, 400);
|
||||||
|
|
||||||
this.panelClientContainer.SuspendLayout();
|
this.panelClientContainer.SuspendLayout();
|
||||||
this.panelTopBar.SuspendLayout();
|
this.panelTopBar.SuspendLayout();
|
||||||
@@ -83,6 +84,7 @@ namespace ErgometerDoctorApplication
|
|||||||
this.panelDataViewLeft.Controls.Add(power);
|
this.panelDataViewLeft.Controls.Add(power);
|
||||||
this.panelDataViewLeft.Controls.Add(energy);
|
this.panelDataViewLeft.Controls.Add(energy);
|
||||||
this.panelDataViewLeft.Controls.Add(actualpower);
|
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.Panel panelTopBar;
|
||||||
private System.Windows.Forms.Label labelUsername;
|
private System.Windows.Forms.Label labelUsername;
|
||||||
private System.Windows.Forms.Label labelHallo;
|
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;
|
public PanelClientSetData panelClientSetData;
|
||||||
|
|
||||||
private void createTitle()
|
private void createTitle()
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ namespace ErgometerDoctorApplication
|
|||||||
power.updateValue(m.Power);
|
power.updateValue(m.Power);
|
||||||
energy.updateValue(m.Energy);
|
energy.updateValue(m.Energy);
|
||||||
actualpower.updateValue(m.ActualPower);
|
actualpower.updateValue(m.ActualPower);
|
||||||
|
time.updateValue(m.Seconds);
|
||||||
|
|
||||||
if (count >= 10)
|
if (count >= 10)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ namespace ErgometerDoctorApplication
|
|||||||
this.listUsers.Location = new System.Drawing.Point(20, -150);
|
this.listUsers.Location = new System.Drawing.Point(20, -150);
|
||||||
this.listUsers.Name = "listUsers";
|
this.listUsers.Name = "listUsers";
|
||||||
this.listUsers.Size = new System.Drawing.Size(200, 280);
|
this.listUsers.Size = new System.Drawing.Size(200, 280);
|
||||||
this.listUsers.Items.Add("No Users");
|
this.listUsers.Items.Add("Geen gebruikers");
|
||||||
//
|
//
|
||||||
// newPassword
|
// newPassword
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user