First commit 16/08/1996
This commit is contained in:
90
INSTALAR.CPP
Normal file
90
INSTALAR.CPP
Normal file
@ -0,0 +1,90 @@
|
||||
//programa de instalacion del software
|
||||
#include<stdio.h>
|
||||
#include<conio.h>
|
||||
#include<stdlib.h>
|
||||
//declaracion de funciones
|
||||
void recuadro(void);
|
||||
char menu(void);
|
||||
void datos(char compa[1][40],char usu[1][40]);
|
||||
void peloteo(char usu[1][40]);
|
||||
//funcion principal
|
||||
void main(void)
|
||||
{
|
||||
char opcion;
|
||||
char compa[1][40];
|
||||
char usu[1][40];
|
||||
clrscr();
|
||||
textcolor(3);
|
||||
recuadro();
|
||||
opcion=menu();
|
||||
if(opcion=='1')
|
||||
{
|
||||
datos(compa,usu);
|
||||
peloteo(usu);
|
||||
system("copy a:\\programa\\programa.exe c:\\programa.exe");
|
||||
gotoxy(30,24);
|
||||
printf("PROGRAMA INSTALADO");
|
||||
}
|
||||
clrscr();
|
||||
}
|
||||
|
||||
//funcion crea un recuadro alrededor de la pantalla de texto de 80X24
|
||||
void recuadro()
|
||||
{
|
||||
int x,y=1;
|
||||
for(y=1;y<24;y++)
|
||||
for(x=1;x<81;x++)
|
||||
{
|
||||
if(y==1||y==23)
|
||||
{
|
||||
gotoxy(x,y);
|
||||
cprintf("<EFBFBD>");
|
||||
}
|
||||
else
|
||||
{
|
||||
gotoxy(1,y);
|
||||
cprintf("<EFBFBD>");
|
||||
gotoxy(80,y);
|
||||
cprintf("<EFBFBD>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//presenta opciones y devuelve la opcion elegida
|
||||
char menu()
|
||||
{
|
||||
char op;
|
||||
textcolor(10);
|
||||
gotoxy(32,10);
|
||||
cprintf("1.- INSTALAR PROGRAMA");
|
||||
gotoxy(32,15);
|
||||
cprintf("2.- SALIR AL DOS");
|
||||
while(op!='1'&&op!='2')
|
||||
{
|
||||
op=getch();
|
||||
}
|
||||
return op;
|
||||
}
|
||||
|
||||
//funcion para nombre de la compa<70>ia y usuario
|
||||
void datos(char compa[1][40],char usu[1][40])
|
||||
{
|
||||
clrscr();
|
||||
textcolor(6);
|
||||
recuadro();
|
||||
gotoxy(20,10);
|
||||
cprintf("INTRODUZCA NOMBRE DE LA COMPA<50>IA:");
|
||||
gets(compa[0]);
|
||||
gotoxy(20,15);
|
||||
cprintf("INTRODUZCA NOMBRE DE USUARIO:");
|
||||
gets(usu[0]);
|
||||
}
|
||||
//muestra mensaje antes de instalar el programa
|
||||
void peloteo(char usu[1][40])
|
||||
{
|
||||
clrscr();
|
||||
gotoxy(27,10);
|
||||
printf("ESPERE UN MOMENTO SE<53>OR:%s",usu[0]);
|
||||
gotoxy(30,15);
|
||||
printf("PROGRAMA INSTALANDOSE");
|
||||
}
|
Reference in New Issue
Block a user