All Projects → AlencarGabriel → advpl-MsgTimer

AlencarGabriel / advpl-MsgTimer

Licence: other
Função AdvPL de mensagens (Alert, Info, Stop, Success, YesNo e NoYes) com Timer para fechamento automático

Programming Languages

xBase
55 projects

Projects that are alternatives of or similar to advpl-MsgTimer

tds-vscode
Totvs Developer Studio for vscode
Stars: ✭ 135 (+694.12%)
Mutual labels:  advpl, totvs, protheus
Appserver
A multithreaded application server for PHP, written in PHP.
Stars: ✭ 930 (+5370.59%)
Mutual labels:  timer, message
ProtheusDoc-VsCode
Repositório para implementação dinâmica do ProtheusDoc do TDS para VsCode
Stars: ✭ 19 (+11.76%)
Mutual labels:  advpl, totvs
SemPreju-Exemplos
Repositório de fontes customizados e open-source criados na maioria em ADVPL.
Stars: ✭ 24 (+41.18%)
Mutual labels:  advpl, protheus
timerlab
⏰ A simple and customizable timer
Stars: ✭ 94 (+452.94%)
Mutual labels:  timer
alfred-timer-workflow
Alfred workflow to start a timer, which blinks when the time is up.
Stars: ✭ 39 (+129.41%)
Mutual labels:  timer
prototyped.js
Some common Typescript prototypes
Stars: ✭ 22 (+29.41%)
Mutual labels:  function
bestest timer
This is an awesome punch clock/timer plugin for Redmine. It's great. It's the bestest.
Stars: ✭ 15 (-11.76%)
Mutual labels:  timer
vue-circular-count-down-timer
a count down timer library for vue.js
Stars: ✭ 45 (+164.71%)
Mutual labels:  timer
libmcu
A toolkit for firmware development
Stars: ✭ 33 (+94.12%)
Mutual labels:  timer
Swift101
That contains various information and examples about the basics of Swift Programming. 💻 📱 📺 ⌚️
Stars: ✭ 28 (+64.71%)
Mutual labels:  function
LiveSplitOne
A version of LiveSplit that works on a lot of platforms.
Stars: ✭ 172 (+911.76%)
Mutual labels:  timer
python-makefun
Dynamically create python functions with a proper signature.
Stars: ✭ 62 (+264.71%)
Mutual labels:  function
http
Aplus Framework HTTP Library
Stars: ✭ 113 (+564.71%)
Mutual labels:  message
Toast
To use it in PCL or .NetStandard projects write this line of code : CrossToastPopUp.Current.ShowToastMessage("Message");
Stars: ✭ 51 (+200%)
Mutual labels:  message
mongoose-slug-plugin
Slugs for Mongoose with history and i18n support (uses speakingurl by default, but you can use any slug library such as limax, slugify, mollusc, or slugme)
Stars: ✭ 21 (+23.53%)
Mutual labels:  message
tm
timers and timeline
Stars: ✭ 31 (+82.35%)
Mutual labels:  timer
telephone-ts
Telephone-ts: The "Event Emitter-less" TypeScript Event Architecture.
Stars: ✭ 22 (+29.41%)
Mutual labels:  message
flipdown-timer-card
Flipdown Timer Card for Home Assistant Lovelace
Stars: ✭ 28 (+64.71%)
Mutual labels:  timer
asynchronous
A D port of Python's asyncio library
Stars: ✭ 35 (+105.88%)
Mutual labels:  timer

advpl-MsgTimer

Função AdvPL de mensagens (Alert, Info, Stop, Success, YesNo e NoYes) com Timer para fechamento automático

Exemplo de utilização:

U_MsgTimer(10, "Mensagem", "Título", MT_ISUCCES, MT_TDEFAULT)

Exemplo Msg Timer

Finalidade

Apresentar uma mensagem no formato padrão do Protheus 12, permitindo o fechamento automático caso o usuário não interaja com a mensagem, evitando sessões abertas por muito tempo desnecessariamente.

Saiba mais em meu blog: https://gabrielalencar.dev/2020/01/07/MsgTimer-Advpl-Protheus

Implementação

Compilar o fonte MsgTimer.prw no seu RPO e chamar via chamada de função de usuário U_MsgTimer().

Caso deseje, o arquivo pode ser renomeado para .tlpp, o funcionamento será o mesmo porém no formato TL++.

Futuras implementações

Reportar problemas ou sugerir melhorias

Colaborar

Assim como meu objetivo é ajudar aqueles que precisam, caso você faça uma melhoria ou encontre algum problema no projeto, fique a vontade para ajustar e me mandar seu Pull Request, estarei avaliando e com certeza sendo útil estará disponível e farei uma agradecimento.


Documentação

Lista de Parâmetros:

Ordem Parâmetro Tipo Opcional? Default Descrição
1 nSeconds Numeric Sim 0 Tempo em segundos que a mensagem será exibida antes de ser fechada
2 cMensagem Characters Sim " " Descrição da mensagem [TEXT or HTML Formats]
3 cTitulo Characters Sim " " Título da mensagem [TEXT or HTML Formats]
4 cIcone Characters Sim MT_IINFO Ícone formato MT_I [ICON OF MESSAGE] ou RESOURCE compilados
5 nTipo Numeric Sim MT_TDEFAULT Tipo (botões) da mensagem formato MT_T [TYPE OF MESSAGE]

Importante!

  • Uso de HTML no Título e/ou Mensagem pode ocasionar problemas de dimensionamento nas mensagens;
  • O parâmetro cIcone pode receber qualquer resource compilado no RPO;
  • É possível combinar qualquer ícone com qualquer tipo de mensagem;
  • O parâmetro nSeconds quando 0 (zero) não apresentará o contador de tempo, nem fechará a mensagem automaticamente;
  • Cuidado ao utilizar mensagem com Timer e tipo NoYes ou YesNo, pois o retorno default caso o tempo exceda será o botão focado: No ou Yes.

Definições:

Definição Descrição Retorno Default
MT_TDEFAULT Adiciona somente o botão default "Fechar" Nil
MT_TYESNO Adiciona os botões "Sim" e "Não", focando no "Sim" .T.
MT_TNOYES Adiciona os botões "Não" e "Sim", focando no "Não" .F.
MT_ISUCCES Ícone Default Sucesso Ícone não influencia no retorno
MT_IALERT Ícone Default Alerta Ícone não influencia no retorno
MT_IERROR Ícone Default Erro Ícone não influencia no retorno
MT_IINFO Ícone Default Informação Ícone não influencia no retorno

Exemplos de utilização:

Exemplo Code
MsgTimer Alert NoYes U_MsgTimer(10, "Mensagem", "Título", MT_IALERT, MT_TNOYES)
MsgTimer Error Default U_MsgTimer(10, "Mensagem", "Título", MT_IERROR, MT_TDEFAULT)
MsgTimer Info YesNo U_MsgTimer(10, "Mensagem", "Título", MT_IINFO, MT_TYESNO)
MsgTimer Success Default U_MsgTimer(10, "Mensagem", "Título", MT_ISUCCES, MT_TDEFAULT)

Compatibilidade Homologada

  • Protheus 12 - Release 17
  • Protheus 12 - Release 23
  • Protheus 12 - Release 25
  • Protheus 12 - Release 27

Comportamento em caso de execução sem interface IsBlind()

MsgTimer sem interface

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].