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.labelUsername = new System.Windows.Forms.Label();
this.labelHallo = new System.Windows.Forms.Label(); this.labelHallo = new System.Windows.Forms.Label();
this.heartBeat = new DataPanel("Hartslag"); this.heartBeat = new PanelClientData("Hartslag");
this.RPM = new DataPanel("RPM"); this.RPM = new PanelClientData("RPM");
this.speed = new DataPanel("Snelheid"); this.speed = new PanelClientData("Snelheid");
this.distance = new DataPanel("Afstand (km)"); this.distance = new PanelClientData("Afstand (km)");
this.power = new DataPanel("Weerstand"); this.power = new PanelClientData("Weerstand");
this.energy = new DataPanel("Energie"); this.energy = new PanelClientData("Energie");
this.actualpower = new DataPanel("Absolute Weerstand"); this.actualpower = new PanelClientData("Absolute Weerstand");
this.panelClientContainer.SuspendLayout(); this.panelClientContainer.SuspendLayout();
this.panelTopBar.SuspendLayout(); this.panelTopBar.SuspendLayout();
@@ -190,7 +190,7 @@ namespace ErgometerApplication
private System.Windows.Forms.Button buttonLogOff; private System.Windows.Forms.Button buttonLogOff;
private System.Windows.Forms.Label labelUsername; private System.Windows.Forms.Label labelUsername;
private System.Windows.Forms.Label labelHallo; 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 System.Windows.Forms;
using Newtonsoft.Json; using Newtonsoft.Json;
using System.IO; using System.IO;
//using ErgometerLibrary;
using System.Net.Sockets; using System.Net.Sockets;
using System.Net; using System.Net;
using System.Timers; using System.Timers;
using ErgometerLibrary;
namespace ErgometerApplication namespace ErgometerApplication
{ {
public partial class ClientApplicatie : Form public partial class ClientApplicatie : Form
{ {
//private ComPort comPort; private ComPort comPort;
private TcpClient doctor;
//private List<Meting> _data; //private List<Meting> _data;
//private int i = 0; //private int i = 0;
//NetCommand command; //NetCommand command;
//private ServerCommunicator communicator = new ServerCommunicator(); //private ServerCommunicator communicator = new ServerCommunicator();
//List<Meting> readFile = new List<Meting>(); //List<Meting> readFile = new List<Meting>();
public ClientApplicatie() public ClientApplicatie()
{ {
InitializeComponent(); InitializeComponent();
// comPort = new ComPort(); comPort = new ComPort();
doctor = new TcpClient("127.0.0.1", 8888);
// _data = new List<Meting>(); // _data = new List<Meting>();
// communicator.data = _data; // communicator.data = _data;
} }
@@ -54,7 +54,7 @@
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="DataPanel.cs"> <Compile Include="PanelClientData.cs">
<SubType>Component</SubType> <SubType>Component</SubType>
</Compile> </Compile>
<Compile Include="PanelClientChat.cs"> <Compile Include="PanelClientChat.cs">
@@ -7,13 +7,13 @@ using System.Windows.Forms;
namespace ErgometerApplication namespace ErgometerApplication
{ {
public class DataPanel : Panel public class PanelClientData : Panel
{ {
public Label labelMetingCurrentValue; public Label labelMetingCurrentValue;
public ProgressBar progressBarMeting; public ProgressBar progressBarMeting;
public Label metingName; public Label metingName;
public DataPanel(string name) : base() public PanelClientData(string name) : base()
{ {
this.metingName = new System.Windows.Forms.Label(); this.metingName = new System.Windows.Forms.Label();
this.progressBarMeting = new System.Windows.Forms.ProgressBar(); this.progressBarMeting = new System.Windows.Forms.ProgressBar();