Imports System.Net.Sockets
Imports Newtonsoft.Json
Imports Newtonsoft.Json.Converters
Imports UTS_Core.UTSModule.Test.StatusMonitor
Public Class UtsApp
    Public Property Name As String

    Public Property ProjectName As String

    Public Property StationName As String

    Public Property TestPlan As String

    Public Property Version As String

    <JsonConverter(GetType(StringEnumConverter))>
    Public Property Status As AppStatus

    <JsonIgnore>
    Public Property UtsStatus As ComportStatusMonitor.ComPortConnectStatusEnum

    <JsonIgnore>
    Public Property TestStatus As TestCommandStatusMonitor.TestCommandStatusEnum

    <JsonIgnore>
    Public Property Client As TcpClient



    Sub New()
        Name = String.Empty
        ProjectName = String.Empty
        StationName = String.Empty
        TestPlan = String.Empty
        Version = String.Empty

        UtsStatus = ComportStatusMonitor.ComPortConnectStatusEnum.UnConnected
        TestStatus = TestCommandStatusMonitor.TestCommandStatusEnum.None
        Status = AppStatus.Closed
    End Sub




    Enum AppStatus
        ''' <summary>
        ''' 已启动
        ''' </summary>
        Started
        ''' <summary>
        ''' 已关闭
        ''' </summary>
        Closed
    End Enum
End Class
