@@ -87,20 +87,22 @@ Func __UserEventHandler__OnDownloadStateChanged($oWebV2M, $hGUI, $sState, $sURL,
8787 Case " Interrupted"
8888 ProgressSet (100 , " Done" , " Interrupted" )
8989 Sleep (3000 )
90+ ProgressOff ()
9091 $bProgres_State = 0
9192 $_sURLDownload_InProgress = ' '
9293 Case " Completed"
9394 ProgressSet (100 , " Done" , " Completed" )
9495 Sleep (3000 )
96+ ProgressOff ()
9597 $bProgres_State = 0
9698 $_sURLDownload_InProgress = ' '
9799 EndSwitch
98100EndFunc ; ==>__UserEventHandler__OnDownloadStateChanged
99101
100102Func __UserEventHandler__OnAcceleratorKeyPressed($oWebV2M , $hGUI , $oArgs )
101- #forceref $oWebV2M
103+ $hGUI = HWnd (" 0x" & Hex ($hGUI , 16 ))
104+ Local Const $s_Prefix = " [USER:EVENT: OnAcceleratorKeyPressed]: GUI:" & $hGUI & " ARGS: " & ((IsObj ($oArgs )) ? (' OBJECT' ) : (' ERRROR' ))
102105
103- #TODO parse $oArgs to check if ESC KEY is pressed == > $oWeb .CancelDownloads(" https://fosszone.csd.auth.gr/tdf/libreoffice/stable/25.8.4/win/x86_64/LibreOffice_25.8.4_Win_x86-64.msi" )
104106; ~ https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2acceleratorkeypressedeventargs?view=webview2-dotnet-1.0.705.50
105107 ConsoleWrite ($oArgs .Handled & @CRLF ) ; Indicates whether the AcceleratorKeyPressed event is handled by host.
106108 ConsoleWrite ($oArgs .KeyEventKind & @CRLF ) ; Gets the key event kind that caused the event to run
@@ -112,7 +114,5 @@ Func __UserEventHandler__OnAcceleratorKeyPressed($oWebV2M, $hGUI, $oArgs)
112114 $oWebV2M .CancelDownloads($_sURLDownload_InProgress )
113115 EndIf
114116
115- $hGUI = HWnd (" 0x" & Hex ($hGUI , 16 ))
116- Local Const $s_Prefix = " [USER:EVENT: OnAcceleratorKeyPressed]: GUI:" & $hGUI & " ARGS: " & ((IsObj ($oArgs )) ? (' OBJECT' ) : (' ERRROR' ))
117117 __NetWebView2_Log(@ScriptLineNumber , (StringLen ($s_Prefix ) > 150 ? StringLeft ($s_Prefix , 150 ) & " ..." : $s_Prefix ), 1 )
118118EndFunc ; ==>__UserEventHandler__OnAcceleratorKeyPressed
0 commit comments