private async Task ToggleLight(ButtonStateViewModel arg) { if (arg == null) { _panelService.StopLine(1, true) .ContinueWith(t => _panelService.StopLine(2, true)); ButtonStates.Off(); } else { arg.IsOn = !arg.IsOn; _panelService.SetLightState(arg.Row, arg.Column, arg.Color, arg.IsOn); } }
public CustomPinchUpdatedEventArgs(ButtonStateViewModel button, PinchGestureUpdatedEventArgs args) { Button = button; EventArgs = args; }