修改插件过期提示

This commit is contained in:
Diego
2025-06-20 14:43:13 +08:00
parent a879edd68b
commit 5a4b0a0e93
10 changed files with 14 additions and 20 deletions

View File

@@ -1,8 +1,8 @@
<Project>
<PropertyGroup>
<PluginVersion>10.8.12</PluginVersion>
<ProPluginVersion>10.8.12</ProPluginVersion>
<PluginVersion>10.8.13</PluginVersion>
<ProPluginVersion>10.8.13</ProPluginVersion>
<AuthenticationVersion>2.8.0</AuthenticationVersion>
<SourceGeneratorVersion>10.8.2</SourceGeneratorVersion>
<NET8Version>8.0.17</NET8Version>

View File

@@ -509,18 +509,11 @@ public abstract class DeviceBase : DisposableObject, IDevice
}
/// <inheritdoc/>
protected virtual async ValueTask<MessageBase> SendThenReturnMessageBaseAsync(ISendMessage command, IClientChannel clientChannel = default, CancellationToken cancellationToken = default)
protected virtual ValueTask<MessageBase> SendThenReturnMessageBaseAsync(ISendMessage command, IClientChannel clientChannel = default, CancellationToken cancellationToken = default)
{
try
{
return await GetResponsedDataAsync(command, clientChannel, Timeout, cancellationToken).ConfigureAwait(false);
return GetResponsedDataAsync(command, clientChannel, Timeout, cancellationToken);
}
catch (Exception ex)
{
return new(ex);
}
}
/// <summary>

View File

@@ -399,6 +399,7 @@ public abstract class DriverBase : DisposableObject, IDriver
stringBuilder.Append(" ");
if (expireTime.HasValue && (DateTime.Now - expireTime.Value).TotalHours > -72)
{
stringBuilder.Append(',');
stringBuilder.Append(Localizer["ExpireTime", expireTime.Value.ToString("yyyy-MM-dd HH")]);
}

View File

@@ -55,7 +55,7 @@
"ThingsGateway.Management.Authentication": {
"AuthName": "AuthName",
"Authorized": "Authorized",
"ExpireTime": "ExpireTime",
"ExpireTime": "ExpireTime {0}",
"Password": "Password",
"Register": "Register",
"RegisterStatus": "RegisterStatus",
@@ -373,7 +373,7 @@
"ThingsGateway.Gateway.Application.DriverBase": {
"Authorized": "Authorized",
"ExpireTime": "ExpireTime",
"ExpireTime": "ExpireTime {0}",
"Unauthorized": "Unauthorized"
},
"ThingsGateway.Gateway.Application.ExportString": {

View File

@@ -53,7 +53,7 @@
"ThingsGateway.Management.Authentication": {
"AuthName": "公司名称",
"Authorized": "已授权",
"ExpireTime": "过期时间",
"ExpireTime": "过期时间 {0}",
"Password": "注册码",
"Register": "注册",
"RegisterStatus": "注册状态",
@@ -374,7 +374,7 @@
"ThingsGateway.Gateway.Application.DriverBase": {
"Authorized": "已授权",
"ExpireTime": "过期时间",
"ExpireTime": "过期时间 {0}",
"Unauthorized": "未授权"
},
"ThingsGateway.Gateway.Application.ExportString": {

View File

@@ -162,7 +162,7 @@ public class Dlt645_2007Master : DtuServiceDeviceBase
}
else
{
throw new ArgumentException("State must be of type Dlt645_2007Address", nameof(state));
return EasyValueTask.FromResult(new OperResult<byte[]>(new ArgumentException("State must be of type Dlt645_2007Address", nameof(state))));
}
}

View File

@@ -108,7 +108,7 @@ public partial class ModbusMaster : DtuServiceDeviceBase, IModbusAddress
}
else
{
throw new ArgumentException("State must be of type ModbusAddress", nameof(state));
return EasyValueTask.FromResult(new OperResult<byte[]>(new ArgumentException("State must be of type ModbusAddress", nameof(state))));
}
}
catch (Exception ex)

View File

@@ -329,7 +329,7 @@ public class ModbusSlave : DeviceBase, IModbusAddress
}
else
{
throw new ArgumentException("State must be of type ModbusAddress", nameof(state));
return EasyValueTask.FromResult(new OperResult<byte[]>(new ArgumentException("State must be of type ModbusAddress", nameof(state))));
}
}
catch (Exception ex)

View File

@@ -308,7 +308,7 @@ public partial class SiemensS7Master : DeviceBase
}
else
{
throw new ArgumentException("State must be of type SiemensS7Address", nameof(state));
return EasyValueTask.FromResult(new OperResult<byte[]>(new ArgumentException("State must be of type SiemensS7Address", nameof(state))));
}
}
catch (Exception ex)

View File

@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Version>10.8.12</Version>
<Version>10.8.13</Version>
</PropertyGroup>
<ItemGroup>