ソースを参照

Added working graphs

Mauro de Lyon 10 年 前
コミット
a2514b40cd

+ 267 - 215
Proftaak Remote Healthcare/FietsClientV2/PatientForm.Designer.cs

@@ -1,4 +1,6 @@
-namespace FietsClientV2
+using System.Windows.Forms.DataVisualization.Charting;
+
+namespace FietsClientV2
 {
     partial class PatientForm
     {
@@ -28,15 +30,12 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea7 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
-            System.Windows.Forms.DataVisualization.Charting.Legend legend7 = new System.Windows.Forms.DataVisualization.Charting.Legend();
-            System.Windows.Forms.DataVisualization.Charting.Series series7 = new System.Windows.Forms.DataVisualization.Charting.Series();
-            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea8 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
-            System.Windows.Forms.DataVisualization.Charting.Legend legend8 = new System.Windows.Forms.DataVisualization.Charting.Legend();
-            System.Windows.Forms.DataVisualization.Charting.Series series8 = new System.Windows.Forms.DataVisualization.Charting.Series();
-            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea9 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
-            System.Windows.Forms.DataVisualization.Charting.Legend legend9 = new System.Windows.Forms.DataVisualization.Charting.Legend();
-            System.Windows.Forms.DataVisualization.Charting.Series series9 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea2 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea3 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Series series3 = new System.Windows.Forms.DataVisualization.Charting.Series();
             this.menuStrip1 = new System.Windows.Forms.MenuStrip();
             this.archiefToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
             this.selectSessionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -68,6 +67,16 @@
             this.bpmBox = new System.Windows.Forms.GroupBox();
             this.bpmChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
             this.sessionInfoBox = new System.Windows.Forms.GroupBox();
+            this.requestedBox = new System.Windows.Forms.TextBox();
+            this.actualBox = new System.Windows.Forms.TextBox();
+            this.nameBox = new System.Windows.Forms.TextBox();
+            this.sessionBox = new System.Windows.Forms.TextBox();
+            this.timeBox = new System.Windows.Forms.TextBox();
+            this.pulseBox = new System.Windows.Forms.TextBox();
+            this.rpmInfoBox = new System.Windows.Forms.TextBox();
+            this.energyInfoBox = new System.Windows.Forms.TextBox();
+            this.distanceInfoBox = new System.Windows.Forms.TextBox();
+            this.speedInfoBox = new System.Windows.Forms.TextBox();
             this.label18 = new System.Windows.Forms.Label();
             this.label17 = new System.Windows.Forms.Label();
             this.label16 = new System.Windows.Forms.Label();
@@ -92,16 +101,6 @@
             this.messageBox = new System.Windows.Forms.TextBox();
             this.chatArea = new System.Windows.Forms.GroupBox();
             this.sendButton = new System.Windows.Forms.Button();
-            this.speedInfoBox = new System.Windows.Forms.TextBox();
-            this.distanceInfoBox = new System.Windows.Forms.TextBox();
-            this.energyInfoBox = new System.Windows.Forms.TextBox();
-            this.rpmInfoBox = new System.Windows.Forms.TextBox();
-            this.pulseBox = new System.Windows.Forms.TextBox();
-            this.timeBox = new System.Windows.Forms.TextBox();
-            this.sessionBox = new System.Windows.Forms.TextBox();
-            this.nameBox = new System.Windows.Forms.TextBox();
-            this.actualBox = new System.Windows.Forms.TextBox();
-            this.requestedBox = new System.Windows.Forms.TextBox();
             this.menuStrip1.SuspendLayout();
             this.speedBox.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.speedChart)).BeginInit();
@@ -115,13 +114,15 @@
             // 
             // menuStrip1
             // 
+            this.menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
             this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.archiefToolStripMenuItem,
             this.bicycleToolStripMenuItem,
             this.startTrainingToolStripMenuItem});
             this.menuStrip1.Location = new System.Drawing.Point(0, 0);
             this.menuStrip1.Name = "menuStrip1";
-            this.menuStrip1.Size = new System.Drawing.Size(1064, 24);
+            this.menuStrip1.Padding = new System.Windows.Forms.Padding(8, 2, 0, 2);
+            this.menuStrip1.Size = new System.Drawing.Size(1419, 28);
             this.menuStrip1.TabIndex = 0;
             this.menuStrip1.Text = "menuStrip1";
             // 
@@ -130,7 +131,7 @@
             this.archiefToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.selectSessionToolStripMenuItem});
             this.archiefToolStripMenuItem.Name = "archiefToolStripMenuItem";
-            this.archiefToolStripMenuItem.Size = new System.Drawing.Size(59, 20);
+            this.archiefToolStripMenuItem.Size = new System.Drawing.Size(70, 24);
             this.archiefToolStripMenuItem.Text = "Archive";
             // 
             // selectSessionToolStripMenuItem
@@ -138,13 +139,13 @@
             this.selectSessionToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.sESSIONSToolStripMenuItem});
             this.selectSessionToolStripMenuItem.Name = "selectSessionToolStripMenuItem";
-            this.selectSessionToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
+            this.selectSessionToolStripMenuItem.Size = new System.Drawing.Size(177, 26);
             this.selectSessionToolStripMenuItem.Text = "Select Session";
             // 
             // sESSIONSToolStripMenuItem
             // 
             this.sESSIONSToolStripMenuItem.Name = "sESSIONSToolStripMenuItem";
-            this.sESSIONSToolStripMenuItem.Size = new System.Drawing.Size(125, 22);
+            this.sESSIONSToolStripMenuItem.Size = new System.Drawing.Size(150, 26);
             this.sESSIONSToolStripMenuItem.Text = "SESSIONS";
             // 
             // bicycleToolStripMenuItem
@@ -152,7 +153,7 @@
             this.bicycleToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
             this.selectPortToolStripMenuItem});
             this.bicycleToolStripMenuItem.Name = "bicycleToolStripMenuItem";
-            this.bicycleToolStripMenuItem.Size = new System.Drawing.Size(56, 20);
+            this.bicycleToolStripMenuItem.Size = new System.Drawing.Size(67, 24);
             this.bicycleToolStripMenuItem.Text = "Bicycle";
             // 
             // selectPortToolStripMenuItem
@@ -163,19 +164,19 @@
             this.requestDataToolStripMenuItem,
             this.closePortToolStripMenuItem});
             this.selectPortToolStripMenuItem.Name = "selectPortToolStripMenuItem";
-            this.selectPortToolStripMenuItem.Size = new System.Drawing.Size(130, 22);
+            this.selectPortToolStripMenuItem.Size = new System.Drawing.Size(156, 26);
             this.selectPortToolStripMenuItem.Text = "Select port";
             // 
             // toolStripComboBox1
             // 
             this.toolStripComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.toolStripComboBox1.Name = "toolStripComboBox1";
-            this.toolStripComboBox1.Size = new System.Drawing.Size(121, 23);
+            this.toolStripComboBox1.Size = new System.Drawing.Size(121, 28);
             // 
             // openPortToolStripMenuItem
             // 
             this.openPortToolStripMenuItem.Name = "openPortToolStripMenuItem";
-            this.openPortToolStripMenuItem.Size = new System.Drawing.Size(181, 22);
+            this.openPortToolStripMenuItem.Size = new System.Drawing.Size(187, 26);
             this.openPortToolStripMenuItem.Text = "Open port";
             this.openPortToolStripMenuItem.Click += new System.EventHandler(this.openPortToolStripMenuItem_Click);
             // 
@@ -183,7 +184,7 @@
             // 
             this.requestDataToolStripMenuItem.Enabled = false;
             this.requestDataToolStripMenuItem.Name = "requestDataToolStripMenuItem";
-            this.requestDataToolStripMenuItem.Size = new System.Drawing.Size(181, 22);
+            this.requestDataToolStripMenuItem.Size = new System.Drawing.Size(187, 26);
             this.requestDataToolStripMenuItem.Text = "Request data";
             this.requestDataToolStripMenuItem.Click += new System.EventHandler(this.requestDataToolStripMenuItem_Click);
             // 
@@ -191,7 +192,7 @@
             // 
             this.closePortToolStripMenuItem.Enabled = false;
             this.closePortToolStripMenuItem.Name = "closePortToolStripMenuItem";
-            this.closePortToolStripMenuItem.Size = new System.Drawing.Size(181, 22);
+            this.closePortToolStripMenuItem.Size = new System.Drawing.Size(187, 26);
             this.closePortToolStripMenuItem.Text = "Close port";
             this.closePortToolStripMenuItem.Click += new System.EventHandler(this.closePortToolStripMenuItem_Click);
             // 
@@ -203,7 +204,7 @@
             this.setToolStripMenuItem,
             this.energyBox});
             this.startTrainingToolStripMenuItem.Name = "startTrainingToolStripMenuItem";
-            this.startTrainingToolStripMenuItem.Size = new System.Drawing.Size(87, 20);
+            this.startTrainingToolStripMenuItem.Size = new System.Drawing.Size(107, 24);
             this.startTrainingToolStripMenuItem.Text = "Start training";
             // 
             // distanceToolStripMenuItem
@@ -212,7 +213,7 @@
             this.distanceTraining,
             this.setTimeToolStripMenuItem});
             this.distanceToolStripMenuItem.Name = "distanceToolStripMenuItem";
-            this.distanceToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+            this.distanceToolStripMenuItem.Size = new System.Drawing.Size(179, 26);
             this.distanceToolStripMenuItem.Text = "Select training";
             // 
             // distanceTraining
@@ -221,18 +222,18 @@
             this.distanceBox,
             this.confirmDistanceBox});
             this.distanceTraining.Name = "distanceTraining";
-            this.distanceTraining.Size = new System.Drawing.Size(138, 22);
+            this.distanceTraining.Size = new System.Drawing.Size(166, 26);
             this.distanceTraining.Text = "Set Distance";
             // 
             // distanceBox
             // 
             this.distanceBox.Name = "distanceBox";
-            this.distanceBox.Size = new System.Drawing.Size(100, 23);
+            this.distanceBox.Size = new System.Drawing.Size(100, 27);
             // 
             // confirmDistanceBox
             // 
             this.confirmDistanceBox.Name = "confirmDistanceBox";
-            this.confirmDistanceBox.Size = new System.Drawing.Size(165, 22);
+            this.confirmDistanceBox.Size = new System.Drawing.Size(196, 26);
             this.confirmDistanceBox.Text = "Confirm distance";
             this.confirmDistanceBox.Click += new System.EventHandler(this.confirmDistanceBox_Click);
             // 
@@ -243,32 +244,32 @@
             this.secondBox,
             this.confirmTimeBox});
             this.setTimeToolStripMenuItem.Name = "setTimeToolStripMenuItem";
-            this.setTimeToolStripMenuItem.Size = new System.Drawing.Size(138, 22);
+            this.setTimeToolStripMenuItem.Size = new System.Drawing.Size(166, 26);
             this.setTimeToolStripMenuItem.Text = "Set Time";
             // 
             // minuteBox
             // 
             this.minuteBox.Name = "minuteBox";
-            this.minuteBox.Size = new System.Drawing.Size(100, 23);
+            this.minuteBox.Size = new System.Drawing.Size(100, 27);
             this.minuteBox.Text = "MM";
             // 
             // secondBox
             // 
             this.secondBox.Name = "secondBox";
-            this.secondBox.Size = new System.Drawing.Size(160, 23);
+            this.secondBox.Size = new System.Drawing.Size(160, 27);
             this.secondBox.Text = "SS";
             // 
             // confirmTimeBox
             // 
             this.confirmTimeBox.Name = "confirmTimeBox";
-            this.confirmTimeBox.Size = new System.Drawing.Size(220, 22);
+            this.confirmTimeBox.Size = new System.Drawing.Size(226, 26);
             this.confirmTimeBox.Text = "Confirm time";
             this.confirmTimeBox.Click += new System.EventHandler(this.confirmTimeBox_Click);
             // 
             // stopTrainingToolStripMenuItem
             // 
             this.stopTrainingToolStripMenuItem.Name = "stopTrainingToolStripMenuItem";
-            this.stopTrainingToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+            this.stopTrainingToolStripMenuItem.Size = new System.Drawing.Size(179, 26);
             this.stopTrainingToolStripMenuItem.Text = "Reset training";
             this.stopTrainingToolStripMenuItem.Click += new System.EventHandler(this.stopTrainingToolStripMenuItem_Click);
             // 
@@ -278,18 +279,18 @@
             this.powerBox,
             this.setPower});
             this.setToolStripMenuItem.Name = "setToolStripMenuItem";
-            this.setToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+            this.setToolStripMenuItem.Size = new System.Drawing.Size(179, 26);
             this.setToolStripMenuItem.Text = "Power";
             // 
             // powerBox
             // 
             this.powerBox.Name = "powerBox";
-            this.powerBox.Size = new System.Drawing.Size(100, 23);
+            this.powerBox.Size = new System.Drawing.Size(100, 27);
             // 
             // setPower
             // 
             this.setPower.Name = "setPower";
-            this.setPower.Size = new System.Drawing.Size(160, 22);
+            this.setPower.Size = new System.Drawing.Size(166, 26);
             this.setPower.Text = "Set power";
             this.setPower.Click += new System.EventHandler(this.setPower_Click);
             // 
@@ -299,69 +300,79 @@
             this.toolStripTextBox3,
             this.toolStripMenuItem1});
             this.energyBox.Name = "energyBox";
-            this.energyBox.Size = new System.Drawing.Size(152, 22);
+            this.energyBox.Size = new System.Drawing.Size(179, 26);
             this.energyBox.Text = "Energy";
             // 
             // toolStripTextBox3
             // 
             this.toolStripTextBox3.Name = "toolStripTextBox3";
-            this.toolStripTextBox3.Size = new System.Drawing.Size(100, 23);
+            this.toolStripTextBox3.Size = new System.Drawing.Size(100, 27);
             // 
             // toolStripMenuItem1
             // 
             this.toolStripMenuItem1.Name = "toolStripMenuItem1";
-            this.toolStripMenuItem1.Size = new System.Drawing.Size(160, 22);
+            this.toolStripMenuItem1.Size = new System.Drawing.Size(166, 26);
             this.toolStripMenuItem1.Text = "Set energy";
             // 
             // speedBox
             // 
             this.speedBox.Controls.Add(this.speedChart);
-            this.speedBox.Location = new System.Drawing.Point(12, 27);
+            this.speedBox.Location = new System.Drawing.Point(16, 33);
+            this.speedBox.Margin = new System.Windows.Forms.Padding(4);
             this.speedBox.Name = "speedBox";
-            this.speedBox.Size = new System.Drawing.Size(400, 310);
+            this.speedBox.Padding = new System.Windows.Forms.Padding(4);
+            this.speedBox.Size = new System.Drawing.Size(533, 382);
             this.speedBox.TabIndex = 2;
             this.speedBox.TabStop = false;
-            this.speedBox.Text = "Speed:";
+            this.speedBox.Text = "Kilometers per hour:";
             // 
             // speedChart
             // 
-            chartArea7.Name = "ChartArea1";
-            this.speedChart.ChartAreas.Add(chartArea7);
-            legend7.Name = "Legend1";
-            this.speedChart.Legends.Add(legend7);
-            this.speedChart.Location = new System.Drawing.Point(6, 19);
+            chartArea1.Name = "ChartArea1";
+            this.speedChart.ChartAreas.Add(chartArea1);
+            this.speedChart.Location = new System.Drawing.Point(8, 23);
+            this.speedChart.Margin = new System.Windows.Forms.Padding(4);
             this.speedChart.Name = "speedChart";
-            series7.ChartArea = "ChartArea1";
-            series7.Legend = "Legend1";
-            series7.Name = "Series1";
-            this.speedChart.Series.Add(series7);
-            this.speedChart.Size = new System.Drawing.Size(388, 285);
+            series1.BorderWidth = 10;
+            series1.ChartArea = "ChartArea1";
+            series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
+            series1.Name = "Speed";
+            series1.XValueMember = "Time";
+            series1.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Time;
+            series1.YValueMembers = "Speed";
+            this.speedChart.Series.Add(series1);
+            this.speedChart.Size = new System.Drawing.Size(517, 351);
             this.speedChart.TabIndex = 0;
             this.speedChart.Text = "Speed chart";
             // 
             // bpmBox
             // 
             this.bpmBox.Controls.Add(this.bpmChart);
-            this.bpmBox.Location = new System.Drawing.Point(12, 343);
+            this.bpmBox.Location = new System.Drawing.Point(16, 422);
+            this.bpmBox.Margin = new System.Windows.Forms.Padding(4);
             this.bpmBox.Name = "bpmBox";
-            this.bpmBox.Size = new System.Drawing.Size(400, 310);
+            this.bpmBox.Padding = new System.Windows.Forms.Padding(4);
+            this.bpmBox.Size = new System.Drawing.Size(533, 382);
             this.bpmBox.TabIndex = 3;
             this.bpmBox.TabStop = false;
-            this.bpmBox.Text = "Beats per second:";
+            this.bpmBox.Text = "Beats per minute:";
             // 
             // bpmChart
             // 
-            chartArea8.Name = "ChartArea1";
-            this.bpmChart.ChartAreas.Add(chartArea8);
-            legend8.Name = "Legend1";
-            this.bpmChart.Legends.Add(legend8);
-            this.bpmChart.Location = new System.Drawing.Point(6, 19);
+            chartArea2.Name = "ChartArea1";
+            this.bpmChart.ChartAreas.Add(chartArea2);
+            this.bpmChart.Location = new System.Drawing.Point(8, 23);
+            this.bpmChart.Margin = new System.Windows.Forms.Padding(4);
             this.bpmChart.Name = "bpmChart";
-            series8.ChartArea = "ChartArea1";
-            series8.Legend = "Legend1";
-            series8.Name = "Series1";
-            this.bpmChart.Series.Add(series8);
-            this.bpmChart.Size = new System.Drawing.Size(388, 285);
+            series2.BorderWidth = 10;
+            series2.ChartArea = "ChartArea1";
+            series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
+            series2.Name = "Beats per minute";
+            series2.XValueMember = "Time";
+            series2.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Time;
+            series2.YValueMembers = "Beats per minutes";
+            this.bpmChart.Series.Add(series2);
+            this.bpmChart.Size = new System.Drawing.Size(517, 351);
             this.bpmChart.TabIndex = 1;
             this.bpmChart.Text = "beats per second";
             // 
@@ -395,215 +406,332 @@
             this.sessionInfoBox.Controls.Add(this.label3);
             this.sessionInfoBox.Controls.Add(this.label2);
             this.sessionInfoBox.Controls.Add(this.label1);
-            this.sessionInfoBox.Location = new System.Drawing.Point(418, 27);
+            this.sessionInfoBox.Location = new System.Drawing.Point(557, 33);
+            this.sessionInfoBox.Margin = new System.Windows.Forms.Padding(4);
             this.sessionInfoBox.Name = "sessionInfoBox";
-            this.sessionInfoBox.Size = new System.Drawing.Size(400, 310);
+            this.sessionInfoBox.Padding = new System.Windows.Forms.Padding(4);
+            this.sessionInfoBox.Size = new System.Drawing.Size(533, 382);
             this.sessionInfoBox.TabIndex = 4;
             this.sessionInfoBox.TabStop = false;
             this.sessionInfoBox.Text = "Session info:";
             // 
+            // requestedBox
+            // 
+            this.requestedBox.Location = new System.Drawing.Point(132, 272);
+            this.requestedBox.Margin = new System.Windows.Forms.Padding(4);
+            this.requestedBox.Name = "requestedBox";
+            this.requestedBox.ReadOnly = true;
+            this.requestedBox.Size = new System.Drawing.Size(79, 22);
+            this.requestedBox.TabIndex = 37;
+            // 
+            // actualBox
+            // 
+            this.actualBox.Location = new System.Drawing.Point(132, 304);
+            this.actualBox.Margin = new System.Windows.Forms.Padding(4);
+            this.actualBox.Name = "actualBox";
+            this.actualBox.ReadOnly = true;
+            this.actualBox.Size = new System.Drawing.Size(79, 22);
+            this.actualBox.TabIndex = 36;
+            // 
+            // nameBox
+            // 
+            this.nameBox.Location = new System.Drawing.Point(132, 16);
+            this.nameBox.Margin = new System.Windows.Forms.Padding(4);
+            this.nameBox.Name = "nameBox";
+            this.nameBox.ReadOnly = true;
+            this.nameBox.Size = new System.Drawing.Size(79, 22);
+            this.nameBox.TabIndex = 35;
+            // 
+            // sessionBox
+            // 
+            this.sessionBox.Location = new System.Drawing.Point(132, 48);
+            this.sessionBox.Margin = new System.Windows.Forms.Padding(4);
+            this.sessionBox.Name = "sessionBox";
+            this.sessionBox.ReadOnly = true;
+            this.sessionBox.Size = new System.Drawing.Size(79, 22);
+            this.sessionBox.TabIndex = 34;
+            // 
+            // timeBox
+            // 
+            this.timeBox.Location = new System.Drawing.Point(132, 240);
+            this.timeBox.Margin = new System.Windows.Forms.Padding(4);
+            this.timeBox.Name = "timeBox";
+            this.timeBox.ReadOnly = true;
+            this.timeBox.Size = new System.Drawing.Size(79, 22);
+            this.timeBox.TabIndex = 33;
+            // 
+            // pulseBox
+            // 
+            this.pulseBox.Location = new System.Drawing.Point(132, 80);
+            this.pulseBox.Margin = new System.Windows.Forms.Padding(4);
+            this.pulseBox.Name = "pulseBox";
+            this.pulseBox.ReadOnly = true;
+            this.pulseBox.Size = new System.Drawing.Size(79, 22);
+            this.pulseBox.TabIndex = 32;
+            // 
+            // rpmInfoBox
+            // 
+            this.rpmInfoBox.Location = new System.Drawing.Point(132, 112);
+            this.rpmInfoBox.Margin = new System.Windows.Forms.Padding(4);
+            this.rpmInfoBox.Name = "rpmInfoBox";
+            this.rpmInfoBox.ReadOnly = true;
+            this.rpmInfoBox.Size = new System.Drawing.Size(79, 22);
+            this.rpmInfoBox.TabIndex = 31;
+            // 
+            // energyInfoBox
+            // 
+            this.energyInfoBox.Location = new System.Drawing.Point(132, 208);
+            this.energyInfoBox.Margin = new System.Windows.Forms.Padding(4);
+            this.energyInfoBox.Name = "energyInfoBox";
+            this.energyInfoBox.ReadOnly = true;
+            this.energyInfoBox.Size = new System.Drawing.Size(79, 22);
+            this.energyInfoBox.TabIndex = 30;
+            // 
+            // distanceInfoBox
+            // 
+            this.distanceInfoBox.Location = new System.Drawing.Point(132, 176);
+            this.distanceInfoBox.Margin = new System.Windows.Forms.Padding(4);
+            this.distanceInfoBox.Name = "distanceInfoBox";
+            this.distanceInfoBox.ReadOnly = true;
+            this.distanceInfoBox.Size = new System.Drawing.Size(79, 22);
+            this.distanceInfoBox.TabIndex = 29;
+            // 
+            // speedInfoBox
+            // 
+            this.speedInfoBox.Location = new System.Drawing.Point(132, 144);
+            this.speedInfoBox.Margin = new System.Windows.Forms.Padding(4);
+            this.speedInfoBox.Name = "speedInfoBox";
+            this.speedInfoBox.ReadOnly = true;
+            this.speedInfoBox.Size = new System.Drawing.Size(79, 22);
+            this.speedInfoBox.TabIndex = 28;
+            // 
             // label18
             // 
             this.label18.AutoSize = true;
