#include <graphics.h>
#include <stdio.h>
#include <conio.h>
#include <dos.h>
#include <stdlib.h>
void video_mode(){
int driver=DETECT,mode;
initgraph(&driver,&mode,"GESTION");
}
void frame()
{
int progressbar;
setcolor(14);
settextstyle(BOLD_FONT,HORIZ_DIR,1);
outtextxy(1,1," -------------------------------");
settextstyle(BOLD_FONT,VERT_DIR,1);
outtextxy(0,1," -----------------------");
settextstyle(BOLD_FONT,HORIZ_DIR,1);
outtextxy(1,430," -------------------------------");
settextstyle(BOLD_FONT,VERT_DIR,1);
outtextxy(580,1," -----------------------");
setcolor(14);
settextstyle(SMALL_FONT,HORIZ_DIR,9);
outtextxy(100,90,"Gestion De Cyber HICHAM");
setcolor(14);
settextstyle(BOLD_FONT,HORIZ_DIR,2);
delay(1000);
for(progressbar=0;progressbar<=380;progressbar++)
{
delay(50);
outtextxy(200,170,"Veuillez Patientez ...");
outtextxy(100+progressbar,270,"---");
}
}
void gest()
{
int duree=0;
char choice;
clrscr();
video_mode();
setcolor(10);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(50,30,"Gestion De Cyber HICHAM");
settextstyle(SIMPLEX_FONT,HORIZ_DIR,1);
setcolor(12);
outtextxy(10,120,"Choisir une p‚riode d'aprٹs les choix ci dessous : ");
setcolor(14);
outtextxy(8,160," a) 30 minutes ");
outtextxy(8,200," b) 1 heure ");
outtextxy(8,240," c) 2 heures ");
outtextxy(8,280," d) 3 heures ");
outtextxy(8,320," e) 4 heures ");
outtextxy(300,160,"f) 5 heures ");
outtextxy(300,200,"g) 1 heure et 30 minutes ");
outtextxy(300,240,"h) 2 heures et 30 minutes ");
outtextxy(300,280,"i) 3 heures et 30 minutes ");
outtextxy(300,320,"j) 4 heures et 30 minutes ");
setcolor(15);
outtextxy(100,380,"Tapez votre choix ici ,puis cliquer sur ENTRER =>");
printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t");
gets(&choice);
if(choice==0x61){
FILE *file0;
clrscr();
video_mode();
setcolor(10);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(30,30,"Gestion De Cyber Hicham 2012");
outtextxy(140,110,"Programmer par ");
outtextxy(180,190,"Hamza Qdider");
settextstyle(SIMPLEX_FONT,HORIZ_DIR,1);
setcolor(14);
file0=fopen("c:\\file0.per","w");
fprintf(file0,"0");
fclose(file0);
outtextxy(150,390,"Cliquer sur un button deux fois pour sortir");
delay(4000);
closegraph();
}
else if(choice==0x62){FILE *file1;
clrscr();
video_mode();
setcolor(10);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(30,30,"Gestion De Cyber Hicham 2012");
outtextxy(140,110,"Programmer par :");
outtextxy(180,190,"Hamza Qdider");
settextstyle(SIMPLEX_FONT,HORIZ_DIR,1);
setcolor(12);
file1=fopen("c:\\file1.per","w");
fprintf(file1,"1");
fclose(file1);
outtextxy(150,390,"Cliquer sur un button deux fois pour sortir");
delay(4000);
closegraph();
}
else if(choice== 0x63){FILE *file2;
clrscr();
video_mode();
setcolor(10);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(30,30,"Gestion De Cyber Hicham 2012");
outtextxy(140,110,"Programmer par :");
outtextxy(180,190,"Hamza Qdider");
settextstyle(SIMPLEX_FONT,HORIZ_DIR,1);
setcolor(12);
file2=fopen("c:\\file2.per","w");
fprintf(file2,"2");
fclose(file2);
outtextxy(150,390,"Cliquer sur un button deux fois pour sortir");
delay(4000);
closegraph();
}
else if(choice== 0x64){FILE *file3;
clrscr();
video_mode();
setcolor(10);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(30,30,"Gestion De Cyber Hicham 2012");
outtextxy(140,110,"Programmer par :");
outtextxy(180,190,"Hamza Qdider");
settextstyle(SIMPLEX_FONT,HORIZ_DIR,1);
setcolor(12);
file3=fopen("c:\\file3.per","w");
fprintf(file3,"3");
fclose(file3);
outtextxy(150,390,"Cliquer sur un button deux fois pour sortir");
delay(4000);
closegraph();
}
else if(choice== 0x65){FILE *file4;
clrscr();
video_mode();
setcolor(10);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(30,30,"Gestion De Cyber Hicham 2012");
outtextxy(140,110,"Programmer par :");
outtextxy(180,190,"Hamza Qdider");
settextstyle(SIMPLEX_FONT,HORIZ_DIR,1);
setcolor(12);
file4=fopen("c:\\file4.per","w");
fprintf(file4,"4");
fclose(file4);
outtextxy(150,390,"Cliquer sur un button deux fois pour sortir");
delay(4000);
closegraph();
}
else if(choice== 0x66){FILE *file5;
clrscr();
video_mode();
setcolor(10);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(30,30,"Gestion De Cyber Hicham 2012");
outtextxy(140,110,"Programmer par :");
outtextxy(180,190,"Hamza Qdider");
settextstyle(SIMPLEX_FONT,HORIZ_DIR,1);
setcolor(12);
file5=fopen("c:\\file5.per","w");
fprintf(file5,"5");
fclose(file5);
outtextxy(150,390,"Cliquer sur un button deux fois pour sortir");
delay(4000);
closegraph();
}
else if(choice== 0x67){FILE *file6;
clrscr();
video_mode();
setcolor(10);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(30,30,"Gestion De Cyber Hicham 2012");
outtextxy(140,110,"Programmer par :");
outtextxy(180,190,"Hamza Qdider");
settextstyle(SIMPLEX_FONT,HORIZ_DIR,1);
setcolor(12);
file6=fopen("c:\\file6.per","w");
fprintf(file6,"6");
fclose(file6);
outtextxy(150,390,"Cliquer sur un button deux fois pour sortir");
delay(4000);
closegraph();
}
else if(choice== 0x68){FILE *file7;
clrscr();
video_mode();
setcolor(10);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(30,30,"Gestion De Cyber Hicham 2012");
outtextxy(140,110,"Programmer par :");
outtextxy(180,190,"Hamza Qdider");
settextstyle(SIMPLEX_FONT,HORIZ_DIR,1);
setcolor(12);
file7=fopen("c:\\file7.per","w");
fprintf(file7,"7");
fclose(file7);
outtextxy(150,390,"Cliquer sur un button deux fois pour sortir");
delay(4000);
closegraph();
}
else if(choice== 0x69){FILE *file8;
clrscr();
video_mode();
setcolor(10);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(30,30,"Gestion De Cyber Hicham 2012");
outtextxy(140,110,"Programmer par :");
outtextxy(180,190,"Hamza Qdider");
settextstyle(SIMPLEX_FONT,HORIZ_DIR,1);
setcolor(14);
file8=fopen("c:\\file8.per","w");
fprintf(file8,"8");
fclose(file8);
outtextxy(150,390,"Cliquer sur un button deux fois pour sortir");
delay(4000);
closegraph();
}
else if(choice== 0x6A){FILE *file9;
clrscr();
video_mode();
setcolor(10);
settextstyle(TRIPLEX_FONT,HORIZ_DIR,4);
outtextxy(30,30,"Gestion De Cyber Hicham 2012");
outtextxy(140,110,"Programmer par :");
outtextxy(10,190,"Hamza Qdider");
settextstyle(SIMPLEX_FONT,HORIZ_DIR,1);
setcolor(14);
file9=fopen("c:\\file9.per","w");
fprintf(file9,"9");
fclose(file9);
outtextxy(150,390,"Cliquer sur un button deux fois pour sortir");
delay(4000);
closegraph();
}
else
{
gest();
}
}
void main(){
video_mode();
frame();
gest();
} |
0 commentaires:
Enregistrer un commentaire