Subversion Repositories Kolibri OS

Rev

Rev 5668 | Rev 5680 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5668 Rev 5670
Line 23... Line 23...
23
        mov     ecx, 160 shl 16 + 100           ; [y start]:[y size]
23
        mov     ecx, 160 shl 16 + 100           ; [y start]:[y size]
24
        mov     edx, 0x34DDDDDD                 ; color of work area RRGGBB
24
        mov     edx, 0x34DDDDDD                 ; color of work area RRGGBB
25
        mov     edi, name                       ; WINDOW LABEL
25
        mov     edi, name                       ; WINDOW LABEL
26
        mcall
26
        mcall
Line 27... Line 27...
27
 
27
 
28
        cmp     [status], STATUS_INITIAL
28
        cmp     [status], STATUS_CONNECTING
Line 29... Line 29...
29
        jne     @f
29
        ja      @f
30
 
30
 
31
        mov     ebx, 25 shl 16 + 15
31
        mov     ebx, 25 shl 16 + 14
32
        xor     ecx, ecx
32
        xor     ecx, ecx
33
        mov     edx, serverstr
33
        mov     edx, serverstr
Line 34... Line 34...
34
        mov     esi, userstr-serverstr
34
        mov     esi, userstr-serverstr
Line -... Line 35...
-
 
35
        mcall   4                               ; "server" text
-
 
36
 
-
 
37
        invoke  edit_box_draw, URLbox           ; Server textbox
35
        mcall   4                               ; "server" text
38
 
36
 
39
        cmp     [status], STATUS_INITIAL
37
        invoke  edit_box_draw, URLbox           ; Server textbox
40
        jne     .redraw_done
38
 
41
 
39
        mov     ebx, 220 shl 16 + 85
42
        mov     ebx, 220 shl 16 + 85
Line 40... Line 43...
40
        mov     ecx, 47 shl 16 + 16
43
        mov     ecx, 47 shl 16 + 16
41
        mov     edx, 2
44
        mov     edx, 2
42
        mov     esi, 0xCCCCCC
45
        mov     esi, 0xCCCCCC
43
        mcall   8                               ; Connect button
46
        mcall   8                               ; Connect button
Line 44... Line 47...
44
 
47
 
Line 45... Line 48...
45
        mov     ebx, 240 shl 16 + 49
48
        mov     ebx, 240 shl 16 + 52
46
        mov     edx, connectstr
49
        mov     edx, connectstr
47
        mov     esi, loginstr-connectstr
50
        mov     esi, loginstr-connectstr
Line 48... Line 51...
48
        mcall   4                               ; Connect button text
51
        mcall   4                               ; Connect button text
49
 
52
 
50
        jmp     .redraw_done
53
        jmp     .redraw_done
51
 
54
 
52
  @@:
55
  @@:
Line 53... Line 56...
53
        cmp     [status], STATUS_LOGIN
56
        cmp     [status], STATUS_LOGIN
54
        jne     @f
57
        ja      @f
55
 
58
 
56
        mov     ebx, 25 shl 16 + 15
59
        mov     ebx, 25 shl 16 + 14
Line -... Line 60...
-
 
60
        xor     ecx, ecx
-
 
61
        mov     edx, userstr
-
 
62
        mov     esi, passstr-userstr
-
 
63
        mcall   4                               ; "user" text
-
 
64
 
-
 
65
        add     bl, 20
57
        xor     ecx, ecx
66
        mov     edx, passstr
58
        mov     edx, userstr
67
        mov     esi, connectstr-passstr         ; "password" text
59
        mov     esi, passstr-userstr
68
        mcall
60
        mcall   4                               ; "user" text
69
 
61
 
70
        invoke  edit_box_draw, USERbox          ; username textbox
Line 76... Line 85...
76
        mcall   4                               ; Login button text
85
        mcall   4                               ; Login button text
Line 77... Line 86...
77
 
86
 
Line 78... Line 87...
78
        jmp     .redraw_done
87
        jmp     .redraw_done
-
 
88
 
-
 
89
  @@:
-
 
90
        cmp     [status], STATUS_DISCONNECTED
79
 
91
        jb      .redraw_done
80
  @@:
92
 
81
        mov     ebx, 25 shl 16 + 15
93
        mov     ebx, 25 shl 16 + 15
82
        mov     ecx, 0x80ca0000                 ; red ASCIIZ string
94
        mov     ecx, 0x80ca0000                 ; red ASCIIZ string
83
        mov     edx, [status]
95
        mov     edx, [status]
Line 118... Line 130...
118
        jz      mainloop
130
        jz      mainloop
119
        cmp     ah, 13                          ; enter (return) key
131
        cmp     ah, 13                          ; enter (return) key
120
        je      .connect
132
        je      .connect
121
        invoke  edit_box_key, URLbox
133
        invoke  edit_box_key, URLbox
122
  @@:
134
  @@:
-
 
135
        cmp     [status], STATUS_REQ_LOGIN
-
 
136
        jne     .loop
-
 
137
        cmp     ah, 13                          ; enter (return) key
-
 
138
        je      .login
-
 
139
        invoke  edit_box_key, USERbox
-
 
140
        invoke  edit_box_key, PASSbox
-
 
141
  @@:
123
        jmp     .loop
142
        jmp     .loop
Line 124... Line 143...
124
 
143
 
125
  .btn:
144
  .btn:
Line 136... Line 155...
136
 
155
 
137
  .connect:
156
  .connect:
138
        mov     eax, [URLbox.pos]
157
        mov     eax, [URLbox.pos]
Line -... Line 158...
-
 
158
        mov     byte[serveraddr+eax], 0
-
 
159
 
-
 
160
        mov     [status], STATUS_CONNECTING
139
        mov     byte[serveraddr+eax], 0
161
        inc     [update_gui]
140
 
162
 
141
; Create network thread
163
; Create network thread
142
        mcall   51, 1, thread_start, thread_stack
164
        mcall   51, 1, thread_start, thread_stack
143
        cmp     eax, -1
165
        cmp     eax, -1
144
        jne     @f
166
        jne     @f
145
        mov     [status], STATUS_THREAD_ERR
167
        mov     [status], STATUS_THREAD_ERR
146
        inc     [update_gui]
168
;        inc     [update_gui]
Line 147... Line 169...
147
  @@:
169
  @@:
-
 
170
        jmp     .loop
148
        jmp     .loop
171
 
149
 
172
  .login:
Line 150... Line 173...
150
  .login:
173
        mov     [status], STATUS_LOGIN
151
  ;;;
174
        inc     [update_gui]
152
        ret
175
        jmp     .loop
153
 
176
 
154
  .mouse:
177
  .mouse:
155
        mcall   23
178
        mcall   23
-
 
179
        cmp     [status], STATUS_INITIAL
-
 
180
        jne     @f
-
 
181
        invoke  edit_box_mouse, URLbox
-
 
182
  @@:
-
 
183
        cmp     [status], STATUS_REQ_LOGIN
156
        cmp     [status], STATUS_INITIAL
184
        jne     @f
Line 157... Line 185...
157
        jne     @f
185
        invoke  edit_box_mouse, USERbox
158
        invoke  edit_box_mouse, URLbox
186
        invoke  edit_box_mouse, PASSbox
159
  @@:
187
  @@: