Virtual Disk Manager 0.47: fix bugs

git-svn-id: svn://kolibrios.org@3869 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Serhii Sakhno 2013-08-22 22:10:32 +00:00
parent 49fb1442fa
commit 5c89df1f48
2 changed files with 35 additions and 9 deletions

View File

@ -30,7 +30,7 @@ char Console_Work()
char size_t[256];
strlwr(#param);
debug(#param);
// debug(#param);
switch (param[0])
{

View File

@ -52,7 +52,11 @@ unsigned char icons[14*56] = FROM "icons.raw";
int mouse_dd;
char disk_size[30]="\0";
edit_box edit_disk_size= {60,48,5,0xffffff,0x94AECE,0x000000,0xffffff,0,sizeof(disk_size)+2,#disk_size,#mouse_dd, 1000000000000000b};
#ifdef LANG_RUS
edit_box edit_disk_size= {60,50,5,0xffffff,0x94AECE,0x000000,0xffffff,0,sizeof(disk_size)+2,#disk_size,#mouse_dd, 0b100000000000000};
#else
edit_box edit_disk_size= {60,40,5,0xffffff,0x94AECE,0x000000,0xffffff,0,sizeof(disk_size)+2,#disk_size,#mouse_dd, 0b100000000000000};
#endif
void Main_Window()
{
@ -104,6 +108,23 @@ void Main_Window()
break;
case evKey:
key = GetKey();
if (key==9)
{
if ( !asm test edit_disk_size.flags, 2) edit_disk_size.flags=1000000000000010b;
else edit_disk_size.flags=1000000000000000b;
edit_box_draw stdcall (#edit_disk_size);
}
if ( asm test edit_disk_size.flags, 2)
{
if (key==13)
{
edit_disk_size.flags=1000000000000000b;
edit_box_draw stdcall (#edit_disk_size);
}
EAX=key<<8;
edit_box_key stdcall(#edit_disk_size);
break;
}
if (key==182) if (disk_num<>0) goto _DEL_DISK;
if (key==51) AddDisk();
if (key==13) OpenTmpDisk();
@ -131,20 +152,25 @@ void Main_Window()
selected+=3;
DrawTmpDisks();
}
EAX=key<<8;
edit_box_key stdcall(#edit_disk_size);
//EAX=key<<8;
//edit_box_key stdcall(#edit_disk_size);
break;
case evReDraw:
sc.get();
DefineAndDrawWindow(170,150,314,270,0x74,sc.work,"Virtual Disk Manager 0.46",0);
DefineAndDrawWindow(170,150,314,270,0x74,sc.work,"Virtual Disk Manager 0.47",0);
GetProcessInfo(#Form, SelfInfo);
if (Form.status_window>2) return;
DrawBar(0,0, Form.cwidth,TOPPANELH, sc.work);
DrawBar(0,TOPPANELH, Form.cwidth,1, sc.work_graph);
WriteText(5, 9, 0x80, sc.work_text, INTRO_TEXT_4);
#ifdef LANG_RUS
WriteText(6, 9, 0x80, sc.work_text, INTRO_TEXT_4);
WriteText(117, 9, 0x80, sc.work_text, "MB.");
#else
WriteText(6, 9, 0x80, sc.work_text, INTRO_TEXT_4);
WriteText(107, 9, 0x80, sc.work_text, "MB.");
#endif
edit_box_draw stdcall (#edit_disk_size);
WriteText(115, 9, 0x80, sc.work_text, "MB.");
x=6;
for (i=0; i<2; i++)
{