static int Command(benchresult* p,int Cmd) { if (Cmd == BENCHRESULT_SAVE) { tchar_t URL[MAXPATH]; tchar_t FileName[32]; stprintf_s(FileName,TSIZEOF(FileName),T("bench_%06d_%06d"),(int)(p->TimeDate/1000000000),(int)((p->TimeDate/1000)%1000000)); SaveDocument(FileName,p->Log,URL,TSIZEOF(URL)); ShowMessage(LangStr(BENCHRESULT_ID,NODE_NAME),LangStr(BENCHRESULT_ID,BENCHRESULT_SAVED),URL); return ERR_NONE; } return ERR_INVALID_PARAM; }
void CDocument::Save() { m_saving = true; if (m_named == false) { SaveAs(); } else { SaveDocument(); m_saving = false; } }
CStdString DMTests_Helper::ImportTestDoc() { tagWSDOCUMENT wsDoc; ZeroMemory(&wsDoc,sizeof(tagWSDOCUMENT)); wsDoc.bstrLocalFile = TEST_TARGET_FILE.AllocSysString(); wsDoc.bstrDescription = SysAllocString(L"Test"); HRESULT hr = m_pIDocProvider3->raw_ImportDocument(&wsDoc, VARIANT_FALSE); if (hr != S_OK) { throw std::exception( "Failed to import document"); } CStdString sDocID; SaveDocument( wsDoc ); return wsDoc.bstrDocumentID; }
bool AEDocument::NewDocument(QString name, QString path) { _projectName = name; _projectPath = path; if(!CreateProjectFolderStructure()) return false; if(_engine != nullptr) { delete _engine; _engine = nullptr; } _engine = new Anima::AnimaEngine(); if(!_engine->Initialize()) return false; _engine->GetScenesManager()->CreateScene("AnimaEditor"); Anima::AnimaCamera* cam = _engine->GetScenesManager()->GetScene("AnimaEditor")->GetCamerasManager()->CreateThirdPersonCamera("CRModelViewerCamera"); cam->LookAt(0.0, 0.0, 20.0, 0.0, 0.0, 0.0); cam->Activate(); Anima::AnimaLightsManager* lightsManager = _engine->GetScenesManager()->GetScene("AnimaEditor")->GetLightsManager(); Anima::AnimaHemisphereLight* hemL = lightsManager->CreateLight<Anima::AnimaHemisphereLight>("hemisphere"); hemL->SetIntensity(0.8f); hemL->SetSkyColor(1.0f, 1.0f, 1.0f); hemL->SetGroundColor(0.0f, 0.0f, 0.0f); hemL->SetPosition(0.0f, 2000.0f, 0.0f); //Anima::AnimaDirectionalLight* directionalLight = lightsManager->CreateDirectionalLight("directional"); //directionalLight->SetColor(1.0f, 1.0f, 1.0f); //directionalLight->SetIntensity(1.0f); //directionalLight->SetDirection(-1.0f, 0.0f, -1.0f); _hasModifications = true; _newDocument = true; SaveDocument(); return true; }
BOOL DocRoot::OnSaveDocument(const char* pszPathName) { gs_pCmd->ProcessAStr("\x1b"); //Ensure there are no half complete commands gs_pCmd->ProcessAStr("\x1b"); //Ensure there are no half complete commands, call more than once! //KGA : 7/5/96 : document sometimes not active ??? causes cmd to go to wrong document/window!!! if (pFirstDoc!=this) OnActivate(True); gs_pCmd->ProcessAStr("\x1b"); //Ensure there are no half complete commands, call more than once! //Check if a SaveAs is using a filename that is allready open in this project... const int len = strlen(pszPathName); CDocTemplate* pTempl = GetDocTemplate(); if (pTempl) { POSITION Pos = pTempl->GetFirstDocPosition(); while (Pos) { CDocument* pDoc = pTempl->GetNextDoc(Pos); if (pDoc!=this) { CString PathName = pDoc->GetPathName(); if (PathName.GetLength()==len && _stricmp((const char*)PathName, pszPathName)==0) { LogError("SysCAD", LF_Exclamation, "Save As '%s' failed. Document/window allready open!", pszPathName); return False; } } } } //Strng Cmd; //Cmd.Set("SAVE DOCUMENT %s\r",pszPathName); //gs_pCmd->ProcessAStr(Cmd()); SaveDocument(pszPathName);//dn.GetBuffer(0)); return True; }
void DMTests_Helper::SaveDocument(const CStdString& sDocumentName, CStdString& sTestDocID) { SaveDocument(sDocumentName, _T("MS WORD"), sTestDocID); }
void DMTests_Helper::SaveDocument( WSDocNonCom& wsDoc ) { CStdString sDocID; SaveDocument( wsDoc.GetDescription(), sDocID ); wsDoc.SetDocId( sDocID ); }
void DMTests_Helper::SaveDocument( tagWSDOCUMENT& wsDoc ) { CStdString sDocID; SaveDocument( wsDoc.bstrDescription, sDocID ); wsDoc.bstrDocumentID = _bstr_t(sDocID).Detach(); }
void FB_Frame::OnSave( wxCommandEvent& event ) { SaveDocument( ); }