public ThermoFOTAViewer(IDevice ADevice, IReadOnlyList <IService> services) { BleDevice = ADevice; if (BleDevice == null) { return; } driver = new BleDriver(GUID_SERVICE, GUID_CHAR_OTA_VER, GUID_CHAR_OTA_CTRL, GUID_CHAR_OTA_DATA); ota = new OTA(FOTA_SERVER, driver); ota.StatusChanged += Ota_StatusChanged; ota.Progress += Ota_Progress; InitUI(); var tapGestureRecognizer = new TapGestureRecognizer(); tapGestureRecognizer.NumberOfTapsRequired = 1; tapGestureRecognizer.Tapped += Summary_Tapped; Summary.GestureRecognizers.Add(tapGestureRecognizer); Summary_Tapped(null, null); Action.Clicked += Action_Clicked; driver.Init(ADevice, services); ota.CheckUpdate(); }
public OTA(string url, IBleDriver driver) { updateURL = url; this.driver = driver; Bins = new List <OTABin>(); }