Client/MainForm.cs
changeset 73 926cdf23b485
parent 72 fd0bb39a7818
child 74 60d584bad780
     1.1 --- a/Client/MainForm.cs	Sat Oct 25 13:35:11 2014 +0200
     1.2 +++ b/Client/MainForm.cs	Mon Dec 15 18:52:42 2014 +0100
     1.3 @@ -17,8 +17,8 @@
     1.4  {
     1.5      public partial class MainForm : Form
     1.6      {
     1.7 -        Client iClient;
     1.8 -        Callback iCallback;
     1.9 +        DisplayClient iClient;
    1.10 +
    1.11          ContentAlignment Alignment;
    1.12          DataField iTextFieldTop;
    1.13  
    1.14 @@ -32,8 +32,8 @@
    1.15  
    1.16          private void MainForm_Load(object sender, EventArgs e)
    1.17          {
    1.18 -            iCallback = new Callback(this);
    1.19 -            iClient = new Client(iCallback);
    1.20 +            iClient = new DisplayClient(this);
    1.21 +            iClient.Open();
    1.22  
    1.23              //Connect using unique name
    1.24              //string name = DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss.fff tt");
    1.25 @@ -75,7 +75,6 @@
    1.26                  }
    1.27  
    1.28                  iClient = null;
    1.29 -                iCallback = null;
    1.30              }
    1.31          }
    1.32  
    1.33 @@ -105,7 +104,7 @@
    1.34  
    1.35          public bool IsClientReady()
    1.36          {
    1.37 -            return (iClient != null && iClient.State == CommunicationState.Opened);
    1.38 +            return (iClient != null && iClient.IsReady());
    1.39          }
    1.40  
    1.41          private void buttonAlignLeft_Click(object sender, EventArgs e)
    1.42 @@ -196,7 +195,7 @@
    1.43              TableLayout layout = new TableLayout(2, 2);
    1.44              //First column only takes 25%
    1.45              layout.Columns[0].Width = 25F;
    1.46 -            //Second column takes up 75% 
    1.47 +            //Second column takes up 75%
    1.48              layout.Columns[1].Width = 75F;
    1.49              //Send layout to server
    1.50              iClient.SetLayout(layout);