本文整理汇总了C++中TStringList::SaveToStream方法的典型用法代码示例。如果您正苦于以下问题:C++ TStringList::SaveToStream方法的具体用法?C++ TStringList::SaveToStream怎么用?C++ TStringList::SaveToStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TStringList
的用法示例。
在下文中一共展示了TStringList::SaveToStream方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TMemoryStream
//.........这里部分代码省略.........
{ShowMessage("Не указан ''Срок реализации''...");}
if (Trim(QListCommentsPrognozEffects->AsString)=="")
{ShowMessage("Не указан ''Прогноз эффективности''...");}
if (Trim(QListCommentsGrantingConditions->AsString)=="")
{ShowMessage("Не указаны ''Условия скидки''...");}
//конец балета - занавес
return;
}
///Проверка дробности цены
QNE->Close();
QNE->Parameters->Items[0]->Value=IdRasp;
QNE->Open();
QNE->First();
while(QNE->Eof==false)
{if((((QNECostWithNDS->AsCurrency*100)%1)>0)||(((QNECostWithoutNDS->AsCurrency*100)%1)>0))
{ShowMessage("Сохранение невозможно. \n Сперва приведите значения цен с НДС и без НДС для номенклатурных единиц к целым копейкам."); return; }
QNE->Next();}
///////////////////////////
/////Запись текста письма в БД
vsSQLQw = "DECLARE @IdRasp int, @PermisHdr int;"//, @MailPathAddFiles text, @MailText text ; " //Нельзя создавать переменную типа text
" SET @IdRasp =:D0; SET @PermisHdr =:D1;"// SET @MailPathAddFiles =:D2; SET @MailText =:D3; "
" UPDATE bm_ListMail SET MailPathAddFiles=:D2, MailText=:D3, DateMod=GetDate(), IdMod= @PermisHdr WHERE [email protected] ";
Qw->Close();
Qw->SQL->Clear();
Qw->SQL->Add(vsSQLQw);
Qw->Parameters->Items[0]->Value = IdRasp;
Qw->Parameters->Items[1]->Value = PermisHdr.KeyUserStartProgramm;
LS->Clear();
pms->Position=0;
LS->SaveToStream(pms);
pms->Position=0;
Qw->Parameters->Items[2]->LoadFromStream(pms,ftMemo);
pms->Clear();
pms->Position=0;
reContentRTF->Lines->SaveToStream(pms);
pms->Position=0;
Qw->Parameters->Items[3]->LoadFromStream(pms,ftMemo);
pms->Clear();
Qw->ExecSQL();
Qw->Close();
LS->Clear();
RzPanel300->Visible=true;
rMail=MainForm->CreateMail(IdRasp,1);
///// рассылаем распоряжение лицам с минимальным порядком очереди fTyrn, но не 0
vsSQLQw=" SELECT MIN(fTurn) FROM bm_ListMail"
" WHERE DateDel is null"
" AND IdRasp=:D0"
" AND ( fType=0 OR fType=2) "
" AND fTurn>0"
" AND (fResault=0 OR fResault is NULL )";
Qw->Close();Qw->SQL->Clear();Qw->SQL->Add(vsSQLQw);
Qw->Parameters->Items[0]->Value= IdRasp;
Qw->Open();
viTmpMINfTurn=Qw->Fields->Fields[0]->AsInteger;
QEmplUserDol2->First();
while((QEmplUserDol2->Eof==false))
{
if ((Trim(QEmplUserDol2Mail->AsString) != "") && (QEmplUserDol2fTurn->AsInteger == viTmpMINfTurn))
{
示例2: DateTimeToStr
//.........这里部分代码省略.........
}
//ディレクトリ
else{
DirPath = ExtractFileDir(FileList->Strings[i]);
FileName = ExtractFileName(FileList->Strings[i]);
ProgressMsgText = FileName; //処理中のファイル名
//トップディレクトリ
GetFileInfoList(Index, DirPath, FileName, FileList->Strings[i], FilePathList, HeaderDataList);
//その配下
AllTotalFileSize +=
GetFileInfoList(Index, FileList->Strings[i], "", FileList->Strings[i], FilePathList, HeaderDataList);
}
//ユーザーキャンセル
if (Terminated == true) {
delete HeaderDataList;
return(false);
}
}// end for;
//進捗状況表示
ProgressPercentNum = -1;
//'ヘッダデータを書き込んでいます...'
ProgressStatusText = LoadResourceString(&Msgencrypt::_LABEL_STATUS_TITLE_ENCRYPTING_LIST);
ProgressMsgText = "";
//メモリストリームへ書き込み
tpms = new TMemoryStream;
//------------------------------------------------
// 暗号化時にヘッダデータの互換性維持
//---------------------------------------------------
HeaderDataList->SaveToStream(tpms, TEncoding::GetEncoding(932));
//新バージョン(ver.2.8.0~)用(UTF-8)に保存
for (i = 0; i < HeaderDataList->Count; i++) {
HeaderDataList->Strings[i] = StringReplace(HeaderDataList->Strings[i],"Fn_","U_",TReplaceFlags()<<rfIgnoreCase );
}
HeaderDataList->SaveToStream(tpms, TEncoding::UTF8);
delete HeaderDataList;
//-----------------------------------
//ヘッダ情報の暗号化
//-----------------------------------
//暗号化の準備
gentables();
//キー入力
gkey( 8, 8, key);
for (i = 0; i < BUF_SIZE; i++) {
buffer[i] = 0;
}
//初期化ベクトル(IV)を生成
fillrand(chain_buffer, BUF_SIZE);
pms->Write(chain_buffer, BUF_SIZE);
//先頭にポインタを戻す
tpms->Seek((__int64)0, TSeekOrigin::soBeginning);
EncryptHeaderSize = 0;
//CBCモードで書き込む
while (tpms->Read( buffer, BUF_SIZE ) != NULL){