private void ClearConsoleBtn_Click(object sender, RoutedEventArgs e)
 {
     this.Dispatcher.Invoke(() =>
     {
         ConsoleTextBox.Clear();
         ConsoleTextBox.ScrollToEnd();
     });
 }
Пример #2
0
        void MyConnectionControl_OnConnection(string server, int port)
        {
            ConsoleTextBox.Clear();
            ShowTabParent(ConsoleTextBox);
            isConnected = true;

            AccountSearch.IsEnabled = true;

            OnPropertyChanged("siEndPoint");

            ShowInfoButton.Visibility = System.Windows.Visibility.Visible;
            ShowInfo();
        }
Пример #3
0
 public void Clear()
 {
     if (Dispatcher.Thread.ManagedThreadId == Thread.CurrentThread.ManagedThreadId)
     {
         stringBuilder.Clear();
         ConsoleTextBox.Clear();
     }
     else
     {
         Dispatcher.Invoke(() =>
         {
             stringBuilder.Clear();
             ConsoleTextBox.Clear();
         });
     }
 }
Пример #4
0
 private void RunButton_Click(object sender, RoutedEventArgs e)
 {
     textMarkerService.RemoveAll(m => true);
     try
     {
         ConsoleTextBox.Foreground = Brushes.Black;
         ConsoleTextBox.Clear();
         jsExecutor.Execute(textEditor.Text);
     }
     catch (JavascriptException ex)
     {
         ConsoleTextBox.Foreground = Brushes.Red;
         ConsoleTextBox.AppendText($"line {ex.Line} col {ex.StartColumn}: {ex.Message}");
         var         lineIndex = FindIndex(ex.Line - 1);
         ITextMarker marker    = textMarkerService.Create(lineIndex + ex.StartColumn, ex.EndColumn - ex.StartColumn);
         marker.MarkerTypes = TextMarkerTypes.SquigglyUnderline;
         marker.MarkerColor = Colors.Red;
     }
 }
        private void ConsoleModeComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            var box           = (Guna2ComboBox)sender;
            var selectedIndex = box.SelectedIndex;

            ConsoleTextBox.Clear();

            if (selectedIndex == 0)
            {
                if (Initialized)
                {
                    Log.WriteLine($"You set display mode to 'All'", LogLevel.Info);
                }
            }
            else
            {
                if (Initialized)
                {
                    Log.WriteLine($"You set display mode to '{(LogLevel)selectedIndex}'", (LogLevel)selectedIndex);
                }
            }
        }
 private void clearConsoleLinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     ConsoleTextBox.Clear();
 }
 private void ClearConsoleButton_Click(object sender, EventArgs e)
 {
     ConsoleTextBox.Clear();
 }