Fixed layout

This commit is contained in:
2015-10-20 15:35:07 +02:00
parent c043b92e31
commit 1c0028be4f
2 changed files with 24 additions and 17 deletions
@@ -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));
}
}
+4 -3
View File
@@ -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