private async void ImageButton_Click(object sender, EventArgs e) { //await Navigation.PushModalAsync(PreviewPage); //return; try { if (TurnOff) { TurnOff = false; fLamp.TurnOff(); } else { TurnOff = true; fLamp.TurnOn(); } } catch { } }
protected void TurnOnLamp(ILamp lamp) { lamp.TurnOn(); }
public void TurnLampOn() { _lamp.TurnOn(); }