mirror of
https://gitee.com/ThingsGateway/ThingsGateway.git
synced 2025-10-29 22:53:59 +08:00
build: 10.12.16
fix: 系统总内存在特定情况下单位错误 feat: 网关定时任务性能优化
This commit is contained in:
@@ -412,7 +412,7 @@ public class MachineInfo
|
|||||||
#if NETFRAMEWORK || WINDOWS
|
#if NETFRAMEWORK || WINDOWS
|
||||||
{
|
{
|
||||||
var ci = new Microsoft.VisualBasic.Devices.ComputerInfo();
|
var ci = new Microsoft.VisualBasic.Devices.ComputerInfo();
|
||||||
Memory = (ulong)(ci.TotalPhysicalMemory / 1024.0);
|
Memory = (ulong)(ci.TotalPhysicalMemory / 1024.0 / 1024.0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -632,7 +632,7 @@ public class MachineInfo
|
|||||||
//if (dic2.TryGetValue("Model Name", out str)) Product = str;
|
//if (dic2.TryGetValue("Model Name", out str)) Product = str;
|
||||||
if (dic.TryGetValue("Model Identifier", out var str)) Product = str;
|
if (dic.TryGetValue("Model Identifier", out var str)) Product = str;
|
||||||
if (dic.TryGetValue("Processor Name", out str)) Processor = str;
|
if (dic.TryGetValue("Processor Name", out str)) Processor = str;
|
||||||
if (dic.TryGetValue("Memory", out str)) Memory = (UInt64)str.TrimEnd("GB").Trim().ToLong() * 1024 * 1024;
|
if (dic.TryGetValue("Memory", out str)) Memory = (UInt64)str.TrimEnd("GB").Trim().ToLong() * 1024;
|
||||||
if (dic.TryGetValue("Serial Number (system)", out str)) Serial = str;
|
if (dic.TryGetValue("Serial Number (system)", out str)) Serial = str;
|
||||||
if (dic.TryGetValue("Hardware UUID", out str)) UUID = str;
|
if (dic.TryGetValue("Hardware UUID", out str)) UUID = str;
|
||||||
if (dic.TryGetValue("Processor Name", out str)) Processor = str;
|
if (dic.TryGetValue("Processor Name", out str)) Processor = str;
|
||||||
@@ -868,7 +868,7 @@ public class MachineInfo
|
|||||||
if (dic != null)
|
if (dic != null)
|
||||||
{
|
{
|
||||||
if (dic.TryGetValue("MemTotal", out var str) && !str.IsNullOrEmpty())
|
if (dic.TryGetValue("MemTotal", out var str) && !str.IsNullOrEmpty())
|
||||||
Memory = (UInt64)str.TrimEnd(" kB").ToLong();
|
Memory = (UInt64)(str.TrimEnd(" kB").ToLong() / 1024.0);
|
||||||
|
|
||||||
ulong ma = 0;
|
ulong ma = 0;
|
||||||
if (dic.TryGetValue("MemAvailable", out str) && !str.IsNullOrEmpty())
|
if (dic.TryGetValue("MemAvailable", out str) && !str.IsNullOrEmpty())
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
<Project>
|
<Project>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PluginVersion>10.12.13</PluginVersion>
|
<PluginVersion>10.12.16</PluginVersion>
|
||||||
<ProPluginVersion>10.12.13</ProPluginVersion>
|
<ProPluginVersion>10.12.16</ProPluginVersion>
|
||||||
<DefaultVersion>10.12.13</DefaultVersion>
|
<DefaultVersion>10.12.16</DefaultVersion>
|
||||||
<AuthenticationVersion>10.11.7</AuthenticationVersion>
|
<AuthenticationVersion>10.11.7</AuthenticationVersion>
|
||||||
<SourceGeneratorVersion>10.11.7</SourceGeneratorVersion>
|
<SourceGeneratorVersion>10.11.7</SourceGeneratorVersion>
|
||||||
<NET8Version>8.0.21</NET8Version>
|
<NET8Version>8.0.21</NET8Version>
|
||||||
|
|||||||
@@ -262,9 +262,12 @@ public partial class MainLayout : IDisposable
|
|||||||
|
|
||||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||||
{
|
{
|
||||||
if (WebsiteOption.Value.Demo)
|
if (firstRender)
|
||||||
{
|
{
|
||||||
await ShowGitee();
|
if (WebsiteOption.Value.Demo)
|
||||||
|
{
|
||||||
|
await ShowGitee();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await base.OnAfterRenderAsync(firstRender);
|
await base.OnAfterRenderAsync(firstRender);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user