From d236d350b26f4c5a05a2cd8b3a808dcc4b365cc9 Mon Sep 17 00:00:00 2001 From: Janco Kock Date: Mon, 2 Nov 2015 12:46:41 +0100 Subject: [PATCH] Added panelclientsteps to doctor --- .../Client/PanelClientSteps.cs | 61 +++++++++++++++++++ .../Client/SessionWindow.Designer.cs | 3 + .../Client/SessionWindow.cs | 6 +- .../ErgometerDoctorApplication.csproj | 3 + 4 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 ErgometerIPR/ErgometerDoctorApplication/Client/PanelClientSteps.cs diff --git a/ErgometerIPR/ErgometerDoctorApplication/Client/PanelClientSteps.cs b/ErgometerIPR/ErgometerDoctorApplication/Client/PanelClientSteps.cs new file mode 100644 index 0000000..d3bc772 --- /dev/null +++ b/ErgometerIPR/ErgometerDoctorApplication/Client/PanelClientSteps.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ErgometerApplication +{ + public class PanelClientSteps : Panel + { + public Label UitlegText; + public Label HeaderLabel; + + private string text; + + public PanelClientSteps() : base() + { + + this.HeaderLabel = new System.Windows.Forms.Label(); + this.UitlegText = new System.Windows.Forms.Label(); + // + // initialize panel + // + this.BackColor = System.Drawing.SystemColors.ControlLightLight; + this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.Controls.Add(this.UitlegText); + this.Controls.Add(this.HeaderLabel); + this.Dock = System.Windows.Forms.DockStyle.Top; + this.Location = new System.Drawing.Point(0, 0); + this.Name = "PanelClientSteps"; + this.Size = new System.Drawing.Size(284, 150); + // + // HeaderLabel + // + this.HeaderLabel.AutoSize = true; + this.HeaderLabel.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.HeaderLabel.Location = new System.Drawing.Point(12, 9); + this.HeaderLabel.Name = "HeaderLabel"; + this.HeaderLabel.Size = new System.Drawing.Size(105, 21); + this.HeaderLabel.TabIndex = 0; + this.HeaderLabel.Text = "Uitleg"; + // + // UitlegText + // + this.UitlegText.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left))); + this.UitlegText.AutoSize = true; + this.UitlegText.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.UitlegText.Location = new System.Drawing.Point(12, 35); + this.UitlegText.Name = "UitlegText"; + this.UitlegText.Size = new System.Drawing.Size(800, 32); + this.UitlegText.TabIndex = 2; + this.UitlegText.Text = text; + } + + public void setText(string text) + { + this.UitlegText.Text = text; + } + } +} diff --git a/ErgometerIPR/ErgometerDoctorApplication/Client/SessionWindow.Designer.cs b/ErgometerIPR/ErgometerDoctorApplication/Client/SessionWindow.Designer.cs index 7477f25..105935b 100644 --- a/ErgometerIPR/ErgometerDoctorApplication/Client/SessionWindow.Designer.cs +++ b/ErgometerIPR/ErgometerDoctorApplication/Client/SessionWindow.Designer.cs @@ -50,6 +50,7 @@ namespace ErgometerDoctorApplication this.energy = new PanelClientData("Energie", 0, 200); this.actualpower = new PanelClientData("Absolute Weerstand", 0, 400); this.time = new PanelClientData("Tijd", 0, 400); + this.steps = new ErgometerApplication.PanelClientSteps(); this.panelClientContainer.SuspendLayout(); this.panelTopBar.SuspendLayout(); @@ -81,6 +82,7 @@ namespace ErgometerDoctorApplication this.panelDataViewLeft.Controls.Add(power); this.panelDataViewLeft.Controls.Add(energy); this.panelDataViewLeft.Controls.Add(actualpower); + this.panelDataViewLeft.Controls.Add(steps); this.panelDataViewLeft.Controls.Add(time); @@ -156,6 +158,7 @@ namespace ErgometerDoctorApplication private System.Windows.Forms.Label labelUsername; private System.Windows.Forms.Label labelHallo; public PanelClientData heartBeat, RPM, speed, distance, power, energy, seconds, actualpower, time; + public ErgometerApplication.PanelClientSteps steps; private void createTitle() { diff --git a/ErgometerIPR/ErgometerDoctorApplication/Client/SessionWindow.cs b/ErgometerIPR/ErgometerDoctorApplication/Client/SessionWindow.cs index 43bb154..a69d289 100644 --- a/ErgometerIPR/ErgometerDoctorApplication/Client/SessionWindow.cs +++ b/ErgometerIPR/ErgometerDoctorApplication/Client/SessionWindow.cs @@ -41,7 +41,6 @@ namespace ErgometerDoctorApplication updateGraph = new UpdateGraph(this.LoadGraph); InitializeComponent(); - if(! ActiveSession) { panelClientChat.richTextBox1.Enabled = false; @@ -50,6 +49,11 @@ namespace ErgometerDoctorApplication } } + public void updateStepsText(string text) + { + steps.setText(text); + } + public void ClientApplicatie_Resize(object sender, EventArgs e) { Control control = (Control)sender; diff --git a/ErgometerIPR/ErgometerDoctorApplication/ErgometerDoctorApplication.csproj b/ErgometerIPR/ErgometerDoctorApplication/ErgometerDoctorApplication.csproj index e1d8a9a..1305001 100644 --- a/ErgometerIPR/ErgometerDoctorApplication/ErgometerDoctorApplication.csproj +++ b/ErgometerIPR/ErgometerDoctorApplication/ErgometerDoctorApplication.csproj @@ -62,6 +62,9 @@ Component + + Component + Component