Francisco Horta wrote:Compañeros,
Si Daniel autoriza que publique la TCalex, hasta donde la he modificado con mucho gusto lo haré o la enviaré a alguien para que la ponga a disposición de todos. Yo ya la tengo operando sin problemas en varios Spa's desde hace 5 meses.
Como Opciones que no pude implementar seria algo fantástico que pudiera hacer lo siguiente (a ver si luego alguien puede adaptarla):
1. Desplazamiento con Flechas ( comportamiento idéntico al xbrowse) dentro del calendario
2. poder arrastras y soltar citas en calendario con vista semanal ( cambio de dia y hora ) y vista diaria ( cambio de hora )
3. Ajustar el ancho de los cuadros de las citas al tamaño del control para que no deje espacios.
Creo que eso ahorraria mucho tiempo en agendar.
Esperamos pronta respuesta.
Saludos
case ::oView:IsKindOf("TMONTHVIEW")
do case
case nKey == VK_RETURN
::SetDayView()
case nKey == VK_UP
if ::oMonthView:aDateSelected[ 1 ] = 1
::oMonthView:aDateSelected[ 1 ] := 5
::oMonthView:dDateSelected := ::oMonthView:dDateSelected - 28
else
::oMonthView:aDateSelected[ 1 ]--
::oMonthView:dDateSelected := ::oMonthView:dDateSelected - 7
endif
::dDateSelected := ::oMonthView:dDateSelected
::Refresh()
case nKey == VK_DOWN
if ::oMonthView:aDateSelected[ 1 ] = 5 // Ojo, màximo numero filas
::oMonthView:aDateSelected[ 1 ] := 1
::oMonthView:dDateSelected := ::oMonthView:dDateSelected + 28
else
::oMonthView:aDateSelected[ 1 ]++
::oMonthView:dDateSelected := ::oMonthView:dDateSelected + 7
endif
::dDateSelected := ::oMonthView:dDateSelected
::Refresh()
case nKey == VK_LEFT
if ::oMonthView:aDateSelected[ 2 ] = 1
// Crear Data para ir a Mes anterior o...
::oMonthView:aDateSelected[ 2 ] := 7
::oMonthView:dDateSelected := ::oMonthView:dDateSelected + 6
else
::oMonthView:aDateSelected[ 2 ]--
::oMonthView:dDateSelected--
endif
::dDateSelected := ::oMonthView:dDateSelected
::Refresh()
case nKey == VK_RIGHT
if ::oMonthView:aDateSelected[ 2 ] = 7
// Crear Data para ir a Mes siguiente o...
::oMonthView:aDateSelected[ 2 ] := 1
::oMonthView:dDateSelected := ::oMonthView:dDateSelected - 6
else
::oMonthView:aDateSelected[ 2 ]++
::oMonthView:dDateSelected++
endif
::dDateSelected := ::oMonthView:dDateSelected
::Refresh()
otherwise
return Super:KeyDown( nKey, nFlags )
endcase
METHOD New( .........) CLASS TCalex
.../...
::oWnd:oClient = Self
::GoTop()
::SetFocus() // Añadido Cnl 28/03/2013
Return Self
rolando wrote:Buenas tardes,
Logré generar la .lib y compila bien pero al ejecutarlo y cargar una cita, se cierra la aplicación y da un error:
Error description: Error BASE/1066 Argument error: conditional
Args:
[ 1] = U
Stack Calls
===========
Called from: CALINFO.PRG => TCALINFO:PAINTONMONTH( 231 )
Called from: CALINFO.PRG => TCALINFO:PAINT( 179 )
Called from: TCALEX.PRG => TDAYVIEW:PAINTCALINFO( 1057 )
Called from: TDAYV.PRG => TDAYVIEW:PAINT( 194 )
Called from: TCALEX.PRG => TCALEX:PAINT( 1035 )
Called from: TCALEX.PRG => (b)TCALEX:TCALEX( 107 )
Called from: => TCALEX:DISPLAY( 0 )
Called from: .\source\classes\CONTROL.PRG => TCALEX:HANDLEEVENT( 1690 )
Called from: .\source\classes\WINDOW.PRG => _FWH( 3177 )
Called from: => WINRUN( 0 )
Called from: .\source\classes\WINDOW.PRG => TMDIFRAME:ACTIVATE( 990 )
Called from: D:\VERCE\XbroTest\TCalex\sample01.prg => SAMPLECALEX:NEW( 83 )
Called from: D:\VERCE\XbroTest\TCalex\sample01.prg => MAIN( 14 )
Para más datos, si utilizo la lib que trae la clase, también da el mismo error.
¿A nadie le pasó?
Saludos
Rolando
METHOD LoadDates( nStart, nEnd, dStart, dEnd, cText, cSubject, nIdx, lND, lAplicado, lBloqueoT ) CLASS TCalEx
local oCalInfo
WITH OBJECT oCalInfo := TCalInfo():New()
:nStart = nStart
:nEnd = nEnd
:dStart = dStart
:dEnd = dEnd
:cText = cText
:cSubject = cSubject
:oCalex = Self
:nIdx = nIdx
//:lND = lND
//:lAplicado = lAplicado
//:lBloqueoT = lBloqueoT
END
hb_HSET( ::hCalInfo, oCalInfo:nId, oCalInfo )
RETURN NIL
if ::lCaptured
::nIdReserva := 0 // fjhg 02-04-2013
::Refresh()
else
*--------- fjhg 02-04-2013 Simula tooltip, muestra la info de la cita en vista DIARIA exclusivamente
if ::Classname() == "TDAYVIEW" .AND. ::oCalex:oCalInfo != NIL
if ( ::oCalex:oCalInfo:aCoords[ CI_RIGHT ] - ::oCalex:oCalInfo:aCoords[ CI_LEFT ] ) < VIEW_MIN .AND. ::nIdReserva <> ::oCalex:oCalInfo:nIdx
MsgInfo( "No. Reservación: " + ALLTRIM(STR(::oCalex:oCalInfo:nIdx)) + " " + ;
"A las: " + ::oCalex:ConvertTime(::oCalex:oCalInfo:nStart,::oCalex:lAmPm) + " - " + ;
::oCalex:ConvertTime(::oCalex:oCalInfo:nEnd,::oCalex:lAmPm) + CRLF + ;
"Información: " + ::oCalex:oCalInfo:cSubject, "Datos de la Reservación ..." )
::nIdReserva := ::oCalex:oCalInfo:nIdx
endif
else
::nIdReserva := 0
endif
endif
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 44 guests