Club Delphi  
    FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Desarrollo en Delphi para Android
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy


 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 22-10-2020
Punzo Punzo is offline
Miembro
 
Registrado: abr 2006
Posts: 96
Poder: 19
Punzo Va por buen camino
Deshabilitar sonido de notificaciones

Buen día a todos, quiero deshabilitar el sonido de las notificaciones con la propiedad EnableSound, y simplemente no lo hace, estoy pasando algo por alto?, gracias de antemano
Código Delphi [-]
procedure TMesa.OnTm1(Sender :TObject);
var
N, Hm :TTime;
D :TDateTime;
Dif :Integer;
Notificacion: TNotification;
Notc :TNotificationCenter;
begin
  Notc := TNotificationCenter.Create(Self);
  Notificacion := Notc.CreateNotification ;
  Notificacion.Name := Numero;
  Notificacion.EnableSound := False;
  if HoraM = '' then
    HoraM := Hora;
  Hm := StrToTime(LeftStr(HoraM, 2) + ':' + MidStr(HoraM, 3, 2) + ':' + RightStr(HoraM, 2));
  N := StrToTime(FormatDateTime('hh:nn:ss', Now));
  if Hm > N then 
    D := Hm - N
    else
      D := N - Hm;
  Dif := StrToInt(FormatDateTime('nn', D));
  if (Dif >= 10) and (Dif < 15) then
    begin
      TintColor := TAlphaColorRec.Yellow;
      Notificacion.EnableSound := False;
      Notificacion.AlertBody := 'La mesa ' + Trim(Numero) + ' tiene más de 10 minutos sin movimiento';
      Notc.PresentNotification(Notificacion);
      Inc(Notificacion.Number);
    end
    else if Dif >= 15 then
      begin
        TintColor := TAlphaColorRec.Red;
        Notificacion.EnableSound := False;
        Notificacion.AlertBody := 'La mesa ' + Trim(Numero) + ' tiene más de 15 minutos sin movimiento';
        Notc.PresentNotification(Notificacion);
        Inc(Notificacion.Number);
      end;
  Notificacion.DisposeOf;
  Notc.DisposeOf;
Responder Con Cita
 



Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Notificaciones DamianG FireMonkey 4 21-04-2020 15:40:19
Envió de notificaciones KingOfDragons Varios 3 14-12-2011 02:56:01
No me llegan las notificaciones........ yapt Varios 16 27-07-2010 16:21:06
transformar datos en sonido con delphi y sacarlos por la tarjeta de sonido Johnnywin Internet 3 21-09-2006 20:49:11
Mediaplayer y las notificaciones. Jorghino reyes Varios 4 26-08-2005 07:46:48


La franja horaria es GMT +2. Ahora son las 19:16:54.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi