Ejemplo n.º 1
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.FullTrustAppContract", 1, 0))
            {
                await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();
            }

            var binding = new NetTcpBinding(SecurityMode.None);
            var address = new EndpointAddress("net.tcp://localhost:8001/BrightnessNotificationService");

            brightnessClient = new BrightnessNotificationServiceClient(binding, address);

            await brightnessClient.SubscribeBrightnessNotificationAsync();

            brightnessClient.NotifyBrightnessReceived += BrightnessClient_NotifyBrightnessReceived;
        }
Ejemplo n.º 2
0
 public void Initialize(BrightnessNotificationServiceClient proxy)
 {
     this.proxy = proxy;
 }