public LibraryComponent(string title, LibrariesPage Parent) { this.Title = title; StartButtonText = "Start"; RemoveCommand = new Command(() => { if (Parent.Components.Contains(this)) { Parent.Components.Remove(this); } this.Dispose(); }); StartCommand = new Command(() => { if (!IsRunning) { // start StartButtonText = "Stop"; IsRunning = true; Start(); // call component-specific start StartTimer(); // start the update timer } else { StartButtonText = "Start"; IsRunning = false; Stop(); } }); }
public RotaryEncoder(LibrariesPage page, TreehopperUsb Board = null) : base("Rotary Encoder", page) { this.Board = Board; Board.Connection.UpdateRate = 0; // go real fast! InitializeComponent(); BindingContext = this; }
public Altitude(LibrariesPage page, TreehopperUsb Board = null) : base("Altitude", page) { this.Board = Board; InitializeComponent(); BindingContext = this; }
public Accelerometer(LibrariesPage page, TreehopperUsb Board = null) : base("Accelerometer", page) { this.Board = Board; InitializeComponent(); BindingContext = this; }
public Flir(LibrariesPage page, TreehopperUsb Board = null) : base("FLIR Lepton", page) { this.Board = Board; InitializeComponent(); BindingContext = this; }
public Apa102(LibrariesPage page, TreehopperUsb Board = null) : base("APA102 RGB LEDs", page) { this.Board = Board; InitializeComponent(); BindingContext = this; }
public Display(LibrariesPage page, TreehopperUsb Board = null) : base("Display", page) { this.Board = Board; InitializeComponent(); BindingContext = this; }
public AmbientLight(LibrariesPage page, TreehopperUsb Board = null) : base("Ambient Light Sensor", page) { this.Board = Board; InitializeComponent(); BindingContext = this; }