Amoeba.Windows.MulticastMessageEditWindow.WatchThread C# (CSharp) Метод

WatchThread() приватный Метод

private WatchThread ( ) : void
Результат void
        private void WatchThread()
        {
            this.Dispatcher.Invoke(DispatcherPriority.ContextIdle, new TimeSpan(0, 0, 1), new Action(() =>
            {
                try
                {
                    if (string.IsNullOrWhiteSpace(_commentTextBox.Text) || _commentTextBox.Text.Length > Message.MaxCommentLength)
                    {
                        _okButton.IsEnabled = false;
                    }
                    else
                    {
                        _okButton.IsEnabled = true;
                    }

                    if (_commentTextBox.Text != null)
                    {
                        _countLabel.Content = string.Format("{0} / {1}", _commentTextBox.Text.Length, Message.MaxCommentLength);
                    }
                }
                catch (Exception)
                {

                }
            }));
        }