/// <summary> /// Handles Click event. /// </summary> /// <param name="sender">Source of the event.</param> /// <param name="e">Event arguments.</param> private void ButtonSendServiceRequest_Click(object sender, RoutedEventArgs e) { if (!string.IsNullOrEmpty(TextBoxServiceRequest.Text) && m_serviceClient != null && m_serviceClient.Helper.RemotingClient.CurrentState == ClientState.Connected) { CommonFunctions.SendCommandToService(TextBoxServiceRequest.Text); TextBoxServiceRequest.Focus(); TextBoxServiceRequest.SelectAll(); } }
void ButtonSendServiceRequest_Click(object sender, RoutedEventArgs e) { #if SILVERLIGHT Storyboard sb = new Storyboard(); sb = Application.Current.Resources["ButtonPressAnimation"] as Storyboard; sb.Completed += new EventHandler(delegate(object obj, EventArgs es) { sb.Stop(); }); Storyboard.SetTarget(sb, ButtonSendServiceRequestTransform); sb.Begin(); #endif if (!string.IsNullOrEmpty(TextBoxServiceRequest.Text)) { SendRequest(); TextBoxServiceRequest.Focus(); TextBoxServiceRequest.SelectAll(); } }
void TextBoxServiceRequest_GotFocus(object sender, RoutedEventArgs e) { TextBoxServiceRequest.SelectAll(); }