Changeset 10 for trunk/Forms
- Timestamp:
- Aug 29, 2016, 5:35:21 PM (8 years ago)
- Location:
- trunk/Forms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.lfm
r9 r10 55 55 end 56 56 end 57 object Timer1: TTimer 58 Interval = 50 59 OnTimer = Timer1Timer 60 left = 180 61 top = 281 62 end 57 63 end -
trunk/Forms/UFormMain.pas
r9 r10 24 24 MenuItem4: TMenuItem; 25 25 PaintBox1: TPaintBox; 26 Timer1: TTimer; 26 27 procedure AExitExecute(Sender: TObject); 27 28 procedure AFullscreenExecute(Sender: TObject); … … 34 35 procedure PaintBox1Paint(Sender: TObject); 35 36 procedure PaintBox1Resize(Sender: TObject); 37 procedure Timer1Timer(Sender: TObject); 36 38 private 39 RedrawPending: Boolean; 37 40 VideoDevice: TDeviceVideoBase; 38 41 SerialDevice: TBaseSerialDevice; … … 66 69 var 67 70 NewApp: TApp; 71 NewApp2: TApp; 68 72 begin 69 73 PaintBox1.ControlStyle := PaintBox1.ControlStyle + [csOpaque]; … … 90 94 NewApp := TAppClock.Create; 91 95 Kernel.Apps.Add(NewApp); 96 97 NewApp2 := TAppClock2.Create; 98 Kernel.Apps.Add(NewApp2); 92 99 end; 93 100 … … 196 203 end; 197 204 205 procedure TFormMain.Timer1Timer(Sender: TObject); 206 begin 207 if RedrawPending then begin 208 PaintBox1.Refresh; 209 RedrawPending := False; 210 end; 211 end; 212 198 213 procedure TFormMain.SerialDeviceReceiveDataSync; 199 214 begin … … 214 229 procedure TFormMain.VideoDeviceRedrawSync; 215 230 begin 216 PaintBox1.Refresh;231 RedrawPending := True; 217 232 end; 218 233
Note:
See TracChangeset
for help on using the changeset viewer.