summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--raetsel.lps76
-rw-r--r--raetselunit.pas50
2 files changed, 76 insertions, 50 deletions
diff --git a/raetsel.lps b/raetsel.lps
index b1ae6c0..70cd541 100644
--- a/raetsel.lps
+++ b/raetsel.lps
@@ -9,7 +9,7 @@
<IsPartOfProject Value="True"/>
<EditorIndex Value="2"/>
<CursorPos X="30" Y="19"/>
- <UsageCount Value="84"/>
+ <UsageCount Value="85"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
@@ -18,8 +18,8 @@
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
- <CursorPos Y="16"/>
- <UsageCount Value="84"/>
+ <CursorPos X="18" Y="25"/>
+ <UsageCount Value="85"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
@@ -32,16 +32,16 @@
<UnitName Value="Unit2"/>
<EditorIndex Value="-1"/>
<CursorPos X="11" Y="27"/>
- <UsageCount Value="83"/>
+ <UsageCount Value="84"/>
</Unit2>
<Unit3>
<Filename Value="raetselunit.pas"/>
<IsPartOfProject Value="True"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
- <TopLine Value="186"/>
- <CursorPos X="22" Y="190"/>
- <UsageCount Value="78"/>
+ <TopLine Value="402"/>
+ <CursorPos Y="431"/>
+ <UsageCount Value="79"/>
<Loaded Value="True"/>
</Unit3>
<Unit4>
@@ -50,7 +50,7 @@
<EditorIndex Value="6"/>
<TopLine Value="443"/>
<CursorPos X="51" Y="456"/>
- <UsageCount Value="64"/>
+ <UsageCount Value="65"/>
<Loaded Value="True"/>
</Unit4>
<Unit5>
@@ -162,121 +162,121 @@
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="raetselunit.pas"/>
- <Caret Line="532" Column="11" TopLine="505"/>
+ <Caret Line="1173" Column="26" TopLine="1146"/>
</Position1>
<Position2>
<Filename Value="raetselunit.pas"/>
- <Caret Line="546" Column="13" TopLine="519"/>
+ <Caret Line="1174" Column="44" TopLine="1147"/>
</Position2>
<Position3>
<Filename Value="raetselunit.pas"/>
- <Caret Line="578" Column="11" TopLine="552"/>
+ <Caret Line="1178" Column="46" TopLine="1151"/>
</Position3>
<Position4>
<Filename Value="raetselunit.pas"/>
- <Caret Line="587" Column="11" TopLine="560"/>
+ <Caret Line="1182" Column="25" TopLine="1155"/>
</Position4>
<Position5>
<Filename Value="raetselunit.pas"/>
- <Caret Line="726" Column="11" TopLine="699"/>
+ <Caret Line="65" Column="31" TopLine="50"/>
</Position5>
<Position6>
<Filename Value="raetselunit.pas"/>
- <Caret Line="861" Column="37" TopLine="835"/>
+ <Caret Line="763" Column="28" TopLine="745"/>
</Position6>
<Position7>
<Filename Value="raetselunit.pas"/>
- <Caret Line="105" Column="32" TopLine="89"/>
</Position7>
<Position8>
<Filename Value="raetselunit.pas"/>
- <Caret Line="763" Column="14" TopLine="753"/>
+ <Caret Line="76" Column="23" TopLine="49"/>
</Position8>
<Position9>
<Filename Value="raetselunit.pas"/>
- <Caret Line="65" Column="31" TopLine="50"/>
+ <Caret Line="118" Column="23" TopLine="91"/>
</Position9>
<Position10>
<Filename Value="raetselunit.pas"/>
- <Caret Line="763" Column="28" TopLine="736"/>
+ <Caret Line="353" Column="11" TopLine="326"/>
</Position10>
<Position11>
- <Filename Value="raetselunit.inc"/>
- <Caret Line="15" Column="15"/>
+ <Filename Value="raetselunit.pas"/>
+ <Caret Line="383" Column="13" TopLine="356"/>
</Position11>
<Position12>
<Filename Value="raetselunit.pas"/>
- <Caret Line="1173" Column="26" TopLine="1146"/>
+ <Caret Line="400" Column="13" TopLine="373"/>
</Position12>
<Position13>
<Filename Value="raetselunit.pas"/>
- <Caret Line="1174" Column="44" TopLine="1147"/>
+ <Caret Line="532" Column="11" TopLine="505"/>
</Position13>
<Position14>
<Filename Value="raetselunit.pas"/>
- <Caret Line="1178" Column="46" TopLine="1151"/>
+ <Caret Line="546" Column="13" TopLine="519"/>
</Position14>
<Position15>
<Filename Value="raetselunit.pas"/>
- <Caret Line="1182" Column="25" TopLine="1155"/>
+ <Caret Line="578" Column="11" TopLine="552"/>
</Position15>
<Position16>
<Filename Value="raetselunit.pas"/>
- <Caret Line="65" Column="31" TopLine="50"/>
+ <Caret Line="587" Column="11" TopLine="560"/>
</Position16>
<Position17>
<Filename Value="raetselunit.pas"/>
- <Caret Line="763" Column="28" TopLine="745"/>
+ <Caret Line="726" Column="11" TopLine="699"/>
</Position17>
<Position18>
<Filename Value="raetselunit.pas"/>
+ <Caret Line="819" Column="59" TopLine="800"/>
</Position18>
<Position19>
<Filename Value="raetselunit.pas"/>
- <Caret Line="76" Column="23" TopLine="49"/>
</Position19>
<Position20>
- <Filename Value="raetselunit.pas"/>
- <Caret Line="118" Column="23" TopLine="91"/>
+ <Filename Value="unit1.pas"/>
+ <Caret Line="25" Column="18"/>
</Position20>
<Position21>
<Filename Value="raetselunit.pas"/>
- <Caret Line="353" Column="11" TopLine="326"/>
+ <Caret Line="43" Column="17" TopLine="23"/>
</Position21>
<Position22>
<Filename Value="raetselunit.pas"/>
- <Caret Line="383" Column="13" TopLine="356"/>
+ <Caret Line="249" Column="32" TopLine="227"/>
</Position22>
<Position23>
<Filename Value="raetselunit.pas"/>
- <Caret Line="400" Column="13" TopLine="373"/>
+ <Caret Line="58" Column="29" TopLine="42"/>
</Position23>
<Position24>
<Filename Value="raetselunit.pas"/>
- <Caret Line="532" Column="11" TopLine="505"/>
+ <Caret Line="249" Column="38" TopLine="223"/>
</Position24>
<Position25>
<Filename Value="raetselunit.pas"/>
- <Caret Line="546" Column="13" TopLine="519"/>
+ <Caret Line="43" Column="17" TopLine="25"/>
</Position25>
<Position26>
<Filename Value="raetselunit.pas"/>
- <Caret Line="578" Column="11" TopLine="552"/>
+ <Caret Line="260" Column="38" TopLine="240"/>
</Position26>
<Position27>
<Filename Value="raetselunit.pas"/>
- <Caret Line="587" Column="11" TopLine="560"/>
+ <Caret Line="360" Column="11" TopLine="343"/>
</Position27>
<Position28>
<Filename Value="raetselunit.pas"/>
- <Caret Line="726" Column="11" TopLine="699"/>
+ <Caret Line="417" Column="14" TopLine="403"/>
</Position28>
<Position29>
<Filename Value="raetselunit.pas"/>
- <Caret Line="819" Column="59" TopLine="800"/>
+ <Caret Line="56" Column="29" TopLine="40"/>
</Position29>
<Position30>
<Filename Value="raetselunit.pas"/>
+ <Caret Line="229" Column="38" TopLine="202"/>
</Position30>
</JumpHistory>
<RunParams>
diff --git a/raetselunit.pas b/raetselunit.pas
index b78b37b..6271188 100644
--- a/raetselunit.pas
+++ b/raetselunit.pas
@@ -41,7 +41,8 @@ type
speichernBtn,
ladenBtn,
druckenBtn: tButtonWithArrowKeys;
- zufallSE: tSpinEdit;
+ zufallSE,
+ druckenSE: tSpinEdit;
progressBar1: tProgressBar;
aktuelleFarbe: tColor;
function besitzerHoehe: longint; dynamic;
@@ -241,9 +242,19 @@ begin
ladenBtn.caption:='Laden!';
ladenBtn.onClick:=@ladenOnClick;
ladenBtn.onKeyDown:=@onKeyDown;
+ druckenSE:=tSpinEdit.create(besitzer);
+ druckenSE.parent:=besitzer;
+ druckenSE.left:=ladenBtn.left+ladenBtn.width+spacing;
+ druckenSE.top:=spacing;
+ druckenSE.value:=1;
+ druckenSE.minValue:=0;
+ druckenSE.maxValue:=65536;
+ druckenSE.showHint:=true;
+ druckenSE.hint:='Anzahl zu druckender Rätsel';
+ druckenSE.onKeyDown:=@onKeyDown;
druckenBtn:=tButtonWithArrowKeys.create(besitzer);
druckenBtn.parent:=besitzer;
- druckenBtn.left:=ladenBtn.left+ladenBtn.width+spacing;
+ druckenBtn.left:=druckenSE.left+druckenSE.width+spacing;
druckenBtn.top:=spacing;
druckenBtn.caption:='Drucken!';
druckenBtn.onClick:=@druckenOnClick;
@@ -390,19 +401,34 @@ procedure tRaetsel.druckenOnClick(sender: tObject);
var
safePictureDialog1: tSavePictureDialog;
img: tImage;
+ stamm,suffix,name: string;
+ i: longint;
begin
safePictureDialog1:=TSavePictureDialog.create(besitzer);
if safePictureDialog1.execute then begin
- img:=zeichenFlaeche;
- zeichenFlaeche:=tImage.create(img.parent);
- zeichenFlaeche.width:=img.width;
- zeichenFlaeche.height:=img.height;
- zeichenFlaeche.canvas.font.size:=img.canvas.font.size;
- zeichnen(false);
- zeichenFlaeche.picture.saveToFile(safePictureDialog1.fileName);
- zeichenFlaeche.free;
- zeichenFlaeche:=img;
- img:=nil;
+ suffix:=safePictureDialog1.fileName;
+ while pos('.',suffix)>0 do
+ delete(suffix,1,pos('.',suffix));
+ suffix:='.' + suffix;
+ stamm:=copy(safePictureDialog1.fileName,1,length(safePictureDialog1.fileName)-length(suffix));
+ for i:=1 to druckenSE.value do begin
+ if i>1 then
+ erzeugeOnClick(sender);
+ img:=zeichenFlaeche;
+ zeichenFlaeche:=tImage.create(img.parent);
+ zeichenFlaeche.width:=img.width;
+ zeichenFlaeche.height:=img.height;
+ zeichenFlaeche.canvas.font.size:=img.canvas.font.size;
+ zeichnen(false);
+ if druckenSE.value>1 then
+ name:=stamm + '_' + intToStr(i) + suffix
+ else
+ name:=stamm + suffix;
+ zeichenFlaeche.picture.saveToFile(name);
+ zeichenFlaeche.free;
+ zeichenFlaeche:=img;
+ img:=nil;
+ end;
end;
safePictureDialog1.free;
end;