Exemple #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;
        }
 public void Initialize(BrightnessNotificationServiceClient proxy)
 {
     this.proxy = proxy;
 }