by AIDA » Thu Apr 17, 2008 1:25 am
AQUI ESTA MI MINI CODIGO LO CHECO Y LO CHECO Y NO VEO NADA RARO.
#include "FiveWin.ch"
#include "Splitter.ch"
#include "xbrowse.ch"
#Include "TGraph.Ch"
#include "report.ch"
#define ID_MEMO 110
#define BLANCO 1
#define ROJO 2
#define AMARILLO 3
#define AZUL 4
#define VERDE 5
static lExit := .F.
static oWnd
static oUnidades,cUnidad
static oUnidad:={}
//------------------------de control de tiempo
Static hOra1
Static hOra2
Static hOra3
Static hOra4
Static hOra5
Static hOra6
Static hOra7
Static hOra8
Static oHora1
Static oHora2
Static oHora3
Static oHora4
Static oHora5
Static oHora6
Static oHora7
Static oHora8
Static oHora9
//---- ----------para guardar altas
Static oReg1
Static cReg1
Static oReg2
Static cReg2
Static oReg3
Static cReg3
Static oReg4
Static cReg4
Static oReg5
Static cReg5
Static oReg6
Static cReg6
Static oReg7
Static cReg7
Static oReg8
Static cReg8
Static oReg9
Static cReg9
Static campo1
Static campo2
Static campo3
Static campo4
Static campo5
Static campo6
Static campo7
Static campo8
Static campo9
Static oTurno:= {"Turno1","Turno2","Turno3","INT"}
Static otipo:= {"Urgencia","Traslado","Falsa Alrma","Servicio Especial"}
//----------------------------campos memo
Static cText01
Static cText02
//---------------------//
Static pasito:=0
Static pErsosS
Static cFile
//---------------------------------------------------------------------------- de salva datos//
STATIC hDatos
STATIC hCtrl
STATIC ,oGraph
STATIC SW_RESTORE,GW_CHILD,GW_HWNDNEXT
//-------------------------------------
function Main()
local oOutLook2003, oStatusBar, oSplit, cCombo, oRad, nValue := 1
local oFont,oActiveX,oTimerRelog,oBrush, oBmp , oHSpl1,oVSpl1,oHSplll,oOut
local aBtn[ 1 ]
local A9 :=0
local A14 :=0
local A16 :=0
local A20 :=0
local A21 :=0
local A24 :=0
local A25 :=0
local A26 :=0
lOCAL AMBU21
Local cFileAgent
Local aAvailables := {}
USE BITACORA NEW
USE UNIDADES NEW
USE SOS NEW
USE CONTROLE NEW
dbselectarea("UNIDADES")
UNIDADES->(dbGoTop())
While(UNIDADES->( ! Eof()))
aadd(oUnidad,AllTrim(UNIDADES->UNIDAD))
UNIDADES->(dbSkip(1))
EndDo
SetBalloon( .T. )
DEFINE WINDOW oWnd TITLE "BITACORA ELECTRONICA 2008" MDI ;
MENU BuildMenu()
DEFINE OUTLOOK2003 oOutLook2003 OF oWnd ;
PROMPTS "Contactos", "Bitacora", "Calendario", "Correo","Mantenimiento","" ;
BITMAPS "notes.bmp", "sos2.bmp","calendar.bmp", "mail.bmp"
oWnd:oLeft = nil // Because the splitter is going to control the resize
@ 1, 2 BUTTON "Personal SOS" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION bitacora()
@ 3, 2 BUTTON "Hospitales" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION BuildDlg()
@ 5, 2 BUTTON "Autoridades" OF oOutLook2003:aDialogs[ 1 ] SIZE 80, 22 ACTION MsgInfo( "Edit" )
@ 1, 2 say "Control de Unidades" OF oOutLook2003:aDialogs[ 2 ]
@ 3, 5 BUTTON "Registro" OF oOutLook2003:aDialogs[ 2 ] SIZE 80, 22 ACTION Seguro()
@ 5, 5 BUTTON "Consulta" OF oOutLook2003:aDialogs[ 2 ] SIZE 80, 22 ACTION MsgInfo( "Edit" )
@ 7, 5 BUTTON "Reportes" OF oOutLook2003:aDialogs[ 2 ] SIZE 80, 22 ACTION REPORTE01()
@ 1, 2 BUTTON "Fotografias" OF oOutLook2003:aDialogs[ 3 ] SIZE 80, 22 ACTION camara()
@ 3, 2 BUTTON "Personal SOS" OF oOutLook2003:aDialogs[ 3 ] SIZE 80, 22
@ 5, 2 BUTTON "Hospitales" OF oOutLook2003:aDialogs[ 3 ] SIZE 80, 22
@ 7, 2 BUTTON "Autoridades" OF oOutLook2003:aDialogs[ 3 ] SIZE 80, 22
#ifndef __CLIPPER__
DEFINE STATUSBAR oStatusBar PROMPT "Sistema de control SOS 2008" OF oWnd
#else
DEFINE MESSAGE oStatusBar PROMPT "Sistema de control SOS 2008" OF oWnd
#endif
SetParent( oOutLook2003:hWnd, oWnd:hWnd )
@ 0, 191 SPLITTER oSplit ;
VERTICAL _3DLOOK ;
PREVIOUS CONTROLS oOutLook2003 ;
HINDS CONTROLS oWnd:oWndClient ;
SIZE 4, oWnd:nHeight - 70 PIXEL ;
OF oWnd COLOR nRgb(25,25,112)
oSplit:lStatic:=.T.
A9 :=500
A14 :=20
A16 :=50
A20 :=40
AMBU21 :=0
A24 :=60
A25 :=100
A26 :=80
dbselectarea("BITACORA")
COUNT TO AMBU21 FOR BITACORA->UNIDAD ="A-21"
@00,24.61 GRAPH oGraph OF oWnd ;
SIZE 1085, 335;
TYPE 1;
YVALUES 3D XGRID YGRID LEGENDS
oGraph:aSeries = { { "A-09", CLR_CYAN },;
{ "A-14", CLR_YELLOW },;
{ "A-16", CLR_HRED },;
{ "A-20", CLR_BLUE },;
{ "A-21", CLR_HCYAN },;
{ "A-24", CLR_GREEN },;
{ "A-25", CLR_RED },;
{ "A-26", CLR_HBLUE } }
oGraph:aData = { {A9},{A14},{A16},{A20},{AMBU21},{A24},{A25},{A26} }
oGraph:l3D := .T.
oGraph:lPopUp := .T.
oGraph:lLegends:= .T.
oGraph:lSelView:= .T.
oGraph:cPicture:="9999999999"
oGraph:nBarSep:=05
oGraph:cTitle:= "SERVICIOS POR UNIDAD"
oGraph:lcTitle:= .T.
oGraph:lViewVal:= .T.
oGraph:cBitmap := "brush.bmp"
oGraph:nClrX = CLR_GREEN
oGraph:nClrY = CLR_RED
// oGraph:Refresh(.T.)
SetParent( oGraph:hWnd, oWnd:hWnd )
@ 336,195 SPLITTER oHSpl1 HORIZONTAL _3DLOOK PREVIOUS CONTROLS oOutLook2003 ;
HINDS CONTROLS oWnd:oWndClient ;
SIZE 1200, 4 PIXEL ;
TOP MARGIN 100 OF oWnd COLOR nRgb(25,25,112)
oHSpl1:lStatic:=.T.
@ 600,195 SPLITTER oHSplll HORIZONTAL _3DLOOK SIZE 1200, 4 PIXEL ;
TOP MARGIN 100 OF oWnd COLOR nRgb(25,25,112)
oHSpl1:lStatic:=.T.
@ 336,713 SPLITTER oVSpl1;
VERTICAL ;
PREVIOUS CONTROLS oOut ;
LEFT MARGIN 70 ;
RIGHT MARGIN 202 ;
SIZE 4, 846 PIXEL ;
OF oWnd ;
_3DLOOK ;
COLOR nRgb(25,25,112) ;
UPDATE
oVSpl1:lStatic:=.T.
SetParent( oSplit:hWnd, oWnd:hWnd )
SetParent( oHSpl1:hWnd, oWnd:hWnd )
SetParent( oHSplll:hWnd, oWnd:hWnd )
SetParent( oVSpl1:hWnd, oWnd:hWnd )
ACTIVATE WINDOW oWnd MAXIMIZED ON PAINT oGraph:Refresh(.f.) ON RESIZE oSplit:Adjust()
MsgInfo( "sale correctamente" )
oGraph:END()
resallfree() //por si quedan recursos en memoria....
memory(-1)
PostQuitMessage( 0 )
return nil
//----------------------------------------------------------------------------//
function BuildMenu()
local oMenu
MENU oMenu 2007
MENUITEM "&Salir" ACTION SALIR()
MENUITEM "&Acerca de..."
ENDMENU
return oMenu
//----------------------------------------------------------------------------//
//----------------------------------------------------------------------------//
FUNCTION salir()
SET RESOURCES TO
DBCLOSEALL()
CLOS ALL
resallfree() //por si quedan recursos en memoria....
memory(-1)
PostQuitMessage( 0 )
CLEAR MEMORY
//oWnd:End()
RETURN NIL
//------------------------------------------------------------------------------//
Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P
I love Fivewin
séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