Kaynağa Gözat

Changed patient form a little bit, added some usefull help-texts and easier GUI control

jancoow 10 yıl önce
ebeveyn
işleme
77f4b6ea86

+ 8 - 2
Proftaak Remote Healthcare/FietsClientV2/Forms/PatientForm.cs

@@ -85,7 +85,9 @@ namespace FietsClient
             else if (int.TryParse(distanceBox.Text, out n))
             {
                 patientModel.setDistanceMode(distanceBox.Text);
-                this.label19.Text = "Huidige sessie: Afstand: " + n;
+                patientModel.startAskingData();
+                this.sessionBox.Text = "Afstand: " + n;
+                this.label19.Text = "Sessie is gestart, u kunt nu gaan starten met fietsen.";
             }
             else
             {
@@ -107,7 +109,9 @@ namespace FietsClient
                 if (isNumericS)
                 {
                     patientModel.setTimeMode($"{ minutes:00}{seconds:00}");
-                    this.label19.Text = "Huidige sessie: Tijd: " + minutes + ":" + seconds;
+                    patientModel.startAskingData();
+                    this.sessionBox.Text = "Tijd: " + minutes + ":" + seconds;
+                    this.label19.Text = "Sessie is gestart, u kunt nu gaan starten met fietsen.";
                 }
                 else MessageBox.Show("Minutes is not a valid number.");
             }
@@ -255,6 +259,8 @@ namespace FietsClient
         private void button2_Click(object sender, EventArgs e)
         {
             _connection.StopSessoin();
+            this.sessionBox.Text = " ";
+            this.label19.Text = "Sessie gestopt";
         }
 
         private void logoutToolStripMenuItem_Click(object sender, EventArgs e)

+ 37 - 50
Proftaak Remote Healthcare/FietsClientV2/Forms/PatientForm.designer.cs

@@ -30,12 +30,12 @@ namespace FietsClient
         /// </summary>
         private void InitializeComponent()
         {
-            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();
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea4 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Series series4 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea5 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Series series5 = new System.Windows.Forms.DataVisualization.Charting.Series();
+            System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea6 = new System.Windows.Forms.DataVisualization.Charting.ChartArea();
+            System.Windows.Forms.DataVisualization.Charting.Series series6 = new System.Windows.Forms.DataVisualization.Charting.Series();
             System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PatientForm));
             this.menuStrip1 = new System.Windows.Forms.MenuStrip();
             this.archiefToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -65,7 +65,6 @@ namespace FietsClient
             this.sessionInfoBox = new System.Windows.Forms.GroupBox();
             this.label19 = new System.Windows.Forms.Label();
             this.button2 = new System.Windows.Forms.Button();
-            this.button1 = new System.Windows.Forms.Button();
             this.requestedBox = new System.Windows.Forms.TextBox();
             this.actualBox = new System.Windows.Forms.TextBox();
             this.nameBox = new System.Windows.Forms.TextBox();
@@ -288,18 +287,18 @@ namespace FietsClient
             // 
             // speedChart
             // 
-            chartArea1.Name = "ChartArea1";
-            this.speedChart.ChartAreas.Add(chartArea1);
+            chartArea4.Name = "ChartArea1";
+            this.speedChart.ChartAreas.Add(chartArea4);
             this.speedChart.Location = new System.Drawing.Point(6, 19);
             this.speedChart.Name = "speedChart";
-            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);
+            series4.BorderWidth = 10;
+            series4.ChartArea = "ChartArea1";
+            series4.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
+            series4.Name = "Speed";
+            series4.XValueMember = "Time";
+            series4.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Time;
+            series4.YValueMembers = "Speed";
+            this.speedChart.Series.Add(series4);
             this.speedChart.Size = new System.Drawing.Size(388, 285);
             this.speedChart.TabIndex = 0;
             this.speedChart.Text = "Speed chart";
@@ -316,18 +315,18 @@ namespace FietsClient
             // 
             // bpmChart
             // 
-            chartArea2.Name = "ChartArea1";
-            this.bpmChart.ChartAreas.Add(chartArea2);
+            chartArea5.Name = "ChartArea1";
+            this.bpmChart.ChartAreas.Add(chartArea5);
             this.bpmChart.Location = new System.Drawing.Point(6, 19);
             this.bpmChart.Name = "bpmChart";
-            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);
+            series5.BorderWidth = 10;
+            series5.ChartArea = "ChartArea1";
+            series5.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
+            series5.Name = "Beats per minute";
+            series5.XValueMember = "Time";
+            series5.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Time;
+            series5.YValueMembers = "Beats per minutes";
+            this.bpmChart.Series.Add(series5);
             this.bpmChart.Size = new System.Drawing.Size(388, 285);
             this.bpmChart.TabIndex = 1;
             this.bpmChart.Text = "beats per second";
@@ -336,7 +335,6 @@ namespace FietsClient
             // 
             this.sessionInfoBox.Controls.Add(this.label19);
             this.sessionInfoBox.Controls.Add(this.button2);
-            this.sessionInfoBox.Controls.Add(this.button1);
             this.sessionInfoBox.Controls.Add(this.requestedBox);
             this.sessionInfoBox.Controls.Add(this.actualBox);
             this.sessionInfoBox.Controls.Add(this.nameBox);
@@ -382,7 +380,7 @@ namespace FietsClient
             // 
             // button2
             // 
-            this.button2.Location = new System.Drawing.Point(99, 281);
+            this.button2.Location = new System.Drawing.Point(6, 276);
             this.button2.Name = "button2";
             this.button2.Size = new System.Drawing.Size(75, 23);
             this.button2.TabIndex = 39;
@@ -390,16 +388,6 @@ namespace FietsClient
             this.button2.UseVisualStyleBackColor = true;
             this.button2.Click += new System.EventHandler(this.button2_Click);
             // 
-            // button1
-            // 
-            this.button1.Location = new System.Drawing.Point(9, 281);
-            this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(75, 23);
-            this.button1.TabIndex = 38;
-            this.button1.Text = "Start sessie";
-            this.button1.UseVisualStyleBackColor = true;
-            this.button1.Click += new System.EventHandler(this.button1_Click);
-            // 
             // requestedBox
             // 
             this.requestedBox.Location = new System.Drawing.Point(99, 221);
@@ -654,18 +642,18 @@ namespace FietsClient
             // 
             // rpmChart
             // 
-            chartArea3.Name = "ChartArea1";
-            this.rpmChart.ChartAreas.Add(chartArea3);
+            chartArea6.Name = "ChartArea1";
+            this.rpmChart.ChartAreas.Add(chartArea6);
             this.rpmChart.Location = new System.Drawing.Point(6, 19);
             this.rpmChart.Name = "rpmChart";
-            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);
+            series6.BorderWidth = 10;
+            series6.ChartArea = "ChartArea1";
+            series6.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line;
+            series6.Name = "Rounds per minute";
+            series6.XValueMember = "Time";
+            series6.XValueType = System.Windows.Forms.DataVisualization.Charting.ChartValueType.Time;
+            series6.YValueMembers = "Rounds per minutes";
+            this.rpmChart.Series.Add(series6);
             this.rpmChart.Size = new System.Drawing.Size(388, 285);
             this.rpmChart.TabIndex = 2;
             this.rpmChart.Text = "rounds per minute";
@@ -815,7 +803,6 @@ namespace FietsClient
         public System.Windows.Forms.DataVisualization.Charting.Chart speedChart;
         public Chart bpmChart;
         public Chart rpmChart;
-        private System.Windows.Forms.Button button1;
         private System.Windows.Forms.Button button2;
         private System.Windows.Forms.Label label19;
         private System.Windows.Forms.ToolStripMenuItem logoutToolStripMenuItem;