56 lines
1.3 KiB
C#
56 lines
1.3 KiB
C#
using Remontor.Pinger;
|
|
using Remontor.Words;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Remontor.Picter
|
|
{
|
|
internal static class SPicManager
|
|
{
|
|
private static Dictionary<string, PicBase> PicList = new Dictionary<string, PicBase>();
|
|
public static void PictureSet(PictureBox image, IComp comp)
|
|
{
|
|
IComp Comp = WordsList.FindCompName(comp.GetNetName());
|
|
if(Comp != null)
|
|
{
|
|
image.Image = PicBaseWords.GetImageMax(comp.GetImage());
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
|
|
if (comp.GetName() != null)
|
|
{
|
|
|
|
|
|
if (PicList.ContainsKey(comp.GetName()))
|
|
{
|
|
image.Image = PicList[comp.GetName()].ImageGet;
|
|
}
|
|
else
|
|
{
|
|
new PicLoaderTask(comp.GetName(), image);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
static public void WriteResult(PicBase picBase)
|
|
{
|
|
try
|
|
{
|
|
PicList.Add(picBase.LoginGet, picBase);
|
|
}
|
|
catch
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|