Пример #1
0
 /// <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();
     }
 }
Пример #2
0
        void Monitor_Loaded(object sender, RoutedEventArgs e)
        {
            m_activityWindow = new ActivityWindow("Connecting to Windows Service... Please Wait...");
#if !SILVERLIGHT
            m_activityWindow.Owner = Window.GetWindow(this);
            m_activityWindow.WindowStartupLocation = WindowStartupLocation.CenterOwner;
#endif
            m_activityWindow.Show();
            TextBoxServiceRequest.Focus();
            ReconnectToService();
        }
Пример #3
0
        /// <summary>
        /// Hanldes loaded event.
        /// </summary>
        /// <param name="sender">Source of the event.</param>
        /// <param name="e">Event arguments.</param>
        private void MonitoringUserControl_Loaded(object sender, RoutedEventArgs e)
        {
            TextBoxServiceRequest.Focus();
            SetupServiceConnection();
            if (!int.TryParse(IsolatedStorageManager.ReadFromIsolatedStorage("NumberOfMessages").ToString(), out m_numberOfMessages))
            {
                m_numberOfMessages = 75;
            }

            TextBoxNumberOfMessages.Text = m_numberOfMessages.ToString();
        }
Пример #4
0
        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();
            }
        }
Пример #5
0
 void TextBoxServiceRequest_GotFocus(object sender, RoutedEventArgs e)
 {
     TextBoxServiceRequest.SelectAll();
 }
Пример #6
0
 private void PopupSettings_Closed(object sender, EventArgs e)
 {
     TextBoxServiceRequest.Focus();
 }