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ử p9

Số trang: 8      Loại file: pdf      Dung lượng: 197.91 KB      Lượt xem: 8      Lượt tải: 0    
tailieu_vip

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ử p9', 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ử p9 . 89 LUAÂÄN VAÊN TOÁT NGHIEÄP t1=t; } if(DemSpace==1) { t3=t; fread(&t4,1,1,f); Value1++; fwrite(&t3,1,1,f1); fwrite(&t4,1,1,f1); fwrite(&t1,1,1,f1); fwrite(&t2,1,1,f1); DemSpace=0; do { fread(&t,1,1,f); if(t==' ') DemSpace++; }while((t=='\''||t==' ')&&DemSpace2) { end_line=1; } }while(end_line==0); }while(Value1. 90 LUAÂÄN VAÊN TOÁT NGHIEÄP if(n==0) return dem; for(int z=0;z. 91 LUAÂÄN VAÊN TOÁT NGHIEÄP int Color,Color1; char S[100],S1[100]; char Dri[100],Path_var[100],Name[100],TenFile[100],SubFile[100]; int chiso; public: TEXTBOX() {S[0]='\0';}//S1=Duong dan;} void InitTextBox(int x1,int y1,int x2,int y2,int color,int color1,char s[]); void Path(); void PressTextBox(); void OutTextBox(); int Left(){return l;} int Top(){return t;} int Right(){return r;} int Bottom(){return b;} void DelChar(int length);//,int xoa);//de xoa ky tu khi gap phim del tai texbox void InsertChar(char c); void GetS(char s[]){strcpy(s,S);}; void GetS_in(char s[]){strcpy(S,s);} int DuongDan(char s[]); void Get_path(char s[]){strcpy(s,Path_var);}; void Get_name(); }; #endif XV.MODULE TEXTBOX.CPP #include #include #include #include #include #include #include #include textbox.hpp #include mouse.h //--------------------------------------------------------- void TEXTBOX::InitTextBox(int x1,int y1,int x2,int y2,int color,int color1,char s[]) { char buffer[MAXPATH]; l=x1;t=y1;r=x2;b=y2; Color=color; Color1=color1; strcpy(S1,s); getcwd(buffer, MAXPATH); strcpy(S,buffer); strcat(S,\\); } //--------------------------------------------------------- void TEXTBOX::OutTextBox() { setfillstyle(SOLID_FILL,Color); bar(l,t,r,b); setcolor(WHITE); line(l,b,r,b); line(r,t,r,b); setcolor(BLACK); line(l,t,r,t); line(l,t,l,b); . 92 LUAÂÄN VAÊN TOÁT NGHIEÄP setcolor(WHITE); if(Color==WHITE) setcolor(BLACK); outtextxy(l,t+(b-t-textheight(S))/2-b+t-3,S1); outtextxy(l+5,t+(b-t-textheight(S))/2,S); } //--------------------------------------------------------- /* void TEXTBOX::PressTextBox() { setcolor(BLACK); line(l,t,r,t); line(l,t,l,b); setcolor(WHITE); line(l,b,r,b); line(r,t,r,b); } */ //--------------------------------------------------------- void TEXTBOX::Path()//lay duong dan nhap vao vao bien S cua TEXTBOX { char a; int C1=Color1;//C1 la mau cua text trong textbox o che do nhap ten file setcolor(C1); outtextxy(l+5,t+(b-t-textheight(S))/2,S); chiso=0; MouseText(l+textwidth(S)+4,t+(b- t+textheight(S))/2,Color,C1);//,S);//gia dau nhac chuot char stemp[128]; strcpy(stemp,S); while((a=getch())!=13)//&&a!=27)//kiem tra phim Enter { switch(a)//kiem tra ky tu nhap vao { case 0:switch(a=getch()) { case 71://home MouseText(l+6,t+(b-t+textheight(S))/2,Color,C1);//,S); chiso=-strlen(S); break; case 72:break; case 73:break; case 75://left arrow int f=textwidth(S); int xt=l+6+f+(--chiso)*8; int yt=t+(b-t+textheight(S))/2; if(xt. LUAÂÄN VAÊN TOÁT NGHIEÄP 93 case 80: case 81: case 82:break; case 83://del setcolor(GREEN); outtextxy(l+5,t+(b-t-textheight(S))/2,S); DelChar(strlen(S));//,chiso); f=textwidth(S); setcolor(YELLOW); outtextxy(l+5,t+(b-t-textheight(S))/2,S); MouseText(l+f+6+chiso*8,t+(b- t+textheight(S))/2,Color,C1);//,S);//so 8 ...

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