| 28 | 
   | 
     procedure DrawImage(index: Integer); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 29 | 
   | 
     procedure SetBitmapCount(Count: Integer); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 30 | 
   | 
     procedure LoadImage(fileid, index: Integer); | 
 
 
 
 
 
 
 
 
 | 31 | 
 + | 
     procedure Splitter1Moved(Sender: TObject); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 32 | 
   | 
   private | 
 
 
 
 
 
 
 
 
 
 
 
 | 33 | 
 < | 
     bitmaps:   array of TBitmap; | 
 
 
 
 
 
 
 
 
 
 | 33 | 
 > | 
     bitmaps:   array of TOniImage; | 
 
 
 
 
 
 
 
 
 
 
 
 | 34 | 
   | 
     actualimg: Byte; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 35 | 
   | 
     _fileid:   Integer; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 36 | 
   | 
   public | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 41 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 42 | 
   | 
 implementation | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 43 | 
   | 
 {$R *.dfm} | 
 
 
 
 
 
 
 
 
 | 44 | 
 + | 
 uses Imaging, ImagingComponents, ImagingTypes, jpeg; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 45 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 46 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 47 | 
   | 
 procedure TForm_Preview.FormCreate(Sender: TObject); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 48 | 
   | 
 begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 49 | 
   | 
   inherited; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 50 | 
   | 
   Self.OnNewFileSelected := NewFile; | 
 
 
 
 
 
 
 
 
 | 51 | 
 + | 
   SetBitmapCount(0); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 52 | 
   | 
 end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 53 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 54 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 57 | 
   | 
   ext: String; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 58 | 
   | 
 begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 59 | 
   | 
   _fileid := fileinfo.ID; | 
 
 
 
 
 
 
 
 
 | 60 | 
 + | 
   SetBitmapCount(0); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 61 | 
   | 
   if _fileid >= 0 then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 62 | 
   | 
   begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 63 | 
   | 
     lbl_notpossible.Visible := False; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 86 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 87 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 88 | 
   | 
 procedure TForm_Preview.LoadImage(fileid, index: Integer); | 
 
 
 
 
 
 
 
 
 
 | 85 | 
 – | 
 var | 
 
 
 
 
 
 
 
 
 
 | 86 | 
 – | 
   memstream: TMemoryStream; | 
 
 
 
 
 
 
 
 
 
 | 87 | 
 – | 
   OniImage:  TOniImage; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 89 | 
   | 
 begin | 
 
 
 
 
 
 
 
 
 
 
 
 | 90 | 
 < | 
   OniImage := TOniImage.Create; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 90 | 
 < | 
   OniImage.Load(ConnectionID, fileid); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 91 | 
 < | 
   memstream := TMemoryStream.Create; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 92 | 
 < | 
   OniImage.GetAsBMP(TStream(memstream)); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 93 | 
 < | 
   OniImage.Free; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 94 | 
 < | 
   bitmaps[index].LoadFromStream(memstream); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 95 | 
 < | 
   memstream.Free; | 
 
 
 
 
 
 
 
 
 
 | 90 | 
 > | 
   bitmaps[index].Load(ConnectionID, fileid); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 91 | 
   | 
 end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 92 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 93 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 94 | 
   | 
 procedure TForm_Preview.DrawImage(index: Integer); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 95 | 
   | 
 begin | 
 
 
 
 
 
 
 
 
 
 
 
 | 96 | 
 < | 
   BitBlt(img.Canvas.Handle, 0, 0, img.Width, img.Height, | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 102 | 
 < | 
     bitmaps[index].Canvas.Handle, 0, 0, WHITENESS); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 103 | 
 < | 
   BitBlt(img.Canvas.Handle, 0, 0, bitmaps[index].Width, bitmaps[index].Height, | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 104 | 
 < | 
     bitmaps[index].Canvas.Handle, 0, 0, SRCCOPY); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 105 | 
 < | 
   img.Invalidate; | 
 
 
 
 
 
 
 
 
 
 | 96 | 
 > | 
   bitmaps[index].DrawOnCanvas(img.Canvas, 1); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 97 | 
   | 
 end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 98 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 99 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 112 | 
   | 
     i := Length(bitmaps); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 113 | 
   | 
     SetLength(bitmaps, Count); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 114 | 
   | 
     for i := i to High(bitmaps) do | 
 
 
 
 
 
 
 
 
 
 
 
 | 115 | 
 < | 
       bitmaps[i] := TBitmap.Create; | 
 
 
 
 
 
 
 
 
 
 | 115 | 
 > | 
       bitmaps[i] := TOniImage.Create; | 
 
 
 
 
 
 
 
 
 
 
 
 | 116 | 
   | 
   end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 117 | 
   | 
 end; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 118 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 119 | 
   | 
  | 
 
 
 
 
 
 
 
 
 | 120 | 
 + | 
 procedure TForm_Preview.Splitter1Moved(Sender: TObject); | 
 
 
 
 
 
 
 
 
 | 121 | 
 + | 
 begin | 
 
 
 
 
 
 
 
 
 | 122 | 
 + | 
   inherited; | 
 
 
 
 
 
 
 
 
 | 123 | 
 + | 
   img.Picture.Assign(nil); | 
 
 
 
 
 
 
 
 
 | 124 | 
 + | 
   if Length(bitmaps) > 0 then | 
 
 
 
 
 
 
 
 
 | 125 | 
 + | 
     DrawImage(0); | 
 
 
 
 
 
 
 
 
 | 126 | 
 + | 
 end; | 
 
 
 
 
 
 
 
 
 | 127 | 
 + | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 128 | 
   | 
 procedure TForm_Preview.PreviewImage; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 129 | 
   | 
 begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 130 | 
   | 
   SetBitmapCount(1); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 136 | 
   | 
 procedure TForm_Preview.PreviewTXAN; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 137 | 
   | 
 var | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 138 | 
   | 
   loop_speed: Word; | 
 
 
 
 
 
 
 
 
 
 
 
 | 139 | 
 < | 
   linkcount: LongWord; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 140 | 
 < | 
   link: LongWord; | 
 
 
 
 
 
 
 
 
 
 | 139 | 
 > | 
   linkcount: Integer; | 
 
 
 
 
 
 | 140 | 
 > | 
   link: Integer; | 
 
 
 
 
 
 
 
 
 
 
 
 | 141 | 
   | 
   i:    Byte; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 142 | 
   | 
 begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 143 | 
   | 
   ConManager.Connection[ConnectionID].LoadDatFilePart(_fileid, $14, SizeOf(loop_speed), @loop_speed); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 170 | 
   | 
   Self.timer.Enabled   := not Self.timer.Enabled; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 171 | 
   | 
   Self.btn_dec.Enabled := not Self.timer.Enabled; | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 172 | 
   | 
   Self.btn_inc.Enabled := not Self.timer.Enabled; | 
 
 
 
 
 
 
 
 
 | 173 | 
 + | 
   if self.timer.Enabled then | 
 
 
 
 
 
 
 
 
 | 174 | 
 + | 
     timerTimer(Self); | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 175 | 
   | 
   if Self.timer.Enabled then | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 176 | 
   | 
     Self.btn_startstop.Caption := 'Stop automatic' | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 177 | 
   | 
   else | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 212 | 
   | 
  | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 213 | 
   | 
 begin | 
 
 
 
 
 
 
 
 
 
 
 
 
 
 | 214 | 
   | 
   AddToolListEntry('preview', 'Preview-Window', ''); | 
 
 
 
 
 
 
 
 
 
 
 
 | 215 | 
 < | 
 end. | 
 
 
 
 
 
 
 
 
 
 | 215 | 
 > | 
 end. |