Exemplo n.º 1
0
 public ConsoleView()
 {
     ViewModel = new ConsoleViewModel();
     App.RustRcon.ConsoleLogUpdated += (s, args) =>
     {
         if (ViewModel.ConsoleSettings.IsAutoScrollEnabled)
         {
             ConsoleScrollViewer.ScrollToBottom();
         }
     };
     InitializeComponent();
 }
Exemplo n.º 2
0
        /// <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();
        }
Exemplo n.º 3
0
 public void AddConsoleText(string text, bool newLine = true)
 {
     ConsoleWindow.Text += text + (newLine ? Environment.NewLine : string.Empty);
     ConsoleScrollViewer.ScrollToBottom();
 }