Показать сообщение отдельно
Старый 25.12.2005, 21:02   #2
pax
Unity/C# кодер
 
Аватар для pax
 
Регистрация: 03.10.2005
Адрес: Россия, Рязань
Сообщений: 7,568
Написано 3,006 полезных сообщений
(для 5,323 пользователей)
Справку читать надо
Для этого используется Record store (хранилище записей)

вот пример из справки:
var rs    : recordStore; 
  countStr : string; 
  countInt : integer; 
  index  : integer; 
  nextId  :integer; 
begin 
 rs := OpenRecordStore('Count'); 
  
 nextId := GetRecordStoreNextId(rs); 
  
 // Если это первый запуск программы, то инициализация
 if nextId = 1 then 
  index := AddRecordStoreEntry(rs, '0'); // кол-во записей равно нулю 
  
 // чтение кол-ва запусков программы
 countStr := ReadRecordStoreEntry(rs, 1);    
  
 // увеличение на один 
 countInt := StringToInteger(countStr) + 1; 
 countStr := IntegerToString(countInt); 
  
 // сохранение
 ModifyRecordStoreEntry(rs, countStr, 1); 
  
 // закрытие record store 
 CloseRecordStore(rs);  
  
 // отображение кол-ва запусков
 ShowForm; 
 index := FormAddString('Number of runs: ' + countStr); 
  
 AddCommand(CreateCommand('Exit', CM_EXIT, 1));  
 repeat Delay(100) until GetClickedCommand <> EmptyCommand; 

end.
__________________
Blitz3d to Unity Wiki
(Offline)
 
Ответить с цитированием