Push Notification no WINDEV Desktop
Permite exibir uma notificação de informação com data e hora agendada com aviso sonoro ou não.
Pode alterar o icone escolher qualquer tipo de imagem.
Pode receber agendamentos de modulos diferentes do sistema e exibir avisos
//CODE
PROCEDURE Notification_Mensagem()
Hora is Time = TimeSys() //20220523130250580 = 12 numeros
QRY_Select_Notification.ParamN001_DataHoraExibeInicial = Middle(DateSys() + Hora,1,12)
Hora..Second += 10
QRY_Select_Notification.ParamN001_DataHoraExibeFinal = Middle(DateSys() + Hora,1,12)
Trace(QRY_Select_Notification.ParamN001_DataHoraExibeInicial,QRY_Select_Notification.ParamN001_DataHoraExibeFinal)
IF HExecuteQuery(QRY_Select_Notification) = True THEN
FOR EACH QRY_Select_Notification
SizeHorizontal = MyWindow..Width //1936
SizeVertical = MyWindow..Height //1056
IWC_Notification..Visible = False
IWC_Notification.IMG_Icone = QRY_Select_Notification.N002_Icone
IWC_Notification.STC_Titulo = QRY_Select_Notification.N001_Titulo
IWC_Notification.STC_Mensagem = QRY_Select_Notification.N001_Mensagem
IWC_Notification..X = SizeHorizontal - 510
IWC_Notification..Y = SizeVertical
IWC_Notification..Visible = True
HReset(N001_Notification)
HReadSeek(N001_Notification,N001_NotificationID,QRY_Select_Notification.N001_NotificationID,hIdentical)
N001_Notification.N001_Exibiu = True
HModify(N001_Notification)
Multitask(1)
pos is int = 0
LOOP(210)
pos++
IWC_Notification..Y = SizeVertical - pos
WinRedraw(WIN_Menu)
END
IWC_Notification..Y = SizeVertical - 210
IF QRY_Select_Notification.N001_Som = True THEN
Beep()
Beep()
Beep()
END
END
END
--------------------
TELAS
Windows
Cadastros
WIN_Fiche_N001_Notification
WIN_Fiche_N002_Notification_Icone
WIN_Table_N001_Notification
WIN_Table_N002_Notification_Icone
IW_Notification
WIN_Menu
Controls
Procedures
Notification_Inicial
Notification_Mensagem
Properties
Variables
Reports
Queries
QRY_Select_Notification