@@ -303,14 +303,14 @@ procedure ConnectDevice(DevName: string; MacAddr: string; PerHandle: TSimpleBleP
303
303
DeviceFormElements[i].LabelServiceUuid[SvIdx].Hint := s;
304
304
end ;
305
305
if BleConnectData[i].HasVspService then begin
306
- DeviceFormElements[i].ButtonVspTerminal[SvIdx] := TButton.Create(DeviceForm[i]);
307
- DeviceFormElements[i].ButtonVspTerminal[SvIdx].Parent := DeviceFormElements[i].Panel[SvIdx];
308
- DeviceFormElements[i].ButtonVspTerminal[SvIdx].Tag := (i shl TagPosDev) or (SvIdx shl TagPosSrv);
309
- DeviceFormElements[i].ButtonVspTerminal[SvIdx].Caption := ' VSP Terminal' ;
310
- DeviceFormElements[i].ButtonVspTerminal[SvIdx].Top := DeviceFormElements[i].LabelServiceUuid[SvIdx].Top ;
311
- DeviceFormElements[i].ButtonVspTerminal[SvIdx].Left := DeviceFormElements[i].Panel [SvIdx].Width - DeviceFormElements[i].ButtonVspTerminal[SvIdx].Width - DeviceFormPaddingHorizontal ;
312
- // DeviceFormElements[i].ButtonVspTerminal[SvIdx].Width := 64 ;
313
- DeviceFormElements[i].ButtonVspTerminal[SvIdx].OnClick := @DeviceForm[i].ButtonVspTerminalClick;
306
+ DeviceFormElements[i].ButtonVspTerminal[SvIdx] := TButton.Create(DeviceForm[i]);
307
+ DeviceFormElements[i].ButtonVspTerminal[SvIdx].Parent := DeviceFormElements[i].Panel[SvIdx];
308
+ DeviceFormElements[i].ButtonVspTerminal[SvIdx].Tag := (i shl TagPosDev) or (SvIdx shl TagPosSrv);
309
+ DeviceFormElements[i].ButtonVspTerminal[SvIdx].Caption := ' VSP Terminal' ;
310
+ DeviceFormElements[i].ButtonVspTerminal[SvIdx].AutoSize := true ;
311
+ DeviceFormElements[i].ButtonVspTerminal[SvIdx].Top := DeviceFormElements[i].LabelServiceUuid [SvIdx].Top ;
312
+ DeviceFormElements[i].ButtonVspTerminal[SvIdx].Left := DeviceFormElements[i].Panel[SvIdx].Width - DeviceFormElements[i].ButtonVspTerminal[SvIdx].Width - DeviceFormPaddingHorizontal ;
313
+ DeviceFormElements[i].ButtonVspTerminal[SvIdx].OnClick := @DeviceForm[i].ButtonVspTerminalClick;
314
314
end ;
315
315
NextElementVertical := DeviceFormElements[i].LabelServiceUuid[SvIdx].Top + DeviceFormElements[i].LabelServiceUuid[SvIdx].Height + DeviceFormPaddingVertical;
316
316
@@ -480,7 +480,6 @@ procedure ConnectDevice(DevName: string; MacAddr: string; PerHandle: TSimpleBleP
480
480
DeviceFormElements[i].LabelDescriptorUuid[SvIdx][ChIdx][DeIdx].Caption := ' LabelDescriptorUuid' ;
481
481
DeviceFormElements[i].LabelDescriptorUuid[SvIdx][ChIdx][DeIdx].Width := Round(DeviceFormElements[i].Panel[SvIdx].Width * 2 / 3 );
482
482
DeviceFormElements[i].LabelDescriptorUuid[SvIdx][ChIdx][DeIdx].AutoSize := false;
483
- // DeviceFormElements[i].LabelDescriptorUuid[SvIdx][ChIdx][DeIdx].Height := 18;
484
483
DeviceFormElements[i].LabelDescriptorUuid[SvIdx][ChIdx][DeIdx].Font.Size := 10 ;
485
484
if n = ' ' then
486
485
DeviceFormElements[i].LabelDescriptorUuid[SvIdx][ChIdx][DeIdx].Caption := UpperCase(s)
@@ -493,15 +492,15 @@ procedure ConnectDevice(DevName: string; MacAddr: string; PerHandle: TSimpleBleP
493
492
494
493
DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx] := TEdit.Create(DeviceForm[i]);
495
494
DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].Parent := DeviceFormElements[i].Panel[SvIdx];
495
+ DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].ReadOnly := true;
496
496
DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].Top := NextElementVertical;
497
497
DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].Left := 5 *DeviceFormPaddingHorizontal;
498
498
DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].Caption := ' TextBoxDescriptor' ;
499
- DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].Font.Size := 10 ;
500
- DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].MaxLength := 4 ;
501
- DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].Width := 56 ;
502
499
DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].AutoSize := false;
503
- // DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].Height := 20 ;
500
+ DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].Width := 56 ;
504
501
DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].Color := clForm;
502
+ DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].Font.Size := 10 ;
503
+ DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].MaxLength := 4 ;
505
504
NextElementVertical := DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].Top + DeviceFormElements[i].TextBoxDescriptor[SvIdx][ChIdx][DeIdx].Height + DeviceFormPaddingVertical div 2 ;
506
505
507
506
// read descriptor value, store in device data record and display in text box
0 commit comments