Rev 7766 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7766 | Rev 7806 | ||
---|---|---|---|
Line 38... | Line 38... | ||
38 | { |
38 | { |
39 | if (!dir_exists(#save_to)) CreateDir(#save_to); |
39 | if (!dir_exists(#save_to)) CreateDir(#save_to); |
40 | downloader_opened = true; |
40 | downloader_opened = true; |
41 | SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER + EVM_STACK); |
41 | SetEventMask(EVM_REDRAW + EVM_KEY + EVM_BUTTON + EVM_MOUSE + EVM_MOUSE_FILTER + EVM_STACK); |
Line 42... | Line 42... | ||
42 | 42 | ||
43 | system.color.get(); |
43 | sc.get(); |
Line 44... | Line 44... | ||
44 | pb.frame_color = system.color.work_dark; |
44 | pb.frame_color = sc.work_dark; |
Line 45... | Line 45... | ||
45 | 45 | ||
46 | filepath[0] = NULL; |
46 | filepath[0] = NULL; |
Line 64... | Line 64... | ||
64 | edit_box_key stdcall(#ed); |
64 | edit_box_key stdcall(#ed); |
65 | if (key_scancode==SCAN_CODE_ENTER) Key_Scan(301); |
65 | if (key_scancode==SCAN_CODE_ENTER) Key_Scan(301); |
66 | break; |
66 | break; |
Line 67... | Line 67... | ||
67 | 67 | ||
68 | case evReDraw: |
68 | case evReDraw: |
69 | DefineAndDrawWindow(215, 100, 580, 130, 0x74, system.color.work, DL_WINDOW_HEADER, 0); |
69 | DefineAndDrawWindow(215, 100, 580, 130, 0x74, sc.work, DL_WINDOW_HEADER, 0); |
70 | GetProcessInfo(#DL_Form, SelfInfo); |
70 | GetProcessInfo(#DL_Form, SelfInfo); |
71 | if (DL_Form.status_window>2) break; |
71 | if (DL_Form.status_window>2) break; |
72 | if (DL_Form.height<120) MoveSize(OLD,OLD,OLD,120); |
72 | if (DL_Form.height<120) MoveSize(OLD,OLD,OLD,120); |
73 | if (DL_Form.width<280) MoveSize(OLD,OLD,280,OLD); |
73 | if (DL_Form.width<280) MoveSize(OLD,OLD,280,OLD); |
Line 109... | Line 109... | ||
109 | 109 | ||
110 | void DL_Draw_Window() |
110 | void DL_Draw_Window() |
111 | { |
111 | { |
112 | int but_x = 0; |
112 | int but_x = 0; |
113 | int but_y = 58; |
113 | int but_y = 58; |
114 | DrawBar(0,0, DL_Form.cwidth, DL_Form.cheight, system.color.work); |
114 | DrawBar(0,0, DL_Form.cwidth, DL_Form.cheight, sc.work); |
115 | DeleteButton(301); |
115 | DeleteButton(301); |
116 | DeleteButton(302); |
116 | DeleteButton(302); |
117 | DeleteButton(305); |
117 | DeleteButton(305); |
118 | DeleteButton(306); |
118 | DeleteButton(306); |
Line 128... | Line 128... | ||
128 | if (downloader.state == STATE_IN_PROGRESS) |
128 | if (downloader.state == STATE_IN_PROGRESS) |
129 | { |
129 | { |
130 | DrawStandartCaptButton(DL_Form.width - 190, but_y, 302, STOP_DOWNLOADING); |
130 | DrawStandartCaptButton(DL_Form.width - 190, but_y, 302, STOP_DOWNLOADING); |
131 | DrawDownloading(); |
131 | DrawDownloading(); |
132 | } |
132 | } |
133 | WriteText(CONX, ed.top + 4, 0x90, system.color.work_text, "URL:"); |
133 | WriteText(CONX, ed.top + 4, 0x90, sc.work_text, "URL:"); |
134 | ed.width = DL_Form.cwidth - ed.left - CONX - 3; |
134 | ed.width = DL_Form.cwidth - ed.left - CONX - 3; |
135 | ed.offset=0; |
135 | ed.offset=0; |
136 | DrawEditBox(#ed); |
136 | DrawEditBox(#ed); |
137 | } |
137 | } |
Line 186... | Line 186... | ||
186 | 186 | ||
187 | void DrawDownloading() |
187 | void DrawDownloading() |
188 | { |
188 | { |
189 | char bytes_received[70]; |
189 | char bytes_received[70]; |
190 | sprintf(#bytes_received, KB_RECEIVED, ConvertSizeToKb(downloader.httpd.content_received) ); |
190 | sprintf(#bytes_received, KB_RECEIVED, ConvertSizeToKb(downloader.httpd.content_received) ); |
191 | DrawBar(CONX, pb.top + 22, pb.width, 16, system.color.work); |
191 | DrawBar(CONX, pb.top + 22, pb.width, 16, sc.work); |
192 | WriteText(CONX, pb.top + 22, 0x90, system.color.work_text, #bytes_received); |
192 | WriteText(CONX, pb.top + 22, 0x90, sc.work_text, #bytes_received); |
193 | //CalculateSpeed(); |
193 | //CalculateSpeed(); |
194 | progressbar_draw stdcall(#pb); |
194 | progressbar_draw stdcall(#pb); |
Line 195... | Line 195... | ||
195 | } |
195 | } |