-            this.label18.Location = new System.Drawing.Point(165, 202);
+            this.label18.Location = new System.Drawing.Point(220, 249);
+            this.label18.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label18.Name = "label18";
-            this.label18.Size = new System.Drawing.Size(42, 13);
+            this.label18.Size = new System.Drawing.Size(52, 17);
             this.label18.TabIndex = 27;
             this.label18.Text = "MM:SS";
             // 
             // label17
             // 
             this.label17.AutoSize = true;
-            this.label17.Location = new System.Drawing.Point(165, 228);
+            this.label17.Location = new System.Drawing.Point(220, 281);
+            this.label17.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label17.Name = "label17";
-            this.label17.Size = new System.Drawing.Size(30, 13);
+            this.label17.Size = new System.Drawing.Size(37, 17);
             this.label17.TabIndex = 26;
             this.label17.Text = "Watt";
             // 
             // label16
             // 
             this.label16.AutoSize = true;
-            this.label16.Location = new System.Drawing.Point(165, 254);
+            this.label16.Location = new System.Drawing.Point(220, 313);
+            this.label16.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label16.Name = "label16";
-            this.label16.Size = new System.Drawing.Size(30, 13);
+            this.label16.Size = new System.Drawing.Size(37, 17);
             this.label16.TabIndex = 25;
             this.label16.Text = "Watt";
             // 
             // label15
             // 
             this.label15.AutoSize = true;
-            this.label15.Location = new System.Drawing.Point(165, 176);
+            this.label15.Location = new System.Drawing.Point(220, 217);
+            this.label15.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label15.Name = "label15";
-            this.label15.Size = new System.Drawing.Size(30, 13);
+            this.label15.Size = new System.Drawing.Size(37, 17);
             this.label15.TabIndex = 24;
             this.label15.Text = "Watt";
             // 
             // label14
             // 
             this.label14.AutoSize = true;
-            this.label14.Location = new System.Drawing.Point(165, 150);
+            this.label14.Location = new System.Drawing.Point(220, 185);
+            this.label14.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label14.Name = "label14";
-            this.label14.Size = new System.Drawing.Size(54, 13);
+            this.label14.Size = new System.Drawing.Size(72, 17);
             this.label14.TabIndex = 23;
             this.label14.Text = "kilometers";
             // 
             // label13
             // 
             this.label13.AutoSize = true;
-            this.label13.Location = new System.Drawing.Point(165, 124);
+            this.label13.Location = new System.Drawing.Point(220, 153);
+            this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label13.Name = "label13";
-            this.label13.Size = new System.Drawing.Size(96, 13);
+            this.label13.Size = new System.Drawing.Size(130, 17);
             this.label13.TabIndex = 22;
             this.label13.Text = "kilometers per hour";
             // 
             // label12
             // 
             this.label12.AutoSize = true;
-            this.label12.Location = new System.Drawing.Point(165, 98);
+            this.label12.Location = new System.Drawing.Point(220, 121);
+            this.label12.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label12.Name = "label12";
-            this.label12.Size = new System.Drawing.Size(91, 13);
+            this.label12.Size = new System.Drawing.Size(123, 17);
             this.label12.TabIndex = 21;
             this.label12.Text = "rounds per minute";
             // 
             // label11
             // 
             this.label11.AutoSize = true;
-            this.label11.Location = new System.Drawing.Point(165, 72);
+            this.label11.Location = new System.Drawing.Point(220, 89);
+            this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label11.Name = "label11";
-            this.label11.Size = new System.Drawing.Size(86, 13);
+            this.label11.Size = new System.Drawing.Size(115, 17);
             this.label11.TabIndex = 20;
             this.label11.Text = "Beats per minute";
             // 
             // label10
             // 
             this.label10.AutoSize = true;
-            this.label10.Location = new System.Drawing.Point(6, 254);
+            this.label10.Location = new System.Drawing.Point(8, 313);
+            this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label10.Name = "label10";
-            this.label10.Size = new System.Drawing.Size(69, 13);
+            this.label10.Size = new System.Drawing.Size(89, 17);
             this.label10.TabIndex = 9;
             this.label10.Text = "Actual power";
             // 
             // label9
             // 
             this.label9.AutoSize = true;
-            this.label9.Location = new System.Drawing.Point(6, 228);
+            this.label9.Location = new System.Drawing.Point(8, 281);
+            this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(94, 13);
+            this.label9.Size = new System.Drawing.Size(123, 17);
             this.label9.TabIndex = 8;
             this.label9.Text = "Requested power:";
             // 
             // label8
             // 
             this.label8.AutoSize = true;
-            this.label8.Location = new System.Drawing.Point(6, 202);
+            this.label8.Location = new System.Drawing.Point(8, 249);
+            this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(33, 13);
+            this.label8.Size = new System.Drawing.Size(43, 17);
             this.label8.TabIndex = 7;
             this.label8.Text = "Time:";
             // 
             // label7
             // 
             this.label7.AutoSize = true;
-            this.label7.Location = new System.Drawing.Point(6, 176);
+            this.label7.Location = new System.Drawing.Point(8, 217);
+            this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(43, 13);
+            this.label7.Size = new System.Drawing.Size(57, 17);
             this.label7.TabIndex = 6;
             this.label7.Text = "Energy:";
             // 
             // label6
             // 
             this.label6.AutoSize = true;
-            this.label6.Location = new System.Drawing.Point(6, 150);
+            this.label6.Location = new System.Drawing.Point(8, 185);
+            this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(52, 13);
+            this.label6.Size = new System.Drawing.Size(67, 17);
             this.label6.TabIndex = 5;
             this.label6.Text = "Distance:";
             // 
             // label5
             // 
             this.label5.AutoSize = true;
-            this.label5.Location = new System.Drawing.Point(6, 124);
+            this.label5.Location = new System.Drawing.Point(8, 153);
+            this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(41, 13);
+            this.label5.Size = new System.Drawing.Size(53, 17);
             this.label5.TabIndex = 4;
             this.label5.Text = "Speed:";
             // 
             // label4
             // 
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(6, 98);
+            this.label4.Location = new System.Drawing.Point(8, 121);
+            this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(34, 13);
+            this.label4.Size = new System.Drawing.Size(42, 17);
             this.label4.TabIndex = 3;
             this.label4.Text = "RPM:";
             // 
             // label3
             // 
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(6, 46);
+            this.label3.Location = new System.Drawing.Point(8, 57);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(47, 13);
+            this.label3.Size = new System.Drawing.Size(62, 17);
             this.label3.TabIndex = 2;
             this.label3.Text = "Session:";
             // 
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(6, 72);
+            this.label2.Location = new System.Drawing.Point(8, 89);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(36, 13);
+            this.label2.Size = new System.Drawing.Size(47, 17);
             this.label2.TabIndex = 1;
             this.label2.Text = "Pulse:";
             // 
             // label1
             // 
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(6, 20);
+            this.label1.Location = new System.Drawing.Point(8, 25);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(38, 13);
+            this.label1.Size = new System.Drawing.Size(49, 17);
             this.label1.TabIndex = 0;
             this.label1.Text = "Naam:";
             // 
             // rpmBox
             // 
             this.rpmBox.Controls.Add(this.rpmChart);
-            this.rpmBox.Location = new System.Drawing.Point(418, 343);
+            this.rpmBox.Location = new System.Drawing.Point(557, 422);
+            this.rpmBox.Margin = new System.Windows.Forms.Padding(4);
             this.rpmBox.Name = "rpmBox";
-            this.rpmBox.Size = new System.Drawing.Size(400, 310);
+            this.rpmBox.Padding = new System.Windows.Forms.Padding(4);
+            this.rpmBox.Size = new System.Drawing.Size(533, 382);
             this.rpmBox.TabIndex = 5;
             this.rpmBox.TabStop = false;
             this.rpmBox.Text = "Rounds per minute:";
             // 
             // rpmChart
             // 
-            chartArea9.Name = "ChartArea1";
-            this.rpmChart.ChartAreas.Add(chartArea9);
-            legend9.Name = "Legend1";
-            this.rpmChart.Legends.Add(legend9);
-            this.rpmChart.Location = new System.Drawing.Point(6, 19);
+            chartArea3.Name = "ChartArea1";
+            this.rpmChart.ChartAreas.Add(chartArea3);
+            this.rpmChart.Location = new System.Drawing.Point(8, 23);
+            this.rpmChart.Margin = new System.Windows.Forms.Padding(4);
             this.rpmChart.Name = "rpmChart";
-            series9.ChartArea = "ChartArea1";
-            series9.Legend = "Legend1";
-            series9.Name = "Series1";
-            this.rpmChart.Series.Add(series9);
-            this.rpmChart.Size = new System.Drawing.Size(388, 285);
+            series3.BorderWidth = 10;
+            series3.ChartArea = "ChartArea1";
+            series3.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
+            series3.Name = "Rounds per minute";
+            series3.XValueMember = "Time";
+            series3.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Time;
+            series3.YValueMembers = "Rounds per minutes";
+            this.rpmChart.Series.Add(series3);
+            this.rpmChart.Size = new System.Drawing.Size(517, 351);
             this.rpmChart.TabIndex = 2;
             this.rpmChart.Text = "rounds per minute";
             // 
             // chatBox
             // 
-            this.chatBox.Location = new System.Drawing.Point(0, 19);
+            this.chatBox.Location = new System.Drawing.Point(0, 23);
+            this.chatBox.Margin = new System.Windows.Forms.Padding(4);
             this.chatBox.Multiline = true;
             this.chatBox.Name = "chatBox";
             this.chatBox.ReadOnly = true;
-            this.chatBox.Size = new System.Drawing.Size(228, 546);
+            this.chatBox.Size = new System.Drawing.Size(303, 671);
             this.chatBox.TabIndex = 3;
             // 
             // messageBox
             // 
-            this.messageBox.Location = new System.Drawing.Point(0, 571);
+            this.messageBox.Location = new System.Drawing.Point(0, 703);
+            this.messageBox.Margin = new System.Windows.Forms.Padding(4);
             this.messageBox.Name = "messageBox";
-            this.messageBox.Size = new System.Drawing.Size(228, 20);
+            this.messageBox.Size = new System.Drawing.Size(303, 22);
             this.messageBox.TabIndex = 6;
             // 
             // chatArea
@@ -611,108 +739,31 @@
             this.chatArea.Controls.Add(this.sendButton);
             this.chatArea.Controls.Add(this.chatBox);
             this.chatArea.Controls.Add(this.messageBox);
-            this.chatArea.Location = new System.Drawing.Point(824, 27);
+            this.chatArea.Location = new System.Drawing.Point(1099, 33);
+            this.chatArea.Margin = new System.Windows.Forms.Padding(4);
             this.chatArea.Name = "chatArea";
-            this.chatArea.Size = new System.Drawing.Size(228, 626);
+            this.chatArea.Padding = new System.Windows.Forms.Padding(4);
+            this.chatArea.Size = new System.Drawing.Size(304, 770);
             this.chatArea.TabIndex = 5;
             this.chatArea.TabStop = false;
             this.chatArea.Text = "Chat:";
             // 
             // sendButton
             // 
-            this.sendButton.Location = new System.Drawing.Point(0, 597);
+            this.sendButton.Location = new System.Drawing.Point(0, 735);
+            this.sendButton.Margin = new System.Windows.Forms.Padding(4);
             this.sendButton.Name = "sendButton";
-            this.sendButton.Size = new System.Drawing.Size(228, 23);
+            this.sendButton.Size = new System.Drawing.Size(304, 28);
             this.sendButton.TabIndex = 7;
             this.sendButton.Text = "send";
             this.sendButton.UseVisualStyleBackColor = true;
             // 
-            // speedInfoBox
-            // 
-            this.speedInfoBox.Location = new System.Drawing.Point(99, 117);
-            this.speedInfoBox.Name = "speedInfoBox";
-            this.speedInfoBox.ReadOnly = true;
-            this.speedInfoBox.Size = new System.Drawing.Size(60, 20);
-            this.speedInfoBox.TabIndex = 28;
-            // 
-            // distanceInfoBox
-            // 
-            this.distanceInfoBox.Location = new System.Drawing.Point(99, 143);
-            this.distanceInfoBox.Name = "distanceInfoBox";
-            this.distanceInfoBox.ReadOnly = true;
-            this.distanceInfoBox.Size = new System.Drawing.Size(60, 20);
-            this.distanceInfoBox.TabIndex = 29;
-            // 
-            // energyInfoBox
-            // 
-            this.energyInfoBox.Location = new System.Drawing.Point(99, 169);
-            this.energyInfoBox.Name = "energyInfoBox";
-            this.energyInfoBox.ReadOnly = true;
-            this.energyInfoBox.Size = new System.Drawing.Size(60, 20);
-            this.energyInfoBox.TabIndex = 30;
-            // 
-            // rpmInfoBox
-            // 
-            this.rpmInfoBox.Location = new System.Drawing.Point(99, 91);
-            this.rpmInfoBox.Name = "rpmInfoBox";
-            this.rpmInfoBox.ReadOnly = true;
-            this.rpmInfoBox.Size = new System.Drawing.Size(60, 20);
-            this.rpmInfoBox.TabIndex = 31;
-            // 
-            // pulseBox
-            // 
-            this.pulseBox.Location = new System.Drawing.Point(99, 65);
-            this.pulseBox.Name = "pulseBox";
-            this.pulseBox.ReadOnly = true;
-            this.pulseBox.Size = new System.Drawing.Size(60, 20);
-            this.pulseBox.TabIndex = 32;
-            // 
-            // timeBox
-            // 
-            this.timeBox.Location = new System.Drawing.Point(99, 195);
-            this.timeBox.Name = "timeBox";
-            this.timeBox.ReadOnly = true;
-            this.timeBox.Size = new System.Drawing.Size(60, 20);
-            this.timeBox.TabIndex = 33;
-            // 
-            // sessionBox
-            // 
-            this.sessionBox.Location = new System.Drawing.Point(99, 39);
-            this.sessionBox.Name = "sessionBox";
-            this.sessionBox.ReadOnly = true;
-            this.sessionBox.Size = new System.Drawing.Size(60, 20);
-            this.sessionBox.TabIndex = 34;
-            // 
-            // nameBox
-            // 
-            this.nameBox.Location = new System.Drawing.Point(99, 13);
-            this.nameBox.Name = "nameBox";
-            this.nameBox.ReadOnly = true;
-            this.nameBox.Size = new System.Drawing.Size(60, 20);
-            this.nameBox.TabIndex = 35;
-            // 
-            // actualBox
-            // 
-            this.actualBox.Location = new System.Drawing.Point(99, 247);
-            this.actualBox.Name = "actualBox";
-            this.actualBox.ReadOnly = true;
-            this.actualBox.Size = new System.Drawing.Size(60, 20);
-            this.actualBox.TabIndex = 36;
-            // 
-            // requestedBox
-            // 
-            this.requestedBox.Location = new System.Drawing.Point(99, 221);
-            this.requestedBox.Name = "requestedBox";
-            this.requestedBox.ReadOnly = true;
-            this.requestedBox.Size = new System.Drawing.Size(60, 20);
-            this.requestedBox.TabIndex = 37;
-            // 
             // PatientForm
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.SystemColors.Control;
-            this.ClientSize = new System.Drawing.Size(1064, 681);
+            this.ClientSize = new System.Drawing.Size(1419, 838);
             this.Controls.Add(this.chatArea);
             this.Controls.Add(this.sessionInfoBox);
             this.Controls.Add(this.rpmBox);
@@ -720,6 +771,7 @@
             this.Controls.Add(this.speedBox);
             this.Controls.Add(this.menuStrip1);
             this.MainMenuStrip = this.menuStrip1;
+            this.Margin = new System.Windows.Forms.Padding(4);
             this.Name = "PatientForm";
             this.Text = "Patient";
             this.Load += new System.EventHandler(this.Form1_Load);
@@ -750,9 +802,6 @@
         private System.Windows.Forms.GroupBox bpmBox;
         private System.Windows.Forms.GroupBox sessionInfoBox;
         private System.Windows.Forms.GroupBox rpmBox;
-        private System.Windows.Forms.DataVisualization.Charting.Chart speedChart;
-        private System.Windows.Forms.DataVisualization.Charting.Chart bpmChart;
-        private System.Windows.Forms.DataVisualization.Charting.Chart rpmChart;
         private System.Windows.Forms.TextBox chatBox;
         private System.Windows.Forms.TextBox messageBox;
         private System.Windows.Forms.GroupBox chatArea;
@@ -807,6 +856,9 @@
         public System.Windows.Forms.TextBox energyInfoBox;
         public System.Windows.Forms.TextBox distanceInfoBox;
         public System.Windows.Forms.TextBox speedInfoBox;
+        public System.Windows.Forms.DataVisualization.Charting.Chart speedChart;
+        public Chart bpmChart;
+        public Chart rpmChart;
     }
 }
 

+ 33 - 1
Proftaak Remote Healthcare/FietsClientV2/PatientModel.cs

@@ -1,9 +1,11 @@
 using System;
 using System.Collections.Generic;
+using System.ComponentModel;
 using System.Linq;
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
+using System.Windows.Forms.DataVisualization.Charting;
 
 namespace FietsClientV2
 {
@@ -44,6 +46,9 @@ namespace FietsClientV2
             }
         }
         //event handler
+        private List<DataPoint> speedPoints = new List<DataPoint>();
+        private List<DataPoint> bpmPoints = new List<DataPoint>();
+        private List<DataPoint> rpmPoints = new List<DataPoint>();
         private void HandleBikeData(string[] data)
         {
             if (patientform.InvokeRequired)
@@ -52,6 +57,7 @@ namespace FietsClientV2
             }
             else
             {
+                //fill fields
                 patientform.pulseBox.Text = data[0];
                 patientform.rpmInfoBox.Text = data[1];
                 patientform.speedInfoBox.Text = data[2];
@@ -60,6 +66,33 @@ namespace FietsClientV2
                 patientform.energyInfoBox.Text = data[5];
                 patientform.timeBox.Text = data[6];
                 patientform.actualBox.Text = data[7];
+                
+                //fill graph speed
+                speedPoints.Add(new DataPoint(Convert.ToDateTime(data[6]).ToOADate(), Convert.ToDouble(data[2])));
+                patientform.speedChart.Series[0].Points.Clear();
+                for (int i = 0; i < speedPoints.Count; i++)
+                    patientform.speedChart.Series[0].Points.Add(speedPoints[i]);
+                if (speedPoints.Count > 25)
+                    speedPoints.RemoveAt(0);
+                patientform.speedChart.Update();
+
+                //fill graph pulse
+                bpmPoints.Add(new DataPoint(Convert.ToDateTime(data[6]).ToOADate(), Convert.ToDouble(data[0])));
+                patientform.bpmChart.Series[0].Points.Clear();
+                for (int i = 0; i < bpmPoints.Count; i++)
+                    patientform.bpmChart.Series[0].Points.Add(bpmPoints[i]);
+                if (bpmPoints.Count > 25)
+                    bpmPoints.RemoveAt(0);
+                patientform.speedChart.Update();
+
+                //fill graph rpm
+                rpmPoints.Add(new DataPoint(Convert.ToDateTime(data[6]).ToOADate(), Convert.ToDouble(data[1])));
+                patientform.rpmChart.Series[0].Points.Clear();
+                for (int i = 0; i < rpmPoints.Count; i++)
+                    patientform.rpmChart.Series[0].Points.Add(rpmPoints[i]);
+                if (rpmPoints.Count > 25)
+                    rpmPoints.RemoveAt(0);
+                patientform.rpmChart.Update();
             }
             
         }
@@ -70,7 +103,6 @@ namespace FietsClientV2
                 workerThread.Interrupt();
             dataHandler.closeComm();
         }
-
         //change bike values
         public void setTimeMode(string time)
         {