diff --git a/ErgometerApplication/ErgometerApplication/ClientApplicatie.Designer.cs b/ErgometerApplication/ErgometerApplication/ClientApplicatie.Designer.cs index faa1183..9b704f8 100644 --- a/ErgometerApplication/ErgometerApplication/ClientApplicatie.Designer.cs +++ b/ErgometerApplication/ErgometerApplication/ClientApplicatie.Designer.cs @@ -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; } diff --git a/ErgometerApplication/ErgometerApplication/ClientApplicatie.cs b/ErgometerApplication/ErgometerApplication/ClientApplicatie.cs index 0c5dcc7..8e457a3 100644 --- a/ErgometerApplication/ErgometerApplication/ClientApplicatie.cs +++ b/ErgometerApplication/ErgometerApplication/ClientApplicatie.cs @@ -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 _data; //private int i = 0; //NetCommand command; //private ServerCommunicator communicator = new ServerCommunicator(); //List readFile = new List(); + public ClientApplicatie() { InitializeComponent(); - // comPort = new ComPort(); + comPort = new ComPort(); + + doctor = new TcpClient("127.0.0.1", 8888); + // _data = new List(); // communicator.data = _data; } diff --git a/ErgometerApplication/ErgometerApplication/ErgometerApplication.csproj b/ErgometerApplication/ErgometerApplication/ErgometerApplication.csproj index 088fb82..cc4fa12 100644 --- a/ErgometerApplication/ErgometerApplication/ErgometerApplication.csproj +++ b/ErgometerApplication/ErgometerApplication/ErgometerApplication.csproj @@ -54,7 +54,7 @@ - + Component diff --git a/ErgometerApplication/ErgometerApplication/DataPanel.cs b/ErgometerApplication/ErgometerApplication/PanelClientData.cs similarity index 97% rename from ErgometerApplication/ErgometerApplication/DataPanel.cs rename to ErgometerApplication/ErgometerApplication/PanelClientData.cs index b7ae035..9a39e06 100644 --- a/ErgometerApplication/ErgometerApplication/DataPanel.cs +++ b/ErgometerApplication/ErgometerApplication/PanelClientData.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();