Changed names and started net implementation

This commit is contained in:
2015-10-05 12:52:02 +02:00
parent 751063f834
commit 799dc88f92
4 changed files with 19 additions and 14 deletions
@@ -44,13 +44,13 @@ namespace ErgometerApplication
this.labelUsername = new System.Windows.Forms.Label();
this.labelHallo = new System.Windows.Forms.Label();
this.heartBeat = new DataPanel("Hartslag");
this.RPM = new DataPanel("RPM");
this.speed = new DataPanel("Snelheid");
this.distance = new DataPanel("Afstand (km)");
this.power = new DataPanel("Weerstand");
this.energy = new DataPanel("Energie");
this.actualpower = new DataPanel("Absolute Weerstand");
this.heartBeat = new PanelClientData("Hartslag");
this.RPM = new PanelClientData("RPM");
this.speed = new PanelClientData("Snelheid");
this.distance = new PanelClientData("Afstand (km)");
this.power = new PanelClientData("Weerstand");
this.energy = new PanelClientData("Energie");
this.actualpower = new PanelClientData("Absolute Weerstand");
this.panelClientContainer.SuspendLayout();
this.panelTopBar.SuspendLayout();
@@ -190,7 +190,7 @@ namespace ErgometerApplication
private System.Windows.Forms.Button buttonLogOff;
private System.Windows.Forms.Label labelUsername;
private System.Windows.Forms.Label labelHallo;
public DataPanel heartBeat, RPM, speed, distance, power, energy, seconds, actualpower;
public PanelClientData heartBeat, RPM, speed, distance, power, energy, seconds, actualpower;
}
@@ -11,25 +11,30 @@ using System.Threading.Tasks;
using System.Windows.Forms;
using Newtonsoft.Json;
using System.IO;
//using ErgometerLibrary;
using System.Net.Sockets;
using System.Net;
using System.Timers;
using ErgometerLibrary;
namespace ErgometerApplication
{
public partial class ClientApplicatie : Form
{
//private ComPort comPort;
private ComPort comPort;
private TcpClient doctor;
//private List<Meting> _data;
//private int i = 0;
//NetCommand command;
//private ServerCommunicator communicator = new ServerCommunicator();
//List<Meting> readFile = new List<Meting>();
public ClientApplicatie()
{
InitializeComponent();
// comPort = new ComPort();
comPort = new ComPort();
doctor = new TcpClient("127.0.0.1", 8888);
// _data = new List<Meting>();
// communicator.data = _data;
}
@@ -54,7 +54,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="DataPanel.cs">
<Compile Include="PanelClientData.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="PanelClientChat.cs">
@@ -7,13 +7,13 @@ using System.Windows.Forms;
namespace ErgometerApplication
{
public class DataPanel : Panel
public class PanelClientData : Panel
{
public Label labelMetingCurrentValue;
public ProgressBar progressBarMeting;
public Label metingName;
public DataPanel(string name) : base()
public PanelClientData(string name) : base()
{
this.metingName = new System.Windows.Forms.Label();
this.progressBarMeting = new System.Windows.Forms.ProgressBar();