GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV 25
→
Relógio via código usando as procedures TIMER_STOP, TIMER_LOOP, TIMER_PLAY, TIMER_BREAK
Relógio via código usando as procedures TIMER_STOP, TIMER_LOOP, TIMER_PLAY, TIMER_BREAK
Iniciado por Boller, set., 22 2020 12:49 PM - Sem resposta
Conecte-se…
Boller
#1
Membro registado
3.655 mensagems
Popularité : +175 (223 votes)
Publicado em setembro, 22 2020 - 12:49 PM
Prezados,
Segue abaixo um conjunto de procedures para trabalhar com TIMER de Relógio via código usando as procedures:
TIMER_PLAY = INICIA O CONTADOR E O LOOP
TIMER_LOOP = TODOS OS PROCESSOS SEQUENCIAIS A SEREM FEITOS A CADA CICLO
TIMER_STOP = PARA DE CONTAR ATE QUE DER TIMER_PLAY
TIMER_BREAK = PAUSA OU FREIA
Procedure
Timer_Break
(
)
//Suspend the stopwatch
Loc_Timer_Pause
=
True
//Time the time passed that must not be counted
ChronoStart
(
2
)
Procedure
Timer_Play
(
)
//If there is a start time for the stopwatch, it means that time calculation resumes after a stop
IF
Loc_Timer_Pause
=
True
THEN
//Duration not to count in milliseconds (it is a cumulated duration for all the stops performed)
du
Duration
is
Duration
=
ChronoEnd
(
2
)
gdu
TimeNotCounted
+
=
du
Duration
Loc_Timer_Pause
=
False
ELSE
//Otherwise, initialize the beginning of the stopwatch
ChronoStart
(
1
)
gb
ChronoStarted
=
True
gn
TimerNum
=
TimerSys
(
Timer_Loop
,
50
)
END
Procedure
Timer_Stop
(
)
//Stop the stopwatch
EndTimerSys
(
gn
TimerNum
)
IF
gb
ChronoStarted
=
True
THEN
ChronoEnd
(
1
)
gb
ChronoStarted
=
False
END
//Re-initialization
gdu
TimeNotCounted
=
0
Loc_Timer_Pause
=
False
//EDT_Duration = "00:00:00"
Procedure
Timer_Loop
(
)
du
Duration
is
Duration
//Duration (difference) to display
IF
Loc_Timer_Pause
=
True
THEN
RETURN
END
IF
InternetConnected
(
) =
False
OR
WiFiStatus
(
) =
wifiDisabled
BTN_
0800
..
Visible
=
True
ELSE
BTN_
0800
..
Visible
=
False
END
//Time passed
du
Duration
=
ChronoValue
(
1
)
//Deduces the duration that must not be counted
du
Duration
=
du
Duration
-
gdu
TimeNotCounted
gn
TimerCadastro
+
=
1
IF
gb
TermoUso
=
True
THEN
IF
gn
TimerCadastro
>
1
THEN
gn
TimerCadastro
=
0
aio_HourGlass
(
"Incluindo cadastro..."
)
gb
TermoUso
=
False
ok
is boolean
=
C
adastroConta
(
"Criar"
,
""
)
//info(ok)
IF
ok
=
True
Teclado
(
"Hide"
)
Popup
(
"Cadastro incluido com sucesso"
,
"C"
)
aio_HourGlass
(
""
)
gb
FecharBemVindo
=
True
//ok
gn
Plane
=
1
GloOutrasTelas
=
""
Close
(
)
ELSE
aio_HourGlass
(
""
)
END
END
ELSE
gn
TimerCadastro
=
0
END
--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 99949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Denunciar
0
0
→ Voltar para WINDEV 25
WINDEV 25
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto