1007 lines
36 KiB
Plaintext
1007 lines
36 KiB
Plaintext
|
//Leency & Veliant -=- KolibriOS Team -=- 2008
|
|||
|
|
|||
|
#pragma option J0
|
|||
|
#pragma option LST
|
|||
|
#pragma option OC
|
|||
|
#pragma option 4
|
|||
|
#pragma option A
|
|||
|
#include "lib\kolibri.h--"
|
|||
|
#include "lib\memory.h--"
|
|||
|
#include "imgs\Imgs.cpp"
|
|||
|
#include "imgs\icons.cpp"
|
|||
|
#include "imgs\left_p.cpp"
|
|||
|
#include "LVabout.c--"
|
|||
|
#speed
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
char header = "Eolite File Manager v0.84";
|
|||
|
char gotodev = "Goto:";
|
|||
|
char actions = "Actions";
|
|||
|
char preview = "Preview";
|
|||
|
char tfile = "File";
|
|||
|
char ttype = "Type";
|
|||
|
char tsize = "Size";
|
|||
|
dword videlenie=0x94AECE; //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//
|
|||
|
|
|||
|
int but_num, kolichestvo, curbtn, za_kadrom, longest_name;;
|
|||
|
dword top_actions, show_actions=1, show_preview=0, top_pr;
|
|||
|
int razm_scrl, on_y; //<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int y,off; //<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
char path[256] = "/rd/1/", edit_path[256], temp[256]; //<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
char file_path[256], param[256], file_name[256]; //<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
char copyfile[256],copy_name[256]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int i=1; //<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
dword id=1;
|
|||
|
dword ins_mas[200]=0; //Insert
|
|||
|
dword file_mas[2000]; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int cut_active, rename_active, del_active;
|
|||
|
int temp_int, str_len;
|
|||
|
dword stak[100]=0;
|
|||
|
|
|||
|
proc_info Form;
|
|||
|
|
|||
|
struct {
|
|||
|
int func;
|
|||
|
int pos;
|
|||
|
int rezerv;
|
|||
|
int sizefile;
|
|||
|
int buffer;
|
|||
|
char rezerv2;
|
|||
|
int stroka;
|
|||
|
}open_file_70;
|
|||
|
dword buf, size, isdir;
|
|||
|
|
|||
|
struct {
|
|||
|
int func;
|
|||
|
int flag;
|
|||
|
int param;
|
|||
|
int rez1;
|
|||
|
int rez2;
|
|||
|
char rezerv2;
|
|||
|
int stroka;
|
|||
|
}run_file_70;
|
|||
|
|
|||
|
void main()
|
|||
|
dword pressed, key;
|
|||
|
mouse m;
|
|||
|
{
|
|||
|
skin_width = GetSkinWidth();
|
|||
|
buf = malloc(65536); //65536
|
|||
|
draw_window();
|
|||
|
$mov eax,40
|
|||
|
$mov ebx,100111b
|
|||
|
$int 0x40
|
|||
|
loop()
|
|||
|
{
|
|||
|
switch(WaitEvent())
|
|||
|
{
|
|||
|
CASE 6:
|
|||
|
IF (del_active==1) break;
|
|||
|
m.get();
|
|||
|
IF ((kolichestvo==but_num) || (m.y<57)) break; //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>, <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (m.y>Form.width) m.y=57; //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (m.lkm==0) pressed=0; ELSE
|
|||
|
//if (m.y>=on_y+skin_width) if (m.y<=on_y+razm_scrl+skin_width)
|
|||
|
IF (m.x>=onLeft(21,0)) IF (m.x<=onLeft(6,0)) pressed=1;
|
|||
|
if (pressed==1) IF (m.y>=on_y+razm_scrl+skin_width) //if (kolichestvo<za_kadrom+but_num)
|
|||
|
{
|
|||
|
IF (za_kadrom+but_num>=kolichestvo) break;
|
|||
|
Line_ReDraw(0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
za_kadrom=za_kadrom+but_num; //za_kadrom=za_kadrom+1;
|
|||
|
List_ReDraw();
|
|||
|
}
|
|||
|
ELSE IF (pressed==1) IF (m.y<=on_y) IF (on_y<>57)
|
|||
|
{
|
|||
|
IF (za_kadrom>but_num) za_kadrom=za_kadrom-but_num; //za_kadrom=za_kadrom-1;
|
|||
|
ELSE za_kadrom=0;
|
|||
|
List_ReDraw();
|
|||
|
}
|
|||
|
break;
|
|||
|
CASE evButton:
|
|||
|
id=GetButtonID();
|
|||
|
IF (id==1) {ExitProcess(); break;}
|
|||
|
IF (del_active==1)
|
|||
|
{
|
|||
|
IF (id==301) Del_File();
|
|||
|
IF (id==302) {del_active=0; Open_Dir(#path,1);}
|
|||
|
break;
|
|||
|
}
|
|||
|
switch(id)
|
|||
|
{
|
|||
|
CASE 23: IF (strcmp(#path,"/")==-1) Dir_Up(); break;//up!
|
|||
|
case 26: Paste(); break;//paste
|
|||
|
case 27: Goto_edit_path(); break; //goto edit_path
|
|||
|
case 81: Del_Form(); break;//Delete file
|
|||
|
case 24: //cut
|
|||
|
case 25: //copy
|
|||
|
if (isdir==1) break; //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
copystr(#file_name,#copy_name);
|
|||
|
copystr(#file_path,#copyfile); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (id==24) cut_active=1; ELSE cut_active=0; //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
break;
|
|||
|
case 30: //about
|
|||
|
EAX = 51;
|
|||
|
EBX = 1;
|
|||
|
ECX = #authors;
|
|||
|
EDX = #stak;
|
|||
|
$int 40h;
|
|||
|
break;
|
|||
|
case 50: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (za_kadrom<=0) break;
|
|||
|
za_kadrom=za_kadrom-1;
|
|||
|
List_ReDraw();
|
|||
|
break;
|
|||
|
case 51: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (za_kadrom+but_num>=kolichestvo) break;
|
|||
|
za_kadrom=za_kadrom+1;
|
|||
|
List_ReDraw();
|
|||
|
break;
|
|||
|
case 77: //actions
|
|||
|
IF (show_actions==1) show_actions=0; else show_actions=1;
|
|||
|
Actions(); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (show_actions==1) DrawBar(22,top_actions*16+159,160,15,0x00699C);
|
|||
|
ELSE {
|
|||
|
DrawBar(22,top_actions*16+120,160,15,0x00699C);
|
|||
|
DrawBar(22,top_actions*16+242,160,50,0x00699C);
|
|||
|
}
|
|||
|
Preview();
|
|||
|
IF (show_preview==0) DrawBar(22,top_pr+18,160,101,0x00699C); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
break;
|
|||
|
case 78: //preview
|
|||
|
if (show_preview==0)show_preview=1; else
|
|||
|
{ show_preview=0; DrawBar(22,top_pr+18,160,101,0x00699C); } //<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
Preview();
|
|||
|
break;
|
|||
|
case 80: //rename
|
|||
|
if (isdir==1) break; //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
y= curbtn*18+85;
|
|||
|
DrawRegion(219,curbtn*18+57,onLeft(50,197),17,0x94AECE); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(220,curbtn*18+58,onLeft(50,197)-1,16,0xFFFFCC); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
WriteTextXY(224<<16+y, 0x80000000, #file_name, 0);
|
|||
|
rename_active=1;
|
|||
|
break;
|
|||
|
case 21: //<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
GoBack(1);
|
|||
|
break;
|
|||
|
case 22: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
GoBack(0);
|
|||
|
break;
|
|||
|
}//---------------------------<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> id----------------------
|
|||
|
if (id>200) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
{
|
|||
|
if (curbtn!=id-201)
|
|||
|
{
|
|||
|
Line_ReDraw(0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
curbtn=id-201;
|
|||
|
Line_ReDraw(videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
break;
|
|||
|
}
|
|||
|
else
|
|||
|
if ((isdir==1) if (strcmp(curbtn+1*304 + buf+72,"..")==-1)
|
|||
|
{
|
|||
|
copystr(#file_path, #path);
|
|||
|
copystr("/", #path+strlen(#path));
|
|||
|
za_kadrom=0; //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
curbtn=0;
|
|||
|
Open_Dir(#path,1);
|
|||
|
} else Dir_Up(); else Run_File();
|
|||
|
break;
|
|||
|
}
|
|||
|
if (id>=100) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
{
|
|||
|
Open_Dir("/",0);
|
|||
|
copystr(id-100*304+ buf+72, #path);
|
|||
|
if (strcmp(#path,"rd")==0) copystr("/rd/1/",#path);
|
|||
|
else
|
|||
|
{
|
|||
|
copystr("/", #temp);
|
|||
|
copystr(#path, #temp+strlen(#temp));
|
|||
|
copystr("/", #temp+strlen(#temp));
|
|||
|
copystr(#temp,#path);
|
|||
|
}
|
|||
|
za_kadrom=0; //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
curbtn=0;
|
|||
|
Open_Dir(#path,1);
|
|||
|
break;
|
|||
|
}
|
|||
|
case evKey:
|
|||
|
key = GetKey();
|
|||
|
IF (del_active==1)
|
|||
|
{
|
|||
|
IF (key==013) Del_File();
|
|||
|
IF (key==027) {del_active=0; Open_Dir(#path,1);}
|
|||
|
break;
|
|||
|
}
|
|||
|
switch (key)
|
|||
|
{
|
|||
|
case 0x08: //backspace
|
|||
|
if (rename_active==1) {copystr(#file_name,#temp); if (strlen(#temp)<=0) break;}
|
|||
|
else {copystr(#edit_path,#temp); if (strlen(#temp)<=1) break;} //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "/"
|
|||
|
EBX=#temp + strlen(#temp)-1;
|
|||
|
ESBYTE[EBX] = 0;
|
|||
|
if (rename_active==1)
|
|||
|
{
|
|||
|
DrawBar(strlen(#file_name)*6+218,curbtn*18+58,6,16,0xFFFFCC); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
copystr(#temp,#file_name);
|
|||
|
WriteTextXY(224<<16+y, 0x80000000, #file_name, 0);
|
|||
|
} else { copystr(#temp,#edit_path); KEdit(); }
|
|||
|
break;
|
|||
|
case 014: //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
break;
|
|||
|
case 024: //Ctrl+X cut
|
|||
|
if (isdir==1) break; //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
copystr(#file_name,#copy_name);
|
|||
|
copystr(#file_path,#copyfile); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cut_active=1;
|
|||
|
break;
|
|||
|
case 089: //Ctrl+Ins copy
|
|||
|
case 003: //Ctrl+C copy
|
|||
|
if (isdir==1) break; //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
copystr(#file_name,#copy_name);
|
|||
|
copystr(#file_path,#copyfile); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
cut_active=0;
|
|||
|
break;
|
|||
|
case 022: //Ctrl+V paste
|
|||
|
Paste();
|
|||
|
break;
|
|||
|
case 027: //Esc
|
|||
|
if (rename_active==1) { rename_active=0; Line_ReDraw(videlenie); }
|
|||
|
break;
|
|||
|
case 013: //Enter
|
|||
|
if (rename_active==1) {Line_ReDraw(videlenie); break;}
|
|||
|
if (strcmp(#path,#edit_path)==-1) Goto_edit_path(); else
|
|||
|
if ((isdir==1) if (strcmp(curbtn+1*304 + buf+72,"..")==-1)
|
|||
|
{
|
|||
|
copystr(#file_path, #path);
|
|||
|
copystr("/", #path+strlen(#path));
|
|||
|
za_kadrom=0; //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
curbtn=0;
|
|||
|
Open_Dir(#path,1);
|
|||
|
} else Dir_Up(); else Run_File();
|
|||
|
break;
|
|||
|
case 178: //up
|
|||
|
if (curbtn>=1)
|
|||
|
{
|
|||
|
Line_ReDraw(0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
curbtn=curbtn-1;
|
|||
|
Line_ReDraw(videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
break;
|
|||
|
}
|
|||
|
if (za_kadrom<=0) break;
|
|||
|
za_kadrom=za_kadrom-1;
|
|||
|
List_ReDraw();
|
|||
|
break;
|
|||
|
case 177: //down
|
|||
|
if(curbtn<but_num-1)
|
|||
|
{
|
|||
|
Line_ReDraw(0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
curbtn=curbtn+1;
|
|||
|
Line_ReDraw(videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
break;
|
|||
|
}
|
|||
|
if (za_kadrom+but_num>=kolichestvo) break;
|
|||
|
za_kadrom=za_kadrom+1;
|
|||
|
List_ReDraw();
|
|||
|
break;
|
|||
|
case 180: //home
|
|||
|
if (curbtn==0)
|
|||
|
if (strcmp(".",buf+72)==-1) if (za_kadrom==0) break; else if (za_kadrom==1) break;
|
|||
|
if (za_kadrom==0){
|
|||
|
Line_ReDraw(0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
curbtn=0;
|
|||
|
Line_ReDraw(videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
break;
|
|||
|
}
|
|||
|
Line_ReDraw(0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
za_kadrom=0; //<2F><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
curbtn=0;
|
|||
|
List_ReDraw();
|
|||
|
break;
|
|||
|
case 181: //end
|
|||
|
if (curbtn==kolichestvo-za_kadrom-1) break;
|
|||
|
if (but_num==kolichestvo-za_kadrom){
|
|||
|
Line_ReDraw(0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
curbtn=but_num-1;
|
|||
|
Line_ReDraw(videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
break;
|
|||
|
}
|
|||
|
Line_ReDraw(0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
za_kadrom=kolichestvo-but_num;
|
|||
|
curbtn=but_num;
|
|||
|
List_ReDraw();
|
|||
|
break;
|
|||
|
case 183: //Page Down
|
|||
|
IF (but_num==kolichestvo-za_kadrom) break;
|
|||
|
IF (kolichestvo-za_kadrom-but_num<but_num) || (kolichestvo==but_num)
|
|||
|
za_kadrom=kolichestvo-but_num; ELSE za_kadrom=za_kadrom+but_num;
|
|||
|
List_ReDraw();
|
|||
|
break;
|
|||
|
case 184: //Page Up
|
|||
|
IF (za_kadrom==0) break;
|
|||
|
IF (za_kadrom<=but_num) za_kadrom=0; ELSE za_kadrom=za_kadrom-but_num;
|
|||
|
List_ReDraw();
|
|||
|
break;
|
|||
|
case 185: //Insert
|
|||
|
if (ins_mas[file_mas[za_kadrom+curbtn]]==0) ins_mas[file_mas[za_kadrom+curbtn]]=1;
|
|||
|
else ins_mas[file_mas[za_kadrom+curbtn]]=0;
|
|||
|
if(curbtn<but_num-1)
|
|||
|
{
|
|||
|
Line_ReDraw(0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
curbtn++;
|
|||
|
Line_ReDraw(videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
break;
|
|||
|
}
|
|||
|
if (za_kadrom+but_num>=kolichestvo) Line_ReDraw(videlenie);
|
|||
|
else { za_kadrom=za_kadrom+1; List_ReDraw(); }
|
|||
|
break;
|
|||
|
case 182: Del_Form(); break; //delete file
|
|||
|
case 054: IF (rename_active==0) {draw_window(); break;} ELSE goto REN_; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> F5
|
|||
|
case 051: //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> F2
|
|||
|
if (rename_active==0){
|
|||
|
if (isdir==1) break; //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
y= curbtn*18+85;
|
|||
|
DrawRegion(219,curbtn*18+57,onLeft(50,197),17,0x94AECE);
|
|||
|
DrawBar(220,curbtn*18+58,onLeft(50,197)-1,16,0xFFFFCC);
|
|||
|
WriteTextXY(224<<16+y, 0x80000000, #file_name, 0);
|
|||
|
rename_active=1;
|
|||
|
} ELSE GOTO REN_;
|
|||
|
break;
|
|||
|
default:
|
|||
|
REN_:
|
|||
|
if (rename_active==1) copystr(#file_name,#temp); else copystr(#edit_path,#temp);
|
|||
|
if (strlen(#temp)>256) break;
|
|||
|
EBX=#temp + strlen(#temp);
|
|||
|
ESBYTE[EBX] = key;
|
|||
|
ESBYTE[EBX+1] = 0;
|
|||
|
//
|
|||
|
if (rename_active==1)
|
|||
|
{
|
|||
|
DrawBar(220,curbtn*18+58,onLeft(50,197)-1,16,0xFFFFCC); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
copystr(#temp,#file_name);
|
|||
|
WriteTextXY(224<<16+y, 0x80000000, #file_name, 0);
|
|||
|
} else { copystr(#temp,#edit_path); KEdit(); }
|
|||
|
break;
|
|||
|
}
|
|||
|
break;
|
|||
|
CASE evReDraw:
|
|||
|
draw_window();
|
|||
|
break;
|
|||
|
}
|
|||
|
}
|
|||
|
ExitProcess();
|
|||
|
}
|
|||
|
|
|||
|
void draw_window()
|
|||
|
{
|
|||
|
WindowRedrawStatus(1);
|
|||
|
DefineAndDrawWindow(100,100,600,410,0x03,0x00E4DFE1,0,0,0);
|
|||
|
DrawTitle(#header);
|
|||
|
Form.getme();
|
|||
|
if (Form.height<skin_width+10) return;
|
|||
|
if (Form.width<493) MoveSize(OLD,OLD,493,OLD);
|
|||
|
//control buttons
|
|||
|
DefineButton(14,5,31,29,21+BT_HIDE,0xE4DFE1); //back
|
|||
|
PutImage(#back,30,28,15,6);
|
|||
|
DefineButton(50,5,31,29,22+BT_HIDE,0xE4DFE1); //forward
|
|||
|
PutImage(#forward,30,28,51,6);
|
|||
|
DefineButton(89,5,31,29,23+BT_HIDE,0xE4DFE1); //up!
|
|||
|
PutImage(#up,30,28,90,6);
|
|||
|
DrawBar(132,8,1,25,0x94AECE);
|
|||
|
DefineButton(140,5,31,29,24+BT_HIDE,0xE4DFE1); //cut
|
|||
|
PutImage(#fcut,30,28,141,6);
|
|||
|
DefineButton(176,5,31,29,25+BT_HIDE,0xE4DFE1); //copy
|
|||
|
PutImage(#fcopy,30,28,177,6);
|
|||
|
DefineButton(212,5,31,29,26+BT_HIDE,0xE4DFE1); //paste
|
|||
|
PutImage(#fpaste,30,28,213,6);
|
|||
|
DefineButton(onLeft(34,0),6,27,28,30+BT_HIDE+BT_NOFRAME,0xE4DFE1); //about
|
|||
|
PutImage(#about,25,26,onLeft(34,0),7);
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawRegion(251,12,onLeft(61,251),16,0x94AECE);//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DefineButton(onLeft(61,0),12,18,16,27+BT_HIDE,0xE4DFE1); //goto there
|
|||
|
PutImage(#Edit_Goto,18,17,onLeft(60,0),12);
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawRegion(6,40,Form.width-12,Form.height-skin_width-46,0x94AECE);
|
|||
|
DrawBar(7,41,190,onTop(6,41),0x00699C); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
LeftBar(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(197,41,onLeft(6,197),1,0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(197,56,onLeft(6,197),1,0x94AECE); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(163,0),41,1,16,0x94AECE); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1
|
|||
|
DrawBar(onLeft(90,0),41,1,16,0x94AECE); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2
|
|||
|
temp_int=Form.width-163-197>>1-15; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> text File
|
|||
|
WriteText(temp_int+197,45,0x80,0,#tfile,0);//text File
|
|||
|
WriteText(onLeft(137,0),45,0x80,0,#ttype,0);//text Type
|
|||
|
WriteText(onLeft(66,0),45,0x80,0,#tsize,0);//text Size
|
|||
|
if (curbtn<>0) DrawBar(197,57,onLeft(22,197),18,0xFFFFFF);
|
|||
|
Open_Dir(#path,1);
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DefineButton(onLeft(22,0),40,16,16,50+BT_HIDE,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(21,0),42,1,14,0x00FFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
WriteText(onLeft(16,0),45,0x80,0,"\x18",0); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DefineButton(onLeft(22,0),onTop(22,0),16,16,51+BT_DEL,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawFlatButton(onLeft(22,0),onTop(22,0),16,16,51,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(21,0),onTop(22,0)+15,15,1,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(7,0),onTop(20,0),1,14,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
WriteText(onLeft(16,0),onTop(17,0),0x80,0,"\x19",0); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(22,0),41,1,onTop(6,57),0x94AECE); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (del_active==1) Del_Form();
|
|||
|
WindowRedrawStatus(2);
|
|||
|
}
|
|||
|
|
|||
|
void KEdit()
|
|||
|
{
|
|||
|
temp_int=onLeft(61,252)/6;
|
|||
|
IF (strlen(#edit_path)<temp_int)
|
|||
|
{
|
|||
|
DrawBar(strlen(#edit_path)*6+252+5,17,6,9,0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> KEdit
|
|||
|
WriteText(257,17,0x80,0,#edit_path,0); //text 'path'
|
|||
|
}
|
|||
|
ELSE
|
|||
|
{
|
|||
|
DrawBar(252,17,onLeft(61,252),9,0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
WriteText(257,17,0x80,0,#edit_path+strlen(#edit_path)-temp_int,0); //text 'path'
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
char drive_name[30];
|
|||
|
dword dev_icon;
|
|||
|
void LeftBar(){
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(22,56,160,17,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
WriteText(30,61,0x80,0,#gotodev,0); //text Goto:
|
|||
|
DrawBar(22,73,160,1,0x94AECE); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
Open_Dir("/",0);
|
|||
|
DrawBar(22,74,160,kolichestvo*16+1,0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
for (i=0;i<kolichestvo;i++)
|
|||
|
{
|
|||
|
copystr("Unknown drive",#drive_name); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DefineButton(22,i*16+74,159,16,100+i+BT_HIDE,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (strcmp(i*304+ buf+72,"rd")<>-1) { copystr("RAM-disk /rd/1/",#drive_name); dev_icon=#rd; }
|
|||
|
IF (strcmp(i*304+ buf+72,"fd")<>-1) { copystr("Floppy disk /fd/",#drive_name); dev_icon=#fd; }
|
|||
|
IF (strcmp(i*304+ buf+72,"hd0")<>-1) { copystr("Hard disk drive /hd0/",#drive_name); dev_icon=#hd; }
|
|||
|
IF (strcmp(i*304+ buf+72,"hd1")<>-1) { copystr("Hard disk drive /hd1/",#drive_name); dev_icon=#hd; }
|
|||
|
IF (strcmp(i*304+ buf+72,"hd2")<>-1) { copystr("Hard disk drive /hd2/",#drive_name); dev_icon=#hd; }
|
|||
|
IF (strcmp(i*304+ buf+72,"bd0")<>-1) { copystr("Hard disk drive /bd0/",#drive_name); dev_icon=#hd; }
|
|||
|
IF (strcmp(i*304+ buf+72,"bd1")<>-1) { copystr("Hard disk drive /bd1/",#drive_name); dev_icon=#hd; }
|
|||
|
IF (strcmp(i*304+ buf+72,"bd2")<>-1) { copystr("Hard disk drive /bd2/",#drive_name); dev_icon=#hd; }
|
|||
|
IF (strcmp(i*304+ buf+72,"cd1")<>-1) { copystr("CD-drive /cd1/",#drive_name); dev_icon=#cd; }
|
|||
|
IF (strcmp(i*304+ buf+72,"cd2")<>-1) { copystr("CD-drive /cd2/",#drive_name); dev_icon=#cd; }
|
|||
|
WriteText(45,i*16+79,0x80,0,#drive_name,0);
|
|||
|
PutImage(dev_icon,14,13,26,i*16+76);
|
|||
|
}
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
top_actions=kolichestvo;
|
|||
|
Actions();
|
|||
|
Preview();
|
|||
|
}
|
|||
|
|
|||
|
void Actions()
|
|||
|
{
|
|||
|
DrawBar(22,top_actions*16+90,160,17,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
WriteText(30,top_actions*16+95,0x80,0,#actions,0); //text Actions
|
|||
|
DefineButton(164,top_actions*16+91,16,16,77+BT_HIDE+BT_NOFRAME,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(22,top_actions*16+107,160,1,0x94AECE); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if (show_actions==1)
|
|||
|
{
|
|||
|
WriteText(170,top_actions*16+95,0x80,0,"\x19",0); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
DrawBar(22,top_actions*16+108,160,51,0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//rename file
|
|||
|
DefineButton(22,top_actions*16+108,159,16,80+BT_HIDE,0xE4DFE1);
|
|||
|
WriteText(47,top_actions*16+113,0x80,0,"Rename file <F2>",0);
|
|||
|
PutImage(#ren_file,16,15,26,top_actions*16+109);
|
|||
|
//delete file
|
|||
|
DefineButton(22,top_actions*16+125,159,16,81+BT_HIDE,0xE4DFE1);
|
|||
|
WriteText(47,top_actions*16+130,0x80,0,"Delete file <Del>",0);
|
|||
|
PutImage(#del_file,16,15,26,top_actions*16+125);
|
|||
|
//create folder
|
|||
|
DefineButton(22,top_actions*16+142,159,16,82+BT_HIDE,0xE4DFE1);
|
|||
|
WriteText(47,top_actions*16+147,0x80,0,"Create folder <F6>",0);
|
|||
|
PutImage(#new_fol,16,15,26,top_actions*16+142);
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
DefineButton(22,top_actions*16+108,159,16,80+BT_DEL,0xE4DFE1);
|
|||
|
DefineButton(22,top_actions*16+125,159,16,81+BT_DEL,0xE4DFE1);
|
|||
|
DefineButton(22,top_actions*16+142,159,16,82+BT_DEL,0xE4DFE1);
|
|||
|
WriteText(170,top_actions*16+95,0x80,0,"\x18",0); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(22,top_actions*16+108,160,51,0x00699C); //<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void Preview()
|
|||
|
{
|
|||
|
IF (show_actions==1) top_pr=top_actions*16+174; ELSE top_pr=top_actions*16+174-51;
|
|||
|
DrawBar(22,top_pr,160,17,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
WriteText(30,top_pr+5,0x80,0,#preview,0); //text Preview
|
|||
|
DefineButton(164,top_pr+1,16,16,78+BT_DEL,0xE4DFE1);
|
|||
|
DefineButton(164,top_pr+1,16,16,78+BT_HIDE+BT_NOFRAME,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(22,top_pr+17,160,1,0x94AECE); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (show_preview==0) WriteText(170,top_pr+5,0x80,0,"\x18",0); else//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
{
|
|||
|
WriteText(170,top_pr+5,0x80,0,"\x19",0); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
DrawBar(22,top_pr+18,160,100,0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
/*WriteText(30,top_pr+30,0x80,0,IntToStr(kolichestvo),0);
|
|||
|
WriteText(30,top_pr+50,0x80,0,IntToStr(but_num),0);
|
|||
|
WriteText(30,top_pr+60,0x80,0,IntToStr(za_kadrom),0);
|
|||
|
WriteText(30,top_pr+70,0x80,0,#file_path,0);
|
|||
|
WriteText(30,top_pr+80,0x80,0,#param,0);*/
|
|||
|
WriteText(30,top_pr+60,0x80,0,"Not realized... Yet.",0);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void TVScroll() { //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if (but_num==kolichestvo)
|
|||
|
{
|
|||
|
DefineButton(onLeft(22,0),57,15,on_y-57,54+BT_DEL,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DefineButton(onLeft(22,0),on_y+razm_scrl+2,16,onTop(22,57)-razm_scrl-on_y+55,55+BT_DEL,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(21,0),57,15,onTop(79,0),0xCED0D0); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
razm_scrl=onTop(22,57) * but_num - but_num / kolichestvo; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
on_y = za_kadrom / but_num * razm_scrl+57;
|
|||
|
IF (razm_scrl<20) razm_scrl = 20; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (za_kadrom==0) on_y= 57; ELSE IF (za_kadrom<but_num) on_y=70;
|
|||
|
IF (za_kadrom+but_num==kolichestvo) on_y= onTop(23,57)-razm_scrl+57; //<2F> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(21,0),on_y,15,1,0x94AECE); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(21,0),on_y+razm_scrl,15,1,0x94AECE); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(21,0),on_y+1,1,razm_scrl-1,0x00FFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(21,0),on_y+1,15,1,0x00FFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(20,0),on_y+2,14,razm_scrl-2,0x00E4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(21,0),57,15,on_y-57,0xCED0D0); //<2F><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(21,0),on_y+razm_scrl+1,15,onTop(22,57)-razm_scrl-on_y+56,0xCED0D0); //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void List_ReDraw()
|
|||
|
{
|
|||
|
y=85;
|
|||
|
if ((kolichestvo-za_kadrom<but_num) && (za_kadrom>1)) //<2F><><EFBFBD><EFBFBD> <20><> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
{
|
|||
|
za_kadrom=kolichestvo-but_num;
|
|||
|
curbtn=but_num-1;
|
|||
|
} else if (curbtn>but_num-1) curbtn=but_num-1; //<2F><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//
|
|||
|
if (onLeft(165,220)/6<longest_name) longest_name= onLeft(165,220)/6+1; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
DrawBar(220,57,longest_name*6,curbtn-3*18+57-3,0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(220,curbtn+1*18+57,longest_name*6,onTop(6,curbtn+1*18+57),0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(155,0),57,121,curbtn-3*18+57-3,0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(155,0),curbtn+1*18+57,121,onTop(6,curbtn+1*18+57),0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//
|
|||
|
str_len = onLeft(220,160)/6; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
longest_name=strlen(off);
|
|||
|
for (i=za_kadrom;i<za_kadrom+but_num;i++)
|
|||
|
{
|
|||
|
if (strcmp(".",buf+72)==-1) off = file_mas[i]*304 + buf+72; else off = file_mas[i+1]*304 + buf+72;
|
|||
|
EAX = off - 8;
|
|||
|
size=ESDWORD[EAX];
|
|||
|
EAX = off - 40;
|
|||
|
EAX=ESDWORD[EAX];
|
|||
|
$shr eax,4
|
|||
|
$and eax,1
|
|||
|
isdir=EAX;
|
|||
|
if (curbtn<>i) if (isdir==1) Put_icon("<dir>"); else
|
|||
|
{
|
|||
|
WriteText(7-strlen(ConvertSize(size))*6+onLeft(75,0),y-22,0x80,0,ConvertSize(size),0);
|
|||
|
Put_icon(off+strlen(off)-4);
|
|||
|
}
|
|||
|
if (strlen(off)<str_len) temp_int=strlen(off); else temp_int=str_len; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if (ins_mas[file_mas[i]]==0)
|
|||
|
WriteTextXY(220<<16+y, 0, off, temp_int); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
else WriteTextXY(220<<16+y, 0x00FF9900, off, temp_int);
|
|||
|
y=y+18;
|
|||
|
if (longest_name<temp_int) longest_name=temp_int; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>: <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
Line_ReDraw(videlenie);
|
|||
|
DrawBar(onLeft(90,0),57,1,onTop(7,57),0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2
|
|||
|
TVScroll();
|
|||
|
}
|
|||
|
|
|||
|
void Line_ReDraw(dword color){
|
|||
|
if (rename_active==1)
|
|||
|
{
|
|||
|
rename_active=0;
|
|||
|
copystr(#path,#temp);
|
|||
|
copystr(#file_name,#temp+strlen(#temp));
|
|||
|
if (strcmp(#file_path,#temp)==-1) if (strlen(#file_name)>0)
|
|||
|
{
|
|||
|
CopyFile(#file_path,#temp);
|
|||
|
Del_File();
|
|||
|
//za_kadrom=kolichestvo-but_num;
|
|||
|
//curbtn=but_num-1;
|
|||
|
//Line_ReDraw(videlenie);
|
|||
|
}
|
|||
|
}
|
|||
|
DrawBar(197,curbtn*18+57,onLeft(22,197),18,color); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
y= curbtn*18+85; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> Y
|
|||
|
if (strcmp(".",buf+72)==-1) off = file_mas[curbtn+za_kadrom]*304 + buf+72; else off = file_mas[curbtn+za_kadrom+1]*304 + buf+72;
|
|||
|
temp_int = onLeft(220,160)/6;
|
|||
|
if (strlen(off)<temp_int) temp_int = strlen(off); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
if (ins_mas[file_mas[za_kadrom+curbtn]]==0)
|
|||
|
WriteTextXY(220<<16+y, 0, off, temp_int); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>?
|
|||
|
//EDI = 0x80FFFFFF;
|
|||
|
//WriteTextXY(temp_int<<16+y, 0xC0000000,#temp, 7); //DD8500 <20><><EFBFBD> FF3399
|
|||
|
else WriteTextXY(220<<16+y, 0x80DD8500, off, temp_int); //DD8500 <20><><EFBFBD> FF3399
|
|||
|
EAX = off - 8;
|
|||
|
size=ESDWORD[EAX];
|
|||
|
EAX = off - 40;
|
|||
|
EAX=ESDWORD[EAX];
|
|||
|
$shr eax,4
|
|||
|
$and eax,1
|
|||
|
isdir=EAX;
|
|||
|
if (isdir==1) Put_icon("<dir>"); else
|
|||
|
{
|
|||
|
WriteText(7-strlen(ConvertSize(size))*6+onLeft(75,0),y-22,0x80,0,ConvertSize(size),0);
|
|||
|
Put_icon(off+strlen(off)-4);
|
|||
|
}
|
|||
|
copystr(#path,#file_path);
|
|||
|
copystr(off,#file_name);
|
|||
|
copystr(off,#file_path+strlen(#file_path)); //<2F><><EFBFBD><EFBFBD>, file_path=<3D><><EFBFBD><EFBFBD><EFBFBD>, <20>.<2E>. <20><>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(163,0),curbtn*18+57,1,18,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1
|
|||
|
DrawBar(onLeft(90,0),curbtn*18+57,1,18,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2
|
|||
|
if (color==videlenie) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
{
|
|||
|
if (temp_int==1) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
{
|
|||
|
DrawBar(200,y-26,2,15,videlenie);
|
|||
|
DrawBar(214,y-26,2,15,videlenie);
|
|||
|
DrawBar(210,y-26,4,1,videlenie);//<2F><>
|
|||
|
DrawBar(211,y-25,3,1,videlenie);//<2F><><EFBFBD>
|
|||
|
DrawBar(212,y-24,2,1,videlenie);//<2F><>
|
|||
|
DrawBar(213,y-23,1,1,videlenie);//
|
|||
|
}
|
|||
|
if (temp_int==2) //<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
{
|
|||
|
DrawBar(201,y-13,15,2,videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(200,y-26,1,15,videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(208,y-26,8,2,videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
//.<2E><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
PutPixel(201,y-26+skin_width,videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
PutPixel(207,y-26+skin_width,videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
PutPixel(201,y-14+skin_width,videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
PutPixel(215,y-14+skin_width,videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
PutPixel(215,y-24+skin_width,videlenie); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
}
|
|||
|
IF (temp_int==3) PutPixel(215,y-26+skin_width,videlenie); //skin
|
|||
|
IF (temp_int==5) {DrawBar(200,y-26,1,15,videlenie); DrawBar(215,y-26,1,15,videlenie);} //video
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
void Open_Dir(dword path_,redraw){
|
|||
|
for (i=0;i<kolichestvo;i++) ins_mas[i]=0;
|
|||
|
//temp=path+3;
|
|||
|
//copestr(#temp
|
|||
|
//if (strcmp(#temp,"/rd")==0) ExitProcess(); //realloc(500000
|
|||
|
open_file_70.func = 1;
|
|||
|
open_file_70.pos = 0;
|
|||
|
open_file_70.rezerv = 0;
|
|||
|
open_file_70.sizefile = 65536;
|
|||
|
open_file_70.buffer = buf;
|
|||
|
open_file_70.rezerv2 = 0;
|
|||
|
open_file_70.stroka = path_;
|
|||
|
$mov eax,70
|
|||
|
$mov ebx,#open_file_70.func
|
|||
|
$int 0x40
|
|||
|
kolichestvo=EBX;
|
|||
|
//
|
|||
|
if (kolichestvo<>-1) if (redraw==1)
|
|||
|
{
|
|||
|
FOR (i=0;i<but_num;i++) DefineButton(197,i+1*18+39,onLeft(22,197),18,201+i+BT_DEL,0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
but_num=onTop(6,57)/18;
|
|||
|
if (strcmp(".",buf+72)==0) kolichestvo--; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "."
|
|||
|
IF (but_num>100) but_num=1; ELSE//<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (kolichestvo<but_num) but_num=kolichestvo;
|
|||
|
FOR (i=0;i<but_num;i++) DefineButton(197,i+1*18+39,onLeft(22,197),18,201+i+BT_HIDE+BT_NOFRAME,0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(197,75,onLeft(22,197),onTop(6,75),0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawBar(onLeft(163,0),57,1,onTop(7,57),0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 1
|
|||
|
FoldesGoUp();
|
|||
|
List_ReDraw();
|
|||
|
copystr(path_,#edit_path);
|
|||
|
DrawBar(252,13,onLeft(61,252),15,0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> KEdit
|
|||
|
KEdit();
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
int k,l;
|
|||
|
void FoldesGoUp(){
|
|||
|
if (strcmp(#path,"/rd/1/")==0) kolichestvo--; else if (strcmp(#path,"/fd/1/")==0) kolichestvo--;
|
|||
|
else if (strlen(#path)>7) if (strcmp(".",buf+72)==-1) kolichestvo--; //>7 <20><><EFBFBD> <20><><EFBFBD> /hd1/ <20> <20>.<2E>.
|
|||
|
k=0; l=0;
|
|||
|
off=buf+72;
|
|||
|
FOR (i=0;i<=kolichestvo;i++)
|
|||
|
{
|
|||
|
EAX = off - 8;
|
|||
|
EAX = off - 40;
|
|||
|
EAX=ESDWORD[EAX];
|
|||
|
$shr eax,4
|
|||
|
$and eax,1
|
|||
|
isdir=EAX;
|
|||
|
IF (isdir==1) {file_mas[k]=i; k++;}
|
|||
|
ELSE {file_mas[kolichestvo-l]=i; l++;}
|
|||
|
off = off + 304;
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
dword offs_put_icon, file_type;
|
|||
|
void Put_icon(dword extension){
|
|||
|
lowcase(extension);
|
|||
|
offs_put_icon = #somefile; //<2F><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
file_type = ""; temp_int=1;
|
|||
|
IF (strcmp(extension,".kex")==0) { offs_put_icon = #kex; file_type="Program"; temp_int=0;}
|
|||
|
IF (strcmp(extension,".cmd")==0) { offs_put_icon = #cmd; file_type="CMD skript"; temp_int=0;}
|
|||
|
IF (strcmp(extension,".skn")==0) { offs_put_icon = #skn; file_type="Skin"; temp_int=3;}
|
|||
|
IF (strcmp(extension,".chr")==0) { offs_put_icon = #font; file_type="Font"; temp_int=4;}
|
|||
|
IF (strcmp(extension,".avi")==0) { offs_put_icon = #video; file_type="Video"; temp_int=5;}
|
|||
|
IF (strcmp(extension,".ini")==0) { offs_put_icon = #ini; file_type="Config"; temp_int=1;}
|
|||
|
IF (strcmp(extension,"conf")==0) { offs_put_icon = #ini; file_type="Config"; temp_int=1;}
|
|||
|
IF (strcmp(extension,".htm")==0) { offs_put_icon = #web; file_type="Web-page"; temp_int=1;}
|
|||
|
IF (strcmp(extension,"html")==0) { offs_put_icon = #web; file_type="Web-page"; temp_int=1;}
|
|||
|
IF (strcmp(extension,".asm")==0) { offs_put_icon = #source; file_type="Source"; }
|
|||
|
IF (strcmp(extension,".inc")==0) { offs_put_icon = #inc ; temp_int=8;}
|
|||
|
IF (strcmp(extension,".exe")==0) { offs_put_icon = #exe; file_type="Win32 Exec"; temp_int=0;}
|
|||
|
IF (strcmp(extension,".dll")==0) { offs_put_icon = #lib; file_type="Library"; temp_int=0;}
|
|||
|
IF (strcmp(extension,".obj")==0) { offs_put_icon = #lib; file_type="Library"; temp_int=0;}
|
|||
|
//text
|
|||
|
IF (strcmp(extension,".txt")==0) { offs_put_icon = #text; file_type="Text"; temp_int=1;}
|
|||
|
IF (strcmp(extension,".doc")==0) { offs_put_icon = #text; file_type="Text"; temp_int=1;}
|
|||
|
IF (strcmp(extension,".rtf")==0) { offs_put_icon = #text; file_type="Text"; temp_int=1;}
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (strcmp(extension,".gif")==0) { offs_put_icon = #pic; file_type="Image"; temp_int=1;}
|
|||
|
IF (strcmp(extension,".bmp")==0) { offs_put_icon = #pic; file_type="Image"; temp_int=1;}
|
|||
|
IF (strcmp(extension,".png")==0) { offs_put_icon = #pic; file_type="Image"; temp_int=1;}
|
|||
|
IF (strcmp(extension,".jpg")==0) { offs_put_icon = #pic; file_type="Image"; temp_int=1;}
|
|||
|
IF (strcmp(extension,"jpeg")==0) { offs_put_icon = #pic; file_type="Image"; temp_int=1;}
|
|||
|
IF (strcmp(extension,".raw")==0) { offs_put_icon = #pic; file_type="Image"; temp_int=1;}
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (strcmp(extension,".rar")==0) { offs_put_icon = #arhiv; file_type="Archive"; temp_int=6;}
|
|||
|
IF (strcmp(extension,".zip")==0) { offs_put_icon = #arhiv; file_type="Archive"; temp_int=6;}
|
|||
|
IF (strcmp(extension,".cab")==0) { offs_put_icon = #arhiv; file_type="Archive"; temp_int=6;}
|
|||
|
IF (strcmp(extension,".tar")==0) { offs_put_icon = #arhiv; file_type="Archive"; temp_int=6;}
|
|||
|
IF (strcmp(extension,".ajr")==0) { offs_put_icon = #arhiv; file_type="Archive"; temp_int=6;}
|
|||
|
//audio
|
|||
|
IF (strcmp(extension,".mp3")==0) { offs_put_icon = #audio; file_type="Music"; temp_int=7;}
|
|||
|
IF (strcmp(extension,".wav")==0) { offs_put_icon = #audio; file_type="Audio"; temp_int=7;}
|
|||
|
IF (strcmp(extension,".mid")==0) { offs_put_icon = #audio; file_type="Audio"; temp_int=7;}
|
|||
|
IF (strcmp(extension,"midi")==0) { offs_put_icon = #audio; file_type="Audio"; temp_int=7;}
|
|||
|
IF (strcmp(extension,".ogg")==0) { offs_put_icon = #audio; file_type="Audio"; temp_int=7;}
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (strcmp(extension,"<dir>")==0) { offs_put_icon = #folder; WriteText(onLeft(140,0),y-22,0x80,0,"<DIR>",0); temp_int=2;}
|
|||
|
PutImage(offs_put_icon,16,15,200,y-26);
|
|||
|
WriteText(onLeft(155,0),y-22,0x80,0,file_type,0);
|
|||
|
}
|
|||
|
|
|||
|
void Dir_Up()
|
|||
|
{
|
|||
|
i=strlen(#path)-1;
|
|||
|
do
|
|||
|
{
|
|||
|
path[i]=0x00;
|
|||
|
i--;
|
|||
|
IF (i==0) break;
|
|||
|
}
|
|||
|
while (path[i]!='/');
|
|||
|
za_kadrom=0; //<2F> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
curbtn=0;
|
|||
|
Open_Dir(#path,1);
|
|||
|
}
|
|||
|
|
|||
|
dword onLeft(dword right,left) {return Form.width-right-left;}
|
|||
|
dword onTop(dword down,up) {return Form.height-skin_width-down-up;}
|
|||
|
|
|||
|
char extension[5];
|
|||
|
void Run_File(){
|
|||
|
copystr(#file_path,#param); //<2F><>-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
copystr(#file_path+strlen(#file_path)-4,#extension); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
lowcase(#extension);
|
|||
|
//<2F><><EFBFBD> <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20>, <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> - <20><><EFBFBD> file_path
|
|||
|
IF (strcmp(#extension,".skn")==0) copystr("/rd/1/desktop",#file_path);
|
|||
|
IF (strcmp(#extension,".avi")==0) copystr("/rd/1/kvid",#file_path);
|
|||
|
IF (strcmp(#extension,".htm")==0) copystr("/rd/1/network/hTTPC",#file_path);
|
|||
|
IF (strcmp(#extension,"html")==0) copystr("/rd/1/network/hTTPC",#file_path);
|
|||
|
IF (strcmp(#extension,".3ds")==0) copystr("/rd/1/3d/view3ds",#file_path);
|
|||
|
IF (strcmp(#extension,".lif")==0) copystr("/rd/1/demos/life2",#file_path);
|
|||
|
//audio
|
|||
|
IF (strcmp(#extension,".mp3")==0) copystr("/rd/1/AC97SND",#file_path);
|
|||
|
IF (strcmp(#extension,".wav")==0) copystr("/rd/1/AC97SND",#file_path);
|
|||
|
IF (strcmp(#extension,".mid")==0) copystr("/rd/1/MIDAMP",#file_path);
|
|||
|
IF (strcmp(#extension,"midi")==0) copystr("/rd/1/MIDAMP",#file_path);
|
|||
|
//text
|
|||
|
IF (strcmp(#extension,".rtf")==0) copystr("/rd/1/RtfRead",#file_path);
|
|||
|
IF (strcmp(#extension,".txt")==0) copystr("/rd/1/TinyPad",#file_path);
|
|||
|
IF (strcmp(#extension,".inc")==0) copystr("/rd/1/TinyPad",#file_path);
|
|||
|
IF (strcmp(#extension,".ini")==0) copystr("/rd/1/TinyPad",#file_path);
|
|||
|
IF (strcmp(#extension,"conf")==0) copystr("/rd/1/TinyPad",#file_path);
|
|||
|
IF (strcmp(#extension,".dat")==0) copystr("/rd/1/TinyPad",#file_path);
|
|||
|
IF (strcmp(#extension,".asm")==0) copystr("/rd/1/TinyPad",#file_path); //AsmMenu1,AsmMenu2
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
IF (strcmp(#extension,".gif")==0) copystr("/rd/1/GIFVIEW",#file_path); //GifMenu1,MenuAnimage
|
|||
|
IF (strcmp(#extension,".bmp")==0) copystr("/rd/1/MV",#file_path); //BmpMenu1,MenuAnimage
|
|||
|
IF (strcmp(#extension,".png")==0) copystr("/rd/1/@rcher",#file_path);
|
|||
|
IF (strcmp(#extension,".jpg")==0) copystr("/rd/1/JpegView",#file_path);
|
|||
|
IF (strcmp(#extension,"jpeg")==0) copystr("/rd/1/JpegView",#file_path);
|
|||
|
IF (strcmp(#file_path,#param)==0) copystr("",#param); //<2F><><EFBFBD><EFBFBD> file_path <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>.
|
|||
|
Run_Program(); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!
|
|||
|
}
|
|||
|
|
|||
|
void Run_Program()
|
|||
|
{
|
|||
|
run_file_70.func = 7;
|
|||
|
run_file_70.flag = 0;
|
|||
|
run_file_70.param= #param;
|
|||
|
run_file_70.rez1 = 0;
|
|||
|
run_file_70.rez2 = 0;
|
|||
|
run_file_70.rezerv2 = 0;
|
|||
|
run_file_70.stroka = #file_path;
|
|||
|
$mov eax,70
|
|||
|
$mov ebx,#run_file_70.func
|
|||
|
$int 0x40
|
|||
|
}
|
|||
|
|
|||
|
void Del_Form()
|
|||
|
{
|
|||
|
if (isdir==0){//<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
temp_int=Form.width-200+197/2;
|
|||
|
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
|||
|
FOR (i=5;i<11;i++) DefineButton(197,i+1*18+39,onLeft(22,197),18,201+i+BT_DEL,0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawFlatButton(temp_int,160,200,80,0,0xE4DFE1); //<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
WriteText(temp_int+19,175,0x80,0,"Do you really want to delete",28);
|
|||
|
WriteTextXY(220<<16+y, 0, off, strlen(off));
|
|||
|
WriteText(temp_int+20,190,0x80,0,#file_name,0); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
WriteText(strlen(#file_name)*6+temp_int+20,190,0x80,0,"?",1);
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
DrawFlatButton(temp_int+20,208,70,20,301,0xFFB6B5);
|
|||
|
WriteText(temp_int+46,215,0x80,0,"Yes",3);
|
|||
|
DrawFlatButton(temp_int+111,208,70,20,302,0xC6DFC6);
|
|||
|
WriteText(temp_int+141,215,0x80,0,"No",2);
|
|||
|
del_active=1;
|
|||
|
}}
|
|||
|
|
|||
|
void Del_File()
|
|||
|
{
|
|||
|
run_file_70.func = 8;
|
|||
|
run_file_70.flag = 0;
|
|||
|
run_file_70.param= 0;
|
|||
|
run_file_70.rez1 = 0;
|
|||
|
run_file_70.rez2 = 0;
|
|||
|
run_file_70.rezerv2 = 0;
|
|||
|
run_file_70.stroka = #file_path;
|
|||
|
$mov eax,70
|
|||
|
$mov ebx,#run_file_70.func
|
|||
|
$int 0x40
|
|||
|
del_active=0;
|
|||
|
Open_Dir(#path,1);
|
|||
|
}
|
|||
|
|
|||
|
dword size_prefix;
|
|||
|
dword ConvertSize(dword bytes)
|
|||
|
{
|
|||
|
copystr(IntToStr(bytes),#size_prefix);
|
|||
|
copystr(" b ",#size_prefix+strlen(#size_prefix));
|
|||
|
if (bytes>=1024)
|
|||
|
{
|
|||
|
bytes=bytes/1024;
|
|||
|
copystr(IntToStr(bytes),#size_prefix);
|
|||
|
copystr(" Kb",#size_prefix+strlen(#size_prefix));
|
|||
|
}
|
|||
|
if (bytes>=1024)
|
|||
|
{
|
|||
|
bytes=bytes/1024;
|
|||
|
copystr(IntToStr(bytes),#size_prefix);
|
|||
|
copystr(" Mb",#size_prefix+strlen(#size_prefix));
|
|||
|
}
|
|||
|
if (bytes>=1024)
|
|||
|
{
|
|||
|
bytes=bytes/1024;
|
|||
|
copystr(IntToStr(bytes),#size_prefix);
|
|||
|
copystr(" Gb",#size_prefix+strlen(#size_prefix));
|
|||
|
}
|
|||
|
return #size_prefix;
|
|||
|
}
|
|||
|
|
|||
|
void Paste()
|
|||
|
{
|
|||
|
if (strcmp(#copyfile,"")==-1){ //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
copystr(#path,#temp);
|
|||
|
copystr(#copy_name,#temp+strlen(#temp));
|
|||
|
if (strcmp(#copyfile,#temp)==0) //<2F><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20> <20><><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
{
|
|||
|
copystr(#path,#temp);
|
|||
|
copystr("new_",#temp+strlen(#temp));
|
|||
|
copystr(#copy_name,#temp+strlen(#temp));
|
|||
|
}
|
|||
|
CopyFile(#copyfile,#temp);
|
|||
|
//
|
|||
|
if (cut_active==1) //<2F><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
{
|
|||
|
copystr(#copyfile,#file_path);
|
|||
|
Del_File();
|
|||
|
copystr("",#copyfile);
|
|||
|
}
|
|||
|
Open_Dir(#path,1);
|
|||
|
}}
|
|||
|
|
|||
|
void Goto_edit_path()
|
|||
|
{
|
|||
|
if (strcmp(#path,#edit_path)==-1) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20> <20><><EFBFBD><EFBFBD> <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
{
|
|||
|
copystr(#edit_path+strlen(#edit_path)-1,#temp); //<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> /
|
|||
|
if (strcmp(#temp,"/")==-1) copystr("/",#edit_path+strlen(#edit_path));
|
|||
|
copystr(#edit_path,#temp);
|
|||
|
Open_Dir(#temp,0);
|
|||
|
if (kolichestvo==-1) KEdit(); else //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
{
|
|||
|
za_kadrom=0; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
curbtn=0;
|
|||
|
copystr(#temp,#path);
|
|||
|
}
|
|||
|
Open_Dir(#path,1);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
//
|
|||
|
dword PathHistory[256*8]="/rd/1/";
|
|||
|
dword PathHistory_Len[8]=0;
|
|||
|
int cur_path=0;
|
|||
|
//
|
|||
|
void GoBack(dword back)
|
|||
|
{
|
|||
|
if (back==0) //IF (cur_path<=8)
|
|||
|
{
|
|||
|
cur_path++;
|
|||
|
copystr(#path,256*cur_path+#PathHistory); //<2F><><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
PathHistory_Len[cur_path]=strlen(#path);
|
|||
|
}
|
|||
|
if (back==1) IF (cur_path>=1)
|
|||
|
{
|
|||
|
cur_path--;
|
|||
|
copystr(256*cur_path+#PathHistory,#edit_path); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
}
|
|||
|
DrawBar(252,13,onLeft(61,252),15,0xFFFFFF); //<2F><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> KEdit
|
|||
|
copystr(IntToStr(cur_path),#edit_path); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
KEdit();
|
|||
|
//Open_Dir(#path);
|
|||
|
}
|
|||
|
|
|||
|
/*int i,j,k;
|
|||
|
int n=20;
|
|||
|
|
|||
|
void sort_by_name(int z){
|
|||
|
for(i = 0; i <= n-1; i++)
|
|||
|
{
|
|||
|
for(j = 0; j <= n-2-i; j++)
|
|||
|
{
|
|||
|
if( mas[j][z]>mas[j+1][z] )
|
|||
|
{
|
|||
|
if (mas[j][z-1] == mas[j+1][z-1])
|
|||
|
{
|
|||
|
strcpy(back,mas[j]);
|
|||
|
strcpy(mas[j],mas[j+1]);
|
|||
|
strcpy(mas[j+1],back);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}
|
|||
|
}*/
|
|||
|
|
|||
|
/*int q,z;
|
|||
|
int n=20;
|
|||
|
void sort_by_name(int z)
|
|||
|
{
|
|||
|
for(q = 0; q <= n-1; q++) for(i = 0; i <= n-2-i; i++)
|
|||
|
if( mas[i][z]>mas[j+1][z]) if (mas[i][z-1]==mas[i+1][z-1])
|
|||
|
{
|
|||
|
strcpy(back,mas[i]);
|
|||
|
strcpy(mas[i],mas[i+1]);
|
|||
|
strcpy(mas[i+1],back);
|
|||
|
}
|
|||
|
}*/
|
|||
|
|
|||
|
/*<2A><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>
|
|||
|
for (k=0;k<255;k++) sort(k);
|
|||
|
*/
|
|||
|
|
|||
|
stop:
|