1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
procedure TMiniDOForm.Panel1Gesture(Sender: TObject;
const [Ref] EventInfo: TGestureEventInfo; var Handled: Boolean);
Var
I, X,V: Integer;
Startpoint: tpoint;
EndPort: char;
Line: String;
S: string;
Begin
Line := 'DimState:';
// if GestureToIdent(EventInfo.GestureID, S) then Memo1.Lines.Add(S);
{IFDEV iOS}
// Panel1.Touch.InteractiveGestures := [] ;
{ENDIF iOS}
case EventInfo.GestureID of
igiPan:
begin
Dimming := EventInfo.Location.X / 3.69;
X := round(Dimming);
TestArray[Y, CurrentPort].c := char(round(Dimming));
TBar[CurrentPort].Value := round(Dimming);
Port[CurrentPort] := char(round(Dimming)); // char(X);
Line := Line + IntToStr(CurrentPort) + ' :' + IntToStr(X);
DomoSend(Port[0], Port[1], Port[2], Port[3], Port[4], Port[5], Port[6],
Port[7]);//, EndPort);
Handled := True;
if CheckBox1.IsChecked = True then // debug on
Memo1.Lines.Insert(0, Line);
end;
end;
end; |
Partager