예제 #1
0
        static void Main(string[] args)
        {
            var projectorServerForm = new ProjectorServerForm();
            var projectorServer     = new ProjectorServer(projectorServerForm);
            var serviceHost         = new ServiceHost(projectorServer);

            // discovery
            serviceHost.Description.Behaviors.Add(new ServiceDiscoveryBehavior());
            serviceHost.AddServiceEndpoint(new UdpDiscoveryEndpoint());

            serviceHost.Open();
            Application.Run(projectorServerForm);
        }
 public ProjectorServer(ProjectorServerForm form)
 {
     this.projectorServerForm = form;
 }
        static void Main(string[] args)
        {
            var projectorServerForm = new ProjectorServerForm();
            var projectorServer = new ProjectorServer(projectorServerForm);
            var serviceHost = new ServiceHost(projectorServer);

            // discovery
            serviceHost.Description.Behaviors.Add(new ServiceDiscoveryBehavior());
            serviceHost.AddServiceEndpoint(new UdpDiscoveryEndpoint());

            serviceHost.Open();
            Application.Run(projectorServerForm);
        }
예제 #4
0
 public ProjectorServer(ProjectorServerForm form)
 {
     this.projectorServerForm = form;
 }