Adding server method to set all texts at once.
2 using System.Collections.Generic;
3 using System.ComponentModel;
8 using System.Threading.Tasks;
9 using System.Windows.Forms;
10 using System.ServiceModel;
11 using System.ServiceModel.Channels;
12 using SharpDisplayManager;
14 namespace SharpDisplayClient
16 public partial class MainForm : Form
18 ChannelFactory<SharpDisplayManager.IDisplayService> iChannelFactory;
19 SharpDisplayManager.IDisplayService iClient;
23 InitializeComponent();
26 private void buttonSetText_Click(object sender, EventArgs e)
28 //iClient.SetText(0,"Top");
29 //iClient.SetText(1, "Bottom");
30 iClient.SetTexts(new string[] { "Top", "Bottom" });
33 private void MainForm_Load(object sender, EventArgs e)
36 iChannelFactory = new ChannelFactory<SharpDisplayManager.IDisplayService>(
37 new NetNamedPipeBinding(),
39 "net.pipe://localhost/DisplayService"));
41 iClient = iChannelFactory.CreateChannel();