dzharii / swd-recorder

Selenium WebDriver Page Recorder (Page Objects)
MIT License
189 stars 71 forks source link

Async to background worker conversion / fix #37

Closed sergueik closed 9 years ago

sergueik commented 9 years ago

Async background worker modifications and project reference allowing one to develop the project on Windows Server 2003 / VS 2010 Express or SharpDevelop 4.4

NOTE: this commit fixes the error with InvokeRequired.

Please make sure README.md or .gitignore is not overwritten

dzharii commented 9 years ago

That was a little bit complicated but I have merged this pull request to master. Please, check the new changes in master to ensure if I did everything right.

@sergueik Don't worry if you'll break something in master.

The only change I've did inside your pull request:

Comments:

Good, you are using .InvokeRequired, please use this helper:

.DoInvokeAction( () => { Do some stuff with . }) C:!Personal\projects_current\swd-recorder-master\SwdPageRecorder\SwdPageRecorder.UI\SwdMain\Tabs\PlayGroundView.cs: ``` internal void AppendConsole(string text) { ``` <<<<<<< HEAD (mine; already in the master) - ``` txtConsole.DoInvokeAction(() => txtConsole.AppendText(text));* ``` ======= (yours) ``` if (this.txtConsole.InvokeRequired) { SetTextCallback d = new ``` SetTextCallback(txtConsole.AppendText); this.Invoke(d, new object[] { text }); } else { txtConsole.AppendText(text); } > > > > > > > 5d4a2c2e60fcceea087e6064771dc50b3718816e ``` } ``` Best, Dima On Sat, Jul 11, 2015 at 5:35 PM, Serguei Kouzmine notifications@github.com wrote: > Async background worker modifications and project reference allowing one > to develop the project on Windows Server 2003 / VS 2010 Express or > SharpDevelop 4.4 > > NOTE: this commit fixes the error with InvokeRequired. > > ## Please make sure README.md or .gitignore is not overwritten > > You can view, comment on, or merge this pull request online at: > > https://github.com/dzharii/swd-recorder/pull/37 > Commit Summary > - fix control accessed from a thread other than the thread it was > created on error > - ensure the project is compatible with windows 2003 / visual studio > 2010 express > - rollback the undesired merge > > File Changes > - _M_ README.md > https://github.com/dzharii/swd-recorder/pull/37/files#diff-0 (61) > - _M_ > SwdPageRecorder/SwdPageRecorder.Tests/SwdPageRecorder.Tests.csproj > https://github.com/dzharii/swd-recorder/pull/37/files#diff-1 (3) > - _M_ SwdPageRecorder/SwdPageRecorder.UI/SwdMain/Tabs/PlayGroundView.cs > https://github.com/dzharii/swd-recorder/pull/37/files#diff-2 (22) > - _M_ SwdPageRecorder/SwdPageRecorder.UI/SwdPageRecorder.UI.csproj > https://github.com/dzharii/swd-recorder/pull/37/files#diff-3 (4) > - _M_ > SwdPageRecorder/SwdPageRecorder.WebDriver/SwdPageRecorder.WebDriver.csproj > https://github.com/dzharii/swd-recorder/pull/37/files#diff-4 (1) > > Patch Links: > - https://github.com/dzharii/swd-recorder/pull/37.patch > - https://github.com/dzharii/swd-recorder/pull/37.diff > > — > Reply to this email directly or view it on GitHub > https://github.com/dzharii/swd-recorder/pull/37.