| 44 |
|
|
| 45 |
var |
var |
| 46 |
Form1: TForm1; |
Form1: TForm1; |
| 47 |
|
|
| 48 |
const |
const |
| 49 |
max = 30; |
max = 30; |
| 50 |
|
|
| 73 |
if Count mod 10 = 0 then |
if Count mod 10 = 0 then |
| 74 |
begin |
begin |
| 75 |
if Count >= max div 5 then |
if Count >= max div 5 then |
| 76 |
Label1.Text := IntToStr(ListBox1.Items.Count - i) + |
Label1.Text := Count.ToString + '回目です。そろそろリーチやビンゴの方いませんか?'; |
|
'回目です。そろそろリーチやビンゴの方いませんか?'; |
|
| 77 |
ListBox1.Items.Insert(0, '----- -----'); |
ListBox1.Items.Insert(0, '----- -----'); |
| 78 |
end; |
end; |
| 79 |
ListBox1.ScrollBy(0, ListBox1.Height); |
ListBox1.ScrollBy(0, ListBox1.Height); |
| 81 |
|
|
| 82 |
procedure TForm1.FormCreate(Sender: TObject); |
procedure TForm1.FormCreate(Sender: TObject); |
| 83 |
begin |
begin |
| 84 |
Label7.Text:=Format(Label7.Text,[max]); |
Label7.Text := Format(Label7.Text, [max]); |
| 85 |
end; |
end; |
| 86 |
|
|
| 87 |
procedure TForm1.MenuItem2Click(Sender: TObject); |
procedure TForm1.MenuItem2Click(Sender: TObject); |
| 127 |
for i := 1 to max do |
for i := 1 to max do |
| 128 |
temp.Add(IntToStr(i)); |
temp.Add(IntToStr(i)); |
| 129 |
Randomize; |
Randomize; |
| 130 |
prt.Canvas.Font.Size:=font; |
prt.Canvas.font.size := font; |
| 131 |
for i := 1 to 5 do |
for i := 1 to 5 do |
| 132 |
for j := 1 to 5 do |
for j := 1 to 5 do |
| 133 |
begin |
begin |
| 136 |
(j + 1) * size), temp[k], false, 1, [], TTextAlign.Center); |
(j + 1) * size), temp[k], false, 1, [], TTextAlign.Center); |
| 137 |
temp.Delete(k); |
temp.Delete(k); |
| 138 |
end; |
end; |
| 139 |
prt.Canvas.font.size := Label1.TextSettings.Font.Size; |
prt.Canvas.font.size := Label1.TextSettings.font.size; |
| 140 |
prt.Canvas.FillText(RectF(font, 7 * size, 8 * size, 7 * size), |
prt.Canvas.FillText(RectF(font, 7 * size, 8 * size, 7 * size), |
| 141 |
'読み上げられた数字を囲んでください。', false, 1, [], TTextAlign.Leading); |
'読み上げられた数字を囲んでください。', false, 1, [], TTextAlign.Leading); |
| 142 |
end; |
end; |
| 144 |
begin |
begin |
| 145 |
if Form2.ShowModal = mrOK then |
if Form2.ShowModal = mrOK then |
| 146 |
begin |
begin |
| 147 |
{ |
{ |
| 148 |
if (prt is TPrinter)and(prt.Printing = true) then |
if (prt is TPrinter)and(prt.Printing = true) then |
| 149 |
begin |
begin |
| 150 |
Showmessage('印刷中です。お待ちください。'); |
Showmessage('印刷中です。お待ちください。'); |
| 151 |
Exit; |
Exit; |
| 152 |
end; |
end; |
| 153 |
} |
} |
| 154 |
temp := TStringList.Create; |
temp := TStringList.Create; |
| 155 |
try |
try |
| 156 |
prt:=Printer; |
prt := Printer; |
| 157 |
prt.ActivePrinter.SelectDPI(300, 300); |
prt.ActivePrinter.SelectDPI(300, 300); |
| 158 |
prt.Orientation:=TPrinterOrientation.poPortrait; |
prt.Orientation := TPrinterOrientation.poPortrait; |
| 159 |
prt.Canvas.SetSize(Floor(4.13*prt.ActivePrinter.ActiveDPI.X), Floor(5.83*prt.ActivePrinter.ActiveDPI.Y)); |
prt.Canvas.SetSize(Floor(4.13 * prt.ActivePrinter.ActiveDPI.X), |
| 160 |
|
Floor(5.83 * prt.ActivePrinter.ActiveDPI.Y)); |
| 161 |
k := 1; |
k := 1; |
| 162 |
prt.BeginDoc; |
prt.BeginDoc; |
| 163 |
while True do |
while True do |