private void sayHello_Click(object sender, RoutedEventArgs e) { Demo.HelloPrx hello = createProxy(); if (hello == null) { return; } int delay = (int)delaySlider.Value; try { if (!deliveryModeIsBatch()) { status.Content = "Sending request"; SayHelloCB cb = new SayHelloCB(this); hello.begin_sayHello(delay).whenCompleted(cb.response, cb.exception).whenSent(cb.sent); } else { flush.IsEnabled = true; hello.sayHello(delay); status.Content = "Queued sayHello request"; } } catch (Ice.LocalException ex) { handleException(ex); } }
private void modeSelectionChanged(object sender, SelectionChangedEventArgs e) { if (flush != null) { flush.IsEnabled = false; } _helloPrx = null; }
private void hostname_TextChanged(object sender, TextChangedEventArgs e) { if (hostname.Text.Length == 0) { if (sayHello != null) { sayHello.IsEnabled = false; } if (shutdown != null) { shutdown.IsEnabled = false; } if (flush != null) { flush.IsEnabled = false; } if (status != null) { status.Content = "No hostname"; } } else { if (sayHello != null) { sayHello.IsEnabled = true; } if (shutdown != null) { shutdown.IsEnabled = true; } if (flush != null) { flush.IsEnabled = false; } if (status != null) { status.Content = "Ready"; } } _helloPrx = null; }
private void btnHello_Click(object sender, EventArgs e) { Demo.HelloPrx hello = createProxy(); lblStatus.Text = "Sending request"; bool haveResponse = false; hello.begin_sayHello(0).whenCompleted( () => { response(ref haveResponse); }, (Ice.Exception ex) => { exception(ref haveResponse, ex); } ).whenSent( (bool sentSynchronously) => { sent(ref haveResponse, sentSynchronously); }); }
private void shutdown_Click(object sender, RoutedEventArgs e) { Demo.HelloPrx hello = createProxy(); if (hello == null) { return; } int delay = (int)delaySlider.Value; try { if (!deliveryModeIsBatch()) { AsyncResult <Demo.Callback_Hello_shutdown> result = hello.begin_shutdown(); status.Content = "Sending request"; result.whenCompleted(delegate() { status.Content = "Ready"; }, delegate(Exception ex) { handleException(ex); }); } else { flush.IsEnabled = true; hello.shutdown(); status.Content = "Queued shutdown request"; } } catch (Ice.LocalException ex) { handleException(ex); } }
private void hostname_TextChanged(object sender, TextChangedEventArgs e) { if(hostname.Text.Length == 0) { if (sayHello != null) { sayHello.IsEnabled = false; } if (shutdown != null) { shutdown.IsEnabled = false; } if (flush != null) { flush.IsEnabled = false; } if(status != null) { status.Content = "No hostname"; } } else { if(sayHello != null) { sayHello.IsEnabled = true; } if(shutdown != null) { shutdown.IsEnabled = true; } if(flush != null) { flush.IsEnabled = false; } if(status != null) { status.Content = "Ready"; } } _helloPrx = null; }
private void modeSelectionChanged(object sender, SelectionChangedEventArgs e) { _helloPrx = null; }