MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / OnClosing

Method OnClosing

Source/Editor/GUI/Dialogs/Dialog.cs:183–208  ·  view source on GitHub ↗
(ClosingReason reason, ref bool cancel)

Source from the content-addressed store, hash-verified

181 }
182
183 private void OnClosing(ClosingReason reason, ref bool cancel)
184 {
185 // Check if can close window
186 if (CanCloseWindow(reason))
187 {
188 if (reason == ClosingReason.User)
189 _result = DialogResult.Cancel;
190
191 // Clean up
192 _window = null;
193
194 // Check if any thread is blocked during ShowDialog, then wait for it
195 bool wait = true;
196 while (wait)
197 {
198 wait = Interlocked.Read(ref _isWaitingForDialog) > 0;
199 Thread.Sleep(1);
200 }
201
202 // Close window
203 return;
204 }
205
206 // Suppress closing
207 cancel = true;
208 }
209
210 private void OnClosed()
211 {

Callers

nothing calls this directly

Calls 2

ReadMethod · 0.45
SleepMethod · 0.45

Tested by

no test coverage detected