commit 22e131ce7945b520e45d539134fe82faf71eab43 Author: jdg Date: Sun Sep 12 20:15:34 2021 +0200 First commit 25/09/1997 diff --git a/ALUM.DSK b/ALUM.DSK new file mode 100644 index 0000000..ab93e7b Binary files /dev/null and b/ALUM.DSK differ diff --git a/ALUM.EXE b/ALUM.EXE new file mode 100644 index 0000000..b617198 Binary files /dev/null and b/ALUM.EXE differ diff --git a/ALUM.PRJ b/ALUM.PRJ new file mode 100644 index 0000000..d3e24a1 Binary files /dev/null and b/ALUM.PRJ differ diff --git a/ALUMMM.CPP b/ALUMMM.CPP new file mode 100644 index 0000000..9a13a74 --- /dev/null +++ b/ALUMMM.CPP @@ -0,0 +1,1360 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "..\..\libs\make_bot\make_bot.h" // Fuciones de MAKE_BOTON +#include "c:\program\src_dos\libs\bdatos\bdatos.hh" +#include "alum_def.h" + +#define SEC_MENU 1 + +#define OFF 0 +#define ON 1 + +#ifdef __cplusplus + #define __CPPARGS ... +#else + #define __CPPARGS +#endif + +#define INTR 0X1C /* The clock tick interrupt */ + +extern unsigned _stklen = 18432U; + + +char far *VGARam = (char far *)MK_FP( 0xA000, 0); +typedef unsigned char DacPalette256[256][3]; +DacPalette256 Palette256; + +void Creditos(void); +int MuestraImagen( char *file ); +int CargaPaleta(char *file ); +void setvgapalette256(DacPalette256 *PalBuf); + + +void ImprimeEtiquetas(void); +void ImprimeNombrees( char como ); +void OptenPaginasIniFin( int *Inicio, int *Fin, int NRegistros ); + + /*********************************\ +|* *| +|* Informe general sobre el estado *| +|* de la empresa selecionada. *| +|* *| + \*********************************/ +DatosInformativos DatosInf; +extern BDatos BAlum; // Base Datos Antig.Alumnos +extern AntiguosAlumnos SAlum; // Struct Antig.Alumnos + +void MuestraDatos( void ); +void RecopilaDatos( void ); + + + /*********************************\ +|* *| +|* Gestion para la *| +|* CFG inicial *| +|* *| + \*********************************/ +extern BDatos BConfig; // Base con la configuracion del programa +extern CONFIG Config; // Configuracion global del programa + +struct date FechaGestionActual;// Fecha de gestion actual +char BufferM[6][65 + 1]; // Buffer para los mensajes... + +char Buffer[180]; // +p_Ampliada MensajesLn; // Definiciones del letrero digital (NOMB.EMPR) +extern char *ptr_char; // Puntero a la fuentes de caracteres propia + + // Control de EDICION / VISUALIZACION +char VisualMode = ERROR; // ERROR: los datos pueden ser modificados + // OK: solo se permite editar NO TOCAR + + /*********************************\ +|* *| +|* Vectores de interrupci¢n para *| +|* provocar que parpadeen las led's*| +|* *| + \*********************************/ +void AnulaInterrupcion(void); +void ActivaInterrupcion(void); + +void interrupt handler(__CPPARGS); +void interrupt ( *oldhandler)(__CPPARGS); +char count = 0, intvect = OFF, IntVect = OFF; + + + /*********************************\ +|* *| +|* Funciones para el manejo del *| +|* Men£ Principal, y ejecuciones. *| +|* *| + \*********************************/ + +void MenuPrincipal(void); +void DibujaMenuPrincipal( void ); +int SubItem( int Sec, int NItem ); +void DibujaLogotipo( char * File, int X, int Y ); +void EjecutaModulo( void (*FuncionModulo)(void) ); +void MarcaItemSeleccionado( int Columna, char como ); +void PantallaGrafica( int X0, int Y0, int X1, int Y1 ); +void MarcaSubItemSeleccionado( int Sec, int Columna, char como ); +char TIPO_ORDENACION; + +int Ordenar( const void *A, const void *B ) +{ + char dev; + + switch( TIPO_ORDENACION ) + { + case 0: + if ( (dev = strcmp( (( AntiguosAlumnos *)A)->Nombre, (( AntiguosAlumnos *)B)->Nombre ) ) == 0) + dev = strcmp( (( AntiguosAlumnos *)A)->Apellidos, (( AntiguosAlumnos *)B)->Apellidos ); + return dev; + break; + case 1: + if ( (dev = strcmp( (( AntiguosAlumnos *)A)->Apellidos, (( AntiguosAlumnos *)B)->Apellidos ) ) == 0) + dev = strcmp( (( AntiguosAlumnos *)A)->Nombre, (( AntiguosAlumnos *)B)->Nombre ); + return dev; + break; + case 2: + return ( strcmp( (( AntiguosAlumnos *)A)->Direccion, (( AntiguosAlumnos *)B)->Direccion ) ); + return 0; + break; + case 3: + return ( strcmp( (( AntiguosAlumnos *)A)->Direccion, (( AntiguosAlumnos *)B)->Direccion ) ); + return 0; + case 4: + if ( (( AntiguosAlumnos *)A)->CC.Oficina == (( AntiguosAlumnos *)B)->CC.Oficina ) + { + if ( (( AntiguosAlumnos *)A)->CC.Sucursal == (( AntiguosAlumnos *)B)->CC.Sucursal ) + { + if ( (( AntiguosAlumnos *)A)->CC.DigControl == (( AntiguosAlumnos *)B)->CC.DigControl ) + { + if ( (( AntiguosAlumnos *)A)->CC.NumCuenta > (( AntiguosAlumnos *)B)->CC.NumCuenta ) return 1; + if ( (( AntiguosAlumnos *)A)->CC.NumCuenta < (( AntiguosAlumnos *)B)->CC.NumCuenta ) return -1; + } + if ( (( AntiguosAlumnos *)A)->CC.DigControl > (( AntiguosAlumnos *)B)->CC.DigControl ) return 1; + if ( (( AntiguosAlumnos *)A)->CC.DigControl < (( AntiguosAlumnos *)B)->CC.DigControl ) return -1; + } + if ( (( AntiguosAlumnos *)A)->CC.Sucursal > (( AntiguosAlumnos *)B)->CC.Sucursal ) return 1; + if ( (( AntiguosAlumnos *)A)->CC.Sucursal < (( AntiguosAlumnos *)B)->CC.Sucursal ) return -1; + } + if ( (( AntiguosAlumnos *)A)->CC.Oficina > (( AntiguosAlumnos *)B)->CC.Oficina ) return 1; + if ( (( AntiguosAlumnos *)A)->CC.Oficina < (( AntiguosAlumnos *)B)->CC.Oficina ) return -1; + break; + + } + return 0; +}; + + + + /**************************************************************************\ +|* *| +|* main *| +|* *| +|* Descripci¢n: *| +|* ¨Sabes lo que es tener el control?, bien pues esta funci¢n *| +|* tiene el control de todo, inicializa y desinicializa todo: *| +|* - vectores de interrupci¢n *| +|* - sistema gr fico - m¢dulo de botones MK_Boton *| +|* *| +|* Entradas: Par metros de inicializaci¢n para el programa. *| +|* *| +|* Salidas: 0 Todo ha ido bien *| +|* # C¢digo de error ( descritos en la funci¢n _Error ) *| +|* *| +|* *| + \**************************************************************************/ +int main( int argc, char *argv[] ) +{ + + int i; + char buffer[4][80] = { "Jos‚ David Guill‚n || _-ùFuTuRe ViSiOnù-_ || 1997 (c)", + " e-mail: Jose-David.Guillen@cs.us.es ", + " http://www.arrakis.es/~infomundo/JD ", + " " }; + + /*****************************\ °±²þ²±° + |* Obtenemos la fecha en curso *| + \*****************************/ + getdate( &FechaGestionActual ); + + /*****************************\ + |* Inicializaci¢n del rat¢n *| °±²Ü²±° + |* modo gr fico y nueva paleta *| °±²ß²±° + \*****************************/ + Initialize( 9, 2 ); // Inicializa el Modo Gr fico + + setrgbpalette(EGA_WHITE, 56, 58, 59 ); + setrgbpalette(EGA_LIGHTGRAY, 30, 37, 43 ); + setrgbpalette(EGA_DARKGRAY, 24, 27, 30 ); + + True_Push = ON; PunteroRaton = 1; + inicializa_raton_grafico( 0, 0, 639, 479 ); + + + /*****************************\ + |* Colocamos el vector de int. *| °±²þ²±° + \*****************************/ + intvect = ON; + for ( i=1; i < argc; i++ ) + if ( strcmpi( argv[i], "/BLINK" ) == 0 ) + intvect = OFF; + if ( intvect == OFF || atexit( AnulaInterrupcion ) != 0 ) + { + intvect = OFF; + } else { + intvect = ON; + /* save the old interrupt vector */ + oldhandler = getvect(INTR); + /* install the new interrupt handler */ + setvect(INTR, handler); + + IntVect = ON; + } + + /*****************************\ + |* Cargamos las fuentes de *| °±²Ü²±° + |* usuario para el letrero dig.*| °±²ß²±° + \*****************************/ + if ( ( ptr_char = ( char *)malloc( sizeof(char)*4096 ) ) == NULL ) + Error( 0x06, "Error inicializando Memoria, fuentes" ); + LeeFuentes(Config.Vent_msg); + + + /*****************************\ + |* Leemos la configuraci¢n glb *| °±²Ü²±° + |* y desactivamos el bloqueo *| °±²Û²±° + |* si procede. *| °±²ß²±° + \*****************************/ + if ( BConfig.AbrirReg( "datos\\config.cfg", sizeof( CONFIG ) ) != OK ) + Error( 0x01, BConfig.cError ); + if ( BConfig.Registros() == 0 ) + BConfig.InsReg( (void *)&Config, BConfig.Registros(), ARRIBA ); + else + BConfig.LeeReg( (void *)&Config, 0 ); + + +//ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +//ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +//ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +// AnulaInterrupcion(); +//ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +//ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +//ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ + + MenuPrincipal(); + + /*****************************\ + |* DesInicializamos todo y *| °±²Ü²±° + |* mostramos el mensaje final. *| °±²ß²±° + \*****************************/ + BConfig.CerrarReg(); + free( ptr_char ); + AnulaInterrupcion(); + + closegraph(); + + + printf( "\n%s", buffer[0] ); + printf( "\n%s", buffer[1] ); + printf( "\n%s", buffer[2] ); + printf( "\n%s", buffer[3] ); + +return 0; + +} + +void AnulaInterrupcion(void) +{ +/* reset the old interrupt handler */ +if ( intvect == ON ) + setvect(INTR, oldhandler); +intvect = OFF; +} + + + +void MenuPrincipal(void) +{ + int ok, CurrCol, BPush, PulsoIntro; + int i; + char buffer[80]; + + + ok = 0; CurrCol = 0; + PulsoIntro = 0; + +// if ( carga_botones( "systm\\alumMP.img" ) != OK ) Error( 0x03, "Make Boton, no pudo cargar los botones" ); + + RecopilaDatos(); + DibujaMenuPrincipal(); + + // Recargamos los botones del men£ + if ( carga_botones( "systm\\alumMP.img" ) != OK ) Error( 0x03, "Make Boton, no pudo cargar los botones" ); + + do { + if ( PulsoIntro == 0 ) + { + MarcaItemSeleccionado( CurrCol, INTENSO ); + BPush = Comprueba_Secuencia( SEC_MENU, RatonVentas ); + MarcaItemSeleccionado( CurrCol, NORMAL ); + if ( BPush > 0 && BPush != 11 ) + { + CurrCol = BPush - 1; + MarcaItemSeleccionado( CurrCol, INTENSO ); + } + } else { + while( kbhit() ) getch(); + PulsoIntro = 0; + BPush = CurrCol + 1; + } + + switch( BPush ) + { + case 0: // No se pulso ningun BOTON + while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER + break; + case -2: // Hay una tecla normal en BUFFER + // Intro + if ( getch() == 13 ) + PulsoIntro = 1; + while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER + break; + case -1: // Hay una tecla especial en BUFFER + switch( getch() ) + { + // Flecha Izquierda + case 75: + case 15: + CurrCol--; if ( CurrCol < 0 ) CurrCol = 9; + break; + // Flecha Arriba + case 72: + CurrCol--; if ( CurrCol < 0 ) CurrCol = 7; + break; + // Flecha Derecha + case 77: + case 9: + CurrCol++; if ( CurrCol > 9 ) CurrCol = 0; + break; + // Flecha Abajo + case 80: + CurrCol++; if ( CurrCol > 7 ) CurrCol = 0; + break; + // Inicio + case 71: + CurrCol = 0; + break; + // Fin + case 79: + CurrCol = 9; + break; + } + break; + // Gestion de Antiguos Alumnos + case 1: + EjecutaModulo( GstAlumnos ); + break; + // Ordenaciones + case 2: + PantallaGrafica( 215, 50, 415, 230 ); + Imprime_Estaticos( 92, "systm\\alumMP.img" ); + BPush = SubItem( 3, 5 ); + PantallaGrafica( 215, 50, 415, 230 ); + switch ( BPush ) + { + case 1: + case 2: + case 3: + case 4: + case 5: + TIPO_ORDENACION = BPush - 1; + Optar( ENCUADRE, "Comando Ordenar", "Ordenando la base de", "datos. Esto puede tardar unos", "minutos. Por favor, espere...", NULL ); + sprintf( buffer, "datos\\alum.dbf" ); + if ( !access( buffer, 0 ) ) + { + if ( BAlum.AbrirReg( buffer, sizeof( AntiguosAlumnos ) ) == ERROR ) + Error(0x01, BAlum.cError); + BAlum.SortReg( Ordenar ); + BAlum.CerrarReg(); + } + Optar( ENCUADRE, "Comando Ordenar", "Ordenando la base de", "datos. Esto puede tardar unos", "minutos. Por favor, espere...", NULL ); + break; + } + break; + // -- + case 3: +/* + PantallaGrafica( 215, 160, 415, 270 ); + Imprime_Estaticos( 95, "systm\\Tpv_MP.img" ); + BPush = SubItem( 6, 3 ); + PantallaGrafica( 215, 160, 415, 270 ); + switch ( BPush ) + { + case 1: + EjecutaModulo( InfoEmpleados ); + break; + case 2: + EjecutaModulo( PassEmpleados ); + break; + case 3: + EjecutaModulo( GraficaVentaEmpleados ); + break; + } +*/ + break; + // Listados + case 4: + PantallaGrafica( 215, 200, 415, 310 ); + Imprime_Estaticos( 93, "systm\\alumMP.img" ); + BPush = SubItem( 4, 3 ); + PantallaGrafica( 215, 200, 415, 310 ); + switch ( BPush ) + { + case 1: + sprintf( buffer, "datos\\alum.dbf" ); + if ( !access( buffer, 0 ) ) + { + // Cargamos los botones del programa + if ( carga_botones( "systm\\alum.img" ) != OK ) Error( 0x03, "Make Boton, no pudo cargar los botones" ); + + if ( BAlum.AbrirReg( buffer, sizeof( AntiguosAlumnos ) ) == ERROR ) + Error(0x01, BAlum.cError); + ImprimeNombrees( 1 ); + BAlum.CerrarReg(); + + // Cargamos los botones del programa + if ( carga_botones( "systm\\alumMP.img" ) != OK ) Error( 0x03, "Make Boton, no pudo cargar los botones" ); + } + break; + case 2: + EjecutaModulo( ImprimeEtiquetas ); + break; + case 3: + sprintf( buffer, "datos\\alum.dbf" ); + if ( !access( buffer, 0 ) ) + { + // Cargamos los botones del programa + if ( carga_botones( "systm\\alum.img" ) != OK ) Error( 0x03, "Make Boton, no pudo cargar los botones" ); + + if ( BAlum.AbrirReg( buffer, sizeof( AntiguosAlumnos ) ) == ERROR ) + Error(0x01, BAlum.cError); + if ( Optar( 1, "Escoja formato salida:", "Presione aceptar para imprimir", "los datos de salida, o canclar", "para grabarlos en soporte A:\\", NULL ) ) + ImprimeNombrees( 3 ); + else + Optar( 0, "ATENCION!!!", "Funci¢n no implementada.", NULL ); + + BAlum.CerrarReg(); + + // Cargamos los botones del programa + if ( carga_botones( "systm\\alumMP.img" ) != OK ) Error( 0x03, "Make Boton, no pudo cargar los botones" ); + } + break; + } + break; + // -- + case 5: +/* + PantallaGrafica( 215, 205, 415, 350 ); + Imprime_Estaticos( 94, "systm\\alumMP.img" ); + BPush = SubItem( 5, 4 ); + PantallaGrafica( 215, 205, 415, 350 ); + switch ( BPush ) + { + case 1: +// EjecutaModulo( VentasDiarias ); + break; + case 2: + break; + } +*/ + break; + // Ayuda + case 6: + // Cargamos los botones del programa + if ( carga_botones( "systm\\alum.img" ) != OK ) Error( 0x03, "Make Boton, no pudo cargar los botones" ); + + Optar( 0, "­ Ayuda !", "Para cualquier consulta", "dirijase a:","---","www.arrakis.es/~infomundo/JD", NULL ); + + // Cargamos los botones del programa + if ( carga_botones( "systm\\alumMP.img" ) != OK ) Error( 0x03, "Make Boton, no pudo cargar los botones" ); + + break; + // Miscelanea + case 7: + PantallaGrafica( 215, 215, 415, 430 ); + Imprime_Estaticos( 96, "systm\\alumMP.img" ); + BPush = SubItem( 7, 6 ); + PantallaGrafica( 215, 215, 415, 430 ); + switch ( BPush ) + { + case 1: + break; + case 2: + break; + case 3: + break; + case 4: + break; + case 5: + break; + case 6: + EjecutaModulo( ConfigurarEntorno ); + break; + } + break; + // Salir + case 8: + ok = 1; + break; + // Marcador interior del letrero que se desplaza + case 9: + break; + // Marcador exterior del letrero que se desplaza + // Creditos... + case 10: + Creditos(); + DibujaMenuPrincipal(); + break; + // Ventana infierior izquierda + case 11: + break; + + } + + } while ( !ok ); + +} + + +void EjecutaModulo( void (*FuncionModulo)(void) ) +{ + // Cargamos los botones del programa + if ( carga_botones( "systm\\alum.img" ) != OK ) Error( 0x03, "Make Boton, no pudo cargar los botones" ); + + // Ejecutamos la funcion Pedida + FuncionModulo(); + + // Recargamos los botones del men£ + if ( carga_botones( "systm\\alumMP.img" ) != OK ) Error( 0x03, "Make Boton, no pudo cargar los botones" ); + + DibujaMenuPrincipal(); + +} + + +void MarcaItemSeleccionado( int Columna, char como ) +{ + + Imprime_Bordes( SEC_MENU, ( Columna + 1 ), ( como == NORMAL ) ? -1 : 11 ); + +} + +void MarcaSubItemSeleccionado( int Sec, int Columna, char como ) +{ + + Imprime_Bordes( Sec, ( Columna + 1 ), ( como == NORMAL ) ? -1 : 11 ); + +} + +void DibujaMenuPrincipal(void) +{ + int i, Center; + char buffer[80]; + char NombreMenu[8][80] = { "Gesti¢n Ant. Alumnos", "Ordenar por...", "---", + "Listados", "---", "Ayuda", + "Miscelanea", "Salir" }; + + // Rellenamos la pantalla con un fondo atractivo... + setfillstyle( Config.FillBgS, Config.FillBgC ); bar( 0, 0, 640, 480 ); + + Imprime_Estaticos( 90, "systm\\alumMP.img" ); + + settextstyle( SMALL_FONT, HORIZ_DIR, 6 ); + + for ( i = 0; i < 8; i++ ) + { + Center = (200 - textwidth( NombreMenu[i] ) ) / 2; + setcolor( EGA_BLACK ); outtextxy( 422 + Center, 164 + 40*i, NombreMenu[i] ); + setcolor( EGA_WHITE ); outtextxy( 423 + Center, 165 + 40*i, NombreMenu[i] ); + } + + if ( access( buffer, 0 ) != 0 ) + strcpy( buffer, "systm\\alum.pcx" ); + DibujaLogotipo( buffer, 25, 5 ); + + sprintf( Buffer, "Dirija cualquier consulta a: e-mail: Jose-David.Guillen@cs.us.es o visiteme en http://www.arrakis.es/~infomundo/JD " ); + + MensajesLn.x = 117; MensajesLn.y = 291; + MensajesLn.ndigitos = 11; + MensajesLn.AX = 2; MensajesLn.AY = 2; + MensajesLn.C1 = Config.DigBg; MensajesLn.C2 = Config.DigFg; + + MuestraDatos(); +} + + + +/***************************************************************************\ +|* *| +|* INT CLK *| +|* *| +|* Descripci¢n: *| +|* interrupci¢n para el parpadeo de los led's *| +|* *| +|* Entradas: (indeterminadas) *| +|* *| +|* *| +|* *| +|* Salidas: (ninguna) *| +|* *| +\***************************************************************************/ +void interrupt handler(__CPPARGS) +{ +/* increase the global counter */ + if ( IntVect == ON ) + { + count = (count++)%16; + if ( count == 1 ) + { + setpalette( 11, EGA_GREEN ); + setpalette( 13, EGA_LIGHTGREEN ); + } + else if ( count == 8 ) + { + setpalette( 11, EGA_RED ); + setpalette( 13, EGA_LIGHTRED ); + + } + } + +/* call the old routine */ + oldhandler(); +} + + +void DibujaLogotipo( char * File, int X, int Y ) +{ + FILE *fp; + int alto, ancho; unsigned char byte; + int contador; + char color[17] = { 0, EGA_RED, EGA_GREEN, EGA_LIGHTGRAY, + EGA_LIGHTRED, EGA_LIGHTRED, EGA_LIGHTRED, EGA_LIGHTRED, + EGA_LIGHTRED, EGA_LIGHTRED, EGA_LIGHTRED, EGA_LIGHTRED, + EGA_LIGHTRED, EGA_LIGHTRED, EGA_LIGHTRED, EGA_LIGHTRED, EGA_LIGHTRED }; + + + if ( ( fp = fopen ( File, "rb" ) ) != NULL ) + { + + // Saltamos la cabecera + fseek( fp, 128, SEEK_SET ); + + for(alto=0; alto<279; alto++) + { + for(ancho=0; ancho<240; ) + { + byte=getc(fp); + if(byte<=0xC0) + { + if ( byte != 255 ) +// VGARam[ ancho+X + (alto+Y)*320 ] = color[byte%16]; + putpixel( ancho+X, alto+Y, color[byte%16] ); + ancho++; + } + else + { + contador=byte&0x3F; byte=getc(fp); + if ( byte != 255 ) + for(; contador>0; contador--) + { +// VGARam[ ancho+X + (alto+Y)*320 ] = color[byte%16]; + + putpixel( ancho+X, alto+Y, color[byte%16] ); + ancho++; + } + else + ancho += contador; + } + } + } + + + + fclose( fp ); + } + +} + + +void PantallaGrafica( int X0, int Y0, int X1, int Y1 ) +{ + static void far *ImagenFondo; + static Memoria = 0; + + + if ( Memoria == 1 ) + { + putimage( X0, Y0, ImagenFondo, COPY_PUT ); + farfree( ImagenFondo ); + Memoria = 0; + } else + + if ( ( ImagenFondo = farmalloc( JD_imagesize( X0, Y0, X1, Y1 ) ) ) != NULL ) + { + Memoria = 1; + getimage( X0, Y0, X1, Y1, ImagenFondo ); + + } else { + + Error( 0x04, "Memoria insuficiente" ); + + } + +} + +int SubItem( int Sec, int NItem ) +{ +int ok, PulsoIntro, CurrSubCol, BPush; +int dev = -1; + ok = 0; PulsoIntro = 0; CurrSubCol = 0; + do { + + if ( PulsoIntro == 0 ) + { + MarcaSubItemSeleccionado( Sec, CurrSubCol, INTENSO ); + BPush = Comprueba_Secuencia( Sec, NULL );//RatonVentas ); + MarcaSubItemSeleccionado( Sec, CurrSubCol, NORMAL ); + } else { + PulsoIntro = 0; + BPush = CurrSubCol + 1; + } + + switch( BPush ) + { + case 0: // No se pulso ningun BOTON + while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER + ok = 1; dev = -1; + break; + case -2: // Hay una tecla normal en BUFFER + // Intro + if ( (BPush = getch()) == 13 ) + PulsoIntro = 1; + else if ( BPush == 27 ) { ok = 1; dev = -1; } + while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER + break; + case -1: // Hay una tecla especial en BUFFER + switch( getch() ) + { + // Flecha Izquierda + case 75: + case 15: + // Flecha Arriba + case 72: + CurrSubCol--; if ( CurrSubCol < 0 ) CurrSubCol = NItem-1; + break; + // Flecha Derecha + case 77: + case 9: + ok = 1; + dev = -1; + break; + // Flecha Abajo + case 80: + CurrSubCol++; if ( CurrSubCol > (NItem-1) ) CurrSubCol = 0; + break; + // Inicio + case 71: + CurrSubCol = 0; + break; + // Fin + case 79: + CurrSubCol = 9; + break; + default: + while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER + } + break; + // + default: + if ( BPush <= NItem && BPush > 0 ) + { + ok = 1; + dev = BPush; + } + break; + } + } while ( !ok ); + + return dev; +} + + + + + + +void Error( int code, char *MensajeError ) +{ + free( ptr_char ); + AnulaInterrupcion(); + restorecrtmode(); + BConfig.CerrarReg(); + + printf( "\nSe produjo un codigo de error %d, subcodigo no disponible ", code ); + switch( code ) + { + case 0: + printf( "\n Error Desconocido " ); + break; + case 1: + printf( "\n BDatos gener¢ el error de salida. |ERROR DE ACCESO| " ); + break; + case 2: + printf( "\n Make Boton gener¢ el error de salida " ); + break; + case 3: + printf( "\n Fall¢ en alg£n punto del men£ principal" ); + break; + + }; + + printf( "\n> %s_", MensajeError ); + exit(code); +} + + + + + + + /**************************************************************************\ +|* *| +|* RecopilaDatos *| +|* *| +|* Descripci¢n: *| +|* Recopila todos los datos utilies, de la empresa seleccionada*| +|* *| +|* Entradas: (ninguna) *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void RecopilaDatos( void ) +{ + char buffer[80]; + long RegComp[31 + 2]; + int scl, ctot, clib; + long bcl; + + struct ffblk ffblk; + union REGS r; + int done, i; + + int MesActual = FechaGestionActual.da_mon; + + // Recopilaci¢n de datos sobre: Empresas + sprintf( buffer, "datos\\alum.dbf" ); + if ( access( buffer, 0 ) == 0 && BAlum.AbrirReg( buffer, sizeof( AntiguosAlumnos ) ) != ERROR ) + { + DatosInf.NumAlum = (int)BAlum.Registros(); + BAlum.CerrarReg(); + } else + DatosInf.NumAlum = 0; + + // Datos de interes vario: Espacio Libre en disco + char unidad = bdos(0x19,0,0); + r.h.ah = 0x36; + r.h.dl = unidad+1; + intdos(&r,&r); + scl = r.x.ax; /*sectores por cluster*/ + bcl = (long)scl*r.x.cx; /*bytes por cluster*/ + ctot = r.x.dx; /*clusters total*/ + clib = r.x.bx; /*clusters libres*/ + DatosInf.EspacioLib = (clib*bcl); + + // Datos de interes vario: + // Espacio consumido por las bases de datos ( del la EMPRESA ACTUAL ) + DatosInf.EspacioCon = 0; + sprintf( buffer, "datos\\*.*" ); + done = findfirst( buffer, &ffblk, 0); + while (!done) + { + DatosInf.EspacioCon += ffblk.ff_fsize; + done = findnext(&ffblk); + } +} + + + /**************************************************************************\ +|* *| +|* MuestraDatos *| +|* *| +|* Descripci¢n: *| +|* Muestra los datos previamente recopilados. *| +|* *| +|* Entradas: (ninguna) *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +#define NUM_LINEAS 3 +void MuestraDatos( void ) +{ + static char LineaActual = 0; + + p_Ampliada InfoDatos; + char buffer[120]; + int i; + + LineaActual = 0; + + InfoDatos.x = 30; + InfoDatos.ndigitos = 32; + InfoDatos.AX = 1; InfoDatos.AY = 1; + InfoDatos.C1 = 0; InfoDatos.C2 = Config.TxtFgI; + InfoDatos.C3 = 0; + + for ( i = 0; i < NUM_LINEAS; i++ ) + { + switch( ( LineaActual + i ) % NUM_LINEAS ) + { + case 0: + sprintf( buffer, "Existen %d antiguos alumnos ", DatosInf.NumAlum ); + break; + case 1: + buffer[0] = ' '; + buffer[1] = '\0'; + break; + case 2: + sprintf( buffer, "Espacio ocup: %ld Kb de %d Mb ", DatosInf.EspacioCon / 1024, DatosInf.EspacioLib / 1048576L ); + break; + default: + buffer[0] = ' '; + buffer[1] = '\0'; + break; + }; + InfoDatos.y = 330 + 8*i; + // No tenemos mas remedio que acceder a los datos privados: + InfoDatos.BitByte = 0; InfoDatos.currByte = 0; + + Fuente_Amplia( buffer, &InfoDatos ); + } + LineaActual = ( LineaActual++ ) % NUM_LINEAS; +} + + + /**************************************************************************\ +|* *| +|* RatonVentas *| +|* *| +|* Descripci¢n: *| +|* Funci¢n soporte para el control del raton, que ademas se *| +|* encarga de mostrar el letrero digital y el protector de *| +|* pantalla. *| +|* *| +|* Entradas: *| +|* Linea en la que se inserta y posici¢n f¡sica, y columna *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +int far RatonVentas(void) +{ + char Que; + + clock_t start, end, start2; + + struct time first; + struct time old; + + start2 = start = clock(); + + activa_raton(); + + union REGS io; + io.x.ax = 3; + + do{ + end = clock(); + + if ( ( (end - start2) / (CLK_TCK /*/ 4*/) ) >= 0.001 ) + { + start2 = end; + old = first; + gettime( &first ); + if ( ( old.ti_min != first.ti_min || old.ti_hour != first.ti_hour ) ) + sprintf( Buffer, "Hoy es %02d-%02d-%02d y son las %02d:%02d (Cualquier consulta en: http://www.arrakis.es/~infomundo/JD ;-)", FechaGestionActual.da_day, FechaGestionActual.da_mon, FechaGestionActual.da_year, (int)first.ti_hour, (int)first.ti_min ); + + Fuente_Amplia( Buffer, &MensajesLn ); + } + + int86(0x33, &io, &io); // lee posici¢n y estados del bot¢n +// boton_izq = io.x.bx & 1; +// boton_der = (io.x.bx >> 1) & 1; + x_raton = io.x.cx; + y_raton = io.x.dx; + + }while( (io.x.bx & 1) == 0 && ((io.x.bx >> 1) & 1) == 0 && !kbhit() ); + + + ///////////////////////////////////////// + // RETURN Derecho Izquierdo // + // // + // 0 0 0 // + // 1 1 0 // + // 2 0 1 // + // 3 1 1 // + // // + ///////////////////////////////////////// + + + if ( ((io.x.bx >> 1) & 1)==0 && (io.x.bx & 1)==0 ) Que = 0; + if ( ((io.x.bx >> 1) & 1)==1 && (io.x.bx & 1)==0 ) Que = 1; + if ( ((io.x.bx >> 1) & 1)==0 && (io.x.bx & 1)==1 ) Que = 2; + if ( ((io.x.bx >> 1) & 1)==1 && (io.x.bx & 1)==1 ) Que = 3; + + desactiva_raton(); + return Que; +} + + + + +void Creditos(void) +{ + + desactiva_raton(); + + // Cambiamos a 320x200 + IntVect = OFF; + + + restorecrtmode(); + asm mov al, 0x13 + asm mov ah, 0x00 + asm int 0x10 + + // + MuestraImagen( "SYSTM\\alumc.PCX" ); + while( !kbhit() ); + while( kbhit() ) getch(); + + // Cambiamos a 640x480 + asm mov al, 0x03 + asm mov ah, 0x00 + asm int 0x10 + + setgraphmode( 2 ); + inicializa_raton_grafico( 0, 0, 639, 479 ); + ////////// + setrgbpalette(EGA_WHITE, 56, 58, 59 ); + setrgbpalette(EGA_LIGHTGRAY, 30, 37, 43 ); + setrgbpalette(EGA_DARKGRAY, 24, 27, 30 ); + + IntVect = ON; + +} + + +#define RES_X 320 +#define RES_Y 200 + /**************************************************************************\ +|* *| +|* MuestraImagen *| +|* *| +|* Descripci¢n: *| +|* Descomprime y copia a la pagina indicada un PCX *| +|* *| +|* Entradas: nombre de la imagen *| +|* *| +|* *| +|* Salidas: OK Todo ha ido bien *| +|* ERROR Algo va mal *| +|* *| + \**************************************************************************/ +int MuestraImagen( char *file ) +{ + int alto, ancho, contador; + unsigned char byte; + FILE *fp; + + CargaPaleta( file ); + + if ( (fp = fopen( file,"rb")) != NULL ) + { + // Saltamos la cabecera + fseek( fp, 128, SEEK_SET ); + + for(alto=0; alto0; contador--) + { +// putpixel (ancho, alto, byte); + VGARam[ ancho + alto*320 ] = byte; + ancho++; + } + } + } + } + + fclose(fp); + + } else return ERROR; + + + + return OK; +} + + + + /**************************************************************************\ +|* *| +|* CargaPaleta *| +|* *| +|* Descripci¢n: *| +|* Carga la paleta con los colores por defecto *| +|* *| +|* *| +|* Entradas: achivo PCX de donde cargar la paleta *| +|* *| +|* Salidas: OK Todo ha ido bien *| +|* ERROR Algo va mal *| +|* *| + \**************************************************************************/ +int CargaPaleta(char *file ) +{ + int index; + FILE *fp; + + if ( (fp=fopen( file, "rb" ) ) == NULL ) + return ERROR; + + if ( fseek( fp, -768L, SEEK_END ) == 0 ) + { + for (index=0; index<256; index++) + { + // get the red component + // get the green component + // get the blue component + // set components + Palette256[index][0] = (getc(fp) >> 2);//*64 / 256; + Palette256[index][1] = (getc(fp) >> 2);//*64 / 256; + Palette256[index][2] = (getc(fp) >> 2);//*64 / 256; + } // end for index + + } + setvgapalette256( &Palette256 ); + + + fclose( fp ); + return OK; +} + +/* Setvgapalette256 sets the entire 256 color palette */ +/* PalBuf contains RGB values for all 256 colors */ +/* R,G,B values range from 0 to 63 */ +/* Usage: */ +/* DacPalette256 dac256; */ +/* */ +/* setvgapalette256(&dac256); */ +void setvgapalette256(DacPalette256 *PalBuf) +{ + struct REGPACK reg; + + reg.r_ax = 0x1012; + reg.r_bx = 0; + reg.r_cx = 256; + reg.r_es = FP_SEG(PalBuf); + reg.r_dx = FP_OFF(PalBuf); + intr(0x10,®); +} + + +int Comprueba_Impresora(void) +{ + return ( biosprint(2, 0, 0) & 0x80 ); +} + + +void ImprimeEtiquetas(void) +{ + long i; char pag, buffer[80]; + int Center, lineas = 2, CMen; + int PagInicio, PagFin; + + char Mensaje[][50] = { "Para interrumpir", "pulse una tecla" }; + + OptenPaginasIniFin( &PagInicio, &PagFin, BAlum.Registros() ); + + FILE *file_out; + + if ( !Config.Impresora.Printer ) + { + if ( ( file_out = fopen( Config.Impresora.PrintTo, "w" ) ) == NULL ) + return; + } else { + file_out = stdprn; + + if ( !Optar( 1, "­ Prepare la impresora !", "Prepare y encienda la", "impresora, y pulse ACEPTAR", "cuando este lista...", NULL ) ) + return; + + while ( !Comprueba_Impresora() ) + { + if ( !Optar( 1, "ERROR IMPRESORA", "Encienda la impresora", "y pulse ACEPTAR para continuar", NULL ) ) + return; + } + } + + sprintf( buffer, "datos\\alum.dbf" ); + if ( !access( buffer, 0 ) ) + if ( BAlum.AbrirReg( buffer, sizeof( AntiguosAlumnos ) ) == ERROR ) + Error(0x01, BAlum.cError); + + +////////////////////////////////////////////////////////////// + + Imprime_Estaticos( 100, "systm\\alum.img" ); + + settextstyle( SMALL_FONT, HORIZ_DIR, 6 ); + + setcolor( 63 ); outtextxy( 172, 165, "Imprimiendo Etiquetas" ); + setcolor( EGA_RED ); + + for ( CMen = 0; CMen < lineas; CMen++ ) + { + Center= (296 - textwidth( Mensaje[CMen] ) ) / 2; + outtextxy( 172+Center, 200+20*CMen, Mensaje[CMen] ); + } +////////////////////////////////////////////////////////////// + + + pag = 0; + PagInicio--; + for ( i=PagInicio; i < BAlum.Registros() && i < PagFin; i++, pag++ ) + { + + if ( pag >= 3*12 ) + { + if ( !Optar( 1, "NUEVA PAGINA", "Por favor, realinee la pagina", "y pulse una tecla", NULL ) ) + return; + pag = 0; + } + + BAlum.LeeReg( (void *)&SAlum, i ); +// do { BAlum.LeeReg( (void *)&SAlum, i ); i++; } while( !SAlum.Varios.Notific && i < BAlum.Registros() ); +// do { BAlum.LeeReg( (void *)&BHtmp, i ); i++; } while( !BHtmp.Varios.Notific && i < BAlum.Registros() ); + fprintf( file_out, "\n\r" ); + fprintf( file_out, "N§ Alumno: %4ld", SAlum.CodigoR ); + fprintf( file_out, "\n\r" ); + fprintf( file_out, "\n\r" ); + sprintf( buffer, "%s %s", SAlum.Nombre, SAlum.Apellidos ); + buffer[32]='\0'; + fprintf( file_out, "%-32s ", buffer ); + + fprintf( file_out, "\n\r" ); + + sprintf( buffer, "%s", SAlum.Direccion ); + fprintf( file_out, "%-32s ", buffer ); + + fprintf( file_out, "\n\r" ); + fprintf( file_out, "\n\r" ); + + sprintf( buffer, "%s (%s)", SAlum.Localidad, SAlum.Provincia ); + fprintf( file_out, "%-32s ", buffer ); + + fprintf( file_out, "\n\r" ); + fprintf( file_out, "C.P. %5ld", SAlum.CodPostal ); + fprintf( file_out, "\n\r" ); + fprintf( file_out, "\n\r" ); + +/* + fprintf( file_out, "\n\r" ); + fprintf( file_out, "N§ Alumno: %4ld %s N§ de Alumno: %4ld %s", SAlum.NHno, (SAlum.Varios.CuotaFam ? "F" :" " ), BHtmp.NHno, (BHtmp.Varios.CuotaFam ? "F" :" " ) ); + fprintf( file_out, "\n\r" ); + sprintf( buffer, "%s %s %s", SAlum.Nombre, SAlum.Apellido1, SAlum.Apellido2 ); + fprintf( file_out, "%-37s ", buffer ); + sprintf( buffer, "%s %s %s", BHtmp.Nombre, BHtmp.Apellido1, BHtmp.Apellido2 ); + fprintf( file_out, "%-37s", buffer ); + + fprintf( file_out, "\n\r" ); + + sprintf( buffer, "%s%s%s%s%s", SAlum.Direccion, (SAlum.Num[0]=='\0')?"":",", SAlum.Num, (SAlum.Piso[0]=='\0')?"":",", SAlum.Piso ); + fprintf( file_out, "%-37s ", buffer ); + sprintf( buffer, "%s%s%s%s%s", BHtmp.Direccion, (BHtmp.Num[0]=='\0')?"":",", BHtmp.Num, (BHtmp.Piso[0]=='\0')?"":",", BHtmp.Piso ); + fprintf( file_out, "%-37s", buffer ); + + fprintf( file_out, "\n\r" ); + + sprintf( buffer, "%s (%s)", SAlum.Localidad, SAlum.Provincia ); + fprintf( file_out, "%-37s ", buffer ); + sprintf( buffer, "%s (%s)", BHtmp.Localidad, BHtmp.Provincia ); + fprintf( file_out, "%-37s", buffer ); + + fprintf( file_out, "\n\r" ); + fprintf( file_out, "C.P. %5ld C.P. %5ld", SAlum.CodP, BHtmp.CodP ); + fprintf( file_out, "\n\r" ); +*/ + + if ( kbhit() ) + { + getch(); + if ( Optar( 1, "CANCELAR IMPRESION ?", "Desea Cancelar la impresion", "el trabajo aun no ha concluido ?", NULL ) ) + break ; + } + } + + BAlum.CerrarReg(); +} + +void OptenPaginasIniFin( int *Inicio, int *Fin, int NRegistros ) +{ + void far *Imagen; + char buffer[80]; + struct textsettingstype texttypeinfo; + + *Inicio = 1; + *Fin = NRegistros; + + + Optar( ENCUADRE, "Rango de salida", NULL ); + + settextstyle( SMALL_FONT, HORIZ_DIR, 6 ); + + outtextxy( 175, 220, "Ficha inicial:"); + outtextxy( 175, 260, "Ficha final:"); + + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + sprintf( buffer, "%d", (*Inicio) ); + InputCadenaG(buffer, 0, 5, EGA_WHITE, EGA_BLUE, 320, 220, 460, 240 ); + (*Inicio) = atoi(buffer); + if ( *Inicio < 0 ) *Inicio = 0; + sprintf( buffer, "%d", (*Fin) ); + InputCadenaG(buffer, 0, 5, EGA_WHITE, EGA_BLUE, 320, 260, 460, 280 ); + (*Fin ) = atoi(buffer); + if ( *Fin > NRegistros ) *Fin = NRegistros; + + Optar( ENCUADRE, "Rango de salida", NULL ); +} \ No newline at end of file diff --git a/ALUMNUM.CPP b/ALUMNUM.CPP new file mode 100644 index 0000000..f6bd9b2 --- /dev/null +++ b/ALUMNUM.CPP @@ -0,0 +1,465 @@ +#include +#include +#include +#include +#include +#include +#include + +//#include "alum_def.h" +extern void Error( int code, char *MensajeError ); + + +char *ptr_char; + +char far *VidRam = (char far *)MK_FP( 0xA000, 0); +void far PutPixel(unsigned int x, unsigned int y, int c_elec ); + +typedef struct + { + int x, y; + char ndigitos; + char AX, AY; + char C1, C2, C3; + } p_graphics; + +typedef struct + { + int x, y; // Coordenadas iniciales de muestreo + char ndigitos; // n£mero de digitos a mostrar + char AX, AY; // factor de espaciado + char C1, C2, C3; // colores de fondo, texto, borde + + // Datos privados y uso interno exclusivamente + unsigned int Flen; // longitud de la frase actual + char BitByte; // bit del byte por el que va en el recorrido + char currByte; // byte actual dentro de la frase + + } p_Ampliada; + +int Numero_Digital( long numero, p_graphics *ND ); +void Fuente_Amplia( char *Frase, p_graphics *FA ); + + + /**************************************************************************\ +|* *| +|* Numero_Digital *| +|* *| +|* Descripcion: *| +|* Muestra un numero, con forma digital en pantalla, *| +|* escalandolo seg£n los factores indicados en p_graphics *| +|* ( 9 digitos como m ximo ) *| +|* *| +|* Entradas: *| +|* N£mero y estructura de muestreo *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +int Numero_Digital( long numero, p_graphics *ND ) +{ +// Son 9 digitos VARIABLES +// 0 +// _________ _________ _________ _________ _________ _________ _________ +// |\______ /| |\______ /| |\______ /| |\______ /| |\______ /| |\______ /| |\______ /| +// | | | | | | | | | | | | | | | | | | | | | | | | | | | | +//3 | | 1 | | 5 | | | | | | | | | | | | | | | | | | | | | | | | +// | /-----\ | | /-----\ | | /-----\ | | /-----\ | | /-----\ | | /-----\ | | /-----\ | +// | \-----/ | | \-----/ | | \-----/ | | \-----/ | | \-----/ | | \-----/ | | \-----/ | +//4 | | | | 6 | | | | | | | | | | | | | | | | | | | | | | | | +// | |_____| | | |_____| | | |_____| | | |_____| | | |_____| | | |_____| | | |_____| | +// |/_______\| |/_______\| |/_______\| |/_______\| |/_______\| |/_______\| |/_______\| +// 2 + + static char dnumero[9] = { -1, -1, -1, -1, -1, -1, -1, -1, -1 }; + static char Dn[9] = { 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + + static char vez = 0; + static p_graphics ND1; + + char dnum=0, i, j, digital; + int punto[10]; + int CONST = 0; + char DnTmp[2]; + char signo = 0; + static old_signo = 0; + + + // Si ha cambiado la posicion, el n§ de digitos, o el factor de escala + // habr  que recalcularlo todo. + if ( + ND1.x != ND -> x || ND1.y != ND -> y || + ND1.ndigitos != ND -> ndigitos || + ND1.AX != ND -> AX || ND1.AY != ND -> AY + ) + { + dnumero[0] = -1; dnumero[1] = -1; dnumero[2] = -1; + dnumero[3] = -1; dnumero[4] = -1; dnumero[5] = -1; + dnumero[6] = -1; dnumero[7] = -1; dnumero[8] = -1; + + Dn[0] = 0; Dn[1] = 0; Dn[2] = 0; + Dn[3] = 0; Dn[4] = 0; Dn[5] = 0; + Dn[6] = 0; Dn[7] = 0; Dn[8] = 0; + + //ndigitos1 = ndigitos; + ND1 = *ND; + vez = 0; + } + + // Miramos el signo del n£mero + if ( numero < 0 ) + { + numero *= -1; + signo = 1; + } + + if ( signo != old_signo ) vez = 0; + + setcolor(ND -> C3); + + // Miro todas las cifras que componen el n£mero + for( i=0; i < ND -> ndigitos; i++ ) + { + dnum = numero % 10; + digital = numero; + numero /= 10; + + // Si el n£mero pintado con anterioridad es distinto al actual, lo dibujamos + if ( dnumero[ ND -> ndigitos - 1 - i] != dnum || digital == 0 || vez == 0 ) + { + // digital = dnumero[5 - i]; + dnumero[ND -> ndigitos - 1 - i] = dnum; + //////// Esta parte del c¢digo imprime el digito en pantalla + CONST = 12*ND -> AX*(ND -> ndigitos - 1 - i); + DnTmp[1] = Dn[ND -> ndigitos - 1 -i]; + + // Antes de nada, eliminamos los cero a la izquierda + if ( digital == 0 && i != 0 ) { Dn[ND -> ndigitos - 1 -i] = 0; dnumero[ND -> ndigitos - 1 - i] = -1; } else + switch( dnum ) + { + case 0: + Dn[ND -> ndigitos - 1 -i] = 0x7D; // 0111 1101 + break; + case 1: + Dn[ND -> ndigitos - 1 -i] = 0x60; // 0110 0000 + break; + case 2: + Dn[ND -> ndigitos - 1 -i] = 0x37; // 0011 0111 + break; + case 3: + Dn[ND -> ndigitos - 1 -i] = 0x67; // 0110 0111 + break; + case 4: + Dn[ND -> ndigitos - 1 -i] = 0x6A; // 0110 1010 + break; + case 5: + Dn[ND -> ndigitos - 1 -i] = 0x4F; // 0100 1111 + break; + case 6: + Dn[ND -> ndigitos - 1 -i] = 0x5F; // 0101 1111 + break; + case 7: + Dn[ND -> ndigitos - 1 -i] = 0x61; // 0110 0001 + break; + case 8: + Dn[ND -> ndigitos - 1 -i] = 0x7F; // 0111 1111 + break; + case 9: + Dn[ND -> ndigitos - 1 -i] = 0x6F; // 0110 1111 + break; + } + + DnTmp[0] = Dn[ND -> ndigitos - 1 -i]; + for( j=0; j<7; j++ ) + { + if ( DnTmp[1]%2 != DnTmp[0]%2 || vez == 0 ) + { + if ( DnTmp[0]%2 ) + setfillstyle(SOLID_FILL, ND -> C1); + else + setfillstyle(SOLID_FILL, ND -> C2); + + switch( j ) + { + case 0: + punto[0] = 0*ND -> AX + CONST + ND -> x; punto[1] = 0*ND -> AY + ND -> y; + punto[2] = 10*ND -> AX + CONST + ND -> x; punto[3] = 0*ND -> AY + ND -> y; + punto[4] = 8*ND -> AX + CONST + ND -> x; punto[5] = 2*ND -> AY + ND -> y; + punto[6] = 2*ND -> AX + CONST + ND -> x; punto[7] = 2*ND -> AY + ND -> y; + punto[8] = 0*ND -> AX + CONST + ND -> x; punto[9] = 0*ND -> AY + ND -> y; + fillpoly( 5, punto ); + break; + case 3: + punto[0] = 0*ND -> AX + CONST + ND -> x; punto[1] = 0*ND -> AY + ND -> y; + punto[2] = 2*ND -> AX + CONST + ND -> x; punto[3] = 2*ND -> AY + ND -> y; + punto[4] = 2*ND -> AX + CONST + ND -> x; punto[5] = 9*ND -> AY + ND -> y; + punto[6] = 1*ND -> AX + CONST + ND -> x; punto[7] = 10*ND -> AY + ND -> y; + punto[8] = 0*ND -> AX + CONST + ND -> x; punto[9] = 9*ND -> AY + ND -> y; + fillpoly( 5, punto ); + break; + case 5: + punto[0] = 10*ND -> AX + CONST + ND -> x; punto[1] = 0*ND -> AY + ND -> y; + punto[2] = 10*ND -> AX + CONST + ND -> x; punto[3] = 9*ND -> AY + ND -> y; + punto[4] = 9*ND -> AX + CONST + ND -> x; punto[5] = 10*ND -> AY + ND -> y; + punto[6] = 8*ND -> AX + CONST + ND -> x; punto[7] = 9*ND -> AY + ND -> y; + punto[8] = 8*ND -> AX + CONST + ND -> x; punto[9] = 2*ND -> AY + ND -> y; + fillpoly( 5, punto ); + break; + case 1: + int punto1[12]; + punto1[0] = 1*ND -> AX + CONST + ND -> x; punto1[1] = 10*ND -> AY + ND -> y; + punto1[2] = 2*ND -> AX + CONST + ND -> x; punto1[3] = 9*ND -> AY + ND -> y; + punto1[4] = 8*ND -> AX + CONST + ND -> x; punto1[5] = 9*ND -> AY + ND -> y; + punto1[6] = 9*ND -> AX + CONST + ND -> x; punto1[7] = 10*ND -> AY + ND -> y; + punto1[8] = 8*ND -> AX + CONST + ND -> x; punto1[9] = 11*ND -> AY + ND -> y; + punto1[10] = 2*ND -> AX + CONST + ND -> x; punto1[11] = 11*ND -> AY +ND -> y; + fillpoly( 6, punto1 ); + break; + case 4: + punto[0] = 1*ND -> AX + CONST + ND -> x; punto[1] = 10*ND -> AY + ND -> y; + punto[2] = 2*ND -> AX + CONST + ND -> x; punto[3] = 11*ND -> AY + ND -> y; + punto[4] = 2*ND -> AX + CONST + ND -> x; punto[5] = 18*ND -> AY + ND -> y; + punto[6] = 0*ND -> AX + CONST + ND -> x; punto[7] = 20*ND -> AY + ND -> y; + punto[8] = 0*ND -> AX + CONST + ND -> x; punto[9] = 11*ND -> AY + ND -> y; + fillpoly( 5, punto ); + break; + case 6: + punto[0] = 9*ND -> AX + CONST + ND -> x; punto[1] = 10*ND -> AY + ND -> y; + punto[2] = 10*ND -> AX + CONST + ND -> x; punto[3] = 11*ND -> AY + ND -> y; + punto[4] = 10*ND -> AX + CONST + ND -> x; punto[5] = 20*ND -> AY + ND -> y; + punto[6] = 8*ND -> AX + CONST + ND -> x; punto[7] = 18*ND -> AY + ND -> y; + punto[8] = 8*ND -> AX + CONST + ND -> x; punto[9] = 11*ND -> AY + ND -> y; + fillpoly( 5, punto ); + break; + case 2: + punto[0] = 2*ND -> AX + CONST + ND -> x; punto[1] = 18*ND -> AY + ND -> y; + punto[2] = 8*ND -> AX + CONST + ND -> x; punto[3] = 18*ND -> AY + ND -> y; + punto[4] = 10*ND -> AX + CONST + ND -> x; punto[5] = 20*ND -> AY + ND -> y; + punto[6] = 0*ND -> AX + CONST + ND -> x; punto[7] = 20*ND -> AY + ND -> y; + punto[8] = 2*ND -> AX + CONST + ND -> x; punto[9] = 18*ND -> AY + ND -> y; + fillpoly( 5, punto ); + break; + default: + break; + } + } + DnTmp[0] /= 2; + DnTmp[1] /= 2; + } + } + } + + if ( signo != old_signo ) + { + + if ( (old_signo = signo) == 1 ) + { + setfillstyle(SOLID_FILL, ND -> C1); + + int punto1[12]; + punto1[0] = 1*ND -> AX + ND -> x; punto1[1] = 10*ND -> AY + ND -> y; + punto1[2] = 2*ND -> AX + ND -> x; punto1[3] = 9*ND -> AY + ND -> y; + punto1[4] = 8*ND -> AX + ND -> x; punto1[5] = 9*ND -> AY + ND -> y; + punto1[6] = 9*ND -> AX + ND -> x; punto1[7] = 10*ND -> AY + ND -> y; + punto1[8] = 8*ND -> AX + ND -> x; punto1[9] = 11*ND -> AY + ND -> y; + punto1[10] = 2*ND -> AX + ND -> x; punto1[11] = 11*ND -> AY +ND -> y; + fillpoly( 6, punto1 ); + } + } + + vez = 1; + return 0; +} + + + +//////////////////////////////////////////////////////////////////////////////////// +void far PutPixel(unsigned int x, unsigned int y, int c_elec ) +{ + if ( x < 320 && y < 200 ) + *(VidRam + (x + y*320) ) = c_elec; +} + + +void LeeFuentes(char *file) +{ +FILE *fich; + /* Reservamos 4 Kb. para cargar la fuente en memoria */ + + /* Abrimos el fichero de la fuente */ + + if ((fich=fopen(file,"rb"))==NULL) { + printf("\a\nArchivo %s no encontrado.\n",file); + Error(0, "No se encuentra el archivo de fuentes"); + } + + fseek(fich, SEEK_SET, 0); /* Nos colocamos al principio del fichero */ + fread(ptr_char,1,4096,fich); /* Cargamos en memoria 4096 bytes del fichero */ + fclose(fich); /* Cerramos el fichero */ +} + + + + + + + + +#define TAMx 8 +#define TAMy 8 +void Fuente_Amplia( char *Frase, p_Ampliada far *FA ) +{ + int i, j, k; // Variables de avance + int c_elec; // Color en el momento de imprimir + int PosX, PosY; // Posicion fisica final + char LCaract; // Caracter de linea a tratar + + if ( FA->Flen != _fstrlen( Frase ) ) // Reseteamos las variables de control interno + { + // Obtenemos la longitud de la frase. ( En d¡gitos ) + FA -> Flen = _fstrlen( Frase ); + // Contador de digito actual a cero + FA -> BitByte = 0; + // Posicion dentro de la frase + FA -> currByte = 0; + } + + // Avance horizontal de bit's ( avance de digitos ) + for ( i = 0; i < ( TAMx * (FA -> ndigitos) ); i++ ) + { + k = ( (unsigned char)Frase[ ( (i+FA->BitByte)/TAMx + FA -> currByte ) % FA->Flen ] ) << 4; + LCaract = ( (char)0x01 << (7 - (i+FA->BitByte)%TAMx) ); + PosX = FA -> x + FA->AX * i; // Posicion f¡sica horizontal + // Avance vertical de bit's + for ( j = 0; j < TAMy; j ++ ) + { + PosY = FA -> y + FA->AY * j; // Posicion f¡sica vertical + + if ( ptr_char[ k + j ] & LCaract ) + c_elec = FA->C2; + else + c_elec = FA->C1; + + putpixel ( PosX, PosY, c_elec ); + } + } + // Tenemos en cuenta el avance dentro de la frase + if ( ( FA -> BitByte ++ ) >= 7 ) + { + FA -> BitByte = 0; FA -> currByte ++; + if ( FA -> currByte >= FA -> Flen ) + FA -> currByte = 0; + } + +} +#undef TAMy +#undef TAMx + + +#define TAMx 8 +#define TAMy 16 +void Fuente_Amplia3( char *Frase, p_Ampliada far *FA ) +{ + int i, j, k; // Variables de avance + int c_elec; // Color en el momento de imprimir + int PosX, PosY; // Posicion fisica final + char LCaract; // Caracter de linea a tratar + + if ( FA->Flen != _fstrlen( Frase ) ) // Reseteamos las variables de control interno + { + // Obtenemos la longitud de la frase. ( En d¡gitos ) + FA -> Flen = _fstrlen( Frase ); + // Contador de digito actual a cero + FA -> BitByte = 0; + // Posicion dentro de la frase + FA -> currByte = 0; + } + + // Avance horizontal de bit's ( avance de digitos ) + for ( i = 0; i < ( TAMx * (FA -> ndigitos) ); i++ ) + { + k = ( (unsigned char)Frase[ ( (i+FA->BitByte)/TAMx + FA -> currByte ) % FA->Flen ] ) << 4; + LCaract = ( (char)0x01 << (7 - (i+FA->BitByte)%TAMx) ); + PosX = FA -> x + FA->AX * i; // Posicion f¡sica horizontal + // Avance vertical de bit's + for ( j = 0; j < TAMy; j ++ ) + { + PosY = FA -> y + FA->AY * j; // Posicion f¡sica vertical + + if ( ptr_char[ k + j ] & LCaract ) + c_elec = FA->C2; + else + c_elec = FA->C1; + + putpixel ( PosX, PosY, c_elec ); + } + } + // Tenemos en cuenta el avance dentro de la frase + if ( ( FA -> BitByte ++ ) >= 7 ) + { + FA -> BitByte = 0; FA -> currByte ++; + if ( FA -> currByte >= FA -> Flen ) + FA -> currByte = 0; + } + +} +#undef TAMy +#undef TAMx + +/////ÜÜ///////////////////////////////////////////////////////////////////////////// +////Û///////////////////////////////////////////////////////////////////////////////// +/////ßÜ/////Ü/////////////////////////////////////////////////////////////////////// +//////ß///Ü////ß/Ü////////////////////////////////////////////////////////////////// +///////ß/Ü///Ü////////////////////////////////////////////////////////////////////// +////////Ü//ß////ß/////////////////////////////////////////////////////////////////// +/////////ß////Ü///////////////////////////////////////////////////////////////////// +///////////ß//////////////////////////////////////////////////////////////////////// +#define TAMx 8 +#define TAMy 16 +void FuenteAmplia( char *Frase, p_Ampliada far *FA ) +{ + int i, j, k; // Variables de avance + int c_elec; // Color en el momento de imprimir + int PosX, PosY; // Posicion fisica final + int LCaract; // Caracter de linea a tratar + + if ( FA->C3 == -1 || FA->Flen != _fstrlen( Frase ) ) // Reseteamos las variables de control interno + { + // Obtenemos la longitud de la frase. ( En d¡gitos ) + FA -> Flen = _fstrlen( Frase ); + // Contador de digito actual a cero + FA -> BitByte = 0; + // Posicion dentro de la frase + FA -> currByte = 0; + } + + // Avance horizontal de bit's ( avance de digitos ) + for ( i = 0; i < ( TAMx * (FA -> ndigitos) ); i++ ) + { + k = ( (unsigned char)Frase[ ( (i+FA->BitByte)/TAMx + FA -> currByte ) % FA->Flen ] ) << 4; + LCaract = ( (char)0x01 << (7 - (i+FA->BitByte)%TAMx) ); + PosX = FA -> x + FA->AX * i; // Posicion f¡sica horizontal + // Avance vertical de bit's + for ( j = 0; j < TAMy; j ++ ) + { + PosY = FA -> y + FA->AY * j; // Posicion f¡sica vertical + + if ( ptr_char[ k + j ] & LCaract ) + c_elec = FA->C2; + else + c_elec = FA->C1; + + PutPixel ( PosX, PosY, c_elec ); + } + } + // Tenemos en cuenta el avance dentro de la frase + if ( ( FA -> BitByte ++ ) >= 7 ) + { + FA -> BitByte = 0; FA -> currByte ++; + if ( FA -> currByte >= FA -> Flen ) + FA -> currByte = 0; + } + +} +#undef TAMy +#undef TAMx diff --git a/ALUM_CFG.CPP b/ALUM_CFG.CPP new file mode 100644 index 0000000..83381e0 --- /dev/null +++ b/ALUM_CFG.CPP @@ -0,0 +1,957 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "c:\program\src_dos\libs\make_bot\make_bot.h" +#include "c:\program\src_dos\libs\bdatos\bdatos.hh" +#include "alum_def.h" + + + +CONFIG Config = { + LTBKSLASH_FILL, EGA_BLUE, EGA_BLACK, + EGA_RED, EGA_BLACK, EGA_DARKGRAY, + EGA_LIGHTRED, EGA_DARKGRAY, + EGA_WHITE, EGA_RED, EGA_BLACK, EGA_WHITE, + { 0, { "PrnFile.out" }, 66, "", "", { "\0", "\0", "\0", "\0" }, + { "\0", "\0", "\0", "\0" } }, + + // Horas inicio, y fin + { + { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, + { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 }, { 0, 0 } }, + 5, // 5 de la ma¤ana ( cambio horario ) + 0, + 0 + }, + // Impr. Ticket / Cobro Completo / InicioCaja + { 0, 0, 6, 0 }, + 0, + // Tiempo para lanzar el protector de pantalla (en sg.) + 120, + + "fonts\\prot_ptl.fnt", + "fonts\\vent_msg.fnt", + + { 8, 12, 16, 20, 24, 4 }, + + 1, 2 + + }; + +BDatos BConfig; +BDatos BThemes; + +void PreviewEntorno( void ); +void NoStandard( int BPush ); +void MuestraCFG( int Campo, int Item, char como ); + +// ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß +// Û Parte principal del m¢dulo Û +// ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ +#define CFG_BASE 120 +#define CFG_BASEd 3 + +#define FUENTES 0x00 + +#define COLOR 0x01 +#define FONDO 0x02 +#define TAMANO 0x04 +#define FUENTE 0x08 + + +typedef struct +{ + char Elementos[40]; + char Propiedades; + + char Color, Fondo; + char Tamano, Fuente[40]; + +} ELEMENTOS; + +typedef struct +{ + char Tema[40]; + ELEMENTOS Elementos[7]; +} THEMES; + + // Cada elemento tiene unas propiedades, de las cuales depende el poder usar + // los distintos pulsadores o no. + THEMES Tema = { + "Combinaci¢n standard", + { + { "Fondo de pantalla", COLOR | FONDO | FUENTE }, + { "Texto normal", COLOR | FONDO }, + { "Texto se¤alado", COLOR | FONDO }, + { "Digitos (numeros grandes)", COLOR | FONDO }, + { "Digitos (borde del n£mero)",COLOR }, + { "Fuente del Protector", FUENTE }, + { "Letrero digital", COLOR | FONDO | FUENTE } + // A¥ADIR NUEVOS ELEMENTOS ( RESPETANDO NO SOLAPAR LAS Ä^ + } + }; +char Elementos[][40] = { + { "Fondo de pantalla" }, + { "Texto normal" }, + { "Texto se¤alado" }, + { "Digitos (numeros grandes)" }, + { "Digitos (borde del n£mero)" }, + { "Fuente del Protector" }, + { "Letrero digital" } + // A¥ADIR NUEVOS ELEMENTOS ( RESPETANDO NO SOLAPAR LAS Ä^ + + }; + +int NumElementos = 7, NumFuentes, NumCombinaciones; + +int ListaDesplegable( char Texto[][40], int NumEtos, int DesX, int DesY, char POS ); +void CargaFuentesElemento( int NumElemento ); +void MuestraElemento( int CurrElemento ); +int ObtenTamano( int TOld ); +int ObtenColor( void ); + +void EditCFG( int Campo, int Item, char como ); + + /**************************************************************************\ +|* *| +|* ConfigurarEntorno *| +|* *| +|* Descripci¢n: *| +|* Permite cambiar las opciones de configuraci¢n... *| +|* *| +|* Entradas: (ninguna) *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +char Combinaciones[50][40], Fuentes[50][40]; + +void ConfigurarEntorno( void ) +{ + int CurrCombinacion, CurrElemento, CurrFuente, i, BPush, ok, oldTmp; + int CurrRow, key; + char buffer[80]; + + +char NumItems[] = { 7, 2 }; +char ItemActual = 0; + + + CurrCombinacion = 0; + CurrElemento = 0; + CurrFuente = 0; + + // Rellenamos la pantalla con un fondo atractivo... + setfillstyle( Config.FillBgS, Config.FillBgC ); + bar( 0, 0, 640, 480 ); + + Imprime_Estaticos( CFG_BASE+0, "systm\\alum.img"); // Imprime botones estaticos 'Seccion 1' + // Flecha hacia abajo + ponicono( 184, 276, flecha, 2 ); + ponicono( 184, 331, flecha, 2 ); + ponicono( 184, 386, flecha, 2 ); + + + if ( BThemes.AbrirReg( "datos\\themes.cfg", sizeof( THEMES ) ) == ERROR ) + Error( 1, BThemes.cError); + + // Inicializamos el tema por defecto + if ( BThemes.Registros() == 0 ) + { + Tema.Elementos[0].Fondo = Config.FillBgF; + Tema.Elementos[0].Color = Config.FillBgC; Tema.Elementos[0].Tamano = Config.FillBgS; + Tema.Elementos[1].Color = Config.TxtFgN ; Tema.Elementos[1].Fondo = Config.TxtBgN ; + Tema.Elementos[2].Color = Config.TxtFgI ; Tema.Elementos[2].Fondo = Config.TxtBgI ; + Tema.Elementos[3].Color = Config.NumFg ; Tema.Elementos[3].Fondo = Config.NumBg ; + Tema.Elementos[4].Color = Config.NumLn ; + strcpy( Tema.Elementos[5].Fuente, Config.Prot_fnt ); + + Tema.Elementos[6].Color = Config.DigFg ; Tema.Elementos[6].Fondo = Config.DigBg ; + strcpy( Tema.Elementos[6].Fuente, Config.Vent_msg ); + if ( BThemes.InsReg( (void *)&Tema, 0, ARRIBA ) == ERROR ) + Error( 1, BThemes.cError); + } else + if ( BThemes.LeeReg( (void *)&Tema, CurrCombinacion ) == ERROR ) + Error( 1, BThemes.cError); + + CargaFuentesElemento( CurrElemento ); + MuestraElemento( CurrElemento ); + PreviewEntorno(); + + Imprime_Estaticos( ItemActual+125, "systm\\alum.img"); // Imprime botones estaticos 'Seccion 1' + for ( CurrRow = 0; CurrRow < NumItems[ ItemActual ]; CurrRow ++ ) + MuestraCFG( CurrRow, ItemActual, NORMAL ); + CurrRow = 0; + + ok = 0; + do { + + MuestraCFG( CurrRow, ItemActual, INTENSO ); + BPush = Comprueba_Secuencia( CFG_BASEd, NULL ); + MuestraCFG( CurrRow, ItemActual, NORMAL ); + + switch ( BPush ) + { + case 0: // No se pulso ningun BOTON + while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER + break; + case -2: // Hay una tecla normal en BUFFER + if ( (key=getch()) != 27 && key != 13 ) + ungetch( key ); + EditCFG( CurrRow, ItemActual, NORMAL ); + while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER + break; + case -1: // Hay una tecla especial en BUFFER + switch( getch() ) + { + // Flecha Izquierda + case 75: + case 15: + // Flecha Arriba + case 72: + CurrRow--; if ( CurrRow < 0 ) CurrRow = NumItems[ItemActual] - 1; + break; + // Flecha Derecha + case 77: + case 9: + // Flecha Abajo + case 80: + CurrRow++; if ( CurrRow >= NumItems[ItemActual] ) CurrRow = 0; + break; + // Inicio + case 71: + CurrRow = 0; + break; + // Fin + case 79: + CurrRow = NumItems[ItemActual]; + break; + } + break; + // Men£ Principal + case 1: + ok = 1; + break; + // Combinaciones + case 2: + break; + // Guardar combinaci¢n + case 3: +// GuardaCombinacion(); + break; + // Eliminar combinaci¢n + case 4: +/* + if ( CurrCombinacion != 0 && Optar( 1, "Eliminar combinaci¢n", "Confirme la eliminaci¢n", "de la combinaci¢n actual.", NULL ) ) + { + if ( BThemes.DelReg( CurrCombinacion ) == ERROR ) + Error( 1, BThemes.cError); + CurrCombinacion --; + if ( BThemes.LeeReg( (void *)&Config, CurrCombinacion ) == ERROR ) + Error( 1, BThemes.cError); + PreviewEntorno(); + } +*/ + break; + // Elementos + case 5: + oldTmp = CurrElemento; + CurrElemento = ListaDesplegable( Elementos, NumElementos, 5, 330, ARRIBA ); + if ( oldTmp != CurrElemento ) + { + CargaFuentesElemento( CurrElemento ); + MuestraElemento( CurrElemento ); + PreviewEntorno(); + } + break; + // Fuentes + case 6: + if ( Tema.Elementos[CurrElemento].Propiedades & FUENTE ) + { + oldTmp = CurrFuente; + CurrFuente = ListaDesplegable( Fuentes, NumFuentes, 5, 385, ARRIBA ); + if ( oldTmp != CurrFuente ) + { + if ( CurrElemento == 0 ) + Tema.Elementos[CurrElemento].Tamano = CurrFuente; + + strcpy( Tema.Elementos[CurrElemento].Fuente, Fuentes[CurrFuente] ); + + PreviewEntorno(); + } + } + break; + // Color + case 7: + if ( Tema.Elementos[CurrElemento].Propiedades & COLOR ) + { + Tema.Elementos[CurrElemento].Color = ObtenColor(); + PreviewEntorno(); + setfillstyle( SOLID_FILL, Tema.Elementos[CurrElemento].Color ); + bar( 292, 332, 308, 348 ); + } + break; + // Fondo + case 8: + if ( Tema.Elementos[CurrElemento].Propiedades & FONDO ) + { + Tema.Elementos[CurrElemento].Fondo = ObtenColor(); + PreviewEntorno(); + setfillstyle( SOLID_FILL, Tema.Elementos[CurrElemento].Fondo ); + bar( 292, 360, 308, 376 ); + } + break; + // Tama¤o + case 9: + if ( Tema.Elementos[CurrElemento].Propiedades & TAMANO ) + { + Tema.Elementos[CurrElemento].Tamano = ObtenTamano( Tema.Elementos[CurrElemento].Tamano ); + PreviewEntorno(); + setfillstyle( SOLID_FILL, EGA_LIGHTGRAY ); + bar( 264, 387, 308, 403 ); + sprintf( buffer, "%3d", Tema.Elementos[CurrElemento].Tamano ); + outtextxy( 264, 387, buffer ); + } + break; + // Impresora + // Ventas + // Varios... + case 10: + case 11: + case 12: + ItemActual = BPush - 10; + Imprime_Estaticos( ItemActual+125, "systm\\alum.img"); // Imprime botones estaticos 'Seccion 1' + for ( CurrRow = 0; CurrRow < NumItems[ ItemActual ]; CurrRow ++ ) + MuestraCFG( CurrRow, ItemActual, NORMAL ); + CurrRow = 0; + break; + default: + NoStandard( BPush ); + break; + } + + } while( !ok ); + + + // Copiamos el Tema actual a las opciones de configuracion + Config.FillBgF= Tema.Elementos[0].Fondo; + Config.FillBgC= Tema.Elementos[0].Color; Config.FillBgS= Tema.Elementos[0].Tamano; + Config.TxtFgN = Tema.Elementos[1].Color; Config.TxtBgN = Tema.Elementos[1].Fondo; + Config.TxtFgI = Tema.Elementos[2].Color; Config.TxtBgI = Tema.Elementos[2].Fondo; + Config.NumFg = Tema.Elementos[3].Color; Config.NumBg = Tema.Elementos[3].Fondo; + Config.NumLn = Tema.Elementos[4].Color; + + strcpy( Config.Prot_fnt, Tema.Elementos[5].Fuente ); + + Config.DigFg = Tema.Elementos[6].Color ; Config.DigBg = Tema.Elementos[6].Fondo ; + strcpy( Config.Vent_msg, Tema.Elementos[6].Fuente ); + + // Salvamos la configuraci¢n + if ( BConfig.EscribeReg( (void *)&Config, 0 ) == ERROR ) + Error( 1, BConfig.cError); + + // Salvamos la configuraci¢n + if ( BThemes.EscribeReg( (void *)&Tema, CurrCombinacion ) == ERROR ) + Error( 1, BThemes.cError); + + + BThemes.CerrarReg(); +} + + /**************************************************************************\ +|* *| +|* PreviewPantalla *| +|* *| +|* Descripci¢n: *| +|* Realiza el preview de la mini-pantalla *| +|* *| +|* Entradas: (ninguna) *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void PreviewEntorno( void ) +{ + + +// setbkcolor( Tema.Elementos[0].Fondo ); + setfillstyle( Tema.Elementos[0].Tamano, Tema.Elementos[0].Color ); + bar( 6, 36, 309, 239 ); + + Imprime_Estaticos( CFG_BASE+1, "systm\\alum.img" ); + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + + + // Campos + setfillstyle( SOLID_FILL, Tema.Elementos[1].Fondo ); + bar( 51, 55, 179, 63 ); + bar( 41, 67, 84, 75 ); bar( 121, 67, 179, 75 ); + bar( 51, 79, 99, 87 ); bar( 141, 79, 179, 87 ); + + // Visualizaci¢n R pida + bar( 12, 119, 68, 221 ); + bar( 74, 119, 214, 221 ); + bar( 220, 119, 243, 221 ); + bar( 249, 119, 303, 221 ); + + // Texto Iluminado + setfillstyle( SOLID_FILL, Tema.Elementos[2].Fondo ); + setcolor( Tema.Elementos[2].Color ); + + bar( 15, 122, 67, 129 ); + outtextxy( 11, 120, " 000124 " ); + + setcolor( Tema.Elementos[1].Color ); + outtextxy( 11, 120, " Albaranes de compra " ); + outtextxy( 11, 130, " 000136 Aliados en el juego " ); + outtextxy( 11, 140, " 000250 Baticoco de mono " ); + outtextxy( 11, 150, " 000045 Garganta profunda " ); + outtextxy( 8, 120, " 003 1.500 " ); + outtextxy( 8, 130, " 045 9.999 " ); + outtextxy( 8, 140, " 009 415 " ); + outtextxy( 8, 150, " 010 2.250 " ); + + setcolor( EGA_WHITE ); + outtextxy( 10, 224, " C¢digo de la descripci¢n." ); + + Imprime_Estaticos( CFG_BASE+2, "systm\\alum.img" ); + + +} + + + +void MuestraElemento( int CurrElemento ) +{ + char buffer[80]; + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + + setfillstyle( SOLID_FILL, Config.TxtBgN ); + setcolor( Config.TxtFgN ); + + // Nombre del elemento + bar( 7, 332, 178, 348 ); + outtextxy( 10, 332, Tema.Elementos[CurrElemento].Elementos ); + + // Fuente + bar( 7, 387, 178, 403 ); + if ( Tema.Elementos[CurrElemento].Propiedades & FUENTE ) + outtextxy( 10, 387, Tema.Elementos[CurrElemento].Fuente ); + + // Color + if ( Tema.Elementos[CurrElemento].Propiedades & COLOR ) + setfillstyle( SOLID_FILL, Tema.Elementos[CurrElemento].Color ); + else + setfillstyle( SOLID_FILL, EGA_LIGHTGRAY ); + bar( 292, 332, 308, 348 ); + + // Fondo + if ( Tema.Elementos[CurrElemento].Propiedades & FONDO ) + setfillstyle( SOLID_FILL, Tema.Elementos[CurrElemento].Fondo ); + else + setfillstyle( SOLID_FILL, EGA_LIGHTGRAY ); + bar( 292, 360, 308, 376 ); + + // Tamano + setfillstyle( SOLID_FILL, EGA_LIGHTGRAY ); + bar( 264, 387, 308, 403 ); + sprintf( buffer, "%3d", Tema.Elementos[CurrElemento].Tamano ); + if ( Tema.Elementos[CurrElemento].Propiedades & TAMANO ) + outtextxy( 264, 387, buffer ); + +} + + +int ObtenTamano( int TOld ) +{ + char buffer[80]; + + sprintf ( buffer, "%d", TOld ); + if ( ( InputCadenaG( buffer, 1, 4, Config.TxtBgN, Config.TxtFgN, 264, 387, 308, 403 ) >> 8 ) ) + itoa( TOld, buffer, 10 ); + + return atoi(buffer); +} + + +void CargaFuentesElemento( int NumElemento ) +{ + // Cargamos el tipo de fuente necesario + switch( NumElemento ) + { + // Fondo de pantalla + case 0: + strcpy( Fuentes[ 0], "Sin Fondo" ); + strcpy( Fuentes[ 1], "Fondo Solido" ); + strcpy( Fuentes[ 2], "Lineas Horizontales" ); + strcpy( Fuentes[ 3], "Lineas Inclinadas ////" ); + strcpy( Fuentes[ 4], "Lineas Inclinadas2 ////" ); + strcpy( Fuentes[ 5], "Lineas Inclinadas3 \\\\\\\\" ); + strcpy( Fuentes[ 6], "Lineas Inclinadas4 \\\\\\\\" ); + strcpy( Fuentes[ 7], "Crusado suave" ); + strcpy( Fuentes[ 8], "Crusado Grueso" ); + strcpy( Fuentes[ 9], "Lineas intercaladas" ); + strcpy( Fuentes[10], "Punteado" ); + strcpy( Fuentes[11], "Lineas semi-juntas" ); + NumFuentes = 12; + break; + // Fuente del Protector + // Letrero digital + case 5: + case 6: + // Realizamos una recopilaci¢n de fuentes .FNT +// NumFuentes = AdquirirArchivos( Fuentes, "FONTS\*.FNT" ); + NumFuentes = 0; + break; + default: + NumFuentes = 0; + } +} + + + + +//////////////////////////////////////////////////////////////////////// +//////////////////////C O N F I G U R A C I O N///////////////////////// +//////////////////////////////////////////////////////////////////////// +char ColorR[18*18+10], ColorG[18*18+10], ColorB[18*18+10]; +void RecuadraRGB( int Color ); + +int ObtenColor( void ) +{ + char BPush, ok, Reg; + int CurrCol, R, G, B; + + Optar( ENCUADRE, "Elija Color, o definal¢:", NULL ); + Imprime_Estaticos( CFG_BASE+3, "systm\\alum.img" ); + + CurrCol = 1; + RecuadraRGB( CurrCol ); + ok = 0; + do { + + Imprime_Bordes( CFG_BASEd + 1, ( CurrCol + 2 ), 11 ); + BPush = Comprueba_Secuencia( CFG_BASEd + 1, /*RatonParaColor*/NULL ); + Imprime_Bordes( CFG_BASEd + 1, ( CurrCol + 2 ), -1 ); + + switch ( BPush ) + { + case 0: // No se pulso ningun BOTON + while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER + break; + case -2: // Hay una tecla normal en BUFFER + while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER + break; + case -1: // Hay una tecla especial en BUFFER + while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER + break; + // Aceptar + case 1: + Reg = 0; + ok = 1; + break; + // Cancelar + case 2: + Reg = 1; + ok = 1; + break; + default: + if ( BPush >=2 && BPush <= 18 ) + { + CurrCol = BPush - 2; + putimage( 413, 295 - R - 18, ColorR, COPY_PUT ); + putimage( 428, 295 - G - 18, ColorG, COPY_PUT ); + putimage( 443, 295 - B - 18, ColorB, COPY_PUT ); + RecuadraRGB( CurrCol ); + } + } + + } while( !ok ); + + if ( Reg == 1 ) + { + // Restauro los registros anteriores + + } + + Optar( ENCUADRE, "Elija Color, o definal¢:", NULL ); + + return (CurrCol - 1); +} + +void RecuadraRGB( int Color ) +{ + char R, G, B; + + R = G = B = 0; + + getimage( 413, 295 - R - 18, 413 + 18, 295 - R, ColorR ); + getimage( 428, 295 - G - 18, 428 + 18, 295 - G, ColorG ); + getimage( 443, 295 - B - 18, 443 + 18, 295 - B, ColorB ); + + ponicono( 413, 295 - R - 18, led_off, 1); + ponicono( 428, 295 - G - 18, led_off, 1); + ponicono( 443, 295 - B - 18, led_off, 1); + +} + +int ListaDesplegable( char Texto[][40], int NumEtos, int DesX, int DesY, char POS ) +{ + static int PorDonde, NumEl = -1; + + if ( NumEl != NumEtos ) + { + NumEl = NumEtos; PorDonde = 0; + } + PorDonde ++; if ( PorDonde >= NumEtos ) PorDonde = 0; + + + // Fuente + setfillstyle( SOLID_FILL, Config.TxtBgN ); + setcolor( Config.TxtFgN ); + bar( DesX+2, DesY+2, DesX + 175, DesY + 18 ); + outtextxy( DesX + 5, DesY + 2, Texto[PorDonde] ); + + return PorDonde; +} + + + +//ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +//ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +//ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛA partir de aqui, ya no es standard...ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +//ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +//ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +void MuestraCFG( int Campo, int Item, char como ) +{ + int X0, Y0, X1, Y1; + char buffer[80], draw; + int i; + + draw = 1; + switch( Item ) + { + case 0: + switch ( Campo ) + { + // Imprimir en un archivo ( SI/NO ) + case 0: + draw = 0; + X0 = 350; Y0 = 95; X1 = 370; Y1 = 115; + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? EGA_LIGHTGRAY : EGA_RED ); + bar( X0, Y0, X1, Y1 ); + + if ( !Config.Impresora.Printer ) + ponicono( X0+5, Y0+5, led_on, 1 ); + else + ponicono( X0+5, Y0+5, led_off, 1 ); + break; + // Archivo donde imprimir + case 1: + X0 = 541; Y0 = 99; X1 = 629; Y1 = 116; + sprintf( buffer, "%s", Config.Impresora.PrintTo ); + break; + // Numero de lineas + case 2: + X0 = 541; Y0 = 124; X1 = 629; Y1 = 141; + sprintf( buffer, "%d", Config.Impresora.Lineas ); + break; + + // Imprimir normal + case 3: + X0 = 466; Y0 = 176; X1 = 629; Y1 = 193; + sprintf( buffer, "%s", Config.Impresora.Normal ); + break; + // Imprimir Condensado + case 4: + X0 = 466; Y0 = 201; X1 = 631; Y1 = 218; + sprintf( buffer, "%s", Config.Impresora.Condensado ); + break; + // Comentario inicial ( Tickets ventas ) + case 5: + draw = 0; + X0 = 421; Y0 = 250; X1 = 629; Y1 = 310; + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + for ( i=0; i<4; i++) + outtextxy( X0+3, Y0 + i*15, &Config.Impresora.PrincipioTickets[i][0] ); + break; + // Comentario inicial ( Tickets ventas ) + case 6: + draw = 0; + X0 = 421; Y0 = 321; X1 = 629; Y1 = 381; + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + for ( i=0; i<4; i++) + outtextxy( X0+3, Y0 + i*15, &Config.Impresora.FinTickets[i][0] ); + break; + } + break; + case 1: + switch( Campo ) + { + case 0: + X0 = 541; Y0 = 39; X1 = 629; Y1 = 56; + { + auto char TipoProtector[3][10+1] = { "FUTURA", "AMPLIACION", "F.A." }; + sprintf( buffer, "%s", TipoProtector[Config.TProtector] ); + } + break; + case 1: + X0 = 541; Y0 = 64; X1 = 629; Y1 = 81; + sprintf( buffer, " %04d", (int)Config.Protector ); + break; + case 2: + X0 = 541; Y0 = 120; X1 = 629; Y1 = 134; + sprintf( buffer, " %02d", (int)Config.VProductos.CambioHorario ); + break; + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + X0 = 352; Y0 = 181 + 20*(Campo-3); X1 = 379; Y1 = Y0 + 16; + setfillstyle( SOLID_FILL, EGA_LIGHTGRAY ); + bar( /*X0+*/381, Y0, /*X1+*/500, Y1 ); + sprintf( buffer, " :00 >-> %02d:00", (int)Config.HorasMedicion[ ( Campo - 3 + 1 ) % 6 ] ); + TextoDoble( X0, Y0, buffer ); + sprintf( buffer, " %02d", (int)Config.HorasMedicion[Campo-3] ); + break; + case 9: + case 10: + case 11: + case 12: + X0 = 352; Y0 = 331 + 20*(Campo-9); X1 = 379; Y1 = Y0 + 16; + setfillstyle( SOLID_FILL, EGA_LIGHTGRAY ); + bar( /*X0+*/381, Y0, /*X1+*/500, Y1 ); + sprintf( buffer, " :00 >-> %02d:00", (int)Config.VProductos.HoraIni[ ( Campo - 9 + 1 ) % 4 ].hora ); + TextoDoble( X0, Y0, buffer ); + sprintf( buffer, " %02d", (int)Config.VProductos.HoraIni[ ( Campo - 9 ) % 4 ].hora ); + break; + // Permitir modificar P.C en compras ? + case 13: + X0 = 581; Y0 = 424; X1 = 629; Y1 = 441; + sprintf( buffer, "%s", Config.VProductos.CambioPC == 1 ? "SI" : "NO" ); + break; + // Reloj + case 14: + break; + } + break; + } + + if ( draw ) + { + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + outtextxy( X0+2, Y0, buffer ); + } + + +} + +void EditCFG( int Campo, int Item, char como ) +{ + int X0, Y0, X1, Y1; + char buffer[80], draw; + + draw = 1; + switch( Item ) + { + case 0: + switch ( Campo ) + { + // Imprimir en un archivo ( SI/NO ) + case 0: + draw = 0; + X0 = 350; Y0 = 95; X1 = 370; Y1 = 115; + + Config.Impresora.Printer = !Config.Impresora.Printer; + + while( kbhit() ) getch(); + break; + // Archivo donde imprimir + case 1: + X0 = 541; Y0 = 99; X1 = 629; Y1 = 116; + strcpy( buffer, Config.Impresora.PrintTo ); + if ( !( InputCadenaG( buffer, 0, 20, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + strcpy( Config.Impresora.PrintTo, buffer ); + break; + // Numero de lineas + case 2: + X0 = 541; Y0 = 124; X1 = 629; Y1 = 141; + sprintf( buffer, "%d", Config.Impresora.Lineas ); + if ( !( InputCadenaG( buffer, 1, 3, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + Config.Impresora.Lineas = atoi( buffer ); + + Config.Impresora.Lineas = Config.Impresora.Lineas < 30 ? 30 : Config.Impresora.Lineas; + break; + + // Imprimir normal + case 3: + X0 = 466; Y0 = 176; X1 = 629; Y1 = 193; + strcpy( buffer, Config.Impresora.Normal ); + if ( !( InputCadenaG( buffer, 0, 20, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + strcpy( Config.Impresora.Normal, buffer ); + break; + // Imprimir Condensado + case 4: + X0 = 466; Y0 = 201; X1 = 631; Y1 = 218; + strcpy( buffer, Config.Impresora.Condensado ); + if ( !( InputCadenaG( buffer, 0, 20, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + strcpy( Config.Impresora.Condensado, buffer ); + break; + // Comentario inicial ( Tickets ventas ) + case 5: + X0 = 424; Y0 = 250; X1 = 629; Y1 = 310; + EditComentario( (char *)(&Config.Impresora.PrincipioTickets[0][0]), 3, 25, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1, 15 ); + break; + // Comentario inicial ( Tickets ventas ) + case 6: + X0 = 424; Y0 = 321; X1 = 629; Y1 = 381; + EditComentario( (char *)(&Config.Impresora.FinTickets[0][0]), 3, 25, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1, 15 ); + break; + } + break; + case 1: + switch( Campo ) + { + case 0: + Config.TProtector = (++Config.TProtector)%3; + break; + case 1: + X0 = 541; Y0 = 64; X1 = 629; Y1 = 81; + sprintf( buffer, "%d", (int)Config.Protector ); + if ( !( InputCadenaG( buffer, 1, 4, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + Config.Protector = atof( buffer ); + break; + case 2: + X0 = 541; Y0 = 120; X1 = 629; Y1 = 134; + sprintf( buffer, "%d", (int)Config.VProductos.CambioHorario ); + if ( !( InputCadenaG( buffer, 1, 2, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + Config.VProductos.CambioHorario = atoi( buffer ) % 25; + break; + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + X0 = 352; Y0 = 181 + 20*(Campo-3); X1 = 379; Y1 = Y0 + 16; + sprintf( buffer, "%d", (int)Config.HorasMedicion[Campo-3] ); + if ( !( InputCadenaG( buffer, 1, 2, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + { + Config.HorasMedicion[Campo-3] = atoi( buffer ) % 25; + MuestraCFG( ( ( Campo - 1) < 3 ) ? 8 : ( Campo - 1), Item, NORMAL ); + } + break; + case 9: + case 10: + case 11: + case 12: + X0 = 352; Y0 = 331 + 20*(Campo-9); X1 = 379; Y1 = Y0 + 16; + sprintf( buffer, "%d", (int)Config.VProductos.HoraIni[Campo-9].hora ); + if ( !( InputCadenaG( buffer, 1, 2, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + { + Config.VProductos.HoraIni[Campo-9].hora = atoi( buffer ) % 25; + MuestraCFG( ( (Campo - 1) < 0 ) ? 12 : ( Campo - 1), Item, NORMAL ); + } + break; + // Permitir modificar P.C en compras ? + case 13: + X0 = 581; Y0 = 424; X1 = 629; Y1 = 441; + Config.VProductos.CambioPC = !Config.VProductos.CambioPC; + break; + } + break; + } + + while( kbhit() ) getch(); + +} +/* +void MuestraCFG( int Campo, int Item, char como ) +{ + int X0, Y0, X1, Y1; + char buffer[80], draw; + + draw = 1; + switch( Item ) + { + case 0: + switch ( Campo ) + { + // Imprimir en un archivo ( SI/NO ) + case 0: + draw = 0; + X0 = 350; Y0 = 95; X1 = 370; Y1 = 115; + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? EGA_LIGHTGRAY : EGA_RED ); + bar( X0, Y0, X1, Y1 ); + + if ( !Config.Impresora.Printer ) + ponicono( X0+5, Y0+5, led_on, 1 ); + else + ponicono( X0+5, Y0+5, led_off, 1 ); + break; + // Archivo donde imprimir + case 1: + X0 = 541; Y0 = 99; X1 = 629; Y1 = 116; + sprintf( buffer, "%s", Config.Impresora.PrintTo ); + break; + // Numero de lineas + case 2: + X0 = 541; Y0 = 124; X1 = 629; Y1 = 141; + sprintf( buffer, "%d", Config.Impresora.Lineas ); + break; + + // Imprimir normal + case 3: + X0 = 466; Y0 = 324; X1 = 629; Y1 = 341; + sprintf( buffer, "%s", Config.Impresora.Normal ); + break; + // Imprimir Condensado + case 4: + X0 = 466; Y0 = 349; X1 = 631; Y1 = 366; + sprintf( buffer, "%s", Config.Impresora.Condensado ); + break; + } + break; + } + + if ( draw ) + { + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + outtextxy( X0+2, Y0, buffer ); + } + + +} +*/ + + + /**************************************************************************\ +|* *| +|* NoStandard *| +|* *| +|* Descripci¢n: *| +|* Opciones no standard de esta configuraci¢n... *| +|* *| +|* Entradas: N§ de opci¢n seleccionada *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void NoStandard( int BPush ) +{ + + +} \ No newline at end of file diff --git a/ALUM_DEF.H b/ALUM_DEF.H new file mode 100644 index 0000000..c18c9ba --- /dev/null +++ b/ALUM_DEF.H @@ -0,0 +1,209 @@ +#include // Estructuras varias + +// Para generar una demostraci¢n: activar la macro generadora. +// la demostraci¢n excluir  suficiente c¢digo como para no +// poder generar el programa completo a travez de ASM. +//#define DEMOSTRACION + +#define NORMAL 0 +#define INTENSO 1 + +#define ELIMINAR -1 +#define INSERTAR 1 + +#define ATRAS -1 +#define NUEVA_BUSQUEDA 0 +#define ADELANTE 1 + +#define SEC_OPTAR 2 +#define ENCUADRE 3 + +// Niveles de acceso al programa +#define TOTAL 0 +#define USUARIO 1 +#define NINGUNO 2 + + /**************************************************************************\ +|* *| +|* Estructura para el informe de datos varios... *| +|* *| + \**************************************************************************/ +typedef struct +{ + // Empresas + int NumAlum; // N£mero de antiguos alumnos + + // Datos de interes vario + long EspacioCon; // Espacio consumido por el progr. + long EspacioLib; // Espacio libre en disco. +} DatosInformativos; + + +struct hora +{ + char min; // Minutos y hora + char hora; +}; + + +struct VentaProductos +{ + struct hora HoraIni[5]; + struct hora HoraFin[5]; + + char CambioHorario; + char CambioPC; + + char ProcentajeMesa; +}; + +typedef struct +{ + char Printer; + char PrintTo[80]; + + char Lineas; + char Normal[80], Condensado[80]; + + char PrincipioTickets[4][25+1]; + char FinTickets[4][25+1]; +} IMPRESORA; + + +struct CajaDia +{ + char ImprimirTickets; + char CobroCompleto; + + char PorcentajeMesa; + + char SaltarInicio; +}; + + +typedef struct +{ + char FillBgS, FillBgC, FillBgF; + char NumFg, NumBg, NumLn; + char DigFg, DigBg; + char TxtBgN, TxtBgI, TxtFgN, TxtFgI; + + IMPRESORA Impresora; + + struct VentaProductos VProductos; + + struct CajaDia OpcionesCaja; + + + char TProtector; + double Protector; + + char Prot_fnt[80]; + char Vent_msg[80]; + + char HorasMedicion[6]; + + long UltimaEmpresa; + char Intentos; + +} CONFIG; + +struct CuentaBancaria +{ + int Oficina; // 4 dig. + int Sucursal; // 4 dig. + char DigControl; // 2 dig. + double NumCuenta; // 10 dig. +}; + +typedef struct +{ + long CodigoR; + + char Nombre[15+1]; + char Apellidos[30+1]; +// char Apellido2[15+1]; + + char Direccion[28+1]; + char Localidad[15+1]; + char Provincia[15+1]; + unsigned long CodPostal; + + char Telefono1[15+1]; + char Fax[15+1]; + + struct CuentaBancaria CC; + + char Notas[4][37+1]; + + char FuturaAmpliacion[1024]; +} AntiguosAlumnos; + +//ÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜß +//ÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜß +//ÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜß +//ÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜß + +typedef struct + { + int x, y; + char ndigitos; + char AX, AY; + char C1, C2, C3; + } p_graphics; + +int Numero_Digital( long numero, p_graphics *ND ); +void LeeFuentes(char *file); + +typedef struct + { + int x, y; // Coordenadas iniciales de muestreo + char ndigitos; // n£mero de digitos a mostrar + char AX, AY; // factor de espaciado + char C1, C2, C3; // colores de fondo, texto, borde + + // Datos privados y uso interno exclusivamente + unsigned int Flen; // longitud de la frase actual + char BitByte; // bit del byte por el que va en el recorrido + char currByte; // byte actual dentro de la frase + } p_Ampliada; + + +void Fuente_Amplia( char *Frase, p_Ampliada far *FA ); +void FuenteAmplia( char *Frase, p_Ampliada far *FA ); +void Fuente_Amplia3( char *Frase, p_Ampliada *FA ); + + + +extern struct date FechaGestionActual; + +extern CONFIG Config; + +extern char led_on [18] [18]; +extern char led_off [18] [18]; +extern char flecha [18] [18]; + +int Optar( int optar, ... ); +void ponicono(int x,int y,char matriz[18][18], char pos); +void formatea_u_long( unsigned long Numero, char *Inter_Chg); +void formatea_long( long Numero, char *Inter_Chg); +int InputCadenaG(char *s, int numalp, int lmax, int cc, int cf, int X0, int Y0, int X1, int Y1); +int EditComentario( char *Comentario, int Lineas, int Columnas, int cc, int cf, int X0, int Y0, int X1, int Y1, int Inc ); + +void TextoDoble( int x, int y, char *texto ); +void AnulaInterrupcion(void); + +extern char IntVect; +extern char VisualMode; + +void Error( int code, char *MensajeError ); + +extern int far RatonVentas(void); + +// Cambia las opciones de configuraci¢n. +void ConfigurarEntorno( void ); + +// Gestion de Alumnos +void GstAlumnos(void); + +int Comprueba_Impresora(void); \ No newline at end of file diff --git a/ALUM_GST.CPP b/ALUM_GST.CPP new file mode 100644 index 0000000..86c5396 --- /dev/null +++ b/ALUM_GST.CPP @@ -0,0 +1,1557 @@ +#include +#include +#include +#include +#include +#include + +#include "c:\program\src_dos\libs\make_bot\make_bot.h" +#include "c:\program\src_dos\libs\bdatos\bdatos.hh" +#include "alum_def.h" + +#define NLINEAS_Alum 9 + +BDatos BAlum; +AntiguosAlumnos SAlum; // Estructura de Nombrees + + /*************************************\ +| | +| Parte Principal del M¢dulo | +| | + \*************************************/ +void DuplicaBaseNombrees(void); +void MuestraDatosVAlum( int linea); +void MuestraDatosAlum( long RowStart ); +void MuestraAyudaAlum( char columna ); +//int CompruebaPulsosEstrellas( void ); +void EditItemAlum( char columna, int linea ); +void AlumNuevoRegistro( AntiguosAlumnos *MSAlum ); +void MuestraAlum( char columna, int linea, char como ); +void ObtenCoordenadasAlum( char columna, char linea, int *X0, int *Y0, int *X1, int *Y1 ); + + /*************************************\ +| | +| Parte Secundaria del M¢dulo | +| | +| Secci¢n de Busqueda de Nombrees | +| | + \*************************************/ +void ObtenCoordenadasMatchAlum( char Row, int *X0, int *Y0, int *X1, int *Y1 ); +void MatchDrawAlum( char Row, AntiguosAlumnos MAlum, char como ); +void BuscaAlum( char TipoBusqueda, char *CurrRow, long *CurrAlum ); +int Match_Alum( AntiguosAlumnos *A, AntiguosAlumnos *B ); +void EditMatchAlum( char Row, AntiguosAlumnos * MAlum ); +int ObtenMatchAlum( AntiguosAlumnos *MAlum ); + + /*************************************\ +| | +| Parte Tercera del M¢dulo | +| | +| Secci¢n para la impresi¢n | +| | + \*************************************/ +void ImprimeFichaAAlum(void); +void ImprimeNombrees( char como ); +void ImprimeCabeceraAlum( char como, FILE *file_out ); + + + +// ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß +// Û Parte principal del m¢dulo Û +// ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ + + /**************************************************************************\ +|* *| +|* InfoAlumnos *| +|* *| +|* Descripci¢n: *| +|* Controla la introduccion de datos y muestreo asi como todo *| +|* el interfaz de usuario... *| +|* *| +|* Entradas: (ninguna) *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void GstAlumnos(void) +{ + char buffer[100], ok = 0, i; + int BPush, key; + + char oldCol = -1; + char CurrRow; // Linea sobre la que estamos + char CurrCol; // Columna sobre la que estamos + long CurrAlum; // Producto sobre el que estamos posicionados a golpes + + // Rellenamos la pantalla con un fondo atractivo... + setfillstyle( Config.FillBgS, Config.FillBgC ); bar( 0, 0, 640, 480 ); + Imprime_Estaticos( 30, "systm\\alum.img"); // Imprime botones estaticos 'Seccion 30' + + sprintf( buffer, "datos\\alum.dbf" ); + + if ( BAlum.AbrirReg( buffer, sizeof( AntiguosAlumnos ) ) == ERROR ) + Error(0x01, BAlum.cError); + // Si no hay registros, creamos uno almenos. + if ( BAlum.Registros() == 0 ) + { + AlumNuevoRegistro( &SAlum ); + if ( BAlum.InsReg( (void *)&SAlum, BAlum.Registros(), ARRIBA ) == ERROR ) + Error(0x01, BAlum.cError); + } + + CurrAlum = 0; CurrRow = 0; + + // Mostramos datos hasta que se nos acabe la pantalla + MuestraDatosAlum( CurrRow + CurrAlum ); + if ( BAlum.LeeReg( (void *)&SAlum, 0 ) == ERROR ) + Error(0x01, BAlum.cError); + MuestraDatosVAlum( CurrRow ); + + CurrCol = 0; + + do { + if ( CurrCol != oldCol ) + { + oldCol = CurrCol; MuestraAyudaAlum( CurrCol ); + } + + // Si estamos en la parte de arriba, dejamos ver sobre que linea nos encontramos + for ( i = 0; i < 4; i++ ) + MuestraAlum( i, CurrRow, (CurrCol >= 4) ? INTENSO : NORMAL ); + + MuestraAlum( CurrCol, CurrRow, INTENSO ); + BPush = Comprueba_Secuencia( 1, NULL ); + MuestraAlum( CurrCol, CurrRow, NORMAL ); + + switch ( BPush ) + { + case 0: // No se pulso ningun BOTON + while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER +/* + if ( ( BPush = CompruebaPulsosEstrellas() ) != 0 ) + { + MuestraAlum( BPush, CurrRow, INTENSO ); + if ( BAlum.EscribeReg( (void *)&SAlum, (CurrRow + CurrAlum) ) == ERROR ) + Error(0x01, BAlum.cError); + } +*/ + break; + case -2: // Hay una tecla normal en BUFFER + if ( ( key = getch() ) != 27 ) + { + if ( key != 13 ) + ungetch( key ); + EditItemAlum( CurrCol, CurrRow ); + if ( BAlum.EscribeReg( (void *)&SAlum, (CurrRow + CurrAlum) ) == ERROR ) + Error(0x01, BAlum.cError); + MuestraAlum( CurrCol, CurrRow, NORMAL ); + CurrCol++; if ( CurrCol > 17 ) CurrCol = 17; + } + break; + case -1: // Hay una tecla especial en BUFFER + switch( getch() ) + { + // Flecha Izquierda + case 75: + case 15: + CurrCol--; if ( CurrCol < 0 ) CurrCol = 17; + break; + // Flecha Derecha + case 77: + case 9: + CurrCol++; if ( CurrCol > 17 ) CurrCol = 0; + break; + // Flecha Arriba + case 72: + if ( CurrCol < 4 ) + { + if ( (CurrRow + CurrAlum) > 0 ) + { + if ( ( CurrRow ) <= 0 ) + { + CurrRow = NLINEAS_Alum - 1; CurrAlum -= NLINEAS_Alum; + if ( CurrAlum < 0 ) CurrAlum = 0; + + while( ( CurrRow + CurrAlum ) >= BAlum.Registros() && CurrRow > 0 ) CurrRow--; + while( ( CurrRow + CurrAlum ) >= BAlum.Registros() && CurrAlum > 0 ) CurrAlum++; + + // Mostramos datos hasta que se nos acabe la pantalla + MuestraDatosAlum( CurrAlum ); + } else { + CurrRow --; if ( CurrRow < 0 ) CurrRow = 0; + } + } + + if ( BAlum.LeeReg( (void *)&SAlum, (CurrAlum + CurrRow) ) == ERROR ) + Error(0x01, BAlum.cError); + MuestraDatosVAlum( CurrRow ); + } else { + CurrCol--; if ( CurrCol < 0 ) CurrCol = 17; + } + break; + // Flecha Abajo + case 80: + if ( CurrCol < 4 ) + { + if ( ( CurrRow + CurrAlum ) < BAlum.Registros() - 1 ) + { + + if ( ( CurrRow ) >= NLINEAS_Alum - 1 ) + { + CurrRow = 0; CurrAlum += NLINEAS_Alum; + + while ( (CurrAlum + CurrRow) >= BAlum.Registros() ) CurrAlum--; + + // Mostramos datos hasta que se nos acabe la pantalla + MuestraDatosAlum( CurrAlum ); + } else + CurrRow++; + } + if ( BAlum.LeeReg( (void *)&SAlum, (CurrAlum + CurrRow) ) == ERROR ) + Error(0x01, BAlum.cError); + MuestraDatosVAlum( CurrRow ); + } else { + CurrCol++; if ( CurrCol > 17 ) CurrCol = 0; + } + break; + // Inicio + case 71: + CurrRow = 0; + if ( CurrAlum != 0 ) + { + CurrAlum = 0; + + // Mostramos datos hasta que se nos acabe la pantalla + MuestraDatosAlum( CurrAlum ); + } + + if ( BAlum.LeeReg( (void *)&SAlum, (CurrAlum + CurrRow) ) == ERROR ) + Error(0x01, BAlum.cError); + MuestraDatosVAlum( CurrRow ); + break; + // Fin + case 79: + CurrRow = 0; + if ( CurrAlum != BAlum.Registros() - NLINEAS_Alum ) + { + CurrAlum = BAlum.Registros() - NLINEAS_Alum; + if ( CurrAlum < 0 ) + { + CurrAlum = 0; + CurrRow = BAlum.Registros()-1; + } + // Mostramos datos hasta que se nos acabe la pantalla + MuestraDatosAlum( CurrAlum ); + } + + if ( BAlum.LeeReg( (void *)&SAlum, (CurrAlum + CurrRow) ) == ERROR ) + Error(0x01, BAlum.cError); + MuestraDatosVAlum( CurrRow ); + break; + } + break; + // Imprimir Alumerencias + case 1: + ImprimeFichaAAlum(); + break; + // Menu Principal + case 2: + ok = 1; + break; + // Eliminar + case 3: + if ( Optar( 1, "ATENCION", "Esta seguro que desea", "eliminar al Alumno actual.", NULL ) ) + { + if ( BAlum.DelReg( CurrAlum + CurrRow ) == ERROR ) + Error(0x01, BAlum.cError); + if ( BAlum.Registros() == 0 ) + { + AlumNuevoRegistro( &SAlum ); + if ( BAlum.InsReg( (void *)&SAlum, BAlum.Registros(), ARRIBA ) == ERROR ) + Error(0x01, BAlum.cError); + CurrRow = 0; + } else + + // Si he borrado el £ltimo registro subo una linea + if ( (CurrAlum+CurrRow) >= ( BAlum.Registros() - 2 ) ) + { + if ( (CurrRow + CurrAlum) > 0 ) + { + if ( ( CurrRow ) <= 0 ) + { + CurrRow = NLINEAS_Alum - 1; CurrAlum -= NLINEAS_Alum; + if ( CurrAlum < 0 ) CurrAlum = 0; + + while( ( CurrRow + CurrAlum ) >= BAlum.Registros() && CurrRow > 0 ) CurrRow--; + while( ( CurrRow + CurrAlum ) >= BAlum.Registros() && CurrAlum > 0 ) CurrAlum++; + + // Mostramos datos hasta que se nos acabe la pantalla + MuestraDatosAlum( CurrAlum ); + } else { + CurrRow --; if ( CurrRow < 0 ) CurrRow = 0; + } + } + + if ( BAlum.LeeReg( (void *)&SAlum, (CurrAlum + CurrRow) ) == ERROR ) + Error(0x01, BAlum.cError); + MuestraDatosVAlum( CurrRow ); + } + + // Mostramos datos hasta que se nos acabe la pantalla + MuestraDatosAlum( CurrAlum ); + if ( BAlum.LeeReg( (void *)&SAlum, (CurrAlum + CurrRow) ) == ERROR ) + Error(0x01, BAlum.cError); + MuestraDatosVAlum( CurrRow ); + } + break; + // Insertar + case 4: + AlumNuevoRegistro( &SAlum ); + if ( BAlum.InsReg( (void *)&SAlum, (CurrAlum + CurrRow), ARRIBA ) == ERROR ) + Error(0x01, BAlum.cError); + CurrCol = 5; + if ( ( CurrRow + CurrAlum ) < BAlum.Registros() - 1 ) + { + + if ( ( CurrRow ) >= NLINEAS_Alum - 1 ) + { + CurrRow = 0; CurrAlum += NLINEAS_Alum; + + while ( (CurrAlum + CurrRow) >= BAlum.Registros() ) CurrAlum--; + + } else + CurrRow++; + } + + // Mostramos datos hasta que se nos acabe la pantalla + MuestraDatosAlum( CurrAlum ); + if ( BAlum.LeeReg( (void *)&SAlum, (CurrAlum + CurrRow) ) == ERROR ) + Error(0x01, BAlum.cError); + MuestraDatosVAlum( CurrRow ); + break; + // Retroceso R pido + case 5: + CurrRow = NLINEAS_Alum - 1; CurrAlum -= NLINEAS_Alum; + if ( CurrAlum < 0 ) CurrAlum = 0; + + while( ( CurrRow + CurrAlum ) >= BAlum.Registros() && CurrRow > 0 ) CurrRow--; + while( ( CurrRow + CurrAlum ) >= BAlum.Registros() && CurrAlum > 0 ) CurrAlum++; + + // Mostramos datos hasta que se nos acabe la pantalla + MuestraDatosAlum( CurrAlum ); + if ( BAlum.LeeReg( (void *)&SAlum, (CurrAlum + CurrRow) ) == ERROR ) + Error(0x01, BAlum.cError); + MuestraDatosVAlum( CurrRow ); + break; + // Busqueda Atras + case 6: + BuscaAlum( ATRAS, &CurrRow, &CurrAlum ); + break; + // Buscar + case 7: + BuscaAlum( NUEVA_BUSQUEDA, &CurrRow, &CurrAlum ); + break; + // Busqueda Adelante + case 8: + BuscaAlum( ADELANTE, &CurrRow, &CurrAlum ); + + break; + // AvanceR pido + case 9: + CurrRow = 0; CurrAlum += NLINEAS_Alum; + + while ( (CurrAlum + CurrRow) >= BAlum.Registros() ) CurrAlum--; + + // Mostramos datos hasta que se nos acabe la pantalla + MuestraDatosAlum( CurrAlum ); + if ( BAlum.LeeReg( (void *)&SAlum, (CurrAlum + CurrRow) ) == ERROR ) + Error(0x01, BAlum.cError); + MuestraDatosVAlum( CurrRow ); + break; + default: + break; + } + + } while( !ok ); + + BAlum.CerrarReg(); +} + + + + /**************************************************************************\ +|* *| +|* MuestraDatosAlum *| +|* *| +|* Descripci¢n: *| +|* Dado un registro, se muestran sucesivamente este y todos *| +|* los que hay por debajo de ‚l, hasta que se agote la base *| +|* o no quepan mas en la pantalla. *| +|* *| +|* Entradas: Registro por el que comenzar *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void MuestraDatosAlum( long RowStart ) +{ + int linea, campo; + char dev; + int X0, Y0, X1, Y1; + + // Imprimo la NLINEAS_Alum que caben en la pantalla + dev = OK; + for ( linea=0; linea < NLINEAS_Alum && (RowStart + linea) < BAlum.Registros()/*dev == OK*/; linea++ ) + { + dev = BAlum.LeeReg( (void *)&SAlum, RowStart + linea ); + if ( dev == OK ) + // Por cada linea hay 4 campos, ehhh!!! + for ( campo=0; campo < 4; campo++ ) + MuestraAlum( campo, linea, NORMAL ); + } + + // Ahora limpio los restantes huecos si los hay + if ( linea < NLINEAS_Alum ) //dev != OK ) + { + //linea--; + setfillstyle( SOLID_FILL, Config.TxtBgN ); + for ( ; linea < NLINEAS_Alum; linea++ ) + for ( campo=0; campo < 4; campo++ ) + { + ObtenCoordenadasAlum( campo, linea, &X0, &Y0, &X1, &Y1 ); + bar( X0, Y0, X1, Y1 ); + } + } +} + +void MuestraDatosVAlum( int linea ) +{ + int campo; + + // Mostramos los campos que faltan, ( 1¦ Linea ) + // mas 5 que pertenecen a las estrellas + for ( campo=4; campo < 18; campo++ ) + MuestraAlum( campo, linea, NORMAL ); + +} + + /**************************************************************************\ +|* *| +|* MuestraAlum *| +|* *| +|* Descripci¢n: *| +|* Reescribe el campo dado, seg£n la fila, y la intensidad *| +|* *| +|* Entradas: *| +|* columna campo ha mostar *| +|* linea linea en la que nos encontramos *| +|* como intensidad del texto (NORMAL/INTENSO) *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void MuestraAlum( char columna, int linea, char como ) +{ + char buffer[80], draw; + char buffer1[80], i; + + int X0, Y0, X1, Y1; + + ObtenCoordenadasAlum( columna, linea, &X0, &Y0, &X1, &Y1 ); + + draw = 1; + + + switch( columna ) + { + // Nombre del Alumno + case 0: + draw = 0; + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + sprintf ( buffer, "%15s", SAlum.Nombre ); + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + outtextxy( X0+2, Y0, buffer ); + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + break; + // Apellidos + case 1: + draw = 0; + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + sprintf ( buffer, "%30s", SAlum.Apellidos ); + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + outtextxy( X0+2, Y0, buffer ); + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + break; + // Direccion + case 2: + draw = 0; + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + sprintf ( buffer, "%30s", SAlum.Direccion ); + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + outtextxy( X0+2, Y0, buffer ); + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + break; + // Telefono1 + case 3: + sprintf ( buffer, "%15s", SAlum.Telefono1 ); + break; + + + // Codigo + case 4: + sprintf ( buffer, " %08ld", BAlum.RegActual() ); + break; + // Nombre del Alumno + case 5: + sprintf ( buffer, "%29s", SAlum.Nombre ); + break; + // Apellidos + case 6: + sprintf ( buffer, "%29s", SAlum.Apellidos ); + break; + // Direcci¢n + case 7: + sprintf ( buffer, "%29s", SAlum.Direccion ); + break; + // Localidad + case 8: + sprintf ( buffer, "%15s", SAlum.Localidad ); + break; + // Provincia + case 9: + sprintf ( buffer, "%15s", SAlum.Provincia ); + break; + // Codigo Postal + case 10: + sprintf ( buffer, "%09lu", SAlum.CodPostal ); + break; + + // Telefono1 + case 11: + sprintf ( buffer, "%15s", SAlum.Telefono1 ); + break; + // Fax + case 12: + sprintf ( buffer, "%15s", SAlum.Fax ); + break; + + // CuentaBancaria 1 / 4 + case 13: + draw = 0; + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + sprintf ( buffer, " %04d", SAlum.CC.Oficina ); + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + outtextxy( X0+2, Y0, buffer ); + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + break; + // CuentaBancaria 2 / 4 + case 14: + draw = 0; + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + sprintf ( buffer, " %04d", SAlum.CC.Sucursal ); + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + outtextxy( X0+2, Y0, buffer ); + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + break; + // CuentaBancaria 3 / 4 + case 15: + draw = 0; + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + sprintf ( buffer, " %02d", (int)SAlum.CC.DigControl ); + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + outtextxy( X0+2, Y0, buffer ); + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + break; + // CuentaBancaria 4 / 4 + case 16: + draw = 0; + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + sprintf ( buffer, " %010.0f", SAlum.CC.NumCuenta ); + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + outtextxy( X0+2, Y0, buffer ); + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + break; + + // Comentario + case 17: + draw = 0; + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + for ( i = 0; i < 4; i++ ) + outtextxy( X0, Y0 + 14*i, SAlum.Notas[i] ); + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + break; +/* + // Estrellas + case 15: + case 16: + case 17: + case 18: + case 19: + case 20: + case 21: + case 22: + if ( ( SAlum.Estrellas & ( 0x01 << (columna - 15) ) ) >> (columna - 15 ) ) + ponicono( X0+5, Y0+5, led_on, 1 ); + else + ponicono( X0+5, Y0+5, led_off, 1 ); + // En las estrellas no hay que imprimir nada + draw = 0; + break; +*/ + + } + + if ( draw ) + { + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + outtextxy( X0+2, Y0, buffer ); + } +} + + + /**************************************************************************\ +|* *| +|* MuestraAyudaAlum *| +|* *| +|* Descripci¢n: *| +|* Muestra una peque¤a descripcion del contenido para el campo *| +|* *| +|* Entradas: *| +|* columna campo ha mostar su ayuda *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void MuestraAyudaAlum( char columna ) +{ + char buffer1[80]; + + switch( columna ) + { + // Nombre del Alumno + case 0: + sprintf ( buffer1, "Nombre del Antiguo alumno" ); + break; + // Apellidos + case 1: + sprintf ( buffer1, "1er y 2do Apellido del antiguo alumno" ); + break; + // Telefono 1 + case 2: + sprintf ( buffer1, "N£mero de tel‚fono del antiguo Alumno" ); + break; + // Fax + case 3: + sprintf ( buffer1, "Fax o segundo tel‚fono del antiguo Alumno" ); + break; + + + // Codigo + case 4: + sprintf ( buffer1, "Codigo secuencial. ( DATO PARA EL BANCO )" ); + break; + // Nombre del Alumno + case 5: + sprintf ( buffer1, "Nombre del Antiguo alumno" ); + break; + // Apellidos + case 6: + sprintf ( buffer1, "1er y 2do Apellido del antiguo alumno" ); + break; + // Direccion + case 7: + sprintf ( buffer1, "Direcci¢n, calle, n§..." ); + break; + // Localidad + case 8: + sprintf ( buffer1, "Localidad" ); + break; + // Provincia + case 9: + sprintf ( buffer1, "Provincia" ); + break; + // C¢digo postal + case 10: + sprintf ( buffer1, "C¢digo Postal" ); + break; + // Telefono 1 + case 11: + sprintf ( buffer1, "N£mero de tel‚fono del antiguo Alumno" ); + break; + // Fax + case 12: + sprintf ( buffer1, "Fax o segundo tel‚fono del antiguo Alumno" ); + break; + // Codigo Cuenta Cliente + // Oficina + case 13: + sprintf ( buffer1, "Oficina 4 dig." ); + break; + // Sucursal + case 14: + sprintf ( buffer1, "Sucursal 4 dig." ); + break; + // Digito Control. + case 15: + sprintf ( buffer1, "D¡gito control 2 dig." ); + break; + // N§ Cuenta + case 16: + sprintf ( buffer1, "N£mero de cuenta 10 dig." ); + break; + + case 17: + sprintf ( buffer1, "Breves notas sobre el antiguo alumno" ); + break; + } + + // Ayuda reducida + setfillstyle( SOLID_FILL, EGA_BLACK ); bar( 7, 457, 498, 473 ); + // Imprime la ayudita + setcolor( EGA_WHITE ); outtextxy( 7, 457, buffer1 ); + +} + + + /**************************************************************************\ +|* *| +|* EditItemAlum *| +|* *| +|* Descripci¢n: *| +|* Se encarga de editar y validar el campo. *| +|* *| +|* Entradas: *| +|* columna campo ha editar *| +|* linea linea en la que nos encontramos *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void EditItemAlum( char columna, int linea ) +{ + char buffer[80]; + + int X0, Y0, X1, Y1; + + ObtenCoordenadasAlum( columna, linea, &X0, &Y0, &X1, &Y1 ); + + switch( columna ) + { + // Codigo Real + case 4: +/* + sprintf ( buffer, "%lu", SAlum.CodigoR ); + if ( !( InputCadenaG( buffer, 1, 9, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + SAlum.CodigoR = atol( buffer ); + MuestraAlum( 0, linea, NORMAL ); + MuestraAlum( 4, linea, NORMAL ); +*/ + break; + // Nombre del Alumno + case 5: + strcpy ( buffer, SAlum.Nombre ); + if ( !( InputCadenaG( buffer, 0, 15, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + strcpy ( SAlum.Nombre, buffer ); + MuestraAlum( 0, linea, NORMAL ); +// MuestraAlum( 5, linea, NORMAL ); + + break; + // 1er y 2do Apellidos + case 6: + strcpy ( buffer, SAlum.Apellidos ); + if ( !( InputCadenaG( buffer, 0, 28, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + strcpy ( SAlum.Apellidos, buffer ); + MuestraAlum( 1, linea, NORMAL ); +// MuestraAlum( 6, linea, NORMAL ); + + break; + // Direccion + case 7: + sprintf ( buffer, "%s", SAlum.Direccion ); + if ( !( InputCadenaG( buffer, 0, 28, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + strcpy ( SAlum.Direccion, buffer ); + MuestraAlum( 2, linea, NORMAL ); + break; + // Poblaci¢n + case 8: + sprintf ( buffer, "%s", SAlum.Localidad ); + if ( !( InputCadenaG( buffer, 0, 15, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + strcpy ( SAlum.Localidad, buffer ); + break; + // Provincia + case 9: + sprintf ( buffer, "%s", SAlum.Provincia ); + if ( !( InputCadenaG( buffer, 0, 15, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + strcpy ( SAlum.Provincia, buffer ); + break; + // C¢digo Postal + case 10: + sprintf ( buffer, "%lu", SAlum.CodPostal ); + if ( !( InputCadenaG( buffer, 0, 5, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + SAlum.CodPostal = atol ( buffer ); + break; + + + // Telefono + case 11: + sprintf ( buffer, "%s", SAlum.Telefono1 ); + if ( !( InputCadenaG( buffer, 0, 15, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + strcpy ( SAlum.Telefono1, buffer ); + MuestraAlum( 3, linea, NORMAL ); + break; + // Fax + case 12: + sprintf ( buffer, "%s", SAlum.Fax ); + if ( !( InputCadenaG( buffer, 0, 15, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + strcpy ( SAlum.Fax, buffer ); +// MuestraAlum( 3, linea, NORMAL ); + break; + + // Codgio Cuenta + // Oficina + case 13: + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + + sprintf ( buffer, "%d", SAlum.CC.Oficina ); + if ( !( InputCadenaG( buffer, 0, 4, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + SAlum.CC.Oficina = atoi ( buffer ); + + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + break; + // Sucursal + case 14: + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + + sprintf ( buffer, "%d", SAlum.CC.Sucursal ); + if ( !( InputCadenaG( buffer, 0, 4, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + SAlum.CC.Sucursal = atoi ( buffer ); + + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + break; + // Dig.Control + case 15: + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + + sprintf ( buffer, "%d", (int)SAlum.CC.DigControl ); + if ( !( InputCadenaG( buffer, 0, 2, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + SAlum.CC.DigControl = (char)atoi ( buffer ); + + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + break; + // C¢digo Cuenta Cliente + case 16: + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + + sprintf ( buffer, "%Ld", SAlum.CC.NumCuenta ); + if ( !( InputCadenaG( buffer, 0, 10, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + SAlum.CC.NumCuenta = atof ( buffer ); + + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + break; + + // Comentario + case 17: + settextstyle( SMALL_FONT, HORIZ_DIR, 4 ); + EditComentario( (char *)(&SAlum.Notas[0][0]), 3, 37, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1, 14 ); + settextstyle( SMALL_FONT, HORIZ_DIR, 5 ); + break; + } + +} + + + /**************************************************************************\ +|* *| +|* ObtenCoordenadasAlum *| +|* *| +|* Descripci¢n: *| +|* Obtiene las coordenadas de acotacion para el campo pedido *| +|* *| +|* Entradas: *| +|* columna campo del que obtener las coordenadas *| +|* linea linea en la que nos encontramos *| +|* X0 Y0 X1 Y1 Punteros para devolver las coordenadas *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void ObtenCoordenadasAlum( char columna, char linea, int *X0, int *Y0, int *X1, int *Y1 ) +{ + + // Calculamos la Y0, Y1 para la linea dada ( SOLO columna < 6 ) + *Y0 = 264 + 19*linea; + *Y1 = *Y0 + 17; + + switch( columna ) + { + case 0: + *X0 = 7; *X1 = 108; + break; + case 1: + *X0 = 107; *X1 = 298; + break; + case 2: + *X0 = 307; *X1 = 495; + break; + case 3: + *X0 = 505; *X1 = 633; + break; + + case 4: + *X0 = 67; *Y0 = 7; + *X1 = 148; *Y1 = 28; + break; + case 5: + *X0 = 152; *Y0 = 42; + *X1 = 390; *Y1 = 63; + break; + case 6: + *X0 = 152; *Y0 = 67; + *X1 = 390; *Y1 = 88; + break; + case 7: + *X0 = 152; *Y0 = 112; + *X1 = 390; *Y1 = 133; +/* + *X0 = 92; *Y0 = 112; + *X1 = 388; *Y1 = 133; +*/ + break; + case 8: + *X0 = 92; *Y0 = 137; + *X1 = 223; *Y1 = 158; + break; + case 9: + *X0 = 312; *Y0 = 137; + *X1 = 438; *Y1 = 158; + break; + case 10: + *X0 = 522; *Y0 = 137; + *X1 = 598; *Y1 = 158; + break; + case 11: + *X0 = 92; *Y0 = 162; + *X1 = 245; *Y1 = 183; + break; + case 12: + *X0 = 255; *Y0 = 162; + *X1 = 388; *Y1 = 183; + break; + + case 13: + *X0 = 10; *Y0 = 209; + *X1 = 60; *Y1 = 220; + break; + case 14: + *X0 = 65; *Y0 = 209; + *X1 =115; *Y1 = 220; + break; + case 15: + *X0 =120; *Y0 = 209; + *X1 =145; *Y1 = 220; + break; + case 16: + *X0 =150; *Y0 = 209; + *X1 =250; *Y1 = 220; + break; + + case 17: + *X0 = 402; *Y0 = 165; + *X1 = 633; *Y1 = 221; + break; + } + + *X0 += 2; + *X1 -= 2; + +} + + /**************************************************************************\ +|* *| +|* AlumNuevoRegistro *| +|* *| +|* Descripci¢n: *| +|* Limpia el buffer, para un nuevo registro. *| +|* *| +|* Entradas: (ninguna) *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void AlumNuevoRegistro( AntiguosAlumnos *NSAlum ) +{ + int i, j; + + NSAlum -> CodigoR = 0; // Codigos asignados a los Alumnos + strcpy( NSAlum -> Nombre , "" ); // Nombre del Nombre + // Nombre del Nombre + strcpy( NSAlum -> Apellidos, "" ); + + strcpy( NSAlum -> Telefono1, "" ); // Tel‚fono y fax del Nombre + strcpy( NSAlum -> Fax, "" ); // + + strcpy( NSAlum -> Direccion, "" ); // Direccion + + strcpy( NSAlum -> Localidad, "" ); // Localidad + strcpy( NSAlum -> Provincia, "" ); // Alumincia + NSAlum -> CodPostal = 0; // C¢digo Postal + + + NSAlum -> CC.Oficina = 0; // Oficina + NSAlum -> CC.Sucursal = 0; // Sucursal + NSAlum -> CC.DigControl = 0; // DC + NSAlum -> CC.NumCuenta = 0; // NumCuenta + +// NSAlum -> Estrellas = 0; // Estrellas ( lo que imagina el cliente ) + for ( i = 0; i < 1024; i++ ) + NSAlum -> FuturaAmpliacion[i] = '\0'; + + for ( i = 0; i < 4; i++ ) + for ( j = 0; j < 37; j++ ) + SAlum.Notas[i][j] = '\0'; + + +} + +/* +int CompruebaPulsosEstrellas(void) +{ + char enc, i; + + enc = 0; + + for ( i=0; i < 8; i++ ) + { + if ( y_raton > 190 && y_raton < 215 && + x_raton > ( 90 + 30 * i ) && x_raton < ( 90 + 30 * i + 25 ) ) + { + if ( SAlum.Estrellas & ( 0x01 << i ) ) + SAlum.Estrellas -= ( 0x01 << i ); + else + SAlum.Estrellas += ( 0x01 << i ); + + enc = 15 + i; + break; + } + } + + Anclar_Raton(); + + return enc; +} +*/ + +// ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß +// Û Parte secundaria del m¢dulo Û +// Û Û +// Û Secci¢n de Busqueda de refecencias Û +// ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ + + /**************************************************************************\ +|* *| +|* BuscaAlum *| +|* *| +|* Descripci¢n: *| +|* Busca una referencia por su n§ o descripcion *| +|* *| +|* Entradas: *| +|* ATRAS Busca otra coincidencia hacia atras *| +|* NUEVA_BUSQUEDA Inicia una nueva busqueda *| +|* ADELANTE Busca otra coincidencia hacia delante *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void BuscaAlum( char TipoBusqueda, char *CurrRow, long *CurrAlum ) +{ + static AntiguosAlumnos MAlum; + char enc; long i; + + + switch ( TipoBusqueda ) + { + case NUEVA_BUSQUEDA: + if ( ObtenMatchAlum( &MAlum ) != OK ) + return; + i = 0; + break; + case ATRAS: + case ADELANTE: + i = ( *CurrRow + *CurrAlum ) + TipoBusqueda; + break; + } + + Optar( ENCUADRE, "Comando: Buscar", "Ahora se inica", "la busqueda elegida", NULL ); + enc = 0; + while ( i < BAlum.Registros() && !enc ) + { + if ( BAlum.LeeReg( (void *)&SAlum, i ) == ERROR ) + Error( 0x01, BAlum.cError); + if ( Match_Alum( &SAlum, &MAlum ) ) + enc = 1; + else + i++; + } + + Optar( ENCUADRE, NULL ); + + if ( enc ) + { + *CurrRow = 0; *CurrAlum = i; + // Mostramos datos hasta que se nos acabe la pantalla + MuestraDatosAlum( *CurrRow + *CurrAlum ); + if ( BAlum.LeeReg( (void *)&SAlum, *CurrAlum ) == ERROR ) + Error(0x01, BAlum.cError); + MuestraDatosVAlum( *CurrRow ); + } else + switch( TipoBusqueda ) + { + case NUEVA_BUSQUEDA: + Optar( 0, "Comando: Buscar", "No se encontr¢", "ninguna coincidencia", NULL ); + break; + case ATRAS: + case ADELANTE: + Optar( 0, "Comando: Buscar", "No se encontr¢", "ninguna coincidencia", NULL ); + break; + } + + if ( BAlum.LeeReg( (void *)&SAlum, (*CurrRow + *CurrAlum) ) == ERROR ) + Error( 0x01, BAlum.cError); + + +} + + /**************************************************************************\ +|* *| +|* Match_Alum *| +|* *| +|* Descripci¢n: *| +|* Compara dos registros y devuelve la posible coincidencia *| +|* *| +|* Entradas: *| +|* Registros a comparar *| +|* *| +|* Salidas: *| +|* Resultado de la comparaci¢n *| +|* *| + \**************************************************************************/ +int Match_Alum( AntiguosAlumnos *A, AntiguosAlumnos *B ) +{ + if ( B -> Nombre[0] != '\0' ) + return ( strncmpi( A -> Nombre, B -> Nombre, strlen( B -> Nombre ) ) == 0 ); + if ( B -> Apellidos[0] != '\0' ) + return ( strncmpi( A -> Apellidos, B -> Apellidos, strlen( B -> Apellidos ) ) == 0 ); + if ( B -> Direccion[0] != '\0' ) + return ( strncmpi( A -> Direccion, B -> Direccion, strlen( B -> Direccion ) ) == 0 ); + if ( B -> Telefono1[0] != '\0' ) + return ( strncmpi( A -> Telefono1, B -> Telefono1, strlen( B -> Telefono1 ) ) == 0 ); + + return 0; +} + + /**************************************************************************\ +|* *| +|* ObtenMatchAlum *| +|* *| +|* Descripci¢n: *| +|* Obtine los patrones de busqueda necesarios *| +|* *| +|* Entradas: *| +|* Estructura donde guardar el patron de busqueda *| +|* *| +|* Salidas: *| +|* OK La entrada es correcta *| +|* ERROR El usuario interrumpio la busqueda *| +|* *| + \**************************************************************************/ +int ObtenMatchAlum( AntiguosAlumnos *MAlum ) +{ + char Row, ok, i; + int BPush, key, DEV; + struct textsettingstype texttypeinfo; + + gettextsettings( &texttypeinfo ); + + Optar( ENCUADRE, "Comando: Buscar", NULL ); + Imprime_Estaticos( 31, "systm\\alum.img" ); + + ok = 0; Row = 0; + + AlumNuevoRegistro( MAlum ); + + do + { + MatchDrawAlum(Row, *MAlum, INTENSO); + BPush = Comprueba_Secuencia( SEC_OPTAR, NULL ); + MatchDrawAlum(Row, *MAlum, NORMAL); + + switch ( BPush ) + { + case 0: // No se pulso ningun BOTON + while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER + case -2: + if ( ( key = getch() ) != 13 && key != 27 ) + ungetch( key ); + EditMatchAlum( Row, MAlum ); + for ( i=0; i < 4; i++ ) + MatchDrawAlum(i, *MAlum, NORMAL); + break; + case -1: + switch ( getch() ) + { + // Flecha Izquierda + case 75: + case 15: + // Flecha Arriba + case 72: + Row--; if ( Row < 0 ) Row = 3; + break; + // Flecha Derecha + case 77: + case 9: + // Flecha Abajo + case 80: + Row++; if ( Row > 3 ) Row = 0; + break; + } + break; + case 1: + DEV = OK; ok = 1; + break; + case 2: + DEV = ERROR; ok = 1; + break; + } + + } while ( !ok ); + + Optar( ENCUADRE, NULL ); + + settextstyle( texttypeinfo.font, texttypeinfo.direction, texttypeinfo.charsize ); + + return DEV; + +} + + /**************************************************************************\ +|* *| +|* EditMatchAlum *| +|* *| +|* Descripci¢n: *| +|* Edita el patron de busqueda *| +|* *| +|* Entradas: *| +|* Campo a editar, y lugar donde almacenarlo *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void EditMatchAlum( char Row, AntiguosAlumnos * MAlum ) +{ + int X0, Y0, X1, Y1; + char buffer[80]; + + ObtenCoordenadasMatchAlum( Row, &X0, &Y0, &X1, &Y1 ); + + switch( Row ) + { + case 0: + sprintf( buffer, "%s", MAlum -> Nombre ); + if ( !( InputCadenaG( buffer, 0, 15, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + { + AlumNuevoRegistro( MAlum ); + strcpy( MAlum -> Nombre, buffer ); + } + break; + case 1: + sprintf( buffer, "%s", MAlum -> Apellidos ); + if ( !( InputCadenaG( buffer, 0, 25, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + { + AlumNuevoRegistro( MAlum ); + strcpy ( MAlum -> Apellidos, buffer ); + } + break; + case 2: + sprintf( buffer, "%s", MAlum -> Direccion ); + if ( !( InputCadenaG( buffer, 0, 25, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + { + AlumNuevoRegistro( MAlum ); + strcpy ( MAlum -> Direccion, buffer ); + } + break; + case 3: + sprintf( buffer, "%s", MAlum -> Telefono1 ); + if ( !( InputCadenaG( buffer, 0, 15, Config.TxtBgN, Config.TxtFgN, X0, Y0, X1, Y1) >> 8 ) ) + { + AlumNuevoRegistro( MAlum ); + strcpy ( MAlum -> Telefono1, buffer ); + } + break; + } + + + +} + + /**************************************************************************\ +|* *| +|* MatchDrawAlum *| +|* *| +|* Descripci¢n: *| +|* Escribe los distintos campos seg£n se le indique *| +|* *| +|* Entradas: *| +|* Campo a mostrar, lugar donde se encuentra, y como mostrarlo *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void MatchDrawAlum( char Row, AntiguosAlumnos MAlum, char como ) +{ + int X0, Y0, X1, Y1; + char buffer[80]; + + ObtenCoordenadasMatchAlum( Row, &X0, &Y0, &X1, &Y1 ); + + switch( Row ) + { + case 0: + sprintf( buffer, "%15s", MAlum.Nombre ); + break; + case 1: + strncpy( buffer, MAlum.Apellidos, 25 ); + buffer[26] = '\0'; + break; + case 2: + strncpy( buffer, MAlum.Direccion, 25 ); + buffer[26] = '\0'; + break; + case 3: + strncpy( buffer, MAlum.Telefono1, 15 ); + buffer[15] = '\0'; + break; + } + + setfillstyle( SOLID_FILL, ( como == NORMAL ) ? Config.TxtBgN : Config.TxtBgI ); + bar( X0, Y0, X1, Y1 ); + setcolor ( ( como == NORMAL ) ? Config.TxtFgN : Config.TxtFgI ); + outtextxy( X0+2, Y0, buffer ); + +} + + /**************************************************************************\ +|* *| +|* MatchDrawAlum *| +|* *| +|* Descripci¢n: *| +|* Obtiene las coordenadas relativas al campo dado. *| +|* *| +|* Entradas: *| +|* Campo a obtener las coordenadas, y coordenadas de salida *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void ObtenCoordenadasMatchAlum( char Row, int *X0, int *Y0, int *X1, int *Y1 ) +{ + + switch( Row ) + { + case 0: + *X0 = 265; *X1 = 465; + *Y0 = 200; *Y1 = 220; + break; + case 1: + *X0 = 265; *X1 = 465; + *Y0 = 225; *Y1 = 245; + break; + case 2: + *X0 = 265; *X1 = 465; + *Y0 = 250; *Y1 = 275; + break; + case 3: + *X0 = 265; *X1 = 465; + *Y0 = 280; *Y1 = 305; + break; + case 4: + *X0 = 385; *X1 = 465; + *Y0 = 250; *Y1 = 275; + break; + case 5: + *X0 = 330; *X1 = 365; + *Y0 = 275; *Y1 = 300; + break; + } + + (*X0) ++; (*Y0) ++; + (*X1) --; (*Y1) --; + +} + + +// ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß +// Û Parte secundaria del m¢dulo Û +// Û Û +// Û Secci¢n de Busqueda de refecencias Û +// ÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜÜ + + /**************************************************************************\ +|* *| +|* ImprimeNombrees *| +|* *| +|* Descripci¢n: *| +|* Imprime todas las referencias seg£n se le indique *| +|* *| +|* Entradas: *| +|* Como imprimir las referencias *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void ImprimeNombrees( char como ) +{ + long i, old_reg; + char buffer[80]; + char Pag=0; + + + FILE *file_out; + + old_reg = BAlum.RegActual(); + + if ( !Config.Impresora.Printer ) + { + if ( ( file_out = fopen( Config.Impresora.PrintTo, "w" ) ) == NULL ) + return; + } else { + file_out = stdprn; + while ( !Comprueba_Impresora() ) + { + if ( !Optar( 1, "ERROR IMPRESORA", "Encienda la impresora", "y pulse ACEPTAR para continuar", NULL ) ) + return; + } + } + + + ImprimeCabeceraAlum(como, file_out); + + for ( i=0; i Config.Impresora.Lineas ) { Pag = 1; fputc( 12, file_out ); } + BAlum.LeeReg( (void *)&SAlum, i ); + switch( como ) + { + // Listado General + case 1: + sprintf( buffer, "%s %s", SAlum.Nombre, SAlum.Apellidos ); + buffer[31] = '\0'; + fprintf( file_out, "%-30s %-28s %-15s\n\r", buffer, SAlum.Direccion, SAlum.Telefono1 ); + break; + // Listado Etiquetas + case 2: + sprintf( buffer, "%s, %s", SAlum.Nombre, SAlum.Apellidos ); + buffer[31] = '\0'; + fprintf( file_out, "%30s\n", buffer ); + fprintf( file_out, "%30s\n", SAlum.Direccion ); + fprintf( file_out, "%15s (%15s)\n", SAlum.Localidad, SAlum.Provincia ); + fprintf( file_out, "C¢d. Postal: %lu\n", SAlum.CodPostal ); + + fprintf( file_out, "\n" ); + + break; + // Facturas Bancarias ( IMPRESO ) + case 3: + fprintf( file_out, " %04d %04d %02d %010.0f", SAlum.CC.Sucursal, SAlum.CC.Oficina, SAlum.CC.DigControl, SAlum.CC.NumCuenta ); + fprintf( file_out, " %-15s, %s\n", SAlum.Nombre, SAlum.Apellidos ); + break; + } + } + + if ( !Config.Impresora.Printer ) + fclose( file_out ); + + BAlum.LeeReg( (void *)&SAlum, old_reg ); + +} + +void ImprimeCabeceraAlum( char como, FILE *file_out ) +{ + + switch( como ) + { + // Listado R pido + case 1: + fprintf( file_out, "Nombre y Apellidos Direcci¢n Tel‚fono\n\r" ); + fprintf( file_out, "------------------------------------------------------------------------\n\r" ); + // 123456789-123456789-123456789 123456789-123456789-123456789- 123456789-12345 + // 123456789-123456789-123456789-123456789-123456789-123456789-123456789-123456789- + break; + // Listado Completo + case 2: + // C¢digos de banco + case 3: + fprintf( file_out, "Sucursal Ofic. DC. Num Cuenta Nombre, Apellidos\n\r" ); + fprintf( file_out, "------------------------------------------------------------------------\n\r" ); + break; + } + +} + +void ImprimeFichaAAlum(void) +{ + int i; + FILE *file_out; + + if ( !Config.Impresora.Printer ) + { + if ( ( file_out = fopen( Config.Impresora.PrintTo, "w" ) ) == NULL ) + return; + } else + file_out = stdprn; + + if ( Config.Impresora.Printer && !Optar( 1, "­ Prepare la impresora !", "Prepare y encienda la", "impresora, y pulse ACEPTAR", "cuando este lista...", NULL ) ) + return; + + + fprintf( file_out, "ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\n" ); + fprintf( file_out, "³ Ficha: %05ld ³\n", BAlum.RegActual() ); + fprintf( file_out, "³----------------ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿\n" ); + fprintf( file_out, "³ ³\n" ); + fprintf( file_out, "³ Nombre: %-30s, %-15s ³\n", SAlum.Apellidos, SAlum.Nombre ); + fprintf( file_out, "³ ³\n" ); + fprintf( file_out, "³ Direcci¢n: %-30s ³\n", SAlum.Direccion ); + fprintf( file_out, "³ Localidad: %-15s Provincia: %-15s Cod.Post: %05lu ³\n", SAlum.Localidad, SAlum.Provincia, SAlum.CodPostal ); + fprintf( file_out, "³ ³\n" ); + fprintf( file_out, "³ Telefono: %-15s %-15s ³\n", SAlum.Telefono1, SAlum.Fax ); + fprintf( file_out, "³ ³\n" ); + fprintf( file_out, "³ CC: Sucursal Oficina D.C. Num Cuenta ³\n" ); + fprintf( file_out, "³ %04d %04d %02d %010.0f ³\n", SAlum.CC.Sucursal, SAlum.CC.Oficina, SAlum.CC.DigControl, SAlum.CC.NumCuenta ); + fprintf( file_out, "³ ³\n" ); + fprintf( file_out, "ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ\n" ); + fprintf( file_out, "\n" ); + fprintf( file_out, " Notas:\n" ); + + for ( i=0; i < 4; i++ ) + fprintf( file_out, " %s\n", SAlum.Notas[i] ); + + if ( !Config.Impresora.Printer ) + fclose ( file_out ); + + +} \ No newline at end of file diff --git a/ALUM_UTL.CPP b/ALUM_UTL.CPP new file mode 100644 index 0000000..1b3a9a0 --- /dev/null +++ b/ALUM_UTL.CPP @@ -0,0 +1,792 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "c:\program\src_dos\libs\make_bot\make_bot.h" +#include "c:\program\src_dos\libs\bdatos\bdatos.hh" +#include "alum_def.h" + +#define BLANCO EGA_WHITE +#define ENCUADRE 3 +#define SEC_OPTAR 2 + +void BEEP(void); + + /**************************************************************************\ +|* *| +|* InputCadenaG *| +|* *| +|* Descripci¢n: *| +|* Edita una cadena en formato gr fico *| +|* *| +|* Entradas: *| +|* Puntero a los datos editados *| +|* 0 alfanumerico 1 numerico *| +|* longitud de la cadena (TEXTO/NUMERO) *| +|* color del texto *| +|* color de fondo *| +|* Limites de acotacion *| +|* *| +|* Salidas: (ninguna) *| +|* *| +|* *| + \**************************************************************************/ +int InputCadenaG(char *s, int numalp, int lmax, int cc, int cf, int X0, int Y0, int X1, int Y1) +{ + // A todas las y les sumaba antes +RoW*12 parametro que indica la linea + + int ls; // longitud cadena + char Status = 0; + char *s1; // puntero a cadena inicial + int c, ok; + + s1 = s; // inicio cadena + + setfillstyle(SOLID_FILL, cf); + bar(X0, Y0, X1, Y1); + setcolor(cc); outtextxy( X0, Y0, s1 ); + + + ls = strlen ( s ); // Longitud de actual + + if ( ls < lmax ) { + setcolor(BLANCO); + outtextxy( X0+textwidth( s1 ), Y0, "þ"); + } + + s += ls; // se coloca en el final + + do{ + c = getch(); // obtiene tecla + + if ( c == 27 ) Status = 1; + + ok = ( c == 27 || c == 13 || c == 0); // 13 = INTRO || Especiales + + if ( c == 8 && ls > 0 && !ok ) { // 8 = Back Space + ls--; + s--; + + *s = '\0'; + + setfillstyle(SOLID_FILL, cf); + bar(X0, Y0, X1, Y1); + setcolor(cc); outtextxy( X0, Y0, s1 ); + setcolor(BLANCO); + + outtextxy( X0+textwidth( s1 ), Y0, "þ"); + setcolor(cc); + + } else { + if ( !numalp && c >= 32 && c <= 254 && ls < lmax) { + + *s++ = c; + ls++; + + *s = '\0'; + setfillstyle(SOLID_FILL, cf); + bar(X0, Y0, X1, Y1); + setcolor(cc); outtextxy( X0, Y0, s1 ); + + if ( ls < lmax ) { + setcolor(BLANCO); + outtextxy( X0+textwidth( s1 ), Y0, "þ"); + } + + + } else { + if ( numalp && isdigit(c) && ls < lmax) { + *s++ = c; + ls++; + + *s = '\0'; // Cero final + setfillstyle(SOLID_FILL, cf); + bar(X0, Y0, X1, Y1); + setcolor(cc); outtextxy( X0, Y0, s1 ); + + if ( ls < lmax ) { + setcolor(BLANCO); + outtextxy( X0+textwidth( s1 ), Y0, "þ"); + } + + + } + /*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ*/ + else if( c == 27 ) {*s='\0'; ok = 1; } + /*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ*/ + else BEEP(); + } + } + + }while(!ok); + + ok = 1; + *s = ' '; + while( ok && ls >= 0 ) { + if(*s==' ') { *s = '\0'; s--; ls--; + } else { s++; ok = 0; } + } + + *s = '\0'; + + while(kbhit()) getch(); // Vacia Buffer impidiendo falsas + // pulsaciones... + + return ( (Status<<8) + (ls&0x00FF) ); +} + +void BEEP(void) +{ + + sound(440); + delay(50); + nosound(); + +} + +void formatea_long( long Numero, char *Inter_Chg) +{ + char Buffer1[80]; + + int c; + char Nmc = 0; + + + if ( Numero < 0 ) { Numero *= -1; Nmc = 1; } + + sprintf(Buffer1, "%lu", Numero ); + + Inter_Chg[0]='\0'; + + strrev(Buffer1); + + c = strlen( Buffer1 ); + + while( c >= 3 ) + { + c -= 3; + strncat( Inter_Chg, Buffer1, 3); + + strrev(Buffer1); + + Buffer1[c] = '\0'; + + strrev(Buffer1); + + if(strlen(Buffer1)!=0) + strcat( Inter_Chg, "." ); + } + + strcat( Inter_Chg, Buffer1); + if ( Nmc == 1 ) + strcat( Inter_Chg, "-" ); + + strrev(Inter_Chg); + + +/*// return Buffer2;*/ +} + + +void formatea_u_long( unsigned long Numero, char *Inter_Chg) +{ + char Buffer1[80]; + + int c; + + sprintf(Buffer1, "%lu", Numero); + + Inter_Chg[0]='\0'; + + strrev(Buffer1); + + c = strlen( Buffer1 ); + + while( c >= 3 ) + { + + c -= 3; + strncat( Inter_Chg, Buffer1, 3); + + strrev(Buffer1); + + Buffer1[c] = '\0'; + + strrev(Buffer1); + + if(strlen(Buffer1)!=0) + strcat( Inter_Chg, "." ); + } + + strcat( Inter_Chg, Buffer1); + strrev(Inter_Chg); + + +/*// return Buffer2;*/ +} + + +int Optar( int optar, ... ) +{ + static void far *fondo, far *fd_aceptar, far *fd_cancelar; + static char Memoria = 0; + + int DEV = 0, ok = 0, linea = 0; + int Center; char *buff; + struct textsettingstype texttypeinfo; + + va_list ap; + va_start( ap, &optar ); + + if ( Memoria == 1 ) + { + putimage( 170, 165, fondo , COPY_PUT ); + putimage( 170, 320, fd_aceptar , COPY_PUT ); + putimage( 370, 320, fd_cancelar, COPY_PUT ); + + farfree( fondo ); + farfree( fd_aceptar ); + farfree( fd_cancelar ); + + Memoria = 0; + + if ( optar == ENCUADRE ) return DEV; + } + + if ( ( fondo = farmalloc( JD_imagesize( 170, 165, 470, 315 ) ) ) != NULL && + ( fd_aceptar = farmalloc( JD_imagesize( 170, 320, 270, 350 ) ) ) != NULL && + ( fd_cancelar = farmalloc( JD_imagesize( 370, 320, 470, 350 ) ) ) != NULL ) + { + Memoria = 1; + + getimage( 170, 165, 470, 315, fondo ); + getimage( 170, 320, 270, 350, fd_aceptar ); + getimage( 370, 320, 470, 350, fd_cancelar); + + gettextsettings( &texttypeinfo ); + + Imprime_Estaticos( 100, "systm\\alum.img" ); + + settextstyle( SMALL_FONT, HORIZ_DIR, 6 ); + + setcolor( 63 ); + + while ( (buff = va_arg(ap, char *)) != NULL ) + { + Center = (296 - textwidth( buff ) ) / 2; + outtextxy( 172+Center, ( (linea == 0 ) ? 167 : 200 + 20*linea ), buff ); + linea++; + } + + va_end(ap); + + settextstyle( texttypeinfo.font, texttypeinfo.direction, texttypeinfo.charsize ); + + + if ( optar != ENCUADRE ) + { + ok = 0; while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER + do { + switch( Comprueba_Secuencia( SEC_OPTAR, NULL ) ) + { + case 0: // No se pulso ningun BOTON + case -2: + case -1: + while( kbhit() ) getch(); // Limpiamos posibles teclas en BUFFER + if ( optar == 0 ) ok = 1; + break; + case 1: + DEV = 1; ok = 1; + break; + case 2: + DEV = 0; ok = 1; + break; + } + }while( !ok ); + + putimage( 170, 165, fondo , COPY_PUT ); + putimage( 170, 320, fd_aceptar , COPY_PUT ); + putimage( 370, 320, fd_cancelar, COPY_PUT ); + + farfree( fondo ); + farfree( fd_aceptar ); + farfree( fd_cancelar ); + + Memoria = 0; + + } + + + } else { + farfree( fondo ); + farfree( fd_aceptar ); + farfree( fd_cancelar ); + } + + + return DEV; +} + + + + char led_off [18] [18] = + { + { 3,3,3,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,0,7,7,7,7,0,3,3,3,3,3,3,3,3,3,3 }, + { 3,0,7,4,12,12,4,7,0,3,3,3,3,3,3,3,3,3 }, + { 0,7,4,12,4,4,4,4,8,0,3,3,3,3,3,3,3,3 }, + { 0,7,4,4,4,4,4,4,8,0,3,3,3,3,3,3,3,3 }, + { 0,7,4,4,4,4,4,12,8,0,3,3,3,3,3,3,3,3 }, + { 0,7,4,4,4,4,12,12,8,0,3,3,3,3,3,3,3,3 }, + { 3,0,8,4,12,12,12,8,0,3,3,3,3,3,3,3,3,3 }, + { 3,3,0,8,8,8,8,0,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 } + }; + + char led_on [18] [18] = + { + { 3,3,3,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,0,7,7,7,7,0,3,3,3,3,3,3,3,3,3,3 }, + { 3,0,7,11,13,13,11,7,0,3,3,3,3,3,3,3,3,3 }, + { 0,7,11,13,11,11,11,11,8,0,3,3,3,3,3,3,3,3 }, + { 0,7,11,11,11,11,11,11,8,0,3,3,3,3,3,3,3,3 }, + { 0,7,11,11,11,11,11,13,8,0,3,3,3,3,3,3,3,3 }, + { 0,7,11,11,11,11,13,13,8,0,3,3,3,3,3,3,3,3 }, + { 3,0,8,11,13,13,13,8,0,3,3,3,3,3,3,3,3,3 }, + { 3,3,0,8,8,8,8,0,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 }, + { 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3 } + }; + + char flecha [18] [18] = + { + 3,3,3,3,3,3,3,3,3,0,3,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,3,0,4,0,3,3,3,3,3,3,3, + 3,3,3,3,3,3,3,0,4,4,4,0,3,3,3,3,3,3, + 3,3,3,3,3,3,0,4,4,4,4,4,0,3,3,3,3,3, + 3,3,3,3,3,0,4,4,4,4,4,4,4,0,3,3,3,3, + 3,3,3,3,0,4,4,4,4,4,4,4,4,4,0,3,3,3, + 3,3,3,0,4,4,4,4,4,4,4,4,4,4,4,0,3,3, + 3,3,0,0,0,0,0,4,4,4,4,4,0,0,0,0,0,3, + 3,3,3,3,3,3,0,4,4,4,4,4,0,3,3,3,3,3, + 3,3,3,3,3,3,0,4,4,4,4,4,0,3,3,3,3,3, + 3,3,3,3,3,3,0,4,4,4,4,4,0,3,3,3,3,3, + 3,3,3,3,3,3,0,4,4,4,4,4,0,3,3,3,3,3, + 3,3,3,3,3,3,0,4,4,4,4,4,0,3,3,3,3,3, + 3,3,3,3,3,3,0,4,4,4,4,4,0,3,3,3,3,3, + 3,3,3,3,3,3,0,4,4,4,4,4,0,3,3,3,3,3, + 3,3,3,3,3,3,0,4,4,4,4,4,0,3,3,3,3,3, + 3,3,3,3,3,3,0,4,4,4,4,4,0,3,3,3,3,3, + 3,3,3,3,3,3,0,0,0,0,0,0,0,3,3,3,3,3 + }; + + + /**************************************************************************\ +|* *| +|* poicono *| +|* *| +|* Descripci¢n: *| +|* Dibuja el bitmap que se encuentra en matriz, en ¤a pos x,y *| +|* y segun un angulo de rotacion definido en pos. *| +|* *| +|* Entradas: Coordenadas x, y *| +|* Matriz del bitmap y ( 0: Normal 1: 90§ ... *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void ponicono(int x,int y,char matriz[18][18], char pos) +{ + int veces1,veces2; + + for (veces1=0;veces1<=17;veces1++) + { + for (veces2=0;veces2<=17;veces2++) + { + + switch( pos ) + { + case 1: + if ( matriz[veces1][veces2] != 3 ) + putpixel(x+veces1,y+veces2,matriz[veces1][veces2]); + break; + case 2: + if ( matriz[17-veces2][veces1] != 3 ) + putpixel(x+veces1,y+veces2,matriz[17-veces2][veces1]); + break; + case 3: + if ( matriz[17-veces1][veces2] != 3 ) + putpixel(x+veces1,y+veces2,matriz[17-veces1][veces2]); + break; + case 4: + if ( matriz[veces2][veces1] != 3 ) + putpixel(x+veces1,y+veces2,matriz[veces2][veces1]); + break; + } + } + } + +} + + + + /**************************************************************************\ +|* *| +|* CalculaAjusteDia *| +|* *| +|* Descripci¢n: *| +|* Calcula el ajuste necesario para el comienzo de los dias *| +|* y el n£mero de dias que tiene el mes en curso. *| +|* *| +|* Entradas: Retorno del Ajuste, y Dias del Mes *| +|* Mes para iniciar c lculos *| +|* *| +|* Salidas: OK Todo ha ido bien *| +|* ERROR *| +|* *| + \**************************************************************************/ +int CalculaAjusteDias( char *Ajuste, char *DiasMes, char Mes, int Anyo ) +{ + int dev, n, b, dsem, dia; + + // Dias de los meses, si el a¤o no es bisiesto + char DiasMeses[12] = { 31, 00, 31, 30, 31, 30, + 31, 31, 30, 31, 30, 31 }; + + // Ajusta febrero si es bisiesto el a¤o + DiasMeses[1] = (Anyo%4 == 0) ? 29 : 28; + + + dev = ERROR; + // Solo si la entrada es correcta + if ( Mes >= 1 && Mes <=12 ) + { + dev = OK; + // Obtenemos que dia, ( 0 - 365 ), es el 1§ del mes + dia = 0; + for ( n = 0; n < 12 && n < (Mes-1); n++ ) + dia += DiasMeses[n]; + + n = Anyo-1988; // a¤os para bisiesto + b = (n+3)/4; // a¤os bisies. pasados + dsem = 4; // 1o. Ene 1988: Viernes + dsem += (n*365+b); // 1o. Ene actual + dsem = (dsem+dia)%7; // d¡a seleccionado + + *Ajuste = dsem; + *DiasMes = DiasMeses[ Mes - 1 ]; + } + + return dev; +} + + + /**************************************************************************\ +|* *| +|* TextoDoble *| +|* *| +|* Descripci¢n: *| +|* Muestra el texto, con doble letra, en las coordenadas dadas *| +|* *| +|* Entradas: X, Y, texto *| +|* *| +|* Salidas: (ninguna) *| +|* *| + \**************************************************************************/ +void TextoDoble( int x, int y, char *texto ) +{ + setcolor( EGA_BLACK ); + outtextxy( x, y, texto ); + + setcolor( EGA_WHITE ); + outtextxy( x+1, y+1, texto ); + +} + + + + +/////// EDITAR COMENTARIO.... +int EditComentario( char *Comentario, int Lineas, int Columnas, int cc, int cf, int X0, int Y0, int X1, int Y1, int Inc ) +{ + + int ls; // longitud cadena + char *s1, *s, *s_tmp, *s_tmp1; // puntero a cadena inicial + int key, ok, Linea = 0, Columna = 0, lmax; + char Buffer[80]; + + lmax = Columnas; + + setfillstyle(SOLID_FILL, cf); // selecciona los atributos de + setcolor(cc); // devuelve el color a su estado + + for ( ok = 0; ok < Lineas; ok ++ ) + { + bar( X0, Y0+Linea*Inc, X1, Y0+Linea*Inc + Inc); // relleno, y Borra el campo + outtextxy( X0, Y0+ok*Inc, &Comentario[ (lmax+1)*Linea ] ); // e imprime la cadena. + } + + ok = 0; + + s_tmp1 = s_tmp = s = s1 = &Comentario[0 + (lmax+1)*Linea ]; // inicio cadena + + s += lmax ; *s = '\0'; + s = s_tmp; + +do { + + + setfillstyle(SOLID_FILL, cf); // selecciona los atributos de + bar( X0, Y0+Linea*Inc, X1, Y0+Linea*Inc + Inc); // relleno, y Borra el campo + setcolor(cc); // devuelve el color a su estado + + outtextxy( X0, Y0+Linea*Inc, s1 ); // e imprime la cadena. +// ls = strlen ( s ); // Longitud de la cadena actual + + + if ( Columna < lmax ) { // Muestra cursor si es posible + strncpy( Buffer, s1, Columna ); + Buffer[Columna] = '\0'; + setcolor(BLANCO); + outtextxy( X0 + textwidth( Buffer ), Y0+Linea*Inc+2, "Ü"); + } + + + + switch ( ( key = getch() ) ) { // obtiene tecla + // Intro o Return + case 13: + if( Linea < Lineas ) { + setfillstyle(SOLID_FILL, cf); // selecciona los atributos de + bar( X0, Y0+Linea*Inc, X1, Y0+Linea*Inc + Inc); // relleno, y Borra el campo + setcolor(cc); // devuelve el color a su estado + outtextxy( X0, Y0+Linea*Inc, s1 ); // e imprime la cadena. + + Linea++; + s_tmp1 = s_tmp = s = s1 = &Comentario[/*Linea + */(lmax+1)*Linea ]; // inicio cadena + s += lmax; *s = '\0'; + Columna = 0; + s = s_tmp1 = s_tmp = s1; + } + break; + + case 0: + + switch ( key = getch() ) { + + // F. Arriba + case 72: + if( Linea > 0 ) { + setfillstyle(SOLID_FILL, cf); // selecciona los atributos de + bar( X0, Y0+Linea*Inc, X1, Y0+Linea*Inc + Inc); // relleno, y Borra el campo + setcolor(cc); // devuelve el color a su estado + outtextxy( X0, Y0+Linea*Inc, s1 ); // e imprime la cadena. + + Linea--; + s_tmp1 = s_tmp = s = s1 = &Comentario[/*Linea + */(lmax+1)*Linea ]; // inicio cadena + s += lmax; *s = '\0'; + if ( Columna < strlen( s1 ) ) s_tmp += Columna; else { Columna = 0; + s_tmp = s1; } + s = s_tmp1 = s_tmp; + + } + + break; + // F. Abajo + case 80: + + if( Linea < Lineas ) { + setfillstyle(SOLID_FILL, cf); // selecciona los atributos de + bar( X0, Y0+Linea*Inc, X1, Y0+Linea*Inc + Inc); // relleno, y Borra el campo + setcolor(cc); // devuelve el color a su estado + outtextxy( X0, Y0+Linea*Inc, s1 ); // e imprime la cadena. + + Linea++; + s_tmp1 = s_tmp = s = s1 = &Comentario[/*Linea + */(lmax+1)*Linea ]; // inicio cadena + s += lmax; *s = '\0'; + if ( Columna < strlen( s1 ) ) s_tmp += Columna; else { Columna = 0; + s_tmp = s1; } + s = s_tmp1 = s_tmp; + } + break; + // F. Derecha + case 77: + case 9: + if ( Columna < strlen(s1) ) { Columna++; s++; } + break; + // F. Izquierda + case 75: + case 11: + if ( Columna > 0) { Columna--; s--; } + break; + default: + break; + } + + break; + // Back Space + case 8: + if ( Columna > 0 ) { + Columna--; + s--; + s_tmp1 = s_tmp = s; + while ( *s_tmp1 != NULL ) { + s_tmp1++; + *s_tmp = *s_tmp1; + s_tmp++; + } + } + break; + case 27: + ok = 1; + break; + default: + if ( key >= 32 && key <= 254 && Columna < lmax) { + *s++ = key; + Columna++; + } + break; + } +}while(!ok); + +while(kbhit()) getch(); // Vacia Buffer impidiendo falsas + // pulsaciones... + + + setfillstyle(SOLID_FILL, cf); // selecciona los atributos de + bar( X0, Y0+Linea*Inc, X1, Y0+Linea*Inc + Inc); // relleno, y Borra el campo + setcolor(cc); // devuelve el color a su estado + + outtextxy( X0, Y0+Linea*Inc, s1 ); // e imprime la cadena. + +return /* de momento nada */ 0; + +} + + + + +char *PideClave( char *LineaVentana, char *Comprobante ) +{ + static char Clave[15+1]; + + Clave[0] = '\0'; + Optar( ENCUADRE, LineaVentana, "Introduzca clave para:", Comprobante, NULL ); + + InputCadenaG( Clave, 0, 15, EGA_WHITE, EGA_WHITE, 190, 280, 450, 305 ); + + Optar( ENCUADRE, LineaVentana, "Introduzca clave para:", Comprobante, NULL ); + + return Clave; +} + + +void MuestraGraficas( int PosX, int PosY, int xWidth, int yWidth, int NDatos, long *Datos, char Mensajes[][12] ) +{ + long DMaximo; + int i, AnchoBarra; + + // Limpiamos la zona de visualizaci¢n + setfillstyle( SOLID_FILL, EGA_WHITE ); + bar( PosX, PosY, PosX + xWidth, PosY + yWidth ); + + // Calculamos el maximo valor a mostrar + DMaximo = 0; + for ( i = 0; i < NDatos; i++ ) + if ( Datos[i] > DMaximo ) + DMaximo = Datos[i]; + + // Ahora calculamos el ancho de cada barra de porcentaje + AnchoBarra = xWidth / NDatos; + + // Empiezo a dibujar las barras + PosY += yWidth - 1; + yWidth -= (AnchoBarra / 4); + setfillstyle( SLASH_FILL, EGA_BLUE ); + setcolor( EGA_BLACK ); + for ( i = 0; i < NDatos; i++ ) + { + if ( DMaximo != 0 ) + bar3d( PosX + AnchoBarra*i, PosY - ( ( Datos[i] * yWidth ) / DMaximo), PosX + AnchoBarra*(i+1), PosY, + AnchoBarra / 4, 1 ); + } + +} + + + /**************************************************************************\ +|* *| +|* PideClaveUsuario *| +|* *| +|* Descripci¢n: *| +|* Pide la clave de usuario y comprueba si es correcta. *| +|* *| +|* Entradas: (ninguna) *| +|* *| +|* Salidas: OK -clave correcta- ERROR -clave incorrecta- *| +|* *| +|* *| + \**************************************************************************/ +char PideClaveUsuario( void ) +{ +return OK; +/* + char buffer[80], Clave[80]; + int CodEmpl, dev; + + BDatos BEmpl_p; // Base de datos de Empleados + INFO_EMPLEADOS SEmpl_p; // Estructura de Empleados + + dev = ERROR; + + sprintf( buffer, "datos\\%s\\info_emp.dbf", NEmpresa ); + if ( BEmpl_p.AbrirReg( buffer, sizeof( INFO_EMPLEADOS ) ) == ERROR ) + { + Optar( 0, "­ ALERTA !", "No existen empleados", "c¢digos de acceso anulados", "PERMISOS ABIERTOS", NULL ); + return OK; + } + + + + Clave[0] = '\0'; + Optar( ENCUADRE, "­ Identifiquese !", "", "Login: ", "Password: ", NULL ); + + // Obtenemos el c¢digo de usuario: + do { + if ( InputCadenaG( buffer, 1, 5, EGA_WHITE, EGA_WHITE, 190, 280, 450, 305 ) >> 8 ) + return ERROR; + } while ( !MatchEmpleado( atoi(buffer) ) ); + +// InputCadenaG( Clave, 0, 15, EGA_WHITE, EGA_WHITE, 190, 280, 450, 305 ); + + if ( ! ( InputCadenaG( buffer, 1, 5, EGA_WHITE, EGA_WHITE, 190, 280, 450, 305 ) >> 8 ) ) + { + if ( SEmpl_p.Password[0] != '\0' && strcmpi( buffer, SEmpl_p.Password ) == 0 ) + dev = OK; + } + + Optar( ENCUADRE, "­ Identifiquese !", "", "Login: ", "Password: ", NULL ); + + return dev; +*/ +} diff --git a/DATOS/ALUM.DBF b/DATOS/ALUM.DBF new file mode 100644 index 0000000..26d88d7 Binary files /dev/null and b/DATOS/ALUM.DBF differ diff --git a/DATOS/CONFIG.CFG b/DATOS/CONFIG.CFG new file mode 100644 index 0000000..b283ab0 Binary files /dev/null and b/DATOS/CONFIG.CFG differ diff --git a/DATOS/THEMES.CFG b/DATOS/THEMES.CFG new file mode 100644 index 0000000..5b68866 Binary files /dev/null and b/DATOS/THEMES.CFG differ diff --git a/FONTS/PROT_PTL.FNT b/FONTS/PROT_PTL.FNT new file mode 100644 index 0000000..31994db Binary files /dev/null and b/FONTS/PROT_PTL.FNT differ diff --git a/FONTS/VENT_MSG.FNT b/FONTS/VENT_MSG.FNT new file mode 100644 index 0000000..f0b651e Binary files /dev/null and b/FONTS/VENT_MSG.FNT differ diff --git a/PRNFILE.OUT b/PRNFILE.OUT new file mode 100644 index 0000000..8c7faa3 --- /dev/null +++ b/PRNFILE.OUT @@ -0,0 +1,55 @@ + + N§ Alumno: 0 + + Alejandro 1 + 1 + + 1 (1) + C.P. 1 + + + N§ Alumno: 0 + + Antonio + + + () + C.P. 0 + + + N§ Alumno: 0 + + Pepito Grillo + + + () + C.P. 0 + + + N§ Alumno: 0 + + Estemas + + + () + C.P. 0 + + + N§ Alumno: 0 + + Jos‚ David Eqwe + Qwe + + Qwe (Qwe) + C.P. 0 + + + N§ Alumno: 0 + + Nueva persona + + + () + C.P. 0 + + \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..272b97c --- /dev/null +++ b/README.md @@ -0,0 +1,9 @@ +#ALUM + + +*25/09/1997* + +ToDo: wwtcf? + + +![screenshot](/ALUM.png "Screenshot") diff --git a/SYSTM/ALDISK.BMP b/SYSTM/ALDISK.BMP new file mode 100644 index 0000000..970d156 Binary files /dev/null and b/SYSTM/ALDISK.BMP differ diff --git a/SYSTM/ALUM.IMG b/SYSTM/ALUM.IMG new file mode 100644 index 0000000..4159eb5 --- /dev/null +++ b/SYSTM/ALUM.IMG @@ -0,0 +1,517 @@ +** +** Codigo fuente para MAKE_BOTON +** +** +** Dise¤ado integramente, por Jose-David.Guillen@cs.us.es +** http://www.arrakis.es/~infomundo/JD +** +***************************************************************************** +* +* ATENCION !!! +* ALTERAR ESTE FICHERO, CAUSARA EL MALFUNCIONAMIENTO DEL +* PROGRAMA DE APOYO... ( ERRORES NO DOCUMENTADOS ) +* +***************************************************************************** + +#4 + +************************************************ Botones D: 2 +**** **** Botones S: 20 +** M¢dulo de Botones: Gst. AAlum ** +**** **** +************************************************ +!1, 11 + +$ 400, 40, 515, 65, 7, 63, 56, 2, 2, 000, 23 +$ 520, 40, 635, 65, 7, 63, 56, 2, 2, 000, 50 +$ 400, 70, 515, 95, 7, 63, 56, 2, 2, 000, 83 +$ 520, 70, 635, 95, 7, 63, 56, 2, 2, 000, 82 +$ 400, 100, 440, 125, 7, 63, 56, 2, 2, 000, 73 +$ 445, 100, 475, 125, 7, 63, 56, 2, 2, 000, 71 +$ 480, 100, 555, 125, 7, 63, 56, 2, 2, 000, 48 +$ 560, 100, 590, 125, 7, 63, 56, 2, 2, 000, 79 +$ 595, 100, 635, 125, 7, 63, 56, 2, 2, 000, 81 +$ 400, 5, 635, 30, 7, 63, 56, 2, 2, 000, 000 +$ 505, 455, 635, 475, 63, 0, 0, 0, 000, 000 + +************************************************ Botones D: 2 +**** **** Botones S: 30 +** M¢dulo para la Gestion de los Ant.Alumnos ** +**** **** +************************************************ +­30 + +& 400, 5, 635, 30, 7, 63, 56, 2, 2 +| 400, 7, 2, 5, 0, 0, Gestion de Antiguos Alumnos, +| 401, 8, 2, 5, 0, 63, Gestion de Antiguos Alumnos, + +& 400, 40, 515, 65, 7, 63, 56, 2, 2 +| 400, 42, 2, 5, 0, 0, Imprimir Fich., +| 401, 43, 2, 5, 0, 63, Imprimir Fich., + | 400, 43, 2, 5, 0, 0, _, + | 401, 44, 2, 5, 0, 63, _, + +& 520, 40, 635, 65, 7, 63, 56, 2, 2 +| 518, 42, 2, 5, 0, 0, Men£ Principal, +| 519, 43, 2, 5, 0, 63, Men£ Principal, + | 518, 43, 2, 5, 0, 0, _, + | 519, 44, 2, 5, 0, 63, _, + +& 400, 70, 515, 95, 7, 63, 56, 2, 2 +| 400, 72, 2, 5, 0, 0, Eliminar Alum., +| 401, 73, 2, 5, 0, 63, Eliminar Alum., +& 520, 70, 635, 95, 7, 63, 56, 2, 2 +| 518, 72, 2, 5, 0, 0, Insertar Alum., +| 519, 73, 2, 5, 0, 63, Insertar Alum., + +& 400, 100, 440, 125, 7, 63, 56, 2, 2 +| 400, 102, 2, 5, 0, 0, <<, +| 401, 103, 2, 5, 0, 63, <<, +& 445, 100, 475, 125, 7, 63, 56, 2, 2 +| 445, 102, 2, 5, 0, 0, <-, +| 446, 103, 2, 5, 0, 63, <-, + +& 480, 100, 555, 125, 7, 63, 56, 2, 2 +| 480, 102, 2, 5, 0, 0, Buscar, +| 481, 103, 2, 5, 0, 63, Buscar, + +& 560, 100, 590, 125, 7, 63, 56, 2, 2 +| 560, 102, 2, 5, 0, 0, ->, +| 561, 103, 2, 5, 0, 63, ->, +& 595, 100, 635, 125, 7, 63, 56, 2, 2 +| 595, 102, 2, 5, 0, 0, >>, +| 596, 103, 2, 5, 0, 63, >>, + +| 5, 10, 2, 5, 0, 0, C¢digo:, +| 6, 11, 2, 5, 0, 63, C¢digo:, +& 65, 6, 150, 29, 63, 7, 56, 0, 2 + +| 5, 45, 2, 5, 0, 0, Nombre:, +| 6, 46, 2, 5, 0, 63, Nombre:, +& 150, 41, 390, 64, 63, 7, 56, 0, 2 + +| 5, 70, 2, 5, 0, 0, Apellidos:, +| 6, 71, 2, 5, 0, 63, Apellidos:, +& 150, 66, 390, 89, 63, 7, 56, 0, 2 + + +| 5, 115, 2, 5, 0, 0, Direccion:, +| 6, 116, 2, 5, 0, 63, Direccion:, +& 90, 111, 390, 134, 63, 7, 56, 0, 2 + +| 5, 140, 2, 5, 0, 0, Localidad: Provincia:, +| 6, 141, 2, 5, 0, 63, Localidad: Provincia:, +& 90, 136, 225, 159, 63, 7, 56, 0, 2 +& 310, 136, 440, 159, 63, 7, 56, 0, 2 + +| 450, 140, 2, 5, 0, 0, C.Postal:, +| 451, 141, 2, 5, 0, 63, C.Postal:, +& 520, 136, 600, 159, 63, 7, 56, 0, 2 + + +| 5, 165, 2, 5, 0, 0, Tel‚fono:, +| 6, 166, 2, 5, 0, 63, Tel‚fono:, +& 90, 161, 247, 184, 63, 7, 56, 0, 2 +& 253, 161, 390, 184, 63, 7, 56, 0, 2 + +& 5, 188, 255, 225, 7, 63, 56, 2, 2 +| 5, 188, 2, 5, 0, 0, Oficin. Sucur. D.C. Num.Cuenta, +| 6, 189, 2, 5, 0, 63, Oficin. Sucur. D.C. Num.Cuenta, + +* Ancho de la linea: 23 +& 10, 208, 60, 221, 63, 7, 56, 1, 1 +& 65, 208, 115, 221, 63, 7, 56, 1, 1 +& 120, 208, 145, 221, 63, 7, 56, 1, 1 +& 150, 208, 250, 221, 63, 7, 56, 1, 1 + + +| 5, 190, 2, 5, 0, 0, Notas:, +| 6, 191, 2, 5, 0, 63, Notas:, +& 400, 161, 635, 225, 63, 7, 56, 2, 2 + + +| 6, 236, 2, 4, 0, 63, 123456789-123456789-123456789-123456789- 123456789-123456789-123456789- 123456789-12345, + +& 5, 230, 635, 255, 7, 63, 56, 2, 2 +| 5, 235, 2, 5, 0, 0, Nombre y Apellidos Direcci¢n Tel‚fono, +| 6, 236, 2, 5, 0, 63, Nombre y Apellidos Direcci¢n Tel‚fono, + +& 5, 260, 300, 450, 63, 7, 56, 2, 2 +& 305, 260, 497, 450, 63, 7, 56, 2, 2 +& 503, 260, 635, 450, 63, 7, 56, 2, 2 + + + +* Linea de fondo para ayudas +& 5, 455, 500, 475, 0, 63, 56, 0, 2 +& 505, 455, 635, 475, 63, 0, 0, 0, 2 + +************************************************ Botones D: +**** **** Botones S: 31 +** M¢dulo buscar asociado a Proveedores ** +* * +** Muestreo del patr¢n para busquedas ** +**** **** +************************************************ + +­31 +& 265, 200, 365, 220, 63, 0, 56, 0, 2 +& 265, 225, 465, 245, 63, 0, 56, 0, 2 +& 265, 250, 465, 275, 63, 0, 56, 0, 2 +& 265, 280, 465, 305, 63, 0, 56, 0, 2 + +| 175, 200, 2, 6, 0, 0, Nombre: , + | 176, 201, 2, 6, 0, 63, Nombre: , +| 175, 225, 2, 6, 0, 0, Apellidos: , + | 176, 226, 2, 6, 0, 63, Apellidos: , +| 175, 250, 2, 6, 0, 0, Direccion, + | 176, 251, 2, 6, 0, 63, Direccion, +| 175, 275, 2, 6, 0, 0, Tel‚fono:, + | 176, 276, 2, 6, 0, 63, Tel‚fono:, + + + +************************************************ Botones D: 6 +**** **** Botones S: +** Parte Utilizada por Optar ** +**** **** +************************************************ +!2, 2 + +$ 170, 320, 270, 350, 7, 63, 56, 2, 2, 000, 30 +$ 370, 320, 470, 350, 7, 63, 56, 2, 2, 000, 46 + +­100 +& 170, 165, 470, 315, 7, 63, 56, 0, 2 +& 172, 167, 468, 190, 1, 56, 63, 0, 2 + +& 170, 320, 270, 350, 7, 63, 56, 2, 2 +| 175, 325, 2, 6, 0, 63, Aceptar, +| 176, 326, 2, 6, 0, 0, Aceptar, +| 175, 327, 2, 6, 0, 63, _, +| 176, 328, 2, 6, 0, 0, _, + +& 370, 320, 470, 350, 7, 63, 56, 2, 2 +| 373, 325, 2, 6, 0, 63, Cancelar, +| 374, 326, 2, 6, 0, 0, Cancelar, +| 373, 327, 2, 6, 0, 63, _, +| 374, 328, 2, 6, 0, 0, _, + + +************************************************ Botones D: +**** **** Botones S: 120 +** M¢dulo para configurar el entorno ** +**** **** +************************************************ +*!3, 12 +!3, 11 + +$ 195, 430, 310, 450, 7, 63, 56, 0, 2, 000, 050 * Men£ Principal +$ 181, 275, 205, 295, 7, 63, 56, 2, 2, 000, 000 * Combinaciones +$ 213, 275, 261, 295, 7, 63, 56, 2, 2, 000, 000 * Guardar +$ 262, 275, 310, 295, 7, 63, 56, 2, 2, 000, 000 * Eliminar +$ 181, 330, 205, 350, 7, 63, 56, 2, 2, 000, 000 * Elementos +$ 181, 385, 205, 405, 7, 63, 56, 2, 2, 000, 000 * Fuentes + +$ 290, 330, 310, 350, 7, 63, 56, 2, 2, 000, 000 * Color +$ 290, 358, 310, 378, 7, 63, 56, 2, 2, 000, 000 * Fondo +$ 262, 385, 310, 405, 63, 7, 56, 2, 2, 000, 000 * Tama¤o + +$ 325, 370, 345, 450, 7, 56, 63, 0, 2, 000, 000 * Impresora +$ 325, 285, 345, 365, 7, 56, 63, 0, 2, 000, 000 * Ventas +*$ 325, 200, 345, 280, 7, 56, 63, 0, 2, 000, 000 * Varios... + + +­120 + +& 400, 5, 635, 30, 7, 63, 56, 2, 2 +| 400, 7, 2, 5, 0, 0, Cambiar la configuraci¢n, +| 401, 8, 2, 5, 0, 63, Cambiar la configuraci¢n, + +* Linea de separaci¢n +& 319, 5, 321, 450, 0, 63, 63, 0, 2 + + +& 5, 35, 310, 240, 0, 63, 56, 0, 2 + + +| 5, 250, 2, 5, 0, 0, Combinaciones:, +| 5, 250, 2, 5, 0, 63, Combinaciones:, +& 5, 275, 180, 295, 63, 7, 56, 2, 2 +& 181, 275, 205, 295, 7, 63, 56, 2, 2 + +& 213, 275, 261, 295, 7, 63, 56, 2, 2 +& 262, 275, 310, 295, 7, 63, 56, 2, 2 +| 217, 277, 2, 4, 0, 0, Guardar Eliminar, +| 218, 278, 2, 4, 0, 63, Guardar Eliminar, + +| 5, 305, 2, 5, 0, 0, Elementos:, +| 5, 305, 2, 5, 0, 63, Elementos:, +& 5, 330, 180, 350, 63, 7, 56, 2, 2 +& 181, 330, 205, 350, 7, 63, 56, 2, 2 + +| 5, 360, 2, 5, 0, 0, Fuentes:, +| 5, 360, 2, 5, 0, 63, Fuentes:, +& 5, 385, 180, 405, 63, 7, 56, 2, 2 +& 181, 385, 205, 405, 7, 63, 56, 2, 2 + +| 210, 332, 2, 4, 0, 0, Color:, +| 211, 333, 2, 4, 0, 63, Color:, +& 290, 330, 310, 350, 7, 63, 56, 2, 2 +| 210, 360, 2, 4, 0, 0, Fondo:, +| 211, 361, 2, 4, 0, 63, Fondo:, +& 290, 358, 310, 378, 7, 63, 56, 2, 2 +| 210, 387, 2, 4, 0, 0, Tama¤o:, +| 211, 388, 2, 4, 0, 63, Tama¤o:, +& 262, 385, 310, 405, 63, 7, 56, 2, 2 + +& 195, 430, 310, 450, 7, 63, 56, 0, 2 +| 200, 430, 2, 5, 0, 0, Men£ Principal, +| 201, 431, 2, 5, 0, 63, Men£ Principal, + + +* Linea de fondo para ayudas +& 5, 455, 500, 475, 0, 63, 56, 0, 2 +& 505, 455, 635, 475, 63, 0, 0, 0, 2 + +*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +***** Configurar Impresora +& 325, 370, 345, 450, 7, 56, 63, 0, 2 +| 327, 370, 2, 4, 1, 0, Impresora , +| 328, 371, 2, 4, 1, 63, Impresora , + +& 325, 285, 345, 365, 7, 56, 63, 0, 2 +| 327, 285, 2, 4, 1, 0, Opciones , +| 328, 286, 2, 4, 1, 63, Opciones , + +& 325, 200, 345, 280, 7, 56, 63, 0, 2 +| 327, 200, 2, 4, 1, 0, Varios... , +| 328, 201, 2, 4, 1, 63, Varios... , +*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +­121 + +& 200, 40, 305, 60, 7, 63, 56, 2, 2 +| 200, 41, 2, 4, 0, 0, Mensaje de Linea, +| 201, 42, 2, 4, 0, 63, Mensaje de Linea, +& 200, 62, 252, 82, 7, 63, 56, 2, 2 +& 253, 62, 305, 82, 7, 63, 56, 2, 2 +| 198, 63, 2, 4, 0, 0, Imprimir Menu Pr, +| 199, 64, 2, 4, 0, 63, Imprimir Menu Pr, + + +| 10, 51, 2, 4, 0, 0, Campo:, +| 11, 52, 2, 4, 0, 63, Campo:, +& 50, 54, 180, 64, 63, 7, 56, 0, 2 +| 10, 63, 2, 4, 0, 0, Cmo: Tlg:, +| 11, 64, 2, 4, 0, 63, Cmo: Tlg:, +& 40, 66, 85, 76, 63, 7, 56, 0, 2 +& 120, 66, 180, 76, 63, 7, 56, 0, 2 +| 10, 75, 2, 4, 0, 0, Dircc: nn:, +| 11, 76, 2, 4, 0, 63, Dircc: nn:, +& 50, 78, 100, 88, 63, 7, 56, 0, 2 +& 140, 78, 180, 88, 63, 7, 56, 0, 2 + + +& 10, 100, 305, 115, 7, 63, 56, 0, 2 +| 10, 102, 2, 4, 0, 0, C¢digo Descripci¢n Unds. P.V.P, +| 11, 103, 2, 4, 0, 63, C¢digo Descripci¢n Unds. P.V.P, + +& 10, 117, 70, 223, 63, 7, 56, 2, 2 +& 72, 117, 216, 223, 63, 7, 56, 2, 2 +& 218, 117, 245, 223, 63, 7, 56, 2, 2 +& 247, 117, 305, 223, 63, 7, 56, 2, 2 + +* Texto se¤alado +& 14, 121, 68, 130, 3, 3, 3, 0, 2 +| 11, 120, 2, 4, 0, 0, 000124 Albaranes de compra , +| 11, 130, 2, 4, 0, 0, 000136 Aliados en el juego , +| 11, 140, 2, 4, 0, 0, 000250 Baticoco de mono , +| 11, 150, 2, 4, 0, 0, 000045 Garganta profunda , +| 8, 120, 2, 4, 0, 0, 003 1.500, +| 8, 130, 2, 4, 0, 0, 045 9.999, +| 8, 140, 2, 4, 0, 0, 009 415, +| 8, 150, 2, 4, 0, 0, 010 2.250, + + +* Linea de fondo para ayudas +& 10, 225, 259, 235, 0, 63, 56, 0, 2 +& 261, 225, 305, 235, 63, 7, 56, 0, 2 +| 10, 224, 2, 4, 0, 63, C¢digo de la descripci¢n., + +­122 +* Cuadro de di logo +*& 5, 35, 310, 240, 0, 63, 56, 0, 2 +& 60, 145, 240, 230, 7, 63, 56, 0, 2 +& 63, 148, 237, 165, 1, 56, 63, 0, 2 +| 62, 148, 2, 4, 0, 0, Cuadro de Dialogo, +| 63, 149, 2, 4, 0, 63, Cuadro de Dialogo, + +& 63, 215, 113, 227, 7, 63, 56, 0, 2 +& 187, 215, 237, 227, 7, 63, 56, 0, 2 +| 62, 214, 2, 4, 0, 0, Aceptar, +| 63, 215, 2, 4, 0, 63, Aceptar, +| 64, 214, 2, 4, 0, 0, Cancelar, +| 65, 215, 2, 4, 0, 63, Cancelar, + +***** ***** +*** Color *** +***** ***** +************************************************ Botones D: 11 +**** **** Botones S: 123 +** M¢dulo para configurar el entorno ** +**** **** +************************************************ +!4, 18 +$ 170, 320, 270, 350, 7, 63, 56, 2, 2, 000, 30 * ACEPTAR +$ 370, 320, 470, 350, 7, 63, 56, 2, 2, 000, 46 * CANCELAR + +$ 180, 205, 200, 225, 0, 56, 63, 2, 2, 000, 000 +$ 205, 205, 225, 225, 1, 56, 63, 2, 2, 000, 000 +$ 230, 205, 250, 225, 2, 56, 63, 2, 2, 000, 000 +$ 255, 205, 275, 225, 3, 56, 63, 2, 2, 000, 000 + +$ 180, 230, 200, 250, 4, 56, 63, 2, 2, 000, 000 +$ 205, 230, 225, 250, 5, 56, 63, 2, 2, 000, 000 +$ 230, 230, 250, 250, 6, 56, 63, 2, 2, 000, 000 +$ 255, 230, 275, 250, 7, 56, 63, 2, 2, 000, 000 + +$ 180, 255, 200, 275, 8, 56, 63, 2, 2, 000, 000 +$ 205, 255, 225, 275, 9, 56, 63, 2, 2, 000, 000 +$ 230, 255, 250, 275, 10, 56, 63, 2, 2, 000, 000 +$ 255, 255, 275, 275, 11, 56, 63, 2, 2, 000, 000 + +$ 180, 280, 200, 300, 12, 56, 63, 2, 2, 000, 000 +$ 205, 280, 225, 300, 13, 56, 63, 2, 2, 000, 000 +$ 230, 280, 250, 300, 14, 56, 63, 2, 2, 000, 000 +$ 255, 280, 275, 300, 15, 56, 63, 2, 2, 000, 000 + + +­123 + +& 180, 205, 200, 225, 0, 56, 63, 2, 2 +& 205, 205, 225, 225, 1, 56, 63, 2, 2 +& 230, 205, 250, 225, 2, 56, 63, 2, 2 +& 255, 205, 275, 225, 3, 56, 63, 2, 2 + +& 180, 230, 200, 250, 4, 56, 63, 2, 2 +& 205, 230, 225, 250, 5, 56, 63, 2, 2 +& 230, 230, 250, 250, 6, 56, 63, 2, 2 +& 255, 230, 275, 250, 7, 56, 63, 2, 2 + +& 180, 255, 200, 275, 8, 56, 63, 2, 2 +& 205, 255, 225, 275, 9, 56, 63, 2, 2 +& 230, 255, 250, 275, 10, 56, 63, 2, 2 +& 255, 255, 275, 275, 11, 56, 63, 2, 2 + +& 180, 280, 200, 300, 12, 56, 63, 2, 2 +& 205, 280, 225, 300, 13, 56, 63, 2, 2 +& 230, 280, 250, 300, 14, 56, 63, 2, 2 +& 255, 280, 275, 300, 15, 56, 63, 2, 2 + +& 415, 200, 420, 305, 0, 56, 63, 2, 2 +& 430, 200, 435, 305, 0, 56, 63, 2, 2 +& 445, 200, 450, 305, 0, 56, 63, 2, 2 + + +*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ +­125 + + +***** Configurar Impresora +& 345, 35, 635, 450, 7, 56, 63, 0, 2 +& 343, 372, 347, 449, 7, 7, 7, 0, 2 + +| 370, 100, 2, 5, 0, 0, Imprimir en Archivo:, +| 371, 101, 2, 5, 0, 63, Imprimir en Archivo:, +& 540, 98, 630, 117, 63, 7, 56, 0, 0 + + +| 350, 125, 2, 5, 0, 0, Longitud de la p gina:, +| 351, 126, 2, 5, 0, 63, Longitud de la p gina:, +& 540, 123, 630, 142, 63, 7, 56, 0, 0 + + +| 350, 150, 2, 5, 0, 0, C¢digos de Impresi¢n, +| 351, 151, 2, 5, 0, 63, C¢digos de Impresi¢n, + +| 350, 175, 2, 5, 0, 0, Texto Normal:, +| 351, 176, 2, 5, 0, 63, Texto Normal:, +& 465, 175, 630, 194, 63, 7, 56, 0, 0 + +| 350, 200, 2, 5, 0, 0, T. Condensado:, +| 351, 201, 2, 5, 0, 63, T. Condensado:, +& 465, 200, 630, 219, 63, 7, 56, 0, 0 + +| 350, 230, 2, 5, 0, 0, (Cod. Control) INICIO / FIN, +| 351, 231, 2, 5, 0, 63, (Cod. Control) INICIO / FIN, + +& 420, 249, 630, 311, 63, 7, 56, 0, 0 +& 420, 320, 630, 382, 63, 7, 56, 0, 0 + + +­126 + +*ÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜßÜß +***** Configurar Ventas +& 345, 35, 635, 450, 7, 56, 63, 0, 2 +& 343, 287, 347, 363, 7, 7, 7, 0, 2 +*& 343, 202, 347, 268, 7, 7, 7, 0, 2 + +| 350, 40, 2, 5, 0, 0, ---:, +| 351, 41, 2, 5, 0, 63, ---:, +& 540, 38, 630, 57, 63, 7, 56, 0, 0 + + +| 350, 65, 2, 5, 0, 0, Cuota de ant. alumno:, +| 351, 66, 2, 5, 0, 63, Cuota de ant. alumno:, +& 540, 63, 630, 82, 63, 7, 56, 0, 0 + + +*| 350, 120, 2, 5, 0, 0, Hora cambio del dia:, +*| 351, 121, 2, 5, 0, 63, Hora cambio del dia:, +*& 540, 119, 630, 135, 63, 7, 56, 0, 0 + +*| 350, 160, 2, 5, 0, 0, Franjas horarias a discriminar:, +*| 351, 161, 2, 5, 0, 63, Franjas horarias a discriminar:, +*& 351, 180, 380, 197, 63, 7, 56, 0, 0 +*& 351, 200, 380, 217, 63, 7, 56, 0, 0 +*& 351, 220, 380, 237, 63, 7, 56, 0, 0 +*& 351, 240, 380, 257, 63, 7, 56, 0, 0 +*& 351, 260, 380, 277, 63, 7, 56, 0, 0 +*& 351, 280, 380, 297, 63, 7, 56, 0, 0 +**| 351, 181, 2, 5, 0, 63, :00 >-> 00:00, +**| 351, 201, 2, 5, 0, 63, :00 >-> 00:00, +**| 351, 221, 2, 5, 0, 63, :00 >-> 00:00, +**| 351, 241, 2, 5, 0, 63, :00 >-> 00:00, +**| 351, 261, 2, 5, 0, 63, :00 >-> 00:00, +**| 351, 281, 2, 5, 0, 63, :00 >-> 00:00, + +*| 350, 305, 2, 5, 0, 0, Franjas horarias de ventas:, +*| 351, 306, 2, 5, 0, 63, Franjas horarias de ventas:, +*& 351, 330, 380, 347, 63, 7, 56, 0, 0 +*& 351, 350, 380, 367, 63, 7, 56, 0, 0 +*& 351, 370, 380, 387, 63, 7, 56, 0, 0 +*& 351, 390, 380, 407, 63, 7, 56, 0, 0 +*| 351, 331, 2, 5, 0, 63, [ Hora 2 ], +*| 351, 351, 2, 5, 0, 63, [ Hora 3 ], +*| 351, 371, 2, 5, 0, 63, [ Hora 4 ], +*| 351, 391, 2, 5, 0, 63, [ Hora 5 ], + + +*| 350, 425, 2, 4, 0, 0, ¨ Permitir modificar P.C en compras ?:, +*| 351, 426, 2, 4, 0, 63, ¨ Permitir modificar P.C en compras ?:, +*& 580, 423, 630, 442, 63, 7, 56, 0, 0 +*| 351, 331, 2, 5, 0, 0, ., + + + +*ÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ + + + + diff --git a/SYSTM/ALUM.PCX b/SYSTM/ALUM.PCX new file mode 100644 index 0000000..f915bea Binary files /dev/null and b/SYSTM/ALUM.PCX differ diff --git a/SYSTM/ALUMBAK.PCX b/SYSTM/ALUMBAK.PCX new file mode 100644 index 0000000..4ea5ae7 Binary files /dev/null and b/SYSTM/ALUMBAK.PCX differ diff --git a/SYSTM/ALUMC.PCX b/SYSTM/ALUMC.PCX new file mode 100644 index 0000000..a42db9a Binary files /dev/null and b/SYSTM/ALUMC.PCX differ diff --git a/SYSTM/ALUMMP.IMG b/SYSTM/ALUMMP.IMG new file mode 100644 index 0000000..00d0cdf --- /dev/null +++ b/SYSTM/ALUMMP.IMG @@ -0,0 +1,323 @@ +#9 + +************************************************ Botones D: 1 +**** **** Botones S: 90 +** Men£ Principal ** +**** **** +************************************************ +!1, 11 + +$ 420, 160, 620, 190, 7, 63, 56, 2, 2, 000, 30 +$ 420, 200, 620, 230, 7, 63, 56, 2, 2, 000, 25 +$ 420, 240, 620, 270, 7, 63, 56, 2, 2, 000, 18 +$ 420, 280, 620, 310, 7, 63, 56, 2, 2, 000, 46 +$ 420, 320, 620, 350, 7, 63, 56, 2, 2, 000, 34 +$ 420, 360, 620, 390, 7, 63, 56, 2, 2, 000, 19 +$ 420, 400, 620, 430, 7, 63, 56, 2, 2, 000, 50 +$ 420, 440, 620, 470, 7, 63, 56, 2, 2, 000, 31 + +$ 110, 283, 297, 312, 0, 56, 63, 2, 2, 000, 000 +$ 20, 280, 300, 315, 7, 63, 56, 2, 2, 000, 000 + +$ 25, 325, 295, 465, 0, 56, 63, 2, 2, 000, 000 + + + + +­90 +| 420, 100, 10, 1, 0, 56, Men£ Principal, +| 421, 101, 10, 1, 0, 56, Men£ Principal, +| 422, 102, 10, 1, 0, 63, Men£ Principal, +*| 420, 100, 2, 8, 0, 56, Men£ Principal, +*| 421, 101, 2, 8, 0, 56, Men£ Principal, +*| 422, 102, 2, 8, 0, 63, Men£ Principal, + + +& 420, 160, 620, 190, 7, 63, 56, 2, 2 +& 420, 200, 620, 230, 7, 63, 56, 2, 2 +& 420, 240, 620, 270, 7, 63, 56, 2, 2 +& 420, 280, 620, 310, 7, 63, 56, 2, 2 +& 420, 320, 620, 350, 7, 63, 56, 2, 2 +& 420, 360, 620, 390, 7, 63, 56, 2, 2 +& 420, 400, 620, 430, 7, 63, 56, 2, 2 +& 420, 440, 620, 470, 7, 63, 56, 2, 2 + +& 20, 280, 300, 315, 7, 63, 56, 2, 2 +& 110, 283, 297, 312, 0, 56, 63, 2, 2 +| 20, 285, 2, 6, 0, 63, Creditos:, +| 21, 286, 2, 6, 0, 0, Creditos:, + +& 20, 320, 300, 470, 7, 63, 56, 2, 2 +& 25, 325, 295, 465, 0, 56, 63, 2, 2 + +*| 40, 340, 2, 6, 0, 63, Todas las opciones, +*| 40, 360, 2, 6, 0, 63, han sido desactivadas, + +*| 40, 390, 2, 6, 0, 63, C¢digo de acceso RECHAZADO, + + + +* SubMenu Dedicado a Articulo + * Ref. Articulos + * Stock Actual + * Graficas Ventas + +************************************************ Botones D: (ninguno) 2-R +**** **** Botones S: 91 +** Gestion Antiguos Alumnos ** +**** **** +************************************************ +!2, 3 + $ 220, 85, 410, 115, 7, 63, 56, 2, 2, 000, 000 + $ 220, 120, 410, 150, 7, 63, 56, 2, 2, 000, 000 + $ 220, 155, 410, 185, 7, 63, 56, 2, 2, 000, 000 + +­91 +& 215, 80, 415, 190, 7, 56, 63, -2, 2 + & 220, 85, 410, 115, 7, 63, 56, 2, 2 + | 220, 88, 2, 6, 0, 0, Ref. Articulos, + | 221, 89, 2, 6, 0, 63, Ref. Articulos, + & 220, 120, 410, 150, 7, 63, 56, 2, 2 + | 220, 123, 2, 6, 0, 0, Stock Actual, + | 221, 124, 2, 6, 0, 63, Stock Actual, + & 220, 155, 410, 185, 7, 63, 56, 2, 2 + | 220, 158, 2, 6, 0, 0, Graficas Ventas, + | 221, 159, 2, 6, 0, 63, Graficas Ventas, + + +************************************************ Botones D: 3 +**** **** Botones S: 92 +** Ordenaciones ** +**** **** +************************************************ +!3, 5 + + + + $ 220, 55, 410, 85, 7, 63, 56, 2, 2, 000, 000 + $ 220, 90, 410, 120, 7, 63, 56, 2, 2, 000, 000 + $ 220, 125, 410, 155, 7, 63, 56, 2, 2, 000, 000 + $ 220, 160, 410, 190, 7, 63, 56, 2, 2, 000, 000 + $ 220, 195, 410, 225, 7, 63, 56, 2, 2, 000, 000 + +­92 +& 215, 50, 415, 230, 7, 56, 63, -2, 2 + & 220, 55, 410, 85, 7, 63, 56, 2, 2 + | 220, 58, 2, 6, 0, 0, Nombre/Apellidos, + | 221, 59, 2, 6, 0, 63, Nombre/Apellidos, + & 220, 90, 410, 120, 7, 63, 56, 2, 2 + | 220, 93, 2, 6, 0, 0, Apellidos/Nombre, + | 221, 94, 2, 6, 0, 63, Apellidos/Nombre, + & 220, 125, 410, 155, 7, 63, 56, 2, 2 + | 220, 128, 2, 6, 0, 0, Direcci¢n, + | 221, 129, 2, 6, 0, 63, Direcci¢n, + & 220, 160, 410, 190, 7, 63, 56, 2, 2 + | 220, 163, 2, 6, 0, 0, --, + | 221, 164, 2, 6, 0, 63, --, + & 220, 195, 410, 225, 7, 63, 56, 2, 2 + | 220, 198, 2, 6, 0, 0, Cuenta Bancaria, + | 221, 199, 2, 6, 0, 63, Cuenta Bancaria, + +************************************************ Botones D: 4 +**** **** Botones S: 93 +** Listados ** +**** **** +************************************************ +!4, 3 + $ 220, 205, 410, 235, 7, 63, 56, 2, 2, 000, 000 + $ 220, 240, 410, 270, 7, 63, 56, 2, 2, 000, 000 + $ 220, 275, 410, 305, 7, 63, 56, 2, 2, 000, 000 + + +­93 +& 215, 200, 415, 310, 7, 56, 63, -2, 2 + & 220, 205, 410, 235, 7, 63, 56, 2, 2 + | 220, 208, 2, 6, 0, 0, Listado General, + | 221, 209, 2, 6, 0, 63, Listado General, + & 220, 240, 410, 270, 7, 63, 56, 2, 2 + | 220, 243, 2, 6, 0, 0, Pegatinas Direc., + | 221, 244, 2, 6, 0, 63, Pegatinas Direc., + & 220, 275, 410, 305, 7, 63, 56, 2, 2 + | 220, 278, 2, 6, 0, 0, Factura Bancaria, + | 221, 279, 2, 6, 0, 63, Factura Bancaria, + +************************************************ Botones D: 5 +**** **** Botones S: 94 +** Ventas ** +**** **** +************************************************ +!5, 4 + $ 220, 210, 410, 240, 7, 63, 56, 2, 2, 000, 000 + $ 220, 245, 410, 275, 7, 63, 56, 2, 2, 000, 000 + $ 220, 280, 410, 310, 7, 63, 56, 2, 2, 000, 000 + $ 220, 315, 410, 345, 7, 63, 56, 2, 2, 000, 000 + + +­94 +& 215, 205, 415, 350, 7, 56, 63, -2, 2 + & 220, 210, 410, 240, 7, 63, 56, 2, 2 + | 220, 213, 2, 6, 0, 0, --, + | 221, 214, 2, 6, 0, 63, --, + & 220, 245, 410, 275, 7, 63, 56, 2, 2 + | 220, 248, 2, 6, 0, 0, --, + | 221, 249, 2, 6, 0, 63, --, + & 220, 280, 410, 310, 7, 63, 56, 2, 2 + | 220, 283, 2, 6, 0, 0, --, + | 221, 284, 2, 6, 0, 63, --, + & 220, 315, 410, 345, 7, 63, 56, 2, 2 + | 220, 318, 2, 6, 0, 0, --, + | 221, 319, 2, 6, 0, 63, --, + + + +************************************************ Botones D: 6 +**** **** Botones S: 95 +** Empleados ** +**** **** +************************************************ +!6, 3 + $ 220, 165, 410, 195, 7, 63, 56, 2, 2, 000, 000 + $ 220, 200, 410, 230, 7, 63, 56, 2, 2, 000, 000 + $ 220, 235, 410, 265, 7, 63, 56, 2, 2, 000, 000 + + + + +­95 +& 215, 160, 415, 270, 7, 56, 63, -2, 2 + & 220, 165, 410, 195, 7, 63, 56, 2, 2 + | 220, 168, 2, 6, 0, 0, Info Empleados, + | 221, 169, 2, 6, 0, 63, Info Empleados, + & 220, 200, 410, 230, 7, 63, 56, 2, 2 + | 220, 203, 2, 6, 0, 0, Permisos Acceso, + | 221, 204, 2, 6, 0, 63, Permisos Acceso, + & 220, 235, 410, 265, 7, 63, 56, 2, 2 + | 220, 238, 2, 6, 0, 0, Graficas Ventas, + | 221, 239, 2, 6, 0, 63, Graficas Ventas, + + +************************************************ Botones D: 7 +**** **** Botones S: 96 +** Miscelanea ** +**** **** +************************************************ +!7, 6 + +$ 220, 220, 410, 250, 7, 63, 56, 2, 2, 000, 000 +$ 220, 255, 410, 285, 7, 63, 56, 2, 2, 000, 000 +$ 220, 290, 410, 320, 7, 63, 56, 2, 2, 000, 000 +$ 220, 325, 410, 355, 7, 63, 56, 2, 2, 000, 000 +$ 220, 360, 410, 390, 7, 63, 56, 2, 2, 000, 000 +$ 220, 395, 410, 425, 7, 63, 56, 2, 2, 000, 000 + + +­96 + +& 215, 215, 415, 430, 7, 56, 63, -2, 2 + & 220, 220, 410, 250, 7, 63, 56, 2, 2 + | 220, 223, 2, 6, 0, 0, FA, + | 221, 224, 2, 6, 0, 63, FA, + & 220, 255, 410, 285, 7, 63, 56, 2, 2 + | 220, 258, 2, 6, 0, 0, FA, + | 221, 259, 2, 6, 0, 63, FA, + & 220, 290, 410, 320, 7, 63, 56, 2, 2 + | 220, 293, 2, 6, 0, 0, FA, + | 221, 294, 2, 6, 0, 63, FA, + & 220, 325, 410, 355, 7, 63, 56, 2, 2 + | 220, 328, 2, 6, 0, 0, FA, + | 221, 329, 2, 6, 0, 63, FA, + & 220, 360, 410, 390, 7, 63, 56, 2, 2 + | 220, 363, 2, 6, 0, 0, FA, + | 221, 364, 2, 6, 0, 63, FA, + & 220, 395, 410, 425, 7, 63, 56, 2, 2 + | 220, 398, 2, 6, 0, 0, Configurar Entorno, + | 221, 399, 2, 6, 0, 63, Configurar Entorno, + + + +************************************************ Botones D: 8 +**** **** Botones S: 97 +** Escoger empresa activa ** +**** **** +************************************************ +!8, 10 + +$ 110, 75, 297, 95, 7, 63, 56, 2, 2, 000, 000 +$ 110, 95, 297, 115, 7, 63, 56, 2, 2, 000, 000 +$ 110, 115, 297, 135, 7, 63, 56, 2, 2, 000, 000 +$ 110, 135, 297, 155, 7, 63, 56, 2, 2, 000, 000 +$ 110, 155, 297, 175, 7, 63, 56, 2, 2, 000, 000 +$ 110, 175, 297, 195, 7, 63, 56, 2, 2, 000, 000 +$ 110, 195, 297, 215, 7, 63, 56, 2, 2, 000, 000 +$ 110, 215, 297, 235, 7, 63, 56, 2, 2, 000, 000 +$ 110, 235, 297, 255, 7, 63, 56, 2, 2, 000, 000 +$ 110, 255, 297, 275, 7, 63, 56, 2, 2, 000, 000 + + +­97 + +*$ 20, 280, 300, 315, 7, 63, 56, 2, 2, 000, 000 +& 105, 70, 302, 280, 7, 56, 63, -2, 2 + + & 110, 255, 297, 275, 7, 63, 56, 2, 2 + & 110, 235, 297, 255, 7, 63, 56, 2, 2 + & 110, 215, 297, 235, 7, 63, 56, 2, 2 + & 110, 195, 297, 215, 7, 63, 56, 2, 2 + & 110, 175, 297, 195, 7, 63, 56, 2, 2 + & 110, 155, 297, 175, 7, 63, 56, 2, 2 + & 110, 135, 297, 155, 7, 63, 56, 2, 2 + & 110, 115, 297, 135, 7, 63, 56, 2, 2 + & 110, 95, 297, 115, 7, 63, 56, 2, 2 + & 110, 75, 297, 95, 7, 63, 56, 2, 2 + + | 110, 255, 2, 4, 0, 0, 123456789-123456789-123456789-, + | 111, 256, 2, 4, 0, 63, 123456789-123456789-123456789-, + + +************************************************ Botones D: 9 +**** **** Botones S: 98 +** Ventas -> Empleados ** +**** **** +************************************************ +!9, 3 + $ 220, 245, 410, 275, 7, 63, 56, 2, 2, 000, 000 + $ 220, 280, 410, 310, 7, 63, 56, 2, 2, 000, 000 + $ 220, 315, 410, 345, 7, 63, 56, 2, 2, 000, 000 + + +­98 +& 215, 240, 415, 350, 7, 56, 63, -2, 2 + & 220, 245, 410, 275, 7, 63, 56, 2, 2 + | 220, 248, 2, 6, 0, 0, Datos Clientes, + | 221, 249, 2, 6, 0, 63, Datos Clientes, + & 220, 280, 410, 310, 7, 63, 56, 2, 2 + | 220, 283, 2, 6, 0, 0, Venta a Clientes, + | 221, 284, 2, 6, 0, 63, Venta a Clientes, + & 220, 315, 410, 345, 7, 63, 56, 2, 2 + | 220, 318, 2, 6, 0, 0, Datos de interes, + | 221, 319, 2, 6, 0, 63, Datos de interes, + +************************************************ Botones D: 8 <-| +**** **** Botones S: 99 <-| +** Programas externos ** +**** **** +************************************************ +­99 + +& 223, 185, 420, 395, 7, 56, 63, -2, 2 + + & 228, 370, 415, 390, 7, 63, 56, 2, 2 + & 228, 350, 415, 370, 7, 63, 56, 2, 2 + & 228, 330, 415, 350, 7, 63, 56, 2, 2 + & 228, 310, 415, 330, 7, 63, 56, 2, 2 + & 228, 290, 415, 310, 7, 63, 56, 2, 2 + & 228, 270, 415, 290, 7, 63, 56, 2, 2 + & 228, 250, 415, 270, 7, 63, 56, 2, 2 + & 228, 230, 415, 250, 7, 63, 56, 2, 2 + & 228, 210, 415, 230, 7, 63, 56, 2, 2 + & 228, 190, 415, 210, 7, 63, 56, 2, 2 + + & 190, 185, 220, 288, 7, 63, 56, 2, 2 + & 190, 292, 220, 395, 7, 63, 56, 2, 2 + | 192, 185, 2, 6, 1, 0, Eliminar Insertar , + | 193, 186, 2, 6, 1, 63, Eliminar Insertar , diff --git a/SYSTM/BOLD.CHR b/SYSTM/BOLD.CHR new file mode 100644 index 0000000..8af2bc2 Binary files /dev/null and b/SYSTM/BOLD.CHR differ diff --git a/SYSTM/EGAVGA.BGI b/SYSTM/EGAVGA.BGI new file mode 100644 index 0000000..8001631 Binary files /dev/null and b/SYSTM/EGAVGA.BGI differ diff --git a/SYSTM/LITT.CHR b/SYSTM/LITT.CHR new file mode 100644 index 0000000..08c3067 Binary files /dev/null and b/SYSTM/LITT.CHR differ