| 29 | } |
| 30 | |
| 31 | void dialog::OpenPleaseWait(Plugin *workPlugin, const wchar_t *titleText, const wchar_t *messageText, bool withCancel) |
| 32 | { |
| 33 | if (s_currentDialog != CURRENT_DIALOG_NONE) |
| 34 | return; |
| 35 | |
| 36 | bool isMainThread = thread::ThreadIDCache::Check(); |
| 37 | |
| 38 | paf::wstring title = titleText; |
| 39 | paf::wstring message = messageText; |
| 40 | |
| 41 | if (!isMainThread) |
| 42 | thread::RMutex::MainThreadMutex()->Lock(); |
| 43 | |
| 44 | if (withCancel) |
| 45 | s_currentDialog = CommonGuiDialog::Dialog::Show(workPlugin, &title, &message, &CommonGuiDialog::Param::s_dialogCancelBusy, CommonGuiEventHandler, NULL); |
| 46 | else |
| 47 | s_currentDialog = CommonGuiDialog::Dialog::Show(workPlugin, &title, &message, &CommonGuiDialog::Param::s_dialogTextSmallBusy, CommonGuiEventHandler, NULL); |
| 48 | |
| 49 | s_currentPlugin = workPlugin; |
| 50 | |
| 51 | if (!isMainThread) |
| 52 | thread::RMutex::MainThreadMutex()->Unlock(); |
| 53 | } |
| 54 | |
| 55 | void dialog::OpenYesNo(Plugin *workPlugin, const wchar_t *titleText, const wchar_t *messageText) |
| 56 | { |