From 1c0028be4fc68b637d8cdc8791fd1f81f0c0b55d Mon Sep 17 00:00:00 2001 From: Kenneth van Ewijk Date: Tue, 20 Oct 2015 15:35:07 +0200 Subject: [PATCH] Fixed layout --- .../Client/PanelClientSetData.cs | 34 +++++++++++-------- .../Client/SessionWindow.Designer.cs | 7 ++-- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/ErgometerDoctorApplication/Client/PanelClientSetData.cs b/ErgometerDoctorApplication/Client/PanelClientSetData.cs index 928bec7..721c5aa 100644 --- a/ErgometerDoctorApplication/Client/PanelClientSetData.cs +++ b/ErgometerDoctorApplication/Client/PanelClientSetData.cs @@ -1,4 +1,5 @@ -using System; +using ErgometerLibrary; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -27,8 +28,11 @@ namespace ErgometerDoctorApplication.Client private Button buttonTijd; private TextBox textBox1; - public PanelClientSetData() : base() + private int Session; + + public PanelClientSetData(int session) : base() { + Session = session; this.panel6 = new System.Windows.Forms.Panel(); this.label3 = new System.Windows.Forms.Label(); this.panel5 = new System.Windows.Forms.Panel(); @@ -54,15 +58,7 @@ namespace ErgometerDoctorApplication.Client // // panel1 // - Controls.Add(this.panel6); - Controls.Add(this.panel5); - Controls.Add(this.panel3); - Controls.Add(this.panel2); - Dock = System.Windows.Forms.DockStyle.Bottom; - Location = new System.Drawing.Point(0, 0); - Name = "panel1"; - Size = new System.Drawing.Size(370, 311); - TabIndex = 1; + // // panel6 // @@ -239,21 +235,31 @@ namespace ErgometerDoctorApplication.Client this.buttonTrapsnelheid.Text = "Set"; this.buttonTrapsnelheid.UseVisualStyleBackColor = false; this.buttonTrapsnelheid.Click += new System.EventHandler(this.buttonTrapsnelheid_Click); + + Controls.Add(this.panel6); + Controls.Add(this.panel5); + Controls.Add(this.panel3); + Controls.Add(this.panel2); + Dock = System.Windows.Forms.DockStyle.Fill; + Location = new System.Drawing.Point(0, 0); + Name = "panel1"; + Size = new System.Drawing.Size(370, 400); + } private void buttonTrapsnelheid_Click(object sender, EventArgs e) { - //trackbar + MainClient.SendNetCommand(new NetCommand(NetCommand.ValueType.POWER, trackBar1.Value, Session)); } private void buttonAfstand_Click(object sender, EventArgs e) { - //textbox2 + MainClient.SendNetCommand(new NetCommand(NetCommand.ValueType.DISTANCE, int.Parse(textBox2.Text), Session)); } private void buttonTijd_Click(object sender, EventArgs e) { - //textbox1 + MainClient.SendNetCommand(new NetCommand(NetCommand.ValueType.TIME, int.Parse(textBox1.Text), Session)); } } diff --git a/ErgometerDoctorApplication/Client/SessionWindow.Designer.cs b/ErgometerDoctorApplication/Client/SessionWindow.Designer.cs index 3fd1819..2885248 100644 --- a/ErgometerDoctorApplication/Client/SessionWindow.Designer.cs +++ b/ErgometerDoctorApplication/Client/SessionWindow.Designer.cs @@ -37,7 +37,7 @@ namespace ErgometerDoctorApplication this.components = new System.ComponentModel.Container(); this.panelClientContainer = new System.Windows.Forms.Panel(); this.panelDataViewLeft = new System.Windows.Forms.Panel(); - this.panelClientSetData = new PanelClientSetData(); + this.panelClientSetData = new PanelClientSetData(Session); this.panelGraphView = new ErgometerDoctorApplication.PanelGraphView(); this.panelClientChat = new ErgometerDoctorApplication.PanelClientChat(Session, ClientName); this.panelTopBar = new System.Windows.Forms.Panel(); @@ -69,12 +69,13 @@ namespace ErgometerDoctorApplication // // panelDataViewLeft // - this.panelDataViewLeft.Dock = System.Windows.Forms.DockStyle.Left; + //this.panelDataViewLeft.Dock = System.Windows.Forms.DockStyle.Left; this.panelDataViewLeft.Location = new System.Drawing.Point(0, 0); this.panelDataViewLeft.Name = "panelDataViewLeft"; this.panelDataViewLeft.Size = new System.Drawing.Size(18, 600); this.panelDataViewLeft.TabIndex = 3; this.panelDataViewLeft.BackColor = System.Drawing.Color.Gray; + this.panelDataViewLeft.Controls.Add(panelClientSetData); this.panelDataViewLeft.Controls.Add(heartBeat); this.panelDataViewLeft.Controls.Add(RPM); this.panelDataViewLeft.Controls.Add(speed); @@ -82,7 +83,7 @@ namespace ErgometerDoctorApplication this.panelDataViewLeft.Controls.Add(power); this.panelDataViewLeft.Controls.Add(energy); this.panelDataViewLeft.Controls.Add(actualpower); - this.panelDataViewLeft.Controls.Add(panelClientSetData); + // // panelClientChat