/// <summary> /// Deploy and run the package. /// </summary> public void Run(DeviceItem device, Action<LauncherStates, string> stateUpdate) { // Save argument this.stateUpdate = stateUpdate; // Prepare output outputPane.EnsureLoaded(); // Start the device. Task.Factory.StartNew(() => RunOnStartedDevice(device.Device), cancellationTokenSource.Token); }
/// <summary> /// Set the IsCompatible flag of the given device's item. /// </summary> private void SetIsCompatible(DeviceItem item) { var check = IsCompatibleCheck; if (check == null) { return; } var ui = TaskScheduler.FromCurrentSynchronizationContext(); var task = Task.Factory.StartNew(() => check(item)); task.ContinueWith(x => { item.IsCompatible = x.Result; OnSelectedIndexChanged(null, EventArgs.Empty); }, ui); }
/// <summary> /// Set the IsCompatible flag of the given device's item. /// </summary> private void SetIsCompatible(DeviceItem item) { var check = IsCompatibleCheck; if (check == null) return; var ui = TaskScheduler.FromCurrentSynchronizationContext(); var task = Task.Factory.StartNew(() => check(item)); task.ContinueWith(x => { item.IsCompatible = x.Result; OnSelectedIndexChanged(null, EventArgs.Empty); }, ui); }
/// <summary> /// Add the given item /// </summary> public void Add(DeviceItem item) { tvList.Items.Add(item); }
/// <summary> /// Is the given device compatible with this project? /// </summary> private bool IsCompatible(DeviceItem item) { return true; // TODO }
/// <summary> /// Is the given device compatible with the APK we're trying to run? /// </summary> public bool DeviceIsCompatible(DeviceItem device) { return true; //return device.IsCompatibleWith(minSdkVersion); }