//--------------------------------------------------------------------------- void __fastcall TSelectMaskDialog::FormCloseQuery(TObject * /*Sender*/, bool & /*CanClose*/) { if (ModalResult == DefaultResult(this)) { if (MaskEdit->Focused()) { MaskEditExit(NULL); } } }
//--------------------------------------------------------------------------- void __fastcall TFileFindDialog::Start() { if (MaskEdit->Focused()) { MaskEditExit(NULL); } RemoteDirectoryEdit->SaveToHistory(); CustomWinConfiguration->History[L"RemoteDirectory"] = RemoteDirectoryEdit->Items; MaskEdit->SaveToHistory(); WinConfiguration->History[L"Mask"] = MaskEdit->Items; WinConfiguration->SelectMask = MaskEdit->Text; assert(FState != ffFinding); FState = ffFinding; try { UpdateControls(); Repaint(); TOperationVisualizer Visualizer; assert(FOnFind != NULL); FDirectory = UnixExcludeTrailingBackslash(RemoteDirectoryEdit->Text); FOnFind(FDirectory, MaskEdit->Text, FileFound, FindingFile); } __finally { FFindingInDirectory = L""; if (FState == ffFinding) { FState = ffDone; } if (FState == ffAborting) { FState = ffAborted; } if (IsApplicationMinimized() && FMinimizedByMe) { ShowNotification(NULL, LoadStr(BALLOON_OPERATION_COMPLETE), qtInformation); FMinimizedByMe = false; } UpdateControls(); } }