Changeset 18
- Timestamp:
- Sep 27, 2011, 3:49:24 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UMainForm.lfm
r16 r18 8 8 ClientWidth = 514 9 9 Menu = MainMenu1 10 OnClose = FormClose 10 11 OnCreate = FormCreate 11 12 OnDeactivate = FormDeactivate 13 OnDestroy = FormDestroy 12 14 OnKeyDown = FormKeyDown 13 15 OnKeyUp = FormKeyUp 14 16 OnShow = FormShow 15 17 LCLVersion = '0.9.31' 16 WindowState = wsMaximized17 18 object StatusBar1: TStatusBar 18 19 Left = 0 -
trunk/UMainForm.pas
r16 r18 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, 9 ComCtrls, Menus, ActnList, UCore, UPlatform, Math, DateUtils, GraphType; 9 ComCtrls, Menus, ActnList, UCore, UPlatform, Math, DateUtils, GraphType, 10 UPersistentForm, UApplicationInfo; 10 11 11 12 type … … 39 40 procedure AShowMapExecute(Sender: TObject); 40 41 procedure AShowRawImageDescExecute(Sender: TObject); 42 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 41 43 procedure FormCreate(Sender: TObject); 42 44 procedure FormDeactivate(Sender: TObject); 45 procedure FormDestroy(Sender: TObject); 43 46 procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); 44 47 procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); … … 55 58 Drawing: Boolean; 56 59 public 57 { public declarations }60 PersistentForm: TPersistentForm; 58 61 end; 59 62 … … 96 99 procedure TMainForm.FormCreate(Sender: TObject); 97 100 begin 101 PersistentForm := TPersistentForm.Create; 102 PersistentForm.RegistryKey := '\Software\' + ApplicationInfo.CompanyName + '\' + ApplicationInfo.Name; 103 98 104 Application.OnDeactivate := FormDeactivate; 99 105 Randomize; … … 138 144 begin 139 145 Engine.KeyBoard.ClearAll; 146 end; 147 148 procedure TMainForm.FormDestroy(Sender: TObject); 149 begin 150 PersistentForm.Free; 140 151 end; 141 152 … … 178 189 179 190 procedure TMainForm.AShowRawImageDescExecute(Sender: TObject); 180 var 181 List: TStringList; 182 begin 183 with Image1.Picture.Bitmap.RawImage, Description do 184 try 185 List := TStringList.Create; 186 with List do begin 187 Add('Format: ' + RawImageColorFormatNames[Format]); 188 Add('Width: ' + IntToStr(Width)); 189 Add('Height: ' + IntToStr(Height)); 190 Add('Depth: ' + IntToStr(Depth)); 191 Add('BitOrder: ' + RawImageBitOrderNames[BitOrder]); 192 Add('ByteOrder: ' + RawImageByteOrderNames[ByteOrder]); 193 Add('LineOrder: ' + RawImageLineOrderNames[LineOrder]); 194 Add('LineEnd: ' + RawImageLineEndNames[LineEnd]); 195 Add('BitsPerPixel: ' + IntToStr(BitsPerPixel)); 196 Add('RedPrec: ' + IntToStr(RedPrec)); 197 Add('RedShift: ' + IntToStr(RedShift)); 198 Add('GreenPrec: ' + IntToStr(GreenPrec)); 199 Add('GreenShift: ' + IntToStr(GreenShift)); 200 Add('BluePrec: ' + IntToStr(BluePrec)); 201 Add('BlueShift: ' + IntToStr(BlueShift)); 202 Add('AlphaPrec: ' + IntToStr(AlphaPrec)); 203 Add('AlphaShift: ' + IntToStr(AlphaShift)); 204 end; 205 ShowMessage(List.Text); 206 finally 207 List.Free; 208 end; 191 begin 192 ShowMessage(Image1.Picture.Bitmap.RawImage.Description.AsString); 193 end; 194 195 procedure TMainForm.FormClose(Sender: TObject; var CloseAction: TCloseAction); 196 begin 197 PersistentForm.Save(Self); 209 198 end; 210 199 … … 229 218 procedure TMainForm.FormShow(Sender: TObject); 230 219 begin 220 PersistentForm.Load(Self); 231 221 end; 232 222 -
trunk/tunneler.lpi
r16 r18 33 33 <Item1> 34 34 <PackageName Value="LCLBase"/> 35 <MinVersion Major="1" Release="1" Valid="True"/>35 <MinVersion Major="1" Valid="True" Release="1"/> 36 36 </Item1> 37 37 <Item2> … … 42 42 </Item3> 43 43 </RequiredPackages> 44 <Units Count="5 3">44 <Units Count="59"> 45 45 <Unit0> 46 46 <Filename Value="tunneler.lpr"/> … … 50 50 <TopLine Value="1"/> 51 51 <CursorPos X="15" Y="4"/> 52 <UsageCount Value="8 3"/>52 <UsageCount Value="85"/> 53 53 </Unit0> 54 54 <Unit1> … … 59 59 <UnitName Value="UMainForm"/> 60 60 <IsVisibleTab Value="True"/> 61 <EditorIndex Value=" 4"/>62 <WindowIndex Value="0"/> 63 <TopLine Value=" 190"/>64 <CursorPos X=" 1" Y="206"/>65 <UsageCount Value="8 3"/>61 <EditorIndex Value="5"/> 62 <WindowIndex Value="0"/> 63 <TopLine Value="89"/> 64 <CursorPos X="48" Y="102"/> 65 <UsageCount Value="85"/> 66 66 <Loaded Value="True"/> 67 67 <LoadedDesigner Value="True"/> … … 73 73 <EditorIndex Value="0"/> 74 74 <WindowIndex Value="0"/> 75 <TopLine Value="8 85"/>76 <CursorPos X=" 40" Y="895"/>77 <UsageCount Value="8 3"/>75 <TopLine Value="878"/> 76 <CursorPos X="32" Y="395"/> 77 <UsageCount Value="85"/> 78 78 <Loaded Value="True"/> 79 79 </Unit2> … … 135 135 <UnitName Value="Graphics"/> 136 136 <WindowIndex Value="0"/> 137 <TopLine Value="1 433"/>138 <CursorPos X=" 3" Y="1449"/>139 <UsageCount Value=" 5"/>137 <TopLine Value="1314"/> 138 <CursorPos X="42" Y="1327"/> 139 <UsageCount Value="10"/> 140 140 </Unit10> 141 141 <Unit11> … … 261 261 <ResourceBaseClass Value="Form"/> 262 262 <UnitName Value="UMapForm"/> 263 <EditorIndex Value=" 3"/>263 <EditorIndex Value="4"/> 264 264 <WindowIndex Value="0"/> 265 265 <TopLine Value="6"/> 266 266 <CursorPos X="20" Y="39"/> 267 <UsageCount Value="6 2"/>267 <UsageCount Value="64"/> 268 268 <Loaded Value="True"/> 269 269 </Unit27> … … 392 392 <IsPartOfProject Value="True"/> 393 393 <UnitName Value="UPlatform"/> 394 <UsageCount Value="4 2"/>394 <UsageCount Value="44"/> 395 395 </Unit44> 396 396 <Unit45> … … 437 437 <IsPartOfProject Value="True"/> 438 438 <UnitName Value="URectangle"/> 439 <EditorIndex Value=" 2"/>439 <EditorIndex Value="3"/> 440 440 <WindowIndex Value="0"/> 441 441 <TopLine Value="120"/> 442 442 <CursorPos X="44" Y="150"/> 443 <UsageCount Value="2 7"/>443 <UsageCount Value="29"/> 444 444 <Loaded Value="True"/> 445 445 </Unit50> … … 454 454 <Filename Value="../../FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/> 455 455 <UnitName Value="GraphType"/> 456 <WindowIndex Value="0"/> 457 <TopLine Value="520"/> 458 <CursorPos X="35" Y="531"/> 459 <UsageCount Value="11"/> 460 </Unit52> 461 <Unit53> 462 <Filename Value="Common/UPersistentForm.pas"/> 463 <IsPartOfProject Value="True"/> 464 <UnitName Value="UPersistentForm"/> 456 465 <EditorIndex Value="1"/> 457 466 <WindowIndex Value="0"/> 458 <TopLine Value="66"/> 459 <CursorPos X="20" Y="79"/> 467 <TopLine Value="69"/> 468 <CursorPos X="3" Y="90"/> 469 <UsageCount Value="22"/> 470 <Loaded Value="True"/> 471 </Unit53> 472 <Unit54> 473 <Filename Value="UApplicationInfo.pas"/> 474 <IsPartOfProject Value="True"/> 475 <UnitName Value="UApplicationInfo"/> 476 <EditorIndex Value="2"/> 477 <WindowIndex Value="0"/> 478 <TopLine Value="42"/> 479 <CursorPos X="29" Y="58"/> 480 <UsageCount Value="22"/> 481 <Loaded Value="True"/> 482 </Unit54> 483 <Unit55> 484 <Filename Value="Common/URegistry.pas"/> 485 <IsPartOfProject Value="True"/> 486 <UnitName Value="URegistry"/> 487 <UsageCount Value="21"/> 488 </Unit55> 489 <Unit56> 490 <Filename Value="../../FreePascalManager/trunk/Instance/1/FPC/rtl/objpas/sysutils/sysstrh.inc"/> 491 <WindowIndex Value="0"/> 492 <TopLine Value="71"/> 493 <CursorPos X="10" Y="84"/> 460 494 <UsageCount Value="10"/> 461 <Loaded Value="True"/> 462 </Unit52> 495 </Unit56> 496 <Unit57> 497 <Filename Value="../../FreePascalManager/trunk/Instance/1/FPC/rtl/objpas/sysutils/sysstr.inc"/> 498 <WindowIndex Value="0"/> 499 <TopLine Value="167"/> 500 <CursorPos X="3" Y="169"/> 501 <UsageCount Value="10"/> 502 </Unit57> 503 <Unit58> 504 <Filename Value="../../FreePascalManager/trunk/Instance/1/Lazarus/lcl/include/rasterimage.inc"/> 505 <WindowIndex Value="0"/> 506 <TopLine Value="466"/> 507 <CursorPos X="17" Y="470"/> 508 <UsageCount Value="10"/> 509 </Unit58> 463 510 </Units> 464 <JumpHistory Count=" 25" HistoryIndex="24">511 <JumpHistory Count="16" HistoryIndex="15"> 465 512 <Position1> 466 <Filename Value="U Core.pas"/>467 <Caret Line="1 02" Column="1" TopLine="72"/>513 <Filename Value="UMainForm.pas"/> 514 <Caret Line="191" Column="29" TopLine="175"/> 468 515 </Position1> 469 516 <Position2> 470 <Filename Value="U Core.pas"/>471 <Caret Line=" 420" Column="8" TopLine="391"/>517 <Filename Value="UMainForm.pas"/> 518 <Caret Line="188" Column="5" TopLine="180"/> 472 519 </Position2> 473 520 <Position3> 474 <Filename Value="U Core.pas"/>475 <Caret Line=" 379" Column="42" TopLine="361"/>521 <Filename Value="UMainForm.pas"/> 522 <Caret Line="191" Column="45" TopLine="181"/> 476 523 </Position3> 477 524 <Position4> 478 <Filename Value=" UCore.pas"/>479 <Caret Line=" 453" Column="17" TopLine="433"/>525 <Filename Value="Common/UPersistentForm.pas"/> 526 <Caret Line="90" Column="3" TopLine="69"/> 480 527 </Position4> 481 528 <Position5> 482 <Filename Value="U Core.pas"/>483 <Caret Line=" 480" Column="88" TopLine="447"/>529 <Filename Value="UMainForm.pas"/> 530 <Caret Line="10" Column="36" TopLine="1"/> 484 531 </Position5> 485 532 <Position6> 486 <Filename Value="U Core.pas"/>487 <Caret Line=" 521" Column="66" TopLine="496"/>533 <Filename Value="UMainForm.pas"/> 534 <Caret Line="99" Column="54" TopLine="86"/> 488 535 </Position6> 489 536 <Position7> 490 <Filename Value="U Core.pas"/>491 <Caret Line=" 935" Column="26" TopLine="924"/>537 <Filename Value="UMainForm.pas"/> 538 <Caret Line="46" Column="30" TopLine="29"/> 492 539 </Position7> 493 540 <Position8> 494 <Filename Value="U Core.pas"/>495 <Caret Line=" 895" Column="40" TopLine="885"/>541 <Filename Value="UMainForm.pas"/> 542 <Caret Line="147" Column="22" TopLine="145"/> 496 543 </Position8> 497 544 <Position9> 498 <Filename Value=" ../../FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/>499 <Caret Line=" 189" Column="31" TopLine="176"/>545 <Filename Value="UMainForm.pas"/> 546 <Caret Line="246" Column="1" TopLine="229"/> 500 547 </Position9> 501 548 <Position10> 502 549 <Filename Value="UMainForm.pas"/> 503 <Caret Line="2 8" Column="90" TopLine="19"/>550 <Caret Line="230" Column="63" TopLine="220"/> 504 551 </Position10> 505 552 <Position11> 506 <Filename Value="U MainForm.pas"/>507 <Caret Line=" 29" Column="90" TopLine="20"/>553 <Filename Value="UCore.pas"/> 554 <Caret Line="895" Column="41" TopLine="882"/> 508 555 </Position11> 509 556 <Position12> 510 <Filename Value="U MainForm.pas"/>511 <Caret Line=" 30" Column="90" TopLine="21"/>557 <Filename Value="UCore.pas"/> 558 <Caret Line="895" Column="39" TopLine="888"/> 512 559 </Position12> 513 560 <Position13> 514 <Filename Value="U MainForm.pas"/>515 <Caret Line=" 31" Column="90" TopLine="21"/>561 <Filename Value="UCore.pas"/> 562 <Caret Line="947" Column="36" TopLine="924"/> 516 563 </Position13> 517 564 <Position14> 518 <Filename Value="U MainForm.pas"/>519 <Caret Line="8 " Column="30" TopLine="1"/>565 <Filename Value="UCore.pas"/> 566 <Caret Line="895" Column="40" TopLine="876"/> 520 567 </Position14> 521 568 <Position15> 522 <Filename Value="U MainForm.pas"/>523 <Caret Line=" 181" Column="46" TopLine="179"/>569 <Filename Value="UCore.pas"/> 570 <Caret Line="894" Column="24" TopLine="876"/> 524 571 </Position15> 525 572 <Position16> 526 <Filename Value=" ../../FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/>527 <Caret Line="1 89" Column="28" TopLine="176"/>573 <Filename Value="UCore.pas"/> 574 <Caret Line="151" Column="25" TopLine="138"/> 528 575 </Position16> 529 <Position17>530 <Filename Value="UMainForm.pas"/>531 <Caret Line="188" Column="25" TopLine="180"/>532 </Position17>533 <Position18>534 <Filename Value="../../FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/>535 <Caret Line="66" Column="23" TopLine="53"/>536 </Position18>537 <Position19>538 <Filename Value="../../FreePascalManager/trunk/Instance/1/Lazarus/lcl/graphtype.pp"/>539 <Caret Line="114" Column="33" TopLine="93"/>540 </Position19>541 <Position20>542 <Filename Value="UMainForm.pas"/>543 <Caret Line="183" Column="45" TopLine="180"/>544 </Position20>545 <Position21>546 <Filename Value="UMainForm.pas"/>547 <Caret Line="187" Column="43" TopLine="180"/>548 </Position21>549 <Position22>550 <Filename Value="UMainForm.pas"/>551 <Caret Line="183" Column="46" TopLine="174"/>552 </Position22>553 <Position23>554 <Filename Value="UMainForm.pas"/>555 <Caret Line="9" Column="74" TopLine="1"/>556 </Position23>557 <Position24>558 <Filename Value="UMainForm.pas"/>559 <Caret Line="191" Column="29" TopLine="175"/>560 </Position24>561 <Position25>562 <Filename Value="UMainForm.pas"/>563 <Caret Line="188" Column="5" TopLine="180"/>564 </Position25>565 576 </JumpHistory> 566 577 </ProjectOptions> -
trunk/tunneler.lpr
r11 r18 8 8 {$ENDIF}{$ENDIF} 9 9 Interfaces, // this includes the LCL widgetset 10 Forms, UMainForm, UCore, TemplateGenerics, UMapForm, UPlatform, URectangle 10 Forms, UMainForm, UCore, TemplateGenerics, UMapForm, UPlatform, 11 UApplicationInfo, URectangle, UPersistentForm, URegistry 11 12 { you can add units after this }; 12 13
Note:
See TracChangeset
for help on using the changeset viewer.