private void OnGetRecordList(DataReader dataReader) { int recordsTotal = 0; int recordsCount = 0; dataReader.Read(ref recordsTotal); dataReader.Read(ref recordsCount); ArrayList records = new ArrayList(); for (int i = 0; i < recordsCount; ++i) { RecordDescription desc = new RecordDescription(); dataReader.Read(ref desc.recordID); dataReader.Read(ref desc.realityID); dataReader.Read(ref desc.duration); dataReader.ReadUnicode(ref desc.name); dataReader.ReadUnicode(ref desc.author); dataReader.ReadUnicode(ref desc.creationTime); dataReader.ReadUnicode(ref desc.location); dataReader.ReadUnicode(ref desc.lesson); dataReader.ReadUnicode(ref desc.description); dataReader.ReadUnicode(ref desc.URL); records.Add(desc); } Program.context.recordController.RecordsList = records; }
public void Set(RecordDescription apDescription) { if (apDescription == null) { return; } // ID записи recordID = apDescription.recordID; // реальность realityID = apDescription.realityID; // продолжительность duration = apDescription.duration; // название записи name = apDescription.name; // автор author = apDescription.author; // время создания creationTime = apDescription.creationTime; // локация location = apDescription.location; // занятие lesson = apDescription.lesson; // описание description = apDescription.description; // URL URL = apDescription.URL; }
private void Save(RecordDescription desc) { /*DataWriter data = new DataWriter(); * data.AddData(desc.author); * data.AddData(desc.creationTime); * data.AddData(desc.name); * data.AddData(desc.description); * * DataWriter outCommand = new DataWriter(); * outCommand.AddData(Command.CMD_SAVE); * outCommand.AddData((int)data.GetSize()); * outCommand.AddData(data.GetData(), data.GetSize()); * * Program.context.pipeConnector.addOutCommand(outCommand);*/ }
private void OnGetRecordInfo(DataReader dataReader) { RecordDescription desc = new RecordDescription(); dataReader.Read(ref desc.recordID); dataReader.Read(ref desc.realityID); dataReader.Read(ref desc.duration); dataReader.ReadUnicode(ref desc.name); dataReader.ReadUnicode(ref desc.author); dataReader.ReadUnicode(ref desc.creationTime); dataReader.ReadUnicode(ref desc.location); dataReader.ReadUnicode(ref desc.lesson); dataReader.ReadUnicode(ref desc.description); dataReader.ReadUnicode(ref desc.URL); Program.context.recordController.UpdateRecordInfo(desc); // m_recordEditor.OpenRecord(desc.URL); }
private void OnGetRecordInfo(DataReader dataReader) { RecordDescription desc = new RecordDescription(); dataReader.Read(ref desc.recordID); dataReader.Read(ref desc.realityID); dataReader.Read(ref desc.duration); dataReader.ReadUnicode(ref desc.name); dataReader.ReadUnicode(ref desc.author); dataReader.ReadUnicode(ref desc.creationTime); dataReader.ReadUnicode(ref desc.location); dataReader.ReadUnicode(ref desc.lesson); dataReader.ReadUnicode(ref desc.description); dataReader.ReadUnicode(ref desc.URL); m_recordEditor.OpenRecord(desc.URL); // labelDurationValue.Text = Convert.ToString(desc.duration); }