Example #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);
        }
Example #2
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);
        }
Example #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);
 }
Example #4
0
 /// <summary>
 /// Add the given item
 /// </summary>
 public void Add(DeviceItem item)
 {
     tvList.Items.Add(item);
 }
Example #5
0
 /// <summary>
 /// Is the given device compatible with this project?
 /// </summary>
 private bool IsCompatible(DeviceItem item)
 {
     return true; // TODO
 }
Example #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);
 }
Example #7
0
 /// <summary>
 /// Add the given item
 /// </summary>
 public void Add(DeviceItem item)
 {
     tvList.Items.Add(item);
 }