MagistrAnatol
Silver Member | Редактировать | Профиль | Сообщение | ICQ | Цитировать | Сообщить модератору void __fastcall TfrmMain::FormCreate(TObject *Sender) { SaveState->Name=System::Ioutils::TPath::GetFileNameWithoutExtension(ParamStr(0)); SaveState->StoragePath = System::Ioutils::TPath::GetHomePath(); TBinaryReader *R = new TBinaryReader(SaveState->Stream, TEncoding::UTF8, false); if (SaveState->Stream->Size >0) { TJSONObject *jObj = static_cast<TJSONObject*>(TJSONObject::ParseJSONValue(R->ReadString())); TJSONObject *jItem = static_cast<TJSONObject*>(jObj->Get("Edit1")->JsonValue); Edit1->Text = jItem->Get("data")->JsonValue->Value(); } R->Free(); } //--------------------------------------------------------------------------- |