Browse Source

Ensure the window handle is created before using the main form as SynchronizeInvoke. Might fix forum-8974.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3792 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 17 years ago
parent
commit
43733a4944
  1. 2
      src/Main/Base/Project/Src/Gui/WorkbenchSingleton.cs

2
src/Main/Base/Project/Src/Gui/WorkbenchSingleton.cs

@ -104,6 +104,7 @@ namespace ICSharpCode.SharpDevelop.Gui
Project.CustomToolsService.Initialize(); Project.CustomToolsService.Initialize();
Project.BuildModifiedProjectsOnlyService.Initialize(); Project.BuildModifiedProjectsOnlyService.Initialize();
workbench.MainForm.CreateControl(); // ensure the control is created so Invoke can work
WinFormsMessageService.DialogOwner = workbench.MainForm; WinFormsMessageService.DialogOwner = workbench.MainForm;
WinFormsMessageService.DialogSynchronizeInvoke = workbench.MainForm; WinFormsMessageService.DialogSynchronizeInvoke = workbench.MainForm;
@ -327,6 +328,7 @@ namespace ICSharpCode.SharpDevelop.Gui
t.Interval = delayMilliseconds; t.Interval = delayMilliseconds;
t.Tick += delegate { t.Tick += delegate {
t.Stop(); t.Stop();
t.Dispose();
method(); method();
}; };
t.Start(); t.Start();

Loading…
Cancel
Save