public ConsoleView() { ViewModel = new ConsoleViewModel(); App.RustRcon.ConsoleLogUpdated += (s, args) => { if (ViewModel.ConsoleSettings.IsAutoScrollEnabled) { ConsoleScrollViewer.ScrollToBottom(); } }; InitializeComponent(); }
/// <summary> /// Initializes a new instance of the <see cref="Main"/> class. /// </summary> public Main() { InitializeComponent(); CheckPassword(); // USTALAMY LICZBE WATKOW I TASKOW (PROGRAMOWANIE ASYNCHRONICZNE I WIELOWATKOWE) threadsArray = new Thread[2]; // LICZNBA TASKOW JEST ROWNA LICZBIE RDZENI LOGICZNYCH PROCESORA tasksArray = new Task[proc]; // USTAWALY PUNKTY WYJSCIA DO EVENTU ZE SKRAPERA scraper.TextBoxValueChanged += OtherWindowOnTextBoxValueChanged; WriteToConsole("Application Started"); WriteToConsole($"Number Of Logical Processors: {Environment.ProcessorCount}"); ConsoleScrollViewer.ScrollToBottom(); Search_Async(); }
public void AddConsoleText(string text, bool newLine = true) { ConsoleWindow.Text += text + (newLine ? Environment.NewLine : string.Empty); ConsoleScrollViewer.ScrollToBottom(); }