2009年7月20日月曜日

FileAge

procedure TFMForm.Properties1Click(Sender: TObject); //AION シエル RMT
var

Attributes, NewAttributes: Word;
begin
with FileAttrForm do
begin
FileDirName.Caption := FileList.Items[FileList.ItemIndex];
{ set box caption }
PathName.Caption := FileList.Directory;
{ show directory name }
ChangeDate.Caption :=
DateTimeToStr(FileDateToDateTime(FileAge(FileList.FileName)));
Attributes := FileGetAttr(FileDirName.Caption);
{ read file attributes }
ReadOnly.Checked := (Attributes and SysUtils.faReadOnly) = faReadOnly;
Archive.Checked := (Attributes and faArchive) = faArchive;
System.Checked := (Attributes and faSysFile) = faSysFile;
Hidden.Checked := (Attributes and faHidden) = faHidden;
if ShowModal <> id_Cancel then { execute dialog box }
begin
NewAttributes := Attributes;
{ start with original attributes }
if ReadOnly.Checked then
NewAttributes := NewAttributes or SysUtils.faReadOnly
else
NewAttributes := NewAttributes and not SysUtils.faReadOnly;
if Archive.Checked then
NewAttributes := NewAttributes or faArchive
else
NewAttributes := NewAttributes and not faArchive;
if System.Checked then
NewAttributes := NewAttributes or faSysFile
else
NewAttributes := NewAttributes and not faSysFile;
if Hidden.Checked then
NewAttributes := NewAttributes or faHidden
else
NewAttributes := NewAttributes and not faHidden;
if NewAttributes <> Attributes then { if anything changed... }
FileSetAttr(FileDirName.Caption, NewAttributes);
{ ...write the new values }
end;
end;
end;

2009年7月13日月曜日

コオロギ

最近は地味にセカンドキャラのスキル上げしています。 //アイオン(AION) 掲示板

ポルドペロ郊外で調達しながら
保管上げしていたときに気づいたこと。



コオロギ 分類:家畜

東洋で娯楽道具として珍重される昆虫。
薬にも用いられる。



は?娯楽道具?薬?
はじめて知るコオロギの情報にびっくりしたので
wikipediaで調べてみました。

コオロギ - Wikipedia

日本ではコオロギは「枕草子」より以前から
趣のある泣き声に愛玩物として親しまれていた。
これは今も一緒ですよね。

東南アジアでは「民間療法」として薬用されている。
「民間療法」程度で根拠はないのかな?

中国では闘蟋(とうしつ/ドゥオシイ)と呼ばれ、
秋にコオロギのオス同士を喧嘩させて楽しむ伝統的昆虫相撲競技がある。
これが娯楽道具ってことなのかな?
映画「ラストエンペラー」でも闘蟋のシーンあるらしい。
昔見たけど覚えてないなぁ。

DOLではペットの餌としての扱いですが、
実際にコオロギは繁殖しやすく雑食なためにコスト面で管理、飼育がしやすく
肉食動物用の飼育餌として販売されているらしい。



ちなみに分類が「家畜」ですが

か‐ちく【家畜】
人間の生活に役立たせる目的で飼育される動物。

なので調達で手に入れたのは野性なので厳密には違いますよね

2009年7月10日金曜日

PtSetRecord

with Adodataset do //AION ネザカン RMT
begin //AION(アイオン) 溜まり場
commandtext:='select * from '+TableName; //アイオン(AION)
prepared;
open;
Result:=true;
end;
except
on exception do
Result:=false;
end;