sl@17: using System;
sl@17: using System.Windows.Forms;
sl@19: using System.Collections;
sl@20: using System.ServiceModel;
sl@21: using System.Collections.Generic;
sl@21: using System.Linq;
sl@22: using SharpDisplayInterface;
sl@17:
sl@17: namespace SharpDisplayManager
sl@17: {
sl@17: ///
sl@17: /// Implement our display service.
sl@17: /// This class is instantiated anew whenever a client send a request.
sl@17: ///
sl@20: [ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Reentrant)]
sl@17: class DisplayServer : IDisplayService
sl@17: {
sl@17: //From IDisplayService
sl@19: public void SetTexts(System.Collections.Generic.IList aTexts)
sl@19: {
sl@19: //Only support two lines for now
sl@19: for (int i=0; i();
sl@21: //remove the old client if any
sl@21: if (Program.iMainForm.iClients.Keys.Contains(aClientName))
sl@21: {
sl@21: Program.iMainForm.iClients.Remove(aClientName);
sl@21: }
sl@21: //Register our client
sl@21: Program.iMainForm.iClients.Add(aClientName, callback);
sl@22:
sl@21: //For some reason MP still hangs on that one
sl@21: //callback.OnConnected();
sl@20: }
sl@20:
sl@21:
sl@17: }
sl@17:
sl@17: }