sl@18: using System; sl@18: using System.Collections.Generic; sl@18: using System.ComponentModel; sl@18: using System.Data; sl@18: using System.Drawing; sl@18: using System.Linq; sl@18: using System.Text; sl@18: using System.Threading.Tasks; sl@18: using System.Windows.Forms; sl@18: using System.ServiceModel; sl@18: using System.ServiceModel.Channels; sl@18: using SharpDisplayManager; sl@18: sl@18: namespace SharpDisplayClient sl@18: { sl@18: public partial class MainForm : Form sl@18: { sl@18: ChannelFactory iChannelFactory; sl@18: SharpDisplayManager.IDisplayService iClient; sl@18: sl@18: public MainForm() sl@18: { sl@18: InitializeComponent(); sl@18: } sl@18: sl@18: private void buttonSetText_Click(object sender, EventArgs e) sl@18: { sl@18: iClient.SetText(0,"Top"); sl@18: iClient.SetText(1, "Bottom"); sl@18: } sl@18: sl@18: private void MainForm_Load(object sender, EventArgs e) sl@18: { sl@18: sl@18: iChannelFactory = new ChannelFactory( sl@18: new NetNamedPipeBinding(), sl@18: new EndpointAddress( sl@18: "net.pipe://localhost/DisplayService")); sl@18: sl@18: iClient = iChannelFactory.CreateChannel(); sl@18: } sl@18: } sl@18: }