Server/Servers.cs
author sl
Tue, 12 Aug 2014 20:55:50 +0200
changeset 18 7acec5059fa6
parent 17 Servers.cs@19c1aaf900dc
child 19 1a85ec255882
permissions -rw-r--r--
Adding our client implementation. Moving server into its own folder.
sl@17
     1
using System;
sl@17
     2
using System.Windows.Forms;
sl@17
     3
sl@17
     4
namespace SharpDisplayManager
sl@17
     5
{
sl@17
     6
    /// <summary>
sl@17
     7
    /// Implement our display service.
sl@17
     8
    /// This class is instantiated anew whenever a client send a request.
sl@17
     9
    /// </summary>
sl@17
    10
    class DisplayServer : IDisplayService
sl@17
    11
    {
sl@17
    12
        //From IDisplayService
sl@17
    13
        public void SetText(int aLineIndex, string aText)
sl@17
    14
        {
sl@17
    15
            if (aLineIndex == 0)
sl@17
    16
            {
sl@17
    17
                Program.iMainForm.marqueeLabelTop.Text = aText;
sl@17
    18
            }
sl@17
    19
            else if (aLineIndex == 1)
sl@17
    20
            {
sl@17
    21
                Program.iMainForm.marqueeLabelBottom.Text = aText;
sl@17
    22
            }
sl@17
    23
        }
sl@17
    24
sl@17
    25
    }
sl@17
    26
sl@17
    27
}