Exemple #1
0
        /// <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);
        }
Exemple #3
0
 /// <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);
 }
Exemple #4
0
 /// <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
 }
Exemple #6
0
 /// <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);
 }
 /// <summary>
 /// Add the given item
 /// </summary>
 public void Add(DeviceItem item)
 {
     tvList.Items.Add(item);
 }