ソースを参照

添加紧急呼叫按钮点阵屏显示

linjpxc 5 年 前
コミット
f20f47d601

BIN
IPCALLServicePro.zip


+ 9 - 1
IPCALLServicePro/IPCALLServicePro.vbproj

@@ -64,6 +64,9 @@
   <PropertyGroup>
   <PropertyGroup>
     <ApplicationIcon>logo.ico</ApplicationIcon>
     <ApplicationIcon>logo.ico</ApplicationIcon>
   </PropertyGroup>
   </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationManifest>My Project\app.manifest</ApplicationManifest>
+  </PropertyGroup>
   <ItemGroup>
   <ItemGroup>
     <Reference Include="CoreAudioApi">
     <Reference Include="CoreAudioApi">
       <HintPath>..\dlls\CoreAudioApi.dll</HintPath>
       <HintPath>..\dlls\CoreAudioApi.dll</HintPath>
@@ -175,10 +178,10 @@
     </EmbeddedResource>
     </EmbeddedResource>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
-    <None Include="a.ini" />
     <None Include="Config.ini">
     <None Include="Config.ini">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </None>
     </None>
+    <None Include="My Project\app.manifest" />
     <None Include="My Project\Application.myapp">
     <None Include="My Project\Application.myapp">
       <Generator>MyApplicationCodeGenerator</Generator>
       <Generator>MyApplicationCodeGenerator</Generator>
       <LastGenOutput>Application.Designer.vb</LastGenOutput>
       <LastGenOutput>Application.Designer.vb</LastGenOutput>
@@ -196,6 +199,11 @@
     <PackageReference Include="MySql.Data">
     <PackageReference Include="MySql.Data">
       <Version>6.9.12</Version>
       <Version>6.9.12</Version>
     </PackageReference>
     </PackageReference>
+    <PackageReference Include="WMPLib">
+      <Version>1.0.0</Version>
+      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
+      <PrivateAssets>all</PrivateAssets>
+    </PackageReference>
   </ItemGroup>
   </ItemGroup>
   <ItemGroup>
   <ItemGroup>
     <Content Include="logo.ico" />
     <Content Include="logo.ico" />

+ 1 - 1
IPCALLServicePro/My Project/Application.Designer.vb

@@ -24,7 +24,7 @@ Namespace My
         <Global.System.Diagnostics.DebuggerStepThroughAttribute()>  _
         <Global.System.Diagnostics.DebuggerStepThroughAttribute()>  _
         Public Sub New()
         Public Sub New()
             MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
             MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
-            Me.IsSingleInstance = false
+            Me.IsSingleInstance = true
             Me.EnableVisualStyles = true
             Me.EnableVisualStyles = true
             Me.SaveMySettingsOnExit = true
             Me.SaveMySettingsOnExit = true
             Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
             Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses

+ 1 - 1
IPCALLServicePro/My Project/Application.myapp

@@ -2,7 +2,7 @@
 <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <MySubMain>true</MySubMain>
   <MySubMain>true</MySubMain>
   <MainForm>frmMain</MainForm>
   <MainForm>frmMain</MainForm>
-  <SingleInstance>false</SingleInstance>
+  <SingleInstance>true</SingleInstance>
   <ShutdownMode>0</ShutdownMode>
   <ShutdownMode>0</ShutdownMode>
   <EnableVisualStyles>true</EnableVisualStyles>
   <EnableVisualStyles>true</EnableVisualStyles>
   <AuthenticationMode>0</AuthenticationMode>
   <AuthenticationMode>0</AuthenticationMode>

+ 25 - 24
IPCALLServicePro/My Project/Resources.Designer.vb

@@ -1,40 +1,41 @@
 '------------------------------------------------------------------------------
 '------------------------------------------------------------------------------
 ' <auto-generated>
 ' <auto-generated>
-'     This code was generated by a tool.
-'     Runtime Version:4.0.30319.42000
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
 '
 '
-'     Changes to this file may cause incorrect behavior and will be lost if
-'     the code is regenerated.
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
 ' </auto-generated>
 ' </auto-generated>
 '------------------------------------------------------------------------------
 '------------------------------------------------------------------------------
 
 
 Option Strict On
 Option Strict On
 Option Explicit On
 Option Explicit On
 
 
+Imports System
 
 
 Namespace My.Resources
 Namespace My.Resources
-
-    'This class was auto-generated by the StronglyTypedResourceBuilder
-    'class via a tool like ResGen or Visual Studio.
-    'To add or remove a member, edit your .ResX file then rerun ResGen
-    'with the /str option, or rebuild your VS project.
+    
+    '此类是由 StronglyTypedResourceBuilder
+    '类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    '若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    '(以 /str 作为命令选项),或重新生成 VS 项目。
     '''<summary>
     '''<summary>
-    '''  A strongly-typed resource class, for looking up localized strings, etc.
+    '''  一个强类型的资源类,用于查找本地化的字符串等。
     '''</summary>
     '''</summary>
-    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
-     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
-     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
-     Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
+    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0"),  _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+     Global.Microsoft.VisualBasic.HideModuleNameAttribute()>  _
     Friend Module Resources
     Friend Module Resources
-
+        
         Private resourceMan As Global.System.Resources.ResourceManager
         Private resourceMan As Global.System.Resources.ResourceManager
-
+        
         Private resourceCulture As Global.System.Globalization.CultureInfo
         Private resourceCulture As Global.System.Globalization.CultureInfo
-
+        
         '''<summary>
         '''<summary>
-        '''  Returns the cached ResourceManager instance used by this class.
+        '''  返回此类使用的缓存的 ResourceManager 实例。
         '''</summary>
         '''</summary>
-        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
         Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
         Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
             Get
             Get
                 If Object.ReferenceEquals(resourceMan, Nothing) Then
                 If Object.ReferenceEquals(resourceMan, Nothing) Then
@@ -44,17 +45,17 @@ Namespace My.Resources
                 Return resourceMan
                 Return resourceMan
             End Get
             End Get
         End Property
         End Property
-
+        
         '''<summary>
         '''<summary>
-        '''  Overrides the current thread's CurrentUICulture property for all
-        '''  resource lookups using this strongly typed resource class.
+        '''  重写当前线程的 CurrentUICulture 属性
+        '''  重写当前线程的 CurrentUICulture 属性。
         '''</summary>
         '''</summary>
-        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
         Friend Property Culture() As Global.System.Globalization.CultureInfo
         Friend Property Culture() As Global.System.Globalization.CultureInfo
             Get
             Get
                 Return resourceCulture
                 Return resourceCulture
             End Get
             End Get
-            Set(ByVal value As Global.System.Globalization.CultureInfo)
+            Set
                 resourceCulture = value
                 resourceCulture = value
             End Set
             End Set
         End Property
         End Property

+ 36 - 36
IPCALLServicePro/My Project/Settings.Designer.vb

@@ -1,10 +1,10 @@
 '------------------------------------------------------------------------------
 '------------------------------------------------------------------------------
 ' <auto-generated>
 ' <auto-generated>
-'     This code was generated by a tool.
-'     Runtime Version:4.0.30319.42000
+'     此代码由工具生成。
+'     运行时版本:4.0.30319.42000
 '
 '
-'     Changes to this file may cause incorrect behavior and will be lost if
-'     the code is regenerated.
+'     对此文件的更改可能会导致不正确的行为,并且如果
+'     重新生成代码,这些更改将会丢失。
 ' </auto-generated>
 ' </auto-generated>
 '------------------------------------------------------------------------------
 '------------------------------------------------------------------------------
 
 
@@ -13,42 +13,42 @@ Option Explicit On
 
 
 
 
 Namespace My
 Namespace My
-
-    <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
-     Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
-     Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+    
+    <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
+     Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.6.0.0"),  _
+     Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
     Partial Friend NotInheritable Class MySettings
     Partial Friend NotInheritable Class MySettings
         Inherits Global.System.Configuration.ApplicationSettingsBase
         Inherits Global.System.Configuration.ApplicationSettingsBase
-
-        Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
-
-#Region "My.Settings Auto-Save Functionality"
+        
+        Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
+        
+#Region "My.Settings 自动保存功能"
 #If _MyType = "WindowsForms" Then
 #If _MyType = "WindowsForms" Then
-        Private Shared addedHandler As Boolean
+    Private Shared addedHandler As Boolean
 
 
-        Private Shared addedHandlerLockObject As New Object
+    Private Shared addedHandlerLockObject As New Object
 
 
-        <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
-        Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
-            If My.Application.SaveMySettingsOnExit Then
-                My.Settings.Save()
-            End If
-        End Sub
+    <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
+    Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
+        If My.Application.SaveMySettingsOnExit Then
+            My.Settings.Save()
+        End If
+    End Sub
 #End If
 #End If
 #End Region
 #End Region
-
+        
         Public Shared ReadOnly Property [Default]() As MySettings
         Public Shared ReadOnly Property [Default]() As MySettings
             Get
             Get
-
+                
 #If _MyType = "WindowsForms" Then
 #If _MyType = "WindowsForms" Then
-                   If Not addedHandler Then
-                        SyncLock addedHandlerLockObject
-                            If Not addedHandler Then
-                                AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
-                                addedHandler = True
-                            End If
-                        End SyncLock
-                    End If
+               If Not addedHandler Then
+                    SyncLock addedHandlerLockObject
+                        If Not addedHandler Then
+                            AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
+                            addedHandler = True
+                        End If
+                    End SyncLock
+                End If
 #End If
 #End If
                 Return defaultInstance
                 Return defaultInstance
             End Get
             End Get
@@ -57,13 +57,13 @@ Namespace My
 End Namespace
 End Namespace
 
 
 Namespace My
 Namespace My
-
-    <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
-     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
-     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
+    
+    <Global.Microsoft.VisualBasic.HideModuleNameAttribute(),  _
+     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
+     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()>  _
     Friend Module MySettingsProperty
     Friend Module MySettingsProperty
-
-        <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
+        
+        <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")>  _
         Friend ReadOnly Property Settings() As Global.IPCALLServicePro.My.MySettings
         Friend ReadOnly Property Settings() As Global.IPCALLServicePro.My.MySettings
             Get
             Get
                 Return Global.IPCALLServicePro.My.MySettings.Default
                 Return Global.IPCALLServicePro.My.MySettings.Default

+ 75 - 0
IPCALLServicePro/My Project/app.manifest

@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
+  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
+  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
+    <security>
+      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
+        <!-- UAC 清单选项
+             如果想要更改 Windows 用户帐户控制级别,请使用
+             以下节点之一替换 requestedExecutionLevel 节点。n
+        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
+        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
+        <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />
+
+            指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
+            如果你的应用程序需要此虚拟化来实现向后兼容性,则删除此
+            元素。
+        -->
+        <requestedExecutionLevel level="asInvoker" uiAccess="false" />
+      </requestedPrivileges>
+    </security>
+  </trustInfo>
+
+  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
+    <application>
+      <!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
+           Windows 版本的列表。取消评论适当的元素,
+           Windows 将自动选择最兼容的环境。 -->
+
+      <!-- Windows Vista -->
+      <!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
+
+      <!-- Windows 7 -->
+      <!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
+
+      <!-- Windows 8 -->
+      <!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
+
+      <!-- Windows 8.1 -->
+      <!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
+
+      <!-- Windows 10 -->
+      <!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
+
+    </application>
+  </compatibility>
+
+  <!-- 指示该应用程序可以感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
+       自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
+       选择加入。选择加入此设置的 Windows 窗体应用程序(目标设定为 .NET Framework 4.6 )还应
+       在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。-->
+  <!--
+  <application xmlns="urn:schemas-microsoft-com:asm.v3">
+    <windowsSettings>
+      <dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
+    </windowsSettings>
+  </application>
+  -->
+
+  <!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
+  <!--
+  <dependency>
+    <dependentAssembly>
+      <assemblyIdentity
+          type="win32"
+          name="Microsoft.Windows.Common-Controls"
+          version="6.0.0.0"
+          processorArchitecture="*"
+          publicKeyToken="6595b64144ccf1df"
+          language="*"
+        />
+    </dependentAssembly>
+  </dependency>
+  -->
+
+</assembly>

+ 1 - 1
IPCALLServicePro/comGlobalVars.vb

@@ -644,7 +644,7 @@ Module comGlobalVars
             If Val(Temp(1)) = 0 Then
             If Val(Temp(1)) = 0 Then
                 Temp(1) = Temp(2)
                 Temp(1) = Temp(2)
             End If
             End If
-            'SysLedContrl.AddCallingProgram(Temp(1) + "W", ParseStr(DisWCToNurseCalling, Temp))
+            SysLedContrl.AddCallingProgram(Temp(1) + "W", ParseStr(DisWCToNurseCalling, Temp), Int32.Parse(Temp(10)))
             TempStr = ParseStr(SpeechWCCalling, Temp)
             TempStr = ParseStr(SpeechWCCalling, Temp)
             SpeechAddStr(TempStr)
             SpeechAddStr(TempStr)
 
 

+ 8 - 4
IPCALLServicePro/frmMain.vb

@@ -1,5 +1,6 @@
 Imports System.IO
 Imports System.IO
 Imports WDMsgLib
 Imports WDMsgLib
+
 Public Class frmMain
 Public Class frmMain
 
 
     Protected Overrides Sub DefWndProc(ByRef m As Message)
     Protected Overrides Sub DefWndProc(ByRef m As Message)
@@ -31,8 +32,6 @@ Public Class frmMain
         End Try
         End Try
     End Sub
     End Sub
 
 
-
-
     Private Sub frmMain_Disposed(sender As Object, e As System.EventArgs) Handles Me.Disposed
     Private Sub frmMain_Disposed(sender As Object, e As System.EventArgs) Handles Me.Disposed
         Try
         Try
             End
             End
@@ -130,7 +129,11 @@ Public Class frmMain
                 FileClose(1)
                 FileClose(1)
                 Me.txtLog.Text = ""
                 Me.txtLog.Text = ""
             End If
             End If
-            Button5.Text = "【UPS】BatVolt:" + SysUPS.BatVolt.ToString + "V  SysVolt:" + SysUPS.SysVolt.ToString + "V  Mode:" + SysUPS.ChargeMode.ToString
+
+            If Not SysUPS Is Nothing Then
+                Button5.Text = "【UPS】BatVolt:" + SysUPS.BatVolt.ToString + "V  SysVolt:" + SysUPS.SysVolt.ToString + "V  Mode:" + SysUPS.ChargeMode.ToString
+            End If
+
             'txtLog.AppendText(txtLog.Text)
             'txtLog.AppendText(txtLog.Text)
 
 
             'txtLog.ScrollToCaret()
             'txtLog.ScrollToCaret()
@@ -206,4 +209,5 @@ Public Class frmMain
 
 
     Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click
     Private Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click
     End Sub
     End Sub
-End Class
+
+End Class

+ 10 - 4
LatticeScreenServer/CarouselController.cs

@@ -104,18 +104,24 @@ namespace HNWD.LatticeScreen.Server
 
 
         public void AddCallingProgram(string CallId, string CallText, int PartID)
         public void AddCallingProgram(string CallId, string CallText, int PartID)
         {
         {
-            for (int i = 0; i < ledLatticeScreenlist1[PartID.ToString()].Count; i++)
+            var partIdStr = PartID.ToString();
+            if (!ledLatticeScreenlist1.ContainsKey(partIdStr))
+            {
+                return;
+            }
+
+            for (int i = 0; i < ledLatticeScreenlist1[partIdStr].Count; i++)
             {
             {
-                CallingProgram cp = new CallingProgram(ledLatticeScreenlist1[PartID.ToString()][i], CallId);
+                CallingProgram cp = new CallingProgram(ledLatticeScreenlist1[partIdStr][i], CallId);
 
 
                 cp.SetEntity(new WD_ProgramInfo()
                 cp.SetEntity(new WD_ProgramInfo()
                 {
                 {
                     PROGRAM_TEXT = CallText,
                     PROGRAM_TEXT = CallText,
                 });
                 });
 
 
-                if (!ledLatticeScreenlist1[PartID.ToString()][i].CallingList.Exists(f => f.CallId == CallId))
+                if (!ledLatticeScreenlist1[partIdStr][i].CallingList.Exists(f => f.CallId == CallId))
                 {
                 {
-                    ledLatticeScreenlist1[PartID.ToString()][i].CallingList.Add(cp);
+                    ledLatticeScreenlist1[partIdStr][i].CallingList.Add(cp);
                 }
                 }
             }
             }
         }
         }

+ 26 - 1
LatticeScreenServer/Hards/LedControl.cs

@@ -9,6 +9,7 @@ using System.IO;
 using System.Linq;
 using System.Linq;
 using System.Runtime.InteropServices;
 using System.Runtime.InteropServices;
 using System.Text;
 using System.Text;
+using System.Threading;
 using System.Windows.Forms;
 using System.Windows.Forms;
 using LatticeScreenServer;
 using LatticeScreenServer;
 
 
@@ -413,6 +414,7 @@ namespace HNWD.LatticeScreen
 
 
                 if (isEmpty)
                 if (isEmpty)
                 {
                 {
+                    StopEraseThreead();
                     foreach (var item in list)
                     foreach (var item in list)
                     {
                     {
                         var aheader = new bx_sdk_dual.EQareaHeader_G6();
                         var aheader = new bx_sdk_dual.EQareaHeader_G6();
@@ -637,9 +639,32 @@ namespace HNWD.LatticeScreen
             return 0;
             return 0;
         }
         }
 
 
+        private static Thread eraseThread;
+
         public static int JHErase(IntPtr hdl)
         public static int JHErase(IntPtr hdl)
         {
         {
-            return JHDrawText(hdl, 0, 0, ushort.MaxValue, ushort.MaxValue, 0, "");
+            //return JHDrawText(hdl, 0, 0, ushort.MaxValue, ushort.MaxValue, 0, "");
+
+            StopEraseThreead();
+            eraseThread = new Thread(state =>
+            {
+                Thread.Sleep(TimeSpan.FromSeconds(10));
+                JHDrawText(hdl, 0, 0, ushort.MaxValue, ushort.MaxValue, 0, "");
+            });
+
+            return 0;
+        }
+
+        private static void StopEraseThreead()
+        {
+            try
+            {
+                eraseThread?.Abort();
+                eraseThread?.DisableComObjectEagerCleanup();
+            }
+            catch
+            {
+            }
         }
         }
 
 
         public static int JHDrawBitmap(IntPtr hdl, short x, short y, ushort width, ushort height, uint format, tagBitmapSource pbmpsrc)
         public static int JHDrawBitmap(IntPtr hdl, short x, short y, ushort width, ushort height, uint format, tagBitmapSource pbmpsrc)