40 lines
1.3 KiB
C#
40 lines
1.3 KiB
C#
using System.Text;
|
|
|
|
namespace S7Explorer.Models
|
|
{
|
|
public class HardwareItem : ProjectItem
|
|
{
|
|
public string ModuleType { get; set; } = string.Empty;
|
|
public string OrderNumber { get; set; } = string.Empty;
|
|
public string HardwareVersion { get; set; } = string.Empty;
|
|
public string FirmwareVersion { get; set; } = string.Empty;
|
|
public string Position { get; set; } = string.Empty;
|
|
public string Address { get; set; } = string.Empty;
|
|
public object? HardwareData { get; set; }
|
|
|
|
public override object? GetDetailsObject()
|
|
{
|
|
return HardwareData;
|
|
}
|
|
|
|
public override string GetIcon()
|
|
{
|
|
return "Hardware";
|
|
}
|
|
|
|
public override string GetExportText()
|
|
{
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.AppendLine($"Hardware: {Name}");
|
|
sb.AppendLine($"Type: {ModuleType}");
|
|
sb.AppendLine($"Order Number: {OrderNumber}");
|
|
sb.AppendLine($"Hardware Version: {HardwareVersion}");
|
|
sb.AppendLine($"Firmware Version: {FirmwareVersion}");
|
|
sb.AppendLine($"Position: {Position}");
|
|
sb.AppendLine($"Address: {Address}");
|
|
sb.AppendLine();
|
|
|
|
return sb.ToString();
|
|
}
|
|
}
|
|
} |