Add image loader class

This commit is contained in:
qianlifeng
2014-07-14 19:03:52 +08:00
parent e8f3a30a72
commit 855d75f1bb
4 changed files with 232 additions and 204 deletions

View File

@@ -1,9 +1,12 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using Wox.Helper;
using Wox.Plugin;
using UserControl = System.Windows.Controls.UserControl;
@@ -23,6 +26,7 @@ namespace Wox
public void AddResults(List<Result> results)
{
if (Dirty)
{
Dirty = false;
@@ -30,6 +34,10 @@ namespace Wox
}
foreach (var result in results)
{
//ThreadPool.QueueUserWorkItem(delegate
// {
// ImageLoader.Load(Path.Combine(result.PluginDirectory, result.IcoPath));
// });
int position = GetInsertLocation(result.Score);
lbResults.Items.Insert(position, result);
}