source: svn/trunk/zasc/app_c/DST_WinAutoSearch.c @ 5

Last change on this file since 5 was 5, checked in by jglee, 11 years ago

핫키 추가:화면모드, 채널검색

File size: 15.7 KB
Line 
1#include "DST_WinManager.h"
2#include "DST_ChannelTune.h"
3#include "DST_SignalMonitor.h"
4
5#include "DST_DataStrings.h"
6#include "DST_OSDImage.h"
7#include "DST_UserInterface.h"
8
9#include "DST_ISDBT_ChannelTask.h"
10#include "DST_ChannelTune.h"
11#include "DST_DB.h"
12#include "DST_DB_Engine.h"
13#include "DST_MemoryDB.h"
14
15//class CAutoSearchWin : public CWindow
16//{
17//private:
18        static int CAutoSearchWin_m_nState;
19        static int CAutoSearchWin_m_nRF; // ½ºÄµ À§Ä¡
20        static CHANNEL_DISPLAY CAutoSearchWin_ch[4];
21        static DS_U8 CAutoSearchWin_nAutoSearchMode;
22        static int CAutoSearchWin_nChCount[DB_CHANNEL_DB_MAX];
23        static bool CAutoSearchWin_bLockTimeOut;
24        static bool CAutoSearchWin_bPSIPTimeOut;
25        static bool CAutoSearchWin_bReceiveTVCT; 
26        static bool CAutoSearchWin_bReceivePMT;
27        static int    nPrevChannelCount = 0;
28        static bool CAutoSearchWin_bCanceled; 
29        static DS_U16 CAutoSearchWin_g_nPos;
30        static DS_U16 CAutoSearchWin_g_nTop;
31        static DS_U16 CAutoSearchWin_mainSelect;
32        static DS_U16 CAutoSearchWin_mainListNum;
33        static DS_U16 CAutoSearchWin_mainItemNum;
34//public:
35void CAutoSearchWin_InitValues();
36
37//      CAutoSearchWin(SWinEventMsg event):CWindow(event)
38        void CAutoSearchWin_Constructor(CWindow *this, SWinEventMsg event)
39        {
40                this->SetWinName(this,  "AutoSearch");
41                CAutoSearchWin_bCanceled = false;
42                CAutoSearchWin_bPSIPTimeOut = false; 
43                CAutoSearchWin_bLockTimeOut = false; 
44                CAutoSearchWin_bReceiveTVCT = false;
45                CAutoSearchWin_bReceivePMT = false;
46               
47                CAutoSearchWin_nAutoSearchMode = 1; // 0 ¾÷µ¥ÀÌÆ® 1 ¸®½ºÄµ
48                CAutoSearchWin_InitValues();
49               
50//              DST_Printf("nAutoSearchMode = %d\n", nAutoSearchMode);
51                this->rect.w = DST_GetImageWidth(auto_scan_back);
52                this->rect.h = DST_GetImageHeight(auto_scan_back);
53                this->rect.x = (DST_GetScreenWidth() - this->rect.w) / 2;
54                this->rect.y = (DST_GetScreenHeight()- this->rect.h) / 2;
55               
56                this->RegisterAllKey(this);
57                this->RegisterKey(this, VK_PWR, false, 0, 0);
58                this->RegisterKey(this, VK_KEY_PWR, false, 0, 0);
59               
60                this->SetTimeOut(this, 0);
61                CAutoSearchWin_m_nState = 0; // ½ºÄµ Àü
62                CAutoSearchWin_m_nRF = DST_MinRF();
63                memset(CAutoSearchWin_ch, 0, sizeof(CAutoSearchWin_ch));
64                memset(CAutoSearchWin_nChCount, 0, sizeof(CAutoSearchWin_nChCount));
65
66                if(DST_DB_GetChannelCount() == 0 || event.data[2]) this->KeyInput(this, VK_OK, false);
67                if(event.data[3]) this->KeyInput(this, VK_OK, false);  //ä³Î½ºÄµ ÇÖŰ ´­·ÇÀ» °æ¿ì
68        }
69
70       
71        void CAutoSearchWin_Destructor()
72        {
73                if(DST_GetWin(WIN_ERROR)) DST_CreateWin(WIN_CHANNEL_BANNER, WIN_NULL, BANNER_NORMAL ,0, 0, 0);
74        }
75       
76        void CAutoSearchWin_InitValues()
77        {
78                CAutoSearchWin_mainItemNum = 2;
79                CAutoSearchWin_g_nTop = 0;
80                CAutoSearchWin_g_nPos = 0;
81                CAutoSearchWin_mainSelect = CAutoSearchWin_nAutoSearchMode;
82               
83                CAutoSearchWin_mainListNum = 2;
84                if (CAutoSearchWin_mainItemNum < CAutoSearchWin_mainListNum) CAutoSearchWin_mainListNum = CAutoSearchWin_mainItemNum;
85               
86                InitItemValues(CAutoSearchWin_mainListNum, CAutoSearchWin_mainSelect, &CAutoSearchWin_g_nTop, &CAutoSearchWin_g_nPos);
87        }
88       
89        void CAutoSearchWin_AddChList(int rf, int major, int minor, char* name)
90        {
91                int i = 0;
92                int nPos = 4;
93                for ( i = 0; i < 4; i++)
94                {
95                        if (strlen(CAutoSearchWin_ch[i].num) != 0) continue;
96                        nPos = i;
97                        break;
98                }
99                if (nPos > 3) 
100                {
101                        nPos = 3;
102                        memcpy(&CAutoSearchWin_ch[0], &CAutoSearchWin_ch[1], sizeof(CHANNEL_DISPLAY)* 3);
103                }
104                if (minor == 0)
105                {
106                        sprintf(CAutoSearchWin_ch[nPos].num, "%d(%d)", major, DST_GetFrequencyNumberbyIndex(rf));
107                }
108                else
109                {
110                        sprintf(CAutoSearchWin_ch[nPos].num, "%d-%d(%d)", major, minor, DST_GetFrequencyNumberbyIndex(rf));
111                }
112                strcpy((char*)CAutoSearchWin_ch[nPos].name, (char*)name);
113        }
114       
115        void CAutoSearchWin_SearchChDB(int RF)
116        {
117                // DST_Printf("RF = %d\n", RF);
118                int i = 0;
119                CAutoSearchWin_nChCount[RF] = 0;
120                DBLock(true);
121                for (i=0; i < DB_CHANNEL_DB_MAX; i++)
122                {
123                        if (db_channel_db[i].program_number == 0) continue;
124                        if (db_channel_db[i].rf  != RF) continue;
125                        CAutoSearchWin_nChCount[RF]++;
126                        CAutoSearchWin_AddChList(RF, db_channel_db[i].major, db_channel_db[i].minor, db_channel_db[i].name);
127                }
128                DBLock(false);
129        }
130       
131        void CAutoSearchWin_DrawProgressBar(CWindow *this, int x, int y, int w, int range, int pos)
132        {
133                // DST_Printf("range = %d pos = %d\n", range, pos);
134                int position = (w*pos)/(range);
135                int i = 0;
136                for ( i = x; i < x+position; i++)
137                {
138                        this->DrawImage(this, i, y, prog_y,true);
139                }
140        }       
141
142        DS_U16* CAutoSearchWin_GetString(int index)
143        {
144                switch(index)
145                {
146                        case 0: return pz_Scan_Update[OSD_Lang];
147                        case 1: return pz_Scan_Start[OSD_Lang];
148                        default: break;
149                }
150                return 0;
151        }       
152       
153        // nState == 0; // ½ÃÀÛÀü  ¹öư ¾øÀ½
154        // nState == 1; // ÁøÇàÁß  Ãë¼Ò ¹öư
155        // nState == 2; // Á¾·á Àç½ÃÀÛ ´ë±â ½ÃÀÛ ¹öư
156        void CAutoSearchWin_Draw(CWindow *this, int nState, int nRF)
157        {
158                int i = 0;
159                int nTotalCount = 0;
160                int nProg = 0;
161               
162                // ¹è°æ
163                this->DrawImage(this, 0, 0, auto_scan_back, false);
164                // ŸÀÌÆ²
165                this->setFontStyle(this, 20,0xC8C8C8,ALIGN_MIDDLE,ALIGN_CENTER);
166                // Ç׸ñ À̸§  ä³Î¹øÈ£ RF ä³ÎÀ̸§
167                this->DrawTextUni(this, 26, 19,  126, 24, pz_Scan_ChannelNumber[OSD_Lang], &(this->font));
168                this->DrawTextUni(this, 180, 19, 208, 24, pz_chName[OSD_Lang], &(this->font));
169
170
171                // ¹öư ±×¸®±â
172               
173//              this->setFontStyle(this, 19,0xC8C8C8,ALIGN_MIDDLE,ALIGN_CENTER);
174//              this->DrawImage(this, 390, 12, newcon2_gui_depth3_button_small_selected,true);
175//              this->DrawTextUni(this, 390, 12, DST_GetImageWidth(newcon2_gui_depth3_button_small_selected), 38, pz_Scan_Update[OSD_Lang], &(this->font));
176                this->setFontStyle(this,20,0xFFFFFF,ALIGN_MIDDLE,ALIGN_CENTER);
177
178                this->DrawImage(this, 416, 16, Button_h,true);
179                this->DrawTextUni(this, 416, 16, DST_GetImageWidth(Button_h),  DST_GetImageHeight(Button_h), (nState==1)?pz_Stop[OSD_Lang]:CAutoSearchWin_GetString(CAutoSearchWin_mainSelect), &(this->font));
180               
181                this->setFontStyle(this, 20,0xC8C8C8,ALIGN_MIDDLE,ALIGN_CENTER);
182                // Ç׸ñ Ç¥½Ã
183                i = 0;
184                for (i=0; i < 4; i++)
185                {
186                        if (strlen(CAutoSearchWin_ch[i].num) == 0) continue;
187                        DS_U32* strText32 = DST_UTF82Uni((DS_U8*)CAutoSearchWin_ch[i].name); // È£ÃâÇÑ ÂÊ¿¡¼­ ¸Þ¸ð¸® ÇØÁ¦
188                        // ä³Î ¹øÈ£ , RF
189                        // RF
190                        this->DrawText(this, 26, 28+(i+1)*35,   126, 24,  CAutoSearchWin_ch[i].num, &(this->font));
191                        // ä³Î À̸§
192                        this->DrawText32(this, 180, 28+(i+1)*35, 208, 24, strText32, &(this->font));
193                }
194                // ÁøÇà¹Ù
195                switch (nState)
196                {
197                        case 0: nProg = 0; break;
198                        case 1: nProg = nRF - DST_MinRF() + 1; break;
199                        case 2: nProg = DST_MaxRF() - DST_MinRF()+1; break;
200                        default: break;
201                }
202                // DST_Printf("nProg = %d\n", nProg);
203               
204                CAutoSearchWin_DrawProgressBar(this, 34, 210, 346,  DST_MaxRF() - DST_MinRF() +1, nProg);
205                               
206                // ÁøÇà»óȲ ¹®±¸
207                // 5 channels found. searching...
208                i = 0;
209                for ( i = 0; i <= nRF; i++) nTotalCount+=CAutoSearchWin_nChCount[i];
210
211                if( CAutoSearchWin_m_nState == 0 ) 
212                {
213                        this->DrawTextUni(this, 404, 166, 130, 29, pz_Scan_Ready[OSD_Lang], &(this->font));
214                        this->UpdateScreen(this);
215                        return;
216                }
217                char _strTextNum[20];
218                sprintf(_strTextNum, "RF : %d", DST_GetFrequencyNumberbyIndex(nRF));
219                DS_U16 _strText16[64];
220                str2uni(_strText16, _strTextNum);
221                if(CAutoSearchWin_m_nState == 1)
222                {
223                        this->DrawTextUni(this, 404, 106, 130, 29, pz_Scan_Searching[OSD_Lang], &(this->font));
224                        this->DrawTextUni(this, 404, 136, 130, 29, _strText16, &(this->font));
225                }
226                if(nTotalCount == 0 &&CAutoSearchWin_m_nState == 1)
227                {
228                       
229                }
230                else
231                {
232//                      if (nTotalCount)
233//                      {
234
235                                char strTextNum[20];
236                                sprintf(strTextNum, " %d", nTotalCount);
237                                DS_U16 strText16[64];
238                                str2uni(strText16, strTextNum);
239                                strcat16(strText16, pz_Scan_ChannelFound[OSD_Lang]);
240                                this->DrawTextUni(this, 404, 166, 130, 29, strText16, &(this->font));
241                                this->DrawTextUni(this, 404, 196, 130, 29, pz_Scan_ChannelFound_P1[OSD_Lang], &(this->font));
242//                      }
243                }
244               
245                this->UpdateScreen(this);
246               
247        }       
248        void CAutoSearchWin_Scan(int nRF)
249        {
250                if (CAutoSearchWin_bCanceled) return;
251                JST_Scan(nRF);
252                CAutoSearchWin_m_nState = 1; //½ºÄµÁß
253                CAutoSearchWin_m_nRF = nRF;
254        }
255
256        void CAutoSearchWin_ScanComplete(CWindow *this)
257        {
258                DST_DB_TuneFirstChannel();
259                CAutoSearchWin_m_nState = 2;    // ½ºÄµ Á¾·á
260                CAutoSearchWin_Draw(this, CAutoSearchWin_m_nState, CAutoSearchWin_m_nRF);
261                this->SetTimeOut(this, 5);
262               
263//              this->KeyInput(this, VK_OK, false);
264               
265        }       
266
267//      virtual void OnMessage(SWinEventMsg event)
268        void CAutoSearchWin_OnMessage(CWindow *this, SWinEventMsg event)
269        {
270                switch (event.cmd)
271                {
272                        case WM_POWER_OFF:
273                                this->Close(this);
274                                break;
275                               
276                        case WM_CT_MSG:
277                                switch (event.data32[0])
278                                {
279                                        case CT_STOPPED:
280                                                CAutoSearchWin_m_nState = 2;
281                                                CAutoSearchWin_Draw(this, CAutoSearchWin_m_nState, CAutoSearchWin_m_nRF);
282                                                CAutoSearchWin_ScanComplete(this);
283                                                break;
284                                               
285                                        case CT_SCAN_START:
286                                                CAutoSearchWin_Draw(this, CAutoSearchWin_m_nState, event.data32[1]);
287                                                CAutoSearchWin_bPSIPTimeOut = false; // LOCKÀÌ ¾ÈµÇ°Å³ª PSIPÀ» ¸ø¹Þ¾Æ¼­ ŸÀӾƿôÀÌ ³­ °æ¿ì
288                                                CAutoSearchWin_bLockTimeOut = false; // LOCKÀÌ ¾ÈµÇ°Å³ª PSIPÀ» ¸ø¹Þ¾Æ¼­ ŸÀӾƿôÀÌ ³­ °æ¿ì
289                                                CAutoSearchWin_bReceiveTVCT = false; // PSIPÀ» ¹Þ¾Ò´Ù.
290                                                CAutoSearchWin_bReceivePMT = false; //PMT¸¦ ¹Þ¾Ò´Ù. VCT°¡ ¾ø¾îµµ ä³ÎÀÌ ÀÖÀ»¼ö ÀÖ´Ù
291                                                nPrevChannelCount = 0;
292                                                DBLock(true);
293                                                {
294                                                        int i;
295                                                        for (i = 0; i < DB_CHANNEL_DB_MAX; i++) 
296                                                        {
297                                                                if (db_channel_db[i].program_number == 0) continue;
298                                                                if (db_channel_db[i].rf != event.data32[1]) continue;
299                                                                nPrevChannelCount++;
300                                                                break;
301                                                        }
302                                                }
303                                                DBLock(false);
304                                                break;
305                                       
306                                        case CT_SCAN_PSIP_WAIT:
307                                                // DST_Printf("CT_SCAN_PSIP_WAIT %d %d %d\n", (int)event.data32[1], (int)event.data32[2], (int)event.data32[3]);
308                                                if ((int)event.data32[1] != CAutoSearchWin_m_nRF)
309                                                {
310                                                        // DST_Printf("event.data32[1] = %d CAutoSearchWin_m_nRF = %d\n", event.data32[1], CAutoSearchWin_m_nRF);
311                                                        break;
312                                                }
313                                                if (CAutoSearchWin_bReceiveTVCT == true) break;
314                                                if (CAutoSearchWin_bPSIPTimeOut == true) break;
315                                                if (event.data32[2] < 7000) break;
316                                                // DST_Printf("CT_SCAN_PSIP_WAIT timeout\n");
317                                                CAutoSearchWin_bPSIPTimeOut = true;
318                                               
319                                                // ÀÌÀü ä³ÎÀ» Áö¿î´Ù.
320                                                if (CAutoSearchWin_bReceivePMT == false && CAutoSearchWin_bReceiveTVCT == false)
321                                                {
322                                                        JST_DB_Del(CAutoSearchWin_m_nRF);
323                                                }
324                                                 if (CAutoSearchWin_bReceivePMT == true && CAutoSearchWin_bReceiveTVCT == false ) // PSIP ä³ÎÀϼöµµ ÀÖ´Ù.
325                                                 {
326                                                        CAutoSearchWin_SearchChDB(event.data32[1]);
327                                                }
328                                                if (event.data32[1] >= DST_MaxRF())
329                                                {
330                                                        CAutoSearchWin_ScanComplete(this);
331                                                }
332                                                else
333                                                {
334                                                        CAutoSearchWin_Scan(event.data32[1]+1);
335                                                } 
336                                                break;
337                                                       
338                                        case CT_SCAN_LOCK_WAIT:
339                                                //DST_Printf("CT_SCAN_LOCK_WAIT %d %d %d %d\n",
340                                                //              (int)event.data32[1], (int)event.data32[2], (int)event.data32[3], (int)event.data32[4]);
341                                                if ((int)event.data32[1] != CAutoSearchWin_m_nRF)
342                                                {
343                                                        // DST_Printf("event.data32[1] = %d CAutoSearchWin_m_nRF = %d\n", event.data32[1], CAutoSearchWin_m_nRF);
344                                                        break;
345                                                }
346                                                if (CAutoSearchWin_bReceiveTVCT == true) break;
347                                                if (CAutoSearchWin_bReceivePMT == true) break;
348                                                if (CAutoSearchWin_bLockTimeOut == true) break;
349                                                if (event.data32[4] < 20) // POWER LEVELÀÌ 20º¸´Ù ÀÛÀº °æ¿ì´Â ½ÅÈ£°¡ ¾ø´Â°É·Î °£ÁÖÇÏ°í ¹Ù·Î ¹ö¸°´Ù.
350                                                {
351                                                        if (event.data32[2] < 200) break; 
352                                                }
353                                                else if (event.data32[4] < 27) // POWER LEVELÀÌ 27º¸´Ù ÀÛÀº °æ¿ì´Â ¹Ì¾à½ÅÈ£·Î ÆÇ´ÜÇÏ¿© 2.2ÃÊ ±â´Ù¸°´Ù.
354                                                {
355                                                        if (event.data32[2] < 2200) break; 
356                                                }
357                                                else // ÀϹÝÀûÀÎ °æ¿ì·Î 1300ms ±â´Ù¸°´Ù.
358                                                {
359                                                        if (event.data32[2] < 1300) break; 
360                                                }
361                                                if (nPrevChannelCount > 0) // ÀÌÀü¿¡ ä³ÎÀÌ ÀÖ´ø Á֯ļö¶ó¸é 5ÃʱîÁö ±â´Ù·Á º¸ÀÚ
362                                                {
363                                                        if (event.data32[2] < 5000) break; 
364                                                }
365                                                if (event.data32[3] > 0) break; // lockÀÌ µÇ¾î ÀÖ´Ù¸é ¹«½Ã
366                                                // DST_Printf("CT_SCAN_LOCK_WAIT timeout\n");
367                                                CAutoSearchWin_bLockTimeOut = true;
368                                               
369                                                // ÀÌÀü ä³ÎÀ» Áö¿î´Ù.
370                                                if (CAutoSearchWin_bReceivePMT == false && CAutoSearchWin_bReceiveTVCT == false) // 0 ¾÷µ¥ÀÌÆ® 1 ¸®½ºÄµ 2:±âÁö±¹ ¼­Ä¡
371                                                {
372                                                        JST_DB_Del(CAutoSearchWin_m_nRF);
373                                                }
374                                                if (CAutoSearchWin_bReceivePMT == true && CAutoSearchWin_bReceiveTVCT == false) // PSIP ä³ÎÀϼöµµ ÀÖ´Ù.
375                                                {
376                                                        CAutoSearchWin_SearchChDB(event.data32[1]);
377                                                }
378                                                if (event.data32[1] >= DST_MaxRF())
379                                                {
380                                                        CAutoSearchWin_ScanComplete(this);
381                                                }
382                                                else
383                                                {
384                                                        CAutoSearchWin_Scan(event.data32[1]+1);
385                                                } 
386                                                break;
387                                       
388                                        case CT_SCAN_RECEIVE_TVCT:
389#if CVCT_SUPPORT
390                                        case CT_SCAN_RECEIVE_CVCT:
391#endif
392                                                // DST_Printf("CT_SCAN_RECEIVE_TVCT\n");
393                                                if ((int)event.data32[1] != CAutoSearchWin_m_nRF)
394                                                {
395                                                        // DST_Printf("event.data32[1] = %d CAutoSearchWin_m_nRF = %d\n", event.data32[1], CAutoSearchWin_m_nRF);
396                                                        break;
397                                                }
398                                                if (CAutoSearchWin_bReceiveTVCT == true) break;
399//                                              if (CAutoSearchWin_bTimeOut == true) break;
400                                                CAutoSearchWin_bReceiveTVCT = true;
401                                                CAutoSearchWin_SearchChDB(event.data32[1]);
402                                                if (event.data32[1] >= DST_MaxRF())
403                                                {
404                                                        CAutoSearchWin_ScanComplete(this);
405                                                }
406                                                else
407                                                {
408                                                        CAutoSearchWin_Scan(event.data32[1]+1);
409                                                } 
410                                                break;
411                                               
412                                        case CT_SCAN_RECEIVE_PMT:
413                                                // DST_Printf("CT_SCAN_RECEIVE_PMT\n");
414                                                if ((int)event.data32[1] != CAutoSearchWin_m_nRF)
415                                                {
416                                                        // DST_Printf("event.data32[1] = %d CAutoSearchWin_m_nRF = %d\n", event.data32[1], CAutoSearchWin_m_nRF);
417                                                        break;
418                                                }
419                                                // DST_Printf("CT_SCAN_RECEIVE_PMT %d %d %d\n", (int)event.data32[1], (int)event.data32[2], (int)event.data32[3]);
420                                                CAutoSearchWin_bReceivePMT = true;
421                                                break;
422                                        case CT_SCAN_RECEIVE_PAT:
423                                                // DST_Printf("CT_SCAN_RECEIVE_PAT\n");
424                                                if ((int)event.data32[1] != CAutoSearchWin_m_nRF)
425                                                {
426                                                        // DST_Printf("event.data32[1] = %d CAutoSearchWin_m_nRF = %d\n", event.data32[1], CAutoSearchWin_m_nRF);
427                                                        break;
428                                                }
429                                                break;
430                                }
431                                break;
432                }
433        }
434       
435//      virtual void Show(void)
436        void CAutoSearchWin_Show(CWindow *this)
437        {
438                CAutoSearchWin_Draw(this, CAutoSearchWin_m_nState, CAutoSearchWin_m_nRF);
439        }
440       
441//      virtual void KeyInput(unsigned char key, bool /*bRepeat*/)
442        void CAutoSearchWin_KeyInput(CWindow *this, unsigned char key, bool bRepeat)
443        {
444                switch(key)
445                {
446//                      case VK_UP:
447//                      case VK_DN:
448//                              if(m_nState==1) break;
449//                              if(key == VK_UP)
450//                                      ItemIncrease(mainItemNum, 2, &g_nTop, &mainSelect, &g_nPos);
451//                              else
452//                                      ItemDecrease(mainItemNum, 2, &g_nTop, &mainSelect, &g_nPos);
453//                              Draw(m_nState, m_nRF);
454//                              break;
455                        case VK_OK:
456                                if(CAutoSearchWin_nAutoSearchMode == CAutoSearchWin_mainSelect && CAutoSearchWin_m_nState == 1)
457                                {
458                                        CAutoSearchWin_bCanceled = true;
459                                        JST_Stop();
460                                        CAutoSearchWin_ScanComplete(this);                     
461                                }
462                                else
463                                {
464                                        this->SetTimeOut(this, 0);
465                                        CAutoSearchWin_bCanceled = false;
466                                        CAutoSearchWin_m_nRF = DST_MinRF();
467                                        memset(CAutoSearchWin_ch, 0, sizeof(CAutoSearchWin_ch));
468                                        memset(CAutoSearchWin_nChCount, 0, sizeof(CAutoSearchWin_nChCount));
469                                        // nAutoSearchMode=mainSelect; Ç×»ó Ãʱ⠽ºÄµÀÌ´Ù.
470                                        CAutoSearchWin_Scan(CAutoSearchWin_m_nRF);
471                                        CAutoSearchWin_Draw(this, CAutoSearchWin_m_nState, CAutoSearchWin_m_nRF);
472                                }
473                                break;
474                        case VK_CANCEL:
475                        case VK_MENU:
476                        case VK_PREV:
477                        case VK_PREV_CH:
478                                CAutoSearchWin_m_nState = 0;
479                                CAutoSearchWin_bCanceled = true;
480                                JST_Stop();
481                                CAutoSearchWin_ScanComplete(this);
482                                this->Close(this);
483                                if(DST_GetWin(WIN_ERROR)) DST_CreateWin(WIN_CHANNEL_BANNER, WIN_NULL, BANNER_NORMAL ,0, 0, 0);
484                                break;
485                }
486        }
487//};
488
489void DST_CreateAutoSearchWin(SWinEventMsg event)
490{
491        CWindow*pWin = NewCWindow(event);
492        pWin->Destructor        = CAutoSearchWin_Destructor;
493        pWin->KeyInput          = CAutoSearchWin_KeyInput;
494        pWin->OnMessage         = CAutoSearchWin_OnMessage;
495        pWin->Show                      = CAutoSearchWin_Show;
496        // »ý¼ºÀÚ È£Ãâ
497        CAutoSearchWin_Constructor(pWin, event);
498        // À©µµ¿ì ¸Þ´ÏÀú¿¡ µî·Ï
499        DST_AddWin((WinID)(event.data[0]), pWin);
500}
Note: See TracBrowser for help on using the repository browser.