private void KnobClicked(object sender, PinStatusEventArgs e) { if (e.Enabled) { Controls.Instance.ButtonUnsubscribe("ScrollerBtn", KnobClicked); ProgramManager.StartProgram(applications.ToList()[0]); } }
private void OnPinStatusChanged(object sender, PinStatusEventArgs e) { if (e.Configuration == this.busyPin) { if (!e.Enabled) { this.canTransmit.Set(); } } }
private void GlobalConnectionPin_PinStatusChanged(object sender, PinStatusEventArgs e) { if (e.Configuration.Pin == _batteryUnderChargeGpio) { Console.WriteLine("Battery charge changed in: {0}", e.Enabled ? "Full, Discharging or Removed" : "Charging"); _batteryUnderChargeStatus = e.Enabled; OnUnderCharge?.Invoke(new UnderChargeEventArgs { Charging = e.Enabled }); } }
private void PinStatusChanged(object sender, PinStatusEventArgs e) { var connectorPin = e.Configuration.Pin.ToConnector(); var inputPin = MapConnectorInputPin(connectorPin); if (inputPin != null && CircuitStateChanged != null) { CircuitStateChanged(e.Enabled, inputPin.Value); } else { LogHelper.LogMessage("Pin changed {0}", connectorPin); } }
public void g_Detected(object sender, PinStatusEventArgs e) { //start fade out timer edges++; if (edges == 2) { //t.Enabled = true; for (int i = 0; i < 20; i++) { this.Opacity -= 0.05; System.Threading.Thread.Sleep(10); } this.Close(); } }
static void g_detected(object sender, PinStatusEventArgs e) { edges++; if (edges == 2 && state == 0) { while (true) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); stockView = new stockView(); edges = 0; state = 1; Application.Run(stockView); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); weatherView = new WeatherView(); edges = 0; state = 2; Application.Run(weatherView); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); DateAndTime dt = new DateAndTime(); edges = 0; state = 0; dt.Visible = true; Application.Run(dt); } } /* else if (edges == 2 && state == 1) * { * Application.EnableVisualStyles(); * Application.SetCompatibleTextRenderingDefault(false); * ; * } * else if (edges == 2 && state == 2) * { * Application.EnableVisualStyles(); * Application.SetCompatibleTextRenderingDefault(false); * * }*/ }
private void KnobClicked(object sender, PinStatusEventArgs e) { if (e.Enabled) { if (!menuIsShown) { ListView menu = new ListView("MainScroller"); menu.Width = 32; Label l = new Label("Close", menuFont, CanvasColor.WHITE); menu.Add(l); View = menu; menuIsShown = true; } else { StartProgram(); } } }
private static void _conPin_PinStatusChanged(object sender, PinStatusEventArgs e) { Console.WriteLine("Gpio{0}", e.Enabled); }