58 lines
1.2 KiB
C#
58 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Remontor.Seacher
|
|
{
|
|
internal class HistoryResult : ISeacherResult
|
|
{
|
|
private IComp Comp;
|
|
private DateTime LastConnect;
|
|
public HistoryResult()
|
|
{
|
|
|
|
}
|
|
public HistoryResult(IComp comp, DateTime lastConnect)
|
|
{
|
|
Comp = comp;
|
|
LastConnect = lastConnect;
|
|
}
|
|
|
|
public IComp GetComp() {
|
|
return Comp;
|
|
}
|
|
|
|
public DateTime GetLastConnect()
|
|
{
|
|
return LastConnect;
|
|
}
|
|
public string toString()
|
|
{
|
|
return Comp.GetNetNameStr();
|
|
}
|
|
|
|
public IComp Result()
|
|
{
|
|
return Comp;
|
|
}
|
|
|
|
public string ResultString()
|
|
{
|
|
string buf;
|
|
if (Comp.GetName() == null)
|
|
{
|
|
buf = Comp.GetNetNameStr();
|
|
}
|
|
else
|
|
{
|
|
buf = Comp.GetName();
|
|
if (Comp.GetNetNameStr() != null) buf += "(" + Comp.GetNetNameStr() + ")";
|
|
|
|
}
|
|
return buf;
|
|
}
|
|
}
|
|
}
|