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

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

first commit

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