2 instantiations of ThreadContext
System.Windows.Forms (2)
winforms\Managed\System\WinForms\Application.cs (2)
3048
context = new
ThreadContext
();
3064
context = new
ThreadContext
();
85 references to ThreadContext
System.Windows.Forms (85)
winforms\Managed\System\WinForms\Application.cs (65)
116
return
ThreadContext
.FromCurrent().GetAllowQuit();
127
return
ThreadContext
.FromCurrent().ComponentManager.FContinueIdle();
348
return
ThreadContext
.FromCurrent().CustomThreadExceptionHandlerAttached;
429
return
ThreadContext
.FromCurrent().GetMessageLoop();
595
ThreadContext
.FromCurrent().RegisterMessageLoop(callback);
660
ThreadContext
.FromCurrent().RegisterMessageLoop(null);
863
ThreadContext
.FromCurrent().AddMessageFilter(value);
884
bool processed =
ThreadContext
.FromCurrent().ProcessFilters(ref msg, out modified);
904
ThreadContext
current =
ThreadContext
.FromCurrent();
914
ThreadContext
current =
ThreadContext
.FromCurrent();
931
ThreadContext
current =
ThreadContext
.FromCurrent();
938
ThreadContext
current =
ThreadContext
.FromCurrent();
955
ThreadContext
current =
ThreadContext
.FromCurrent();
962
ThreadContext
current =
ThreadContext
.FromCurrent();
978
ThreadContext
current =
ThreadContext
.FromCurrent();
984
ThreadContext
current =
ThreadContext
.FromCurrent();
1014
ThreadContext
.FromCurrent().BeginModalMessageLoop(null);
1023
ThreadContext
.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopDoEvents, null);
1029
ThreadContext
.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopDoEventsModal, null);
1076
ThreadContext
.FromCurrent().EndModalMessageLoop(null);
1139
ThreadContext
.ExitApplication();
1162
ThreadContext
context =
ThreadContext
.FromCurrent();
1178
ThreadContext
.FromCurrent().FormActivated(activated);
1241
private static
ThreadContext
GetContextForHandle(HandleRef handle) {
1245
ThreadContext
cxt =
ThreadContext
.FromId(id);
1311
ThreadContext
cxt = GetContextForHandle(handle);
1324
ThreadContext
cxt =
ThreadContext
.FromCurrent();
1337
return
ThreadContext
.FromCurrent().OleRequired();
1345
ThreadContext
.FromCurrent().OnThreadException(t);
1355
ThreadContext
cxt = GetContextForHandle(handle);
1372
ThreadContext
current =
ThreadContext
.FromCurrent();
1384
ThreadContext
.FromCurrent().RemoveMessageFilter(value);
1486
ThreadContext
.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopMain, new ApplicationContext());
1495
ThreadContext
.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopMain, new ApplicationContext(mainForm));
1506
ThreadContext
.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopMain, context);
1517
ThreadContext
.FromCurrent().RunMessageLoop(NativeMethods.MSOCM.msoloopModalForm, new ModalApplicationContext(form));
2122
Application.
ThreadContext
.FromCurrent().DisposeThreadWindows();
2336
private static
ThreadContext
currentThreadContext;
2970
ThreadContext
[] ctxs = new
ThreadContext
[contextHash.Values.Count];
3044
internal static
ThreadContext
FromCurrent() {
3045
ThreadContext
context = currentThreadContext;
3061
internal static
ThreadContext
FromId(int id) {
3062
ThreadContext
context = (
ThreadContext
)contextHash[(object)id];
4150
Application.
ThreadContext
ctx = Application.
ThreadContext
.FromId(id);
4155
!Object.ReferenceEquals(ctx, Application.
ThreadContext
.FromCurrent())) {
4289
Control activatingControl = Application.
ThreadContext
.FromCurrent().ActivatingControl;
4326
private
ThreadContext
parentWindowContext;
4328
private delegate void ThreadWindowCallback(
ThreadContext
context, bool onlyWinForms);
4377
private void DisableThreadWindowsCallback(
ThreadContext
context, bool onlyWinForms) {
4381
private void EnableThreadWindowsCallback(
ThreadContext
context, bool onlyWinForms) {
winforms\Managed\System\WinForms\Control.cs (3)
1245
Application.
ThreadContext
.FromCurrent().ActivatingControl = (value) ? this : null;
4402
Application.
ThreadContext
ctx = Application.
ThreadContext
.FromId(threadId);
winforms\Managed\System\WinForms\NativeWindow.cs (2)
177
Application.
ThreadContext
ctx = Application.
ThreadContext
.FromId(id);
winforms\Managed\System\WinForms\ToolStrip.cs (5)
2127
Application.
ThreadContext
.FromCurrent().RemoveMessageFilter(restoreFocusFilter);
3469
Application.
ThreadContext
.FromCurrent().RemoveMessageFilter(RestoreFocusFilter);
4088
Application.
ThreadContext
.FromCurrent().RemoveMessageFilter(RestoreFocusFilter);
4753
Application.
ThreadContext
.FromCurrent().AddMessageFilter(RestoreFocusFilter);
5187
Application.
ThreadContext
.FromCurrent().RemoveMessageFilter(this);
winforms\Managed\System\WinForms\ToolStripComboBox.cs (2)
525
Application.
ThreadContext
.FromCurrent().RemoveMessageFilter(ParentInternal.RestoreFocusFilter);
535
Application.
ThreadContext
.FromCurrent().RemoveMessageFilter(ParentInternal.RestoreFocusFilter);
winforms\Managed\System\WinForms\ToolStripManager.cs (6)
859
Application.
ThreadContext
.FromCurrent().AddMessageFilter(this);
860
Application.
ThreadContext
.FromCurrent().TrackInput(true);
862
if (!Application.
ThreadContext
.FromCurrent().GetMessageLoop(true)) {
908
Application.
ThreadContext
.FromCurrent().RemoveMessageFilter(this);
909
Application.
ThreadContext
.FromCurrent().TrackInput(false);
1433
if (Application.
ThreadContext
.FromCurrent().PreTranslateMessage(ref *msg)) {
winforms\Managed\System\WinForms\WindowsFormsSynchronizationContext.cs (2)
39
Application.
ThreadContext
context = Application.
ThreadContext
.FromCurrent();