void EffectSprite3D::addEffect(Effect3DOutline* effect, ssize_t order) { if(nullptr == effect) return; effect->retain(); _effects.push_back(std::make_tuple(order,effect,CustomCommand())); std::sort(std::begin(_effects), std::end(_effects), tuple_sort); }
int CFileZillaApi::Command(t_command *pCommand) { //Check if call allowed if (!m_bInitialized) return FZ_REPLY_NOTINITIALIZED; //Dispatch command to command specific functions switch(pCommand->id) { case FZ_COMMAND_LIST: if (pCommand->param1!=_MPT("")) return List(pCommand->path,pCommand->param1,pCommand->param4); else if (!pCommand->path.IsEmpty()) return List(pCommand->path,pCommand->param4); else return List(pCommand->param4); break; case FZ_COMMAND_CONNECT: return Connect(pCommand->server); break; case FZ_COMMAND_DISCONNECT: return Disconnect(); break; case FZ_COMMAND_FILETRANSFER: return FileTransfer(pCommand->transferfile); break; case FZ_COMMAND_DELETE: return Delete(pCommand->param1, pCommand->path); break; case FZ_COMMAND_REMOVEDIR: return RemoveDir(pCommand->param1, pCommand->path); break; case FZ_COMMAND_MAKEDIR: return MakeDir(pCommand->path); break; case FZ_COMMAND_RENAME: return Rename(pCommand->param1, pCommand->param2, pCommand->path, pCommand->newPath); break; case FZ_COMMAND_CUSTOMCOMMAND: return CustomCommand(pCommand->param1); break; case FZ_COMMAND_CHMOD: return Chmod(pCommand->param4, pCommand->param1, pCommand->path); break; } return FZ_REPLY_INVALIDPARAM; }
void GreenChrome() { // exe路径 wchar_t exePath[MAX_PATH]; GetModuleFileNameW(NULL, exePath, MAX_PATH); // exe所在文件夹 wchar_t exeFolder[MAX_PATH]; wcscpy(exeFolder, exePath); PathRemoveFileSpecW(exeFolder); // 生成默认ini文件 wchar_t iniPath[MAX_PATH]; ReleaseIni(exeFolder, iniPath); // 读取配置 ReadConfig(iniPath); // 启动单次功能 bool first_run = OnceFeature(iniPath); // 自定义用户数据目录 CustomUserData(iniPath); // 打造便携版chrome MakePortable(iniPath); // 给resources.pak打补丁 PatchResourcesPak(iniPath); // 标签页,书签,地址栏增强 TabBookmark(); // 父进程不是Chrome,则需要启动追加参数功能 wchar_t parentPath[MAX_PATH]; if (GetParentPath(parentPath)) { if (PathFileExistsW(parentPath) && _wcsicmp(parentPath, exePath) != 0) { CustomCommand(iniPath, exeFolder, exePath, first_run); } } else { DebugLog(L"GetParentPath failed"); } }