Posts

Showing posts from April 1, 2019

WPF C# HTMLDocument variables automatically updates

Image
1 So I am trying to compare two HTMLDocuments to see if there are any changes in the website using a DispatchTimer(). Here is my code: HTMLDocument lastDoc; public void startTimer() { lastDoc = (HTMLDocument)Form.RosterBrowser.Document; DispatcherTimer dispatcherTimer = new DispatcherTimer(); dispatcherTimer.Tick += dispatcherTimer_Tick; dispatcherTimer.Interval = new TimeSpan(0, 0, 2); dispatcherTimer.Start(); } private void dispatcherTimer_Tick(object sender, EventArgs e) { var thisDoc = (HTMLDocument)Form.RosterBrowser.Document; LogTextBlockControl.Text += "DOCUMENT THIS: " + thisDoc.getElementById("groupList").innerText.Length.ToString(); LogTextBlockControl.Text += "DOCUMENT LAST:...