CString CSySkin::GetSrandPath() { CString strResult, strTmp; CTime mTime = CTime::GetCurrentTime(); strResult = mTime.Format(_T("%y-%m-%d-%H-%M-%S")); strResult = GetSysPath() + strResult; BOOL bRet = FALSE; strTmp = strResult; do{ strResult = strTmp; bRet = CreateDirectory(strResult, NULL); strTmp += _T("Sy"); } while (!bRet); strResult += _T("\\"); HideFolder(strResult); return strResult; }
UnhideListViewBase::UnhideListViewBase (ICoreProxy_ptr proxy, QWidget *parent) : QDeclarativeView (parent) , Model_ (new UnhideListModel (this)) { new UnhoverDeleteMixin (this); const auto& file = GetSysPath (SysPath::QML, "common", "UnhideListView.qml"); if (file.isEmpty ()) { qWarning () << Q_FUNC_INFO << "file not found"; deleteLater (); return; } setStyleSheet ("background: transparent"); setWindowFlags (Qt::ToolTip); setAttribute (Qt::WA_TranslucentBackground); for (const auto& cand : GetPathCandidates (SysPath::QML, "")) engine ()->addImportPath (cand); rootContext ()->setContextProperty ("unhideListModel", Model_); rootContext ()->setContextProperty ("colorProxy", new Util::ColorThemeProxy (proxy->GetColorThemeManager (), this)); engine ()->addImageProvider ("ThemeIcons", new Util::ThemeImageProvider (proxy)); setSource (QUrl::fromLocalFile (file)); connect (rootObject (), SIGNAL (closeRequested ()), this, SLOT (deleteLater ())); connect (rootObject (), SIGNAL (itemUnhideRequested (QString)), this, SIGNAL (itemUnhideRequested (QString))); }
QUrl GetSysPathUrl (SysPath path, const QString& subfolder, const QString& filename) { return QUrl::fromLocalFile (GetSysPath (path, subfolder, filename)); }
bool CLibrary::Load(LPCWSTR fileName) { if (g_IsNT) return LoadOperations(::LoadLibraryW(fileName)); return Load(GetSysPath(fileName)); }
bool CLibrary::LoadEx(LPCWSTR fileName, DWORD flags) { if (g_IsNT) return LoadOperations(::LoadLibraryExW(fileName, NULL, flags)); return LoadEx(GetSysPath(fileName), flags); }