Giáo trình hình thành phân mạch ứng dụng điều chế thiết bị bán dẫn chứa các mạch logic điện tử p6
Số trang: 10
Loại file: pdf
Dung lượng: 183.56 KB
Lượt xem: 7
Lượt tải: 0
Xem trước 2 trang đầu tiên của tài liệu này:
Thông tin tài liệu:
Tham khảo tài liệu giáo trình hình thành phân mạch ứng dụng điều chế thiết bị bán dẫn chứa các mạch logic điện tử p6, kỹ thuật - công nghệ, điện - điện tử phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả
Nội dung trích xuất từ tài liệu:
Giáo trình hình thành phân mạch ứng dụng điều chế thiết bị bán dẫn chứa các mạch logic điện tử p6. 57 LUAÂÄN VAÊN TOÁT NGHIEÄP B.Module Demo.cpp #include #include #include #include #include #include #include #include #include #include #include #include screen.h #include mouse.h #include button.hpp #include textbox.hpp #include list.hpp #include disklist.hpp #include send.hpp #define NumBox 2 #define NumBut 2 LPEVENT lpEvent; //bien chua cac bien co chuot char szMessage[128]; BUTTON But[NumBut],NutKiem; TEXTBOX Box[NumBox],Port; char DiskName[27],DName; char ftype[15]=*.prn; char inter_Path[100]=; char RequF[100]; unsigned int St_address,End_address=0; char Sta_hex[5],End_hex[5]; //--------------------------------------------------------- int TestPressedButton(int x,LPEVENT lpEvent); int TestPressTexbox(int x,LPEVENT lpEvent,char layra[],unsigned *attribp); void MainProgram(); int TestPressList(LIST L,LPEVENT lpEvent,char s[],unsigned *attrib,char *typ);//nhap bang liet ke int SendFile(); //--------------------------------------------------------- void main(void) { InitGraphics(); InitValues(Download Program.); InitScreen(); if (!InitMouse(&MainWindow.rViewPort)) { OutMessage(Mouse driver not found. Init mouse and return); getch(); closegraph(); exit(1); } ShowMouse(); MainProgram(); closegraph(); }. 58 LUAÂÄN VAÊN TOÁT NGHIEÄP //--------------------------------------------------------- void MainProgram() { char Name[20],buffer[MAXPATH]; unsigned attrib,Attribp; SEND Send; LIST L; But[0].InitButton(200,380,250,400,LIGHTGRAY,Send); But[1].InitButton(400,380,450,400,LIGHTGRAY,Exit); Box[0].InitTextBox(50,70,477,90,GREEN,LIGHTGREEN,Open File); Port.InitTextBox(50,270,250,290,GREEN,LIGHTGREEN,Out port); Port.GetS_in(LPT1); L.InitList(480,70,500,90,LIGHTGRAY); But[0].OutButton();//xuat nut lenh But[1].OutButton();//xuat nut lenh Box[0].OutTextBox();//xuat hop nhap text Port.OutTextBox(); L.Show(); setcolor(BLACK); line(50,150,250,150); line(50,150,50,215); setcolor(WHITE); line(50,215,250,215); line(250,150,250,215); outtextxy(50,130,Free memory request); outtextxy(55,158,Start ad :); outtextxy(55,178,End ad :); outtextxy(55,198,Total :); OutMessage(Click mouse to chose action); int kkkk; char RequestFile[15]=; do//kiem tra nhap chuot chon cong viec { ShowMouse(); lpEvent = GetEvent();//lay bien co chuot if(TestPressedButton(2,lpEvent)==0)//kiem tra xem da click vao nut nao //0:nhan OK { char InName[100],OutName[100]; Box[0].GetS(InName); if(InName[strlen(InName)-1]==\) InName[strlen(InName)-1]= ; _dos_getfileattr(InName,&attrib); if(attrib==16) { OutMessage(); OutError(Please enter a file name); OutMessage(Click mouse to chose action); } else//la file { if(End_address!=0) { if(OutError(Are you sure ?)) { OutMessage(Sending... Press Esc to stop if time is over.); Send.CatFile(Sta_hex,End_hex,inter_Path);. 59 LUAÂÄN VAÊN TOÁT NGHIEÄP Send.Out(); HideMouse(); if(Send.Out()!=-1) { HideMouse(); OutMessage(); OutError(Task is complete.); OutMessage(Click mouse to choose action); } else { HideMouse(); OutMessage(Click mouse to choose action); } } } } }//if(TestPressedButton if(TestPressList(L,lpEvent,Name,&attrib,ftype)==1) //chon OK { switch (attrib) { case 16:chdir(Name); getcwd(buffer, MAXPATH);//lay duong dan hien thoi vao buffer ...
Nội dung trích xuất từ tài liệu:
Giáo trình hình thành phân mạch ứng dụng điều chế thiết bị bán dẫn chứa các mạch logic điện tử p6. 57 LUAÂÄN VAÊN TOÁT NGHIEÄP B.Module Demo.cpp #include #include #include #include #include #include #include #include #include #include #include #include screen.h #include mouse.h #include button.hpp #include textbox.hpp #include list.hpp #include disklist.hpp #include send.hpp #define NumBox 2 #define NumBut 2 LPEVENT lpEvent; //bien chua cac bien co chuot char szMessage[128]; BUTTON But[NumBut],NutKiem; TEXTBOX Box[NumBox],Port; char DiskName[27],DName; char ftype[15]=*.prn; char inter_Path[100]=; char RequF[100]; unsigned int St_address,End_address=0; char Sta_hex[5],End_hex[5]; //--------------------------------------------------------- int TestPressedButton(int x,LPEVENT lpEvent); int TestPressTexbox(int x,LPEVENT lpEvent,char layra[],unsigned *attribp); void MainProgram(); int TestPressList(LIST L,LPEVENT lpEvent,char s[],unsigned *attrib,char *typ);//nhap bang liet ke int SendFile(); //--------------------------------------------------------- void main(void) { InitGraphics(); InitValues(Download Program.); InitScreen(); if (!InitMouse(&MainWindow.rViewPort)) { OutMessage(Mouse driver not found. Init mouse and return); getch(); closegraph(); exit(1); } ShowMouse(); MainProgram(); closegraph(); }. 58 LUAÂÄN VAÊN TOÁT NGHIEÄP //--------------------------------------------------------- void MainProgram() { char Name[20],buffer[MAXPATH]; unsigned attrib,Attribp; SEND Send; LIST L; But[0].InitButton(200,380,250,400,LIGHTGRAY,Send); But[1].InitButton(400,380,450,400,LIGHTGRAY,Exit); Box[0].InitTextBox(50,70,477,90,GREEN,LIGHTGREEN,Open File); Port.InitTextBox(50,270,250,290,GREEN,LIGHTGREEN,Out port); Port.GetS_in(LPT1); L.InitList(480,70,500,90,LIGHTGRAY); But[0].OutButton();//xuat nut lenh But[1].OutButton();//xuat nut lenh Box[0].OutTextBox();//xuat hop nhap text Port.OutTextBox(); L.Show(); setcolor(BLACK); line(50,150,250,150); line(50,150,50,215); setcolor(WHITE); line(50,215,250,215); line(250,150,250,215); outtextxy(50,130,Free memory request); outtextxy(55,158,Start ad :); outtextxy(55,178,End ad :); outtextxy(55,198,Total :); OutMessage(Click mouse to chose action); int kkkk; char RequestFile[15]=; do//kiem tra nhap chuot chon cong viec { ShowMouse(); lpEvent = GetEvent();//lay bien co chuot if(TestPressedButton(2,lpEvent)==0)//kiem tra xem da click vao nut nao //0:nhan OK { char InName[100],OutName[100]; Box[0].GetS(InName); if(InName[strlen(InName)-1]==\) InName[strlen(InName)-1]= ; _dos_getfileattr(InName,&attrib); if(attrib==16) { OutMessage(); OutError(Please enter a file name); OutMessage(Click mouse to chose action); } else//la file { if(End_address!=0) { if(OutError(Are you sure ?)) { OutMessage(Sending... Press Esc to stop if time is over.); Send.CatFile(Sta_hex,End_hex,inter_Path);. 59 LUAÂÄN VAÊN TOÁT NGHIEÄP Send.Out(); HideMouse(); if(Send.Out()!=-1) { HideMouse(); OutMessage(); OutError(Task is complete.); OutMessage(Click mouse to choose action); } else { HideMouse(); OutMessage(Click mouse to choose action); } } } } }//if(TestPressedButton if(TestPressList(L,lpEvent,Name,&attrib,ftype)==1) //chon OK { switch (attrib) { case 16:chdir(Name); getcwd(buffer, MAXPATH);//lay duong dan hien thoi vao buffer ...
Tìm kiếm theo từ khóa liên quan:
giáo trình vật lý tài liệu vật lý phương pháp quang học kỹ năng quang học thủ thuật quang họcGợi ý tài liệu liên quan:
-
Giáo trình Vật lý đại cương A2: Phần 2 - ThS. Trương Thành
78 trang 121 0 0 -
Giáo trình hình thành ứng dụng điện thế âm vào Jfet với tín hiệu xoay chiều p2
10 trang 55 0 0 -
Giáo trình giải thích việc nôn mửa do phản xạ hoặc do trung khu thần kinh bị kích thích p10
5 trang 54 0 0 -
Giáo trình hình thành đặc tính kỹ thuật của bộ cánh khuấy Mycom trong hệ số truyền nhiệt p2
5 trang 48 0 0 -
Giáo trình Vật lý phân tử và nhiệt học: Phần 1
54 trang 47 0 0 -
Giáo trình hình thành nguyên lý ứng dụng hệ số góc phân bố năng lượng phóng xạ p4
10 trang 42 0 0 -
13. TƯƠNG TÁC GIỮA HAI DÒNG ĐIỆN THẲNG SONG SONG. ĐỊNH NGHĨA ĐƠN VỊ AM-PE
4 trang 37 0 0 -
Giáo trình Vật lý phân tử và nhiệt học: Phần 2
72 trang 35 0 0 -
Giáo trình hình thành phân đoạn ứng dụng cấu tạo đoạn nhiệt theo dòng lưu động một chiều p5
10 trang 30 0 0 -
35 trang 29 0 0