Ejemplo n.º 1
0
        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();
                }
            });
        }
Ejemplo n.º 2
0
 public RotaryEncoder(LibrariesPage page, TreehopperUsb Board = null) : base("Rotary Encoder", page)
 {
     this.Board = Board;
     Board.Connection.UpdateRate = 0; // go real fast!
     InitializeComponent();
     BindingContext = this;
 }
Ejemplo n.º 3
0
 public Altitude(LibrariesPage page, TreehopperUsb Board = null) : base("Altitude", page)
 {
     this.Board = Board;
     InitializeComponent();
     BindingContext = this;
 }
Ejemplo n.º 4
0
 public Accelerometer(LibrariesPage page, TreehopperUsb Board = null) : base("Accelerometer", page)
 {
     this.Board = Board;
     InitializeComponent();
     BindingContext = this;
 }
Ejemplo n.º 5
0
 public Flir(LibrariesPage page, TreehopperUsb Board = null) : base("FLIR Lepton", page)
 {
     this.Board = Board;
     InitializeComponent();
     BindingContext = this;
 }
Ejemplo n.º 6
0
 public Apa102(LibrariesPage page, TreehopperUsb Board = null) : base("APA102 RGB LEDs", page)
 {
     this.Board = Board;
     InitializeComponent();
     BindingContext = this;
 }
Ejemplo n.º 7
0
 public Display(LibrariesPage page, TreehopperUsb Board = null) : base("Display", page)
 {
     this.Board = Board;
     InitializeComponent();
     BindingContext = this;
 }
Ejemplo n.º 8
0
 public AmbientLight(LibrariesPage page, TreehopperUsb Board = null) : base("Ambient Light Sensor", page)
 {
     this.Board = Board;
     InitializeComponent();
     BindingContext = this;
 }