Danh mục

Giáo trình hướng dẫn phân tích thiết bị bán dẫn chứa các mạch logic điện tử p7

Số trang: 11      Loại file: pdf      Dung lượng: 189.79 KB      Lượt xem: 9      Lượt tải: 0    
Jamona

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ướng dẫn phân tích thiết bị bán dẫn chứa các mạch logic điện tử p7', 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ướng dẫn phân tích thiết bị bán dẫn chứa các mạch logic điện tử p7 . 67 LUAÂÄN VAÊN TOÁT NGHIEÄP if ((buf = farmalloc(size)) == NULL) { OutMessage(Error: not enough heap space in save_screen().); getch(); closegraph(); exit(1); } else { getimage(x1,y,x,y1,buf); OutMessage(Click a drive name in the list); } setfillstyle(SOLID_FILL,WHITE); bar(x1,y,x,y1); setcolor(BLACK); rectangle(x,y,x1,y1); setcolor(LIGHTGRAY); line(x-1,y+1,x-1,y1-1); line(x1+1,y1-1,x-1,y1-1); setcolor(BLACK); char Temp[3]; for(int i=0;i=x1+1&&LpEvent->PosxPosy>=y+7+i*14&&LpEvent->PosyMsg!=1); putimage(x1,y,buf,COPY_PUT); farfree(buf); return LpEvent; } //--------------------------------------------------------- char *FileType(TEXTBOX *b) { char s[15]; . LUAÂÄN VAÊN TOÁT NGHIEÄP 68 b->Path(); b->OutTextBox(); b->GetS(s); return s; } VI.CLASS LIST.HPP #include textbox.hpp #include disklist.hpp #if !defined __LIST__ #define __LIST__ class LIST { private: int l,t,r,b; int Color; public: void InitList(int x1,int y1,int x2,int y2,int Color); void Show(); int Press(char s[],TEXTBOX *Box,unsigned *attrib,char *DiskName,char *DName,char *ftype); int GetList(char s[],TEXTBOX *Box,unsigned *attrib,char *DiskName,char *DName,TEXTBOX *Box2,char *ftype); int Left(){return l;}; int Right(){return r;}; int Top(){return t;}; int Bottom(){return b;}; }; #endif VII.MODULE LIST.CPP #include #include #include #include #include #include #include #include #include #include mouse.h #include list.hpp //--------------------------------------------------------- void LIST::InitList(int x1,int y1,int x2,int y2,int col) { Color=col; l=x1;t=y1;r=x2;b=y2; } //--------------------------------------------------------- void LIST::Show() { setfillstyle(SOLID_FILL,Color); bar(l,t,r,b); int hor=(r-l)/3,ver=(b-t)/3; int x1=l+hor,x2=r-hor,x3=l+(r-l)/2,y1=t+ver,y2=t+ver,y3=b-ver; setcolor(WHITE); line(x1,y1,x2,y2); line(x2,y2,x3,y3); line(x1,y1,x3,y3); setfillstyle(SOLID_FILL,WHITE); floodfill(x1+(x2-x1)/2,y1+(y3-y2)/2,WHITE); . 69 LUAÂÄN VAÊN TOÁT NGHIEÄP setfillstyle(SOLID_FILL,Color); setcolor(BLACK); line(l,b,r,b); line(r,t,r,b); setcolor(WHITE); line(l,t,r,t); line(l,t,l,b); } //--------------------------------------------------------- int LIST::Press(char s[],TEXTBOX *Box,unsigned *attrib,char *DiskName,char *DName,char *ftype) //tra ve 0:nhan Cancel //tra ve 1:nhan OK { TEXTBOX Box2; HideMouse(); int hor=(r-l)/3,ver=(b-t)/3; int x1=l+hor,x2=r-hor,x3=l+(r-l)/2,y1=t+ver,y2=t+ver,y3=b-ver; setcolor(BLACK); line(x1,y1,x2,y2); line(x2,y2,x3,y3); line(x1,y1,x3,y3); setfillstyle(SOLID_FILL,BLACK); floodfill(x1+(x2-x1)/2,y1+(y3-y2)/2,BLACK); setfillstyle(SOLID_FILL,Color); setcolor(WHITE);//vien cho nut bi nhan line(l,b,r,b); line(r,t,r,b); setcolor(BLACK);//vien cho nut bi nhan line(l,t,r,t); line(l,t,l,b); int k=0; *DName=Disk(DiskName); do { char buffer[MAXPATH]; k=GetList(s,Box,attrib,DiskName,DName,&Box2,ftype); getcwd(buffer, MAXPATH); Box->GetS_in(buffer); Box->OutTextBox(); }while(k==2); ShowMouse(); return k;//k=0: nhan Cancel, k=1:nhan OK } //--------------------------------------------------------- int LIST::GetList(char s[],TEXTBOX *Box,unsigned *attrib,char *DiskName,char *DName,TEXTBOX *Box2,char *ftype) { int x11=l-300,y11=b,x12=r+100,y12=b+300;//toa do bang ngoai //600 x 300 la kich thuoc bang ngoai int Kiemtra=0;//bien de kiem tra truong hop chon OK truoc khi chon file LPEVENT lpEvent;//kiem tra bang thu muc void far *buf;//con tro chi vung luu tru man hinh . 70 LUAÂÄN VAÊN TOÁT NGHIEÄP unsigned int size = imagesize(x11,y11,x12,y12); if ((buf = farmalloc(size)) == NULL) { OutMessage(Error: not enough heap space in save_screen().); getch(); closegraph(); exit(1); } else { getimage(x11,y11,x12,y12, buf); OutMessage(Choose a file name then click OK to accept or click Cancel to ignore); } set ...

Tài liệu được xem nhiều: