Commit e6ea8d6d7be925ab4f4938811b743d169c597639

Authored by xiemeng
1 parent a943694d

IMEI检测工具

  1 +// Choosedbdlg.cpp : implementation file
  2 +//
  3 +
  4 +#include "stdafx.h"
  5 +#include "sn writer.h"
  6 +#include "Choosedbdlg.h"
  7 +#include "Common.h"
  8 +#ifdef _DEBUG
  9 +#define new DEBUG_NEW
  10 +#undef THIS_FILE
  11 +static char THIS_FILE[] = __FILE__;
  12 +#endif
  13 +
  14 +extern META_Common_struct g_sMetaComm;
  15 +
  16 +
  17 +/////////////////////////////////////////////////////////////////////////////
  18 +// CChoosedbdlg dialog
  19 +
  20 +
  21 +CChoosedbdlg::CChoosedbdlg(CWnd* pParent /*=NULL*/)
  22 + : CDialog(CChoosedbdlg::IDD, pParent)
  23 +{
  24 + //{{AFX_DATA_INIT(CChoosedbdlg)
  25 + my_str_ap_path = _T("");
  26 + my_str_bp_path = _T("");
  27 + myversion = _T("");
  28 + //}}AFX_DATA_INIT
  29 +}
  30 +
  31 +
  32 +void CChoosedbdlg::DoDataExchange(CDataExchange* pDX)
  33 +{
  34 + CDialog::DoDataExchange(pDX);
  35 + //{{AFX_DATA_MAP(CChoosedbdlg)
  36 + DDX_Text(pDX, IDC_EDIT1, my_str_ap_path);
  37 + DDX_Text(pDX, IDC_EDIT2, my_str_bp_path);
  38 + DDX_Text(pDX, IDC_EDT_VERSION, myversion);
  39 + //}}AFX_DATA_MAP
  40 +}
  41 +
  42 +
  43 +BEGIN_MESSAGE_MAP(CChoosedbdlg, CDialog)
  44 + //{{AFX_MSG_MAP(CChoosedbdlg)
  45 + ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
  46 + ON_BN_CLICKED(IDC_BUTTON4, OnButton4)
  47 + //}}AFX_MSG_MAP
  48 +END_MESSAGE_MAP()
  49 +
  50 +/////////////////////////////////////////////////////////////////////////////
  51 +// CChoosedbdlg message handlers
  52 +
  53 +void CChoosedbdlg::OnButton1()
  54 +{
  55 + char szFilter[]="Database files(*.*)|*.*";
  56 + CFileDialog dlg(TRUE, NULL, NULL,
  57 + OFN_FILEMUSTEXIST|OFN_EXPLORER|OFN_ENABLESIZING|0x10000000/*OFN_FORCESHOWHIDDEN*/,
  58 + szFilter, this);
  59 + dlg.m_ofn.lpstrTitle = _T("Select Modem_1 database file...");
  60 + if(dlg.DoModal() == IDOK)
  61 + {
  62 + g_sMetaComm.sDBFileOption.bDBInitModem_1 = false;
  63 + my_str_ap_path = dlg.GetPathName();
  64 + }
  65 + UpdateData(FALSE);
  66 + strcpy(g_sMetaComm.sDBFileOption.strAPDbpath,my_str_ap_path.GetBuffer(my_str_ap_path.GetLength()));
  67 +
  68 +}
  69 +
  70 +void CChoosedbdlg::OnButton4()
  71 +{
  72 + char szFilter[]="Database files(*.*)|*.*";
  73 + CFileDialog dlg(TRUE, NULL, NULL,
  74 + OFN_FILEMUSTEXIST|OFN_EXPLORER|OFN_ENABLESIZING|0x10000000/*OFN_FORCESHOWHIDDEN*/,
  75 + szFilter, this);
  76 + dlg.m_ofn.lpstrTitle = _T("Select Modem_1 database file...");
  77 + if(dlg.DoModal() == IDOK)
  78 + {
  79 + g_sMetaComm.sDBFileOption.bDBInitModem_1 = false;
  80 + my_str_bp_path = dlg.GetPathName();
  81 + }
  82 + UpdateData(FALSE);
  83 +
  84 + strcpy(g_sMetaComm.sDBFileOption.strMD1Dbpath,my_str_bp_path.GetBuffer(my_str_bp_path.GetLength()));
  85 +
  86 +
  87 +}
  88 +
  89 +BOOL CChoosedbdlg::OnInitDialog()
  90 +{
  91 + CDialog::OnInitDialog();
  92 +
  93 + my_str_ap_path = CString(g_sMetaComm.sDBFileOption.strAPDbpath);
  94 + my_str_bp_path = CString(g_sMetaComm.sDBFileOption.strMD1Dbpath);
  95 + SetDlgItemText(IDC_STR_AP_PATH,my_str_ap_path);
  96 + SetDlgItemText(IDC_STR_BP_PATH,my_str_bp_path);
  97 + //
  98 +
  99 + myversion = CString(g_sMetaComm.check_sw_ver);
  100 + GetDlgItem(IDC_EDT_VERSION)->SetWindowText(myversion);
  101 + return TRUE; // return TRUE unless you set the focus to a control
  102 + // EXCEPTION: OCX Property Pages should return FALSE
  103 +}
  104 +
  105 +void CChoosedbdlg::OnOK()
  106 +{
  107 + UpdateData(TRUE);
  108 + // TODO: Add your control notification handler code here
  109 + // OnSelchangeComboTargetType();
  110 + if (my_str_ap_path== "" ||my_str_bp_path== "")
  111 + {
  112 + MessageBox("请指定DB文件");
  113 + return;
  114 + }
  115 + if (myversion == "")
  116 + {
  117 + MessageBox("请输入版本号");
  118 + }
  119 +
  120 + memset(g_sMetaComm.check_sw_ver,0x0,sizeof(g_sMetaComm.check_sw_ver));
  121 + memcpy(g_sMetaComm.check_sw_ver,myversion.GetBuffer(myversion.GetLength()),myversion.GetLength());
  122 + SaveParaToSetupFile();
  123 + CDialog::OnOK();
  124 +}
  125 +
... ...
  1 +#if !defined(AFX_CHOOSEDBDLG_H__22EAEAD5_3188_4DC6_B2BB_21E4FF12A640__INCLUDED_)
  2 +#define AFX_CHOOSEDBDLG_H__22EAEAD5_3188_4DC6_B2BB_21E4FF12A640__INCLUDED_
  3 +
  4 +#if _MSC_VER > 1000
  5 +#pragma once
  6 +#endif // _MSC_VER > 1000
  7 +// Choosedbdlg.h : header file
  8 +//
  9 +
  10 +/////////////////////////////////////////////////////////////////////////////
  11 +// CChoosedbdlg dialog
  12 +
  13 +class CChoosedbdlg : public CDialog
  14 +{
  15 +// Construction
  16 +public:
  17 + CChoosedbdlg(CWnd* pParent = NULL); // standard constructor
  18 +
  19 +// Dialog Data
  20 + //{{AFX_DATA(CChoosedbdlg)
  21 + enum { IDD = IDD_FIRST_CHOOSE_DB };
  22 + CString my_str_ap_path;
  23 + CString my_str_bp_path;
  24 + CString myversion;
  25 + //}}AFX_DATA
  26 +
  27 +
  28 +// Overrides
  29 + // ClassWizard generated virtual function overrides
  30 + //{{AFX_VIRTUAL(CChoosedbdlg)
  31 + protected:
  32 + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  33 + //}}AFX_VIRTUAL
  34 +
  35 +// Implementation
  36 +protected:
  37 +
  38 + // Generated message map functions
  39 + //{{AFX_MSG(CChoosedbdlg)
  40 + afx_msg void OnButton1();
  41 + afx_msg void OnButton4();
  42 + virtual BOOL OnInitDialog();
  43 + virtual void OnOK();
  44 + //}}AFX_MSG
  45 + DECLARE_MESSAGE_MAP()
  46 +};
  47 +
  48 +//{{AFX_INSERT_LOCATION}}
  49 +// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  50 +
  51 +#endif // !defined(AFX_CHOOSEDBDLG_H__22EAEAD5_3188_4DC6_B2BB_21E4FF12A640__INCLUDED_)
... ...
... ... @@ -932,10 +932,8 @@ void FeaturePhoneSN::ThreadMainEntryPoint()
932 932 EnableStartBTN(false);
933 933
934 934 SNThread_Init();
935   - UpdateProgress(0.05);
936 935
937 936 SetupMetaModeParameters();
938   - UpdateProgress(0.10);
939 937
940 938 EnableStartBTN(true);
941 939
... ... @@ -946,7 +944,6 @@ void FeaturePhoneSN::ThreadMainEntryPoint()
946 944 UpdateUIMsg("EnterModemMeta() : MetaResult = %s", ResultToString(MetaResult));
947 945 goto End;
948 946 }
949   - UpdateProgress(0.15);
950 947
951 948 UpdateUIMsg("Start load and init database...");
952 949 MetaResult = LoadModemDatabase(0);
... ... @@ -957,7 +954,6 @@ void FeaturePhoneSN::ThreadMainEntryPoint()
957 954 PopupMsgBox("Error", MB_OK|MB_ICONERROR, "LoadModemDatabase() : MetaResult = %s", ResultToString(MetaResult));
958 955 goto End;
959 956 }
960   - UpdateProgress(0.20);
961 957
962 958 /*
963 959 META_MISC_GetRID_r(m_hMauiMetaHandle, 5000, (unsigned char*)strChipID,16);
... ... @@ -969,7 +965,6 @@ void FeaturePhoneSN::ThreadMainEntryPoint()
969 965 */
970 966
971 967 EnableStartBTN(false);
972   - UpdateProgress(0.22);
973 968 UpdateUIMsg("Start loop write data to nvram...");
974 969 MetaResult = WriteNvramLoop();
975 970 if (MetaResult != META_SUCCESS)
... ... @@ -981,14 +976,13 @@ void FeaturePhoneSN::ThreadMainEntryPoint()
981 976 End:
982 977 if (m_bStopBeforeUSBInsert == true)
983 978 {
984   - UpdateProgress(0.0);
985 979 UpdateUIMsg("...");
986 980 }
987 981 else
988 982 {
989 983 if (bAnyOperationFail)
990 984 {
991   - m_Process->SendMessage(PBM_SETBARCOLOR, 0, RGB(255, 0, 0));
  985 +// m_Process->SendMessage(PBM_SETBARCOLOR, 0, RGB(255, 0, 0));
992 986 UpdateUICountResult(FAIL);
993 987 }
994 988 else
... ... @@ -1006,7 +1000,6 @@ End:
1006 1000
1007 1001 ExitModemMeta();
1008 1002
1009   - UpdateProgress(1.0);
1010 1003 }
1011 1004
1012 1005 EnableStartBTN(true);
... ...
... ... @@ -151,10 +151,9 @@ UINT SNBase::ThreadStaticEntryPoint(LPVOID pThis)
151 151
152 152 void SNBase::SetProgress()
153 153 {
154   - m_iProcessRange = 1000;
155   - m_Process->SetRange(0, m_iProcessRange);
156   - m_Process->SendMessage(PBM_SETBARCOLOR, 0, RGB(0, 0, 255));
157   - UpdateProgress(0.01);
  154 +//m_iProcessRange = 1000;
  155 +//m_Process->SetRange(0, m_iProcessRange);
  156 +//m_Process->SendMessage(PBM_SETBARCOLOR, 0, RGB(0, 0, 255));
158 157 }
159 158
160 159 int SNBase::UpdateUIMsg(const char * strMsg, ...)
... ... @@ -167,7 +166,7 @@ int SNBase::UpdateUIMsg(const char * strMsg, ...)
167 166 iRet = vsprintf(szBuf, strMsg, varg);
168 167 va_end(varg);
169 168
170   - g_pMainDlg->myloglist.AddString(strMsg);
  169 + g_pMainDlg->myloglist.SetCurSel(g_pMainDlg->myloglist.AddString(strMsg));
171 170
172 171 return iRet;
173 172 }
... ... @@ -205,14 +204,6 @@ void SNBase::UpdateUICountResult(WriteNvram_Status_e eWriteStatus)
205 204 g_pMainDlg->SetDlgItemText(IDC_COUNT_PASS, strPass);
206 205 g_pMainDlg->SetDlgItemText(IDC_COUNT_FAIL, strFail);
207 206
208   -#if 1
209   -
210   - g_pMainDlg->SetDlgItemText(IDC_RSLT_SW, g_pMainDlg->myrslt_sw);
211   - g_pMainDlg->SetDlgItemText(IDC_RSLT_CFT, g_pMainDlg->myrslt_cft);
212   - g_pMainDlg->SetDlgItemText(IDC_RSLT_SMT, g_pMainDlg->myrslt_smt);
213   - g_pMainDlg->SetDlgItemText(IDC_RSLT_QC, g_pMainDlg->myrslt_qc);
214   - g_pMainDlg->SetDlgItemText(IDC_RSLT_WRITE_IMEI, g_pMainDlg->myrslt_imei);
215   -#endif
216 207
217 208 UpdateMainDlgUI(true, eWriteStatus);
218 209 }
... ... @@ -236,16 +227,6 @@ void SNBase::UpdateMainDlgUI(bool bEnable, WriteNvram_Status_e eWriteStatus)
236 227
237 228 }
238 229
239   -void SNBase::UpdateProgress(double dPercent)
240   -{
241   - if (dPercent >= 1)
242   - {
243   - dPercent = 1;
244   - }
245   -
246   - int curPos = (int)(dPercent * m_iProcessRange);
247   - m_Process->SetPos(curPos);
248   -}
249 230
250 231 void SNBase::PopupMsgBox(const char* strTilte, UINT uType, const char* strMsg, ...)
251 232 {
... ... @@ -1279,8 +1260,8 @@ void SNBase::SNThread_Init()
1279 1260 //Get main dialog handle
1280 1261 //g_pMainDlg = (CSNWriterDlg*)g_MainDlgHandle;
1281 1262
1282   - m_Process = &(g_pMainDlg->m_ProgressSN);
1283   - SetProgress();
  1263 +// m_Process = &(g_pMainDlg->m_ProgressSN);
  1264 +// SetProgress();
1284 1265
1285 1266 m_bNeedBackupIMEI = false;
1286 1267 memset(m_strBackupIMEI, 0, IMEI_ARRAY_LEN);
... ...
... ... @@ -98,7 +98,6 @@ protected:
98 98 virtual META_RESULT WriteNvramLoop() = 0;
99 99
100 100 virtual META_RESULT LoadModemDatabase(int MDindex) = 0;
101   - virtual void UpdateProgress(double dPercent);
102 101 virtual void SetProgress();
103 102
104 103 virtual META_RESULT ConductBarcodeData(char *pOutData, unsigned short RID_para, char *pInDatabuf, int bufSize);
... ... @@ -138,7 +137,7 @@ public:
138 137 void EnableStartBTN(bool bEnable = true);
139 138
140 139 protected:
141   - CProgressCtrl *m_Process;
  140 +// CProgressCtrl *m_Process;
142 141 UINT m_iProcessRange;
143 142 bool m_bBackupNvramSuccess;
144 143 };
... ...
... ... @@ -802,7 +802,6 @@ META_RESULT SmartPhoneSN::WriteNvramLoop()
802 802 }
803 803 }
804 804
805   - UpdateProgress(fBeginProcess);
806 805 spStage = spNextStage;
807 806 }
808 807
... ... @@ -4121,7 +4120,6 @@ SPMETA_DLL::META_RESULT SmartPhoneSN::EnterAPMetaMode()
4121 4120 if (!g_sMetaComm.bAlreadyInMeata)
4122 4121 {
4123 4122 UpdateUIMsg("Start searching preloader com port and handshake...");
4124   - UpdateProgress(0.08);
4125 4123
4126 4124 bootResult = ConnectWithPreloader();
4127 4125 if (bootResult != 0)
... ... @@ -4139,14 +4137,11 @@ SPMETA_DLL::META_RESULT SmartPhoneSN::EnterAPMetaMode()
4139 4137 else
4140 4138 {
4141 4139 UpdateUIMsg("Already in Meta Mode, bypass preloader com port handshake.");
4142   - UpdateProgress(0.08);
4143 4140 }
4144 4141
4145 4142 UpdateUIMsg("Start searching kernel com port and handshake...");
4146   - UpdateProgress(0.10);
4147 4143
4148 4144 bootResult = ConnectWithKernelPort_Ex();
4149   - UpdateProgress(0.12);
4150 4145 if (bootResult == 0)
4151 4146 {
4152 4147 UpdateUIMsg("Searching kernel com port and handshake OK.");
... ... @@ -4371,7 +4366,6 @@ void SmartPhoneSN::ThreadMainEntryPoint()
4371 4366
4372 4367 UpdateUIMsg("Start load and init AP database...");
4373 4368
4374   - UpdateProgress(0.06);
4375 4369
4376 4370 if (g_sMetaComm.bUsbEnable)
4377 4371 {
... ... @@ -4527,7 +4521,6 @@ void SmartPhoneSN::ThreadMainEntryPoint()
4527 4521 {
4528 4522 UpdateUIMsg("Start switch to MD meta and init Modem database...");
4529 4523
4530   - UpdateProgress(0.14);
4531 4524
4532 4525 if (!g_sMetaComm.sDBFileOption.bDBInitModem_1 && g_sMetaComm.sDBFileOption.bMDDBFromDUT)
4533 4526 {
... ... @@ -4539,7 +4532,6 @@ void SmartPhoneSN::ThreadMainEntryPoint()
4539 4532 MTRACE(g_hEBOOT_DEBUG, "SmartPhoneSN::GetMDDBFromDUT() : end.");
4540 4533 }
4541 4534
4542   - UpdateProgress(0.18);
4543 4535
4544 4536 MTRACE(g_hEBOOT_DEBUG, "SmartPhoneSN::ApSwithToModemMeta_Ex(): Switch to MODEM meta from AP meta start...");
4545 4537 MetaResult = APSwithToModemMeta_Ex();
... ... @@ -4563,7 +4555,6 @@ void SmartPhoneSN::ThreadMainEntryPoint()
4563 4555 }
4564 4556 MTRACE(g_hEBOOT_DEBUG, "SmartPhoneSN::LoadModemDatabase(): end.");
4565 4557 }
4566   - UpdateProgress(0.22);
4567 4558
4568 4559 EnableStartBTN(false);
4569 4560 UpdateUIMsg("Start loop write data to nvram...");
... ... @@ -4577,7 +4568,6 @@ void SmartPhoneSN::ThreadMainEntryPoint()
4577 4568 End:
4578 4569 if (m_bStopBeforeUSBInsert == true)
4579 4570 {
4580   - UpdateProgress(0.0);
4581 4571 UpdateUIMsg("...");
4582 4572 }
4583 4573 else
... ... @@ -4604,7 +4594,7 @@ End:
4604 4594
4605 4595 if (bAnyOperationFail)
4606 4596 {
4607   - m_Process->SendMessage(PBM_SETBARCOLOR, 0, RGB(255, 0, 0));
  4597 +// m_Process->SendMessage(PBM_SETBARCOLOR, 0, RGB(255, 0, 0));
4608 4598 UpdateUICountResult(FAIL);
4609 4599 }
4610 4600 else
... ... @@ -4621,7 +4611,6 @@ End:
4621 4611 UpdateUICountResult(PASS);
4622 4612 }
4623 4613
4624   - UpdateProgress(1.0);
4625 4614 }
4626 4615
4627 4616 EnableStartBTN(true);
... ... @@ -5068,7 +5057,6 @@ META_RESULT SmartPhoneSN::EnterC2KGen90()
5068 5057 MTRACE_ERR(g_hEBOOT_DEBUG, "[C2K] can not find C2K modem.");
5069 5058 return META_FAILED;
5070 5059 }
5071   - UpdateProgress(0.14);
5072 5060
5073 5061
5074 5062 // init c2k
... ... @@ -5103,7 +5091,6 @@ META_RESULT SmartPhoneSN::EnterC2KGen90()
5103 5091 }
5104 5092 bInited = true; // inited
5105 5093 MTRACE (g_hEBOOT_DEBUG, "[C2K] META_C2K_Init() end...");
5106   - UpdateProgress(0.18);
5107 5094
5108 5095
5109 5096 // connect to c2k
... ... @@ -5144,16 +5131,13 @@ META_RESULT SmartPhoneSN::EnterC2KGen90()
5144 5131 {
5145 5132 UpdateUIMsg("META_C2K_LoadMessage_r() : fail, %s", META_C2K_GetErrorString(m_hMauiMetaHandle));
5146 5133 MTRACE_ERR(g_hEBOOT_DEBUG, "[C2K] META_C2K_LoadMessage_r() : fail, %s", META_C2K_GetErrorString(m_hMauiMetaHandle));
5147   - UpdateProgress(1.00);
5148 5134 goto end;
5149 5135 }
5150 5136 UpdateUIMsg("META_C2K_LoadMessage_r() : successful!");
5151 5137 MTRACE (g_hEBOOT_DEBUG, "[C2K] META_C2K_LoadMessage_r() : successful!");
5152   - UpdateProgress(0.28);
5153 5138 }
5154 5139
5155 5140 UpdateUIMsg("Start connect with C2K Meta...");
5156   - UpdateProgress(0.34);
5157 5141
5158 5142 MTRACE(g_hEBOOT_DEBUG, "[C2K] META_C2K_ConnectWithTarget_r() start...");
5159 5143 for (i = 0; i < 20; i++)
... ... @@ -5166,13 +5150,11 @@ META_RESULT SmartPhoneSN::EnterC2KGen90()
5166 5150 {
5167 5151 UpdateUIMsg("META_C2K_ConnectWithTarget_r() : fail, %s", META_C2K_GetErrorString(m_hMauiMetaHandle));
5168 5152 MTRACE_ERR(g_hEBOOT_DEBUG, "[C2K] META_C2K_ConnectWithTarget_r() : fail, %s", META_C2K_GetErrorString(m_hMauiMetaHandle));
5169   - UpdateProgress(1.00);
5170 5153 goto end;
5171 5154 }
5172 5155 bConnected = true; // connected
5173 5156 UpdateUIMsg("META_C2K_ConnectWithTarget_r() : successful!");
5174 5157 MTRACE(g_hEBOOT_DEBUG, "[C2K] META_C2K_ConnectWithTarget_r() : successful!");
5175   - UpdateProgress(0.48);
5176 5158
5177 5159
5178 5160 // handshake with c2k
... ... @@ -5186,10 +5168,8 @@ META_RESULT SmartPhoneSN::EnterC2KGen90()
5186 5168 {
5187 5169 UpdateUIMsg("META_C2K_LoopbackTest_r() : fail, %s", META_C2K_GetErrorString(m_hMauiMetaHandle));
5188 5170 MTRACE_ERR(g_hEBOOT_DEBUG, "[C2K] META_C2K_LoopbackTest_r() : fail, %s", META_C2K_GetErrorString(m_hMauiMetaHandle));
5189   - UpdateProgress(1.00);
5190 5171 goto end;
5191 5172 }
5192   - UpdateProgress(0.60);
5193 5173
5194 5174
5195 5175 // task
... ... @@ -5210,13 +5190,11 @@ META_RESULT SmartPhoneSN::EnterC2KGen90()
5210 5190 DisconnectC2KMeta();
5211 5191 DeinitC2KMeta();
5212 5192
5213   - UpdateProgress(1.00);
5214 5193
5215 5194 goto end;
5216 5195 }
5217 5196 MTRACE(g_hEBOOT_DEBUG, "[C2K] META_C2K_FlushNvram_r() : Flaush NVRAM to Flash FFS successful!");
5218 5197 #endif
5219   - UpdateProgress(0.85);
5220 5198
5221 5199 end:
5222 5200 // disconnect
... ... @@ -5289,7 +5267,6 @@ end:
5289 5267 UpdateUIMsg("[C2K] Write MEID fail.");
5290 5268 else if (g_sMetaComm.sWriteOption.bWriteEsn)
5291 5269 UpdateUIMsg("[C2K] Write ESN fail.");
5292   - UpdateProgress(1.00);
5293 5270 }
5294 5271
5295 5272 return ret_last;
... ... @@ -5395,7 +5372,6 @@ int SmartPhoneSN::WriteMEID()
5395 5372 return ret_meta;
5396 5373 }
5397 5374 MTRACE(g_hEBOOT_DEBUG, "[C2K] META_C2K_WriteNvram_r() : Write MEID end.");
5398   - UpdateProgress(0.70);
5399 5375
5400 5376
5401 5377 UpdateUIMsg("Read MEID for check start...");
... ... @@ -5409,7 +5385,6 @@ int SmartPhoneSN::WriteMEID()
5409 5385 MTRACE_ERR(g_hEBOOT_DEBUG, "[C2K] META_C2K_ReadNvram_r(): Read MEID fail, %s", META_C2K_GetErrorString(m_hMauiMetaHandle));
5410 5386 return ret_meta;
5411 5387 }
5412   - UpdateProgress(0.75);
5413 5388
5414 5389 MTRACE(g_hEBOOT_DEBUG, "[C2K] Write MEID :%s", g_sMetaComm.sScanData.strMeid);
5415 5390 MTRACE(g_hEBOOT_DEBUG, "[C2K] Read MEID :%s", data_meid.meid);
... ... @@ -5421,7 +5396,6 @@ int SmartPhoneSN::WriteMEID()
5421 5396 }
5422 5397 UpdateUIMsg("Checking MEID succesfully!");
5423 5398 MTRACE(g_hEBOOT_DEBUG, "[C2K] Checking MEID succesfully!");
5424   - UpdateProgress(0.80);
5425 5399
5426 5400 return META_SUCCESS;
5427 5401 }
... ... @@ -5451,7 +5425,6 @@ int SmartPhoneSN::WriteESN()
5451 5425 }
5452 5426 UpdateUIMsg("META_C2K_WriteNvram_r() : Write ESN succesful!");
5453 5427 MTRACE(g_hEBOOT_DEBUG, "[C2K] META_C2K_WriteNvram_r() : Write ESN succesful!");
5454   - UpdateProgress(0.70);
5455 5428
5456 5429 UpdateUIMsg("Read ESN for check start...");
5457 5430 MTRACE(g_hEBOOT_DEBUG, "[C2K] Read ESN for check start...");
... ... @@ -5475,7 +5448,6 @@ int SmartPhoneSN::WriteESN()
5475 5448 }
5476 5449 UpdateUIMsg("Checking Esn Successfully!");
5477 5450 MTRACE(g_hEBOOT_DEBUG, "[C2K] Checking ESN successfully!");
5478   - UpdateProgress(0.80);
5479 5451
5480 5452 return META_SUCCESS;
5481 5453 }
... ...
... ... @@ -214,6 +214,10 @@ SOURCE=.\Form\AutoGen\autogendlg.cpp
214 214 # End Group
215 215 # Begin Source File
216 216
  217 +SOURCE=.\Choosedbdlg.cpp
  218 +# End Source File
  219 +# Begin Source File
  220 +
217 221 SOURCE=.\Encryption.cpp
218 222 # End Source File
219 223 # Begin Source File
... ... @@ -467,6 +471,10 @@ SOURCE=.\Form\AutoGen\autogendlg.h
467 471 # End Group
468 472 # Begin Source File
469 473
  474 +SOURCE=.\Choosedbdlg.h
  475 +# End Source File
  476 +# Begin Source File
  477 +
470 478 SOURCE=.\Encryption.h
471 479 # End Source File
472 480 # Begin Source File
... ...
... ... @@ -13,6 +13,60 @@
13 13 #undef APSTUDIO_READONLY_SYMBOLS
14 14
15 15 /////////////////////////////////////////////////////////////////////////////
  16 +// Chinese (P.R.C.) resources
  17 +
  18 +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
  19 +#ifdef _WIN32
  20 +LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
  21 +#pragma code_page(936)
  22 +#endif //_WIN32
  23 +
  24 +/////////////////////////////////////////////////////////////////////////////
  25 +//
  26 +// Dialog
  27 +//
  28 +
  29 +IDD_FIRST_CHOOSE_DB DIALOG DISCARDABLE 0, 0, 271, 153
  30 +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
  31 +CAPTION "Please choose DB file"
  32 +FONT 10, "System"
  33 +BEGIN
  34 + PUSHBUTTON "Button1",IDC_BUTTON1,230,21,32,14
  35 + PUSHBUTTON "Button1",IDC_BUTTON4,230,59,32,14
  36 + EDITTEXT IDC_EDT_VERSION,4,102,254,14,ES_AUTOHSCROLL
  37 + DEFPUSHBUTTON "OK",IDOK,73,125,50,14
  38 + PUSHBUTTON "Cancel",IDCANCEL,148,126,50,14
  39 + EDITTEXT IDC_EDIT1,7,21,205,14,ES_AUTOHSCROLL
  40 + EDITTEXT IDC_EDIT2,7,59,205,14,ES_AUTOHSCROLL
  41 + GROUPBOX "AP file path",IDC_STATIC,1,0,270,40
  42 + GROUPBOX "BP file path",IDC_STATIC,0,46,270,40
  43 + GROUPBOX "Static",IDC_STATIC,0,90,271,33
  44 +END
  45 +
  46 +
  47 +/////////////////////////////////////////////////////////////////////////////
  48 +//
  49 +// DESIGNINFO
  50 +//
  51 +
  52 +#ifdef APSTUDIO_INVOKED
  53 +GUIDELINES DESIGNINFO DISCARDABLE
  54 +BEGIN
  55 + IDD_FIRST_CHOOSE_DB, DIALOG
  56 + BEGIN
  57 + LEFTMARGIN, 7
  58 + RIGHTMARGIN, 264
  59 + TOPMARGIN, 7
  60 + BOTTOMMARGIN, 146
  61 + END
  62 +END
  63 +#endif // APSTUDIO_INVOKED
  64 +
  65 +#endif // Chinese (P.R.C.) resources
  66 +/////////////////////////////////////////////////////////////////////////////
  67 +
  68 +
  69 +/////////////////////////////////////////////////////////////////////////////
16 70 // English (U.S.) resources
17 71
18 72 #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
... ... @@ -268,56 +322,39 @@ BEGIN
268 322 LTEXT "......",IDC_PWD_MSG,7,50,273,23
269 323 END
270 324
271   -IDD_SNWRITER_DIALOG DIALOGEX 0, 0, 486, 251
  325 +IDD_SNWRITER_DIALOG DIALOGEX 0, 0, 299, 250
272 326 STYLE DS_MODALFRAME | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION |
273 327 WS_SYSMENU
274   -EXSTYLE WS_EX_CLIENTEDGE | WS_EX_APPWINDOW
  328 +EXSTYLE WS_EX_APPWINDOW
275 329 CAPTION "SN Writer"
276 330 FONT 9, "΢ÈíÑźÚ"
277 331 BEGIN
278   - EDITTEXT IDC_COUNT_TOTAL,198,139,38,13,ES_AUTOHSCROLL |
279   - ES_READONLY
280   - DEFPUSHBUTTON "Config",IDC_BTN_SYSCONFIG,63,214,30,12
281   - DEFPUSHBUTTON "Start",IDC_BTN_START,11,214,30,12
282   - DEFPUSHBUTTON "Quit",IDC_BTN_QUIT,119,214,30,12
283   - EDITTEXT IDC_COUNT_PASS,198,163,38,13,ES_AUTOHSCROLL |
284   - ES_READONLY
285   - EDITTEXT IDC_COUNT_FAIL,198,187,38,13,ES_AUTOHSCROLL |
286   - ES_READONLY
287   - LTEXT "Total:",IDC_STATIC,166,139,27,10
288   - LTEXT "Pass:",IDC_STATIC_PASS,166,163,27,10
289   - CONTROL "Progress1",IDC_PROGRESS_SN,"msctls_progress32",
290   - WS_BORDER,2,229,268,10
291   - LTEXT "Fail:",IDC_STATIC,166,187,27,10
292   - COMBOBOX IDC_COMBO_COMPORT,180,209,34,51,CBS_DROPDOWNLIST |
293   - CBS_SORT | WS_VSCROLL | WS_TABSTOP
294   - LTEXT "SW Version",IDC_STATIC,6,12,48,9
295   - EDITTEXT IDC_EDT_VERSION,56,10,182,13,ES_AUTOHSCROLL
296   - PUSHBUTTON "Save",IDC_BT_SAVE_SWVER,246,10,44,15
297   - LTEXT "BP DB",IDC_STATIC,14,55,20,9
298   - LTEXT "AP DB",IDC_STATIC,14,41,20,9
299   - EDITTEXT IDC_STR_AP_PATH,38,38,197,13,ES_AUTOHSCROLL |
300   - ES_READONLY
301   - EDITTEXT IDC_STR_BP_PATH,38,54,197,13,ES_AUTOHSCROLL |
302   - ES_READONLY
303   - PUSHBUTTON "Select",IDC_BTN_AP_PATH,240,40,44,12
304   - PUSHBUTTON "Select",IDC_BTN_BP_PATH,240,55,44,12
305   - GROUPBOX "",IDC_STATIC,6,28,285,44
306   - CONTROL 133,IDC_BITMAP_RESAULT,"Static",SS_BITMAP,154,84,93,45
307   - LTEXT "SW",IDC_STATIC,6,91,11,9
308   - LTEXT "CFT",IDC_STATIC,5,115,12,9
309   - LTEXT "SMT MMI",IDC_STATIC,5,139,30,9
310   - LTEXT "IMEI",IDC_STATIC,5,187,32,9
311   - LTEXT "QC1",IDC_STATIC,5,163,13,9
312   - EDITTEXT IDC_RSLT_SW,47,91,104,15,ES_AUTOHSCROLL | ES_READONLY
313   - EDITTEXT IDC_RSLT_CFT,47,115,104,15,ES_AUTOHSCROLL | ES_READONLY
314   - EDITTEXT IDC_RSLT_SMT,47,139,104,13,ES_AUTOHSCROLL | ES_READONLY
315   - EDITTEXT IDC_RSLT_QC,47,163,82,15,ES_AUTOHSCROLL | ES_READONLY
316   - EDITTEXT IDC_RSLT_WRITE_IMEI,47,187,82,15,ES_AUTOHSCROLL |
317   - ES_READONLY
318   - GROUPBOX "Test Result",IDC_STATIC,2,78,285,131
319   - LISTBOX IDC_LOG_LIST,293,1,193,249,LBS_NOINTEGRALHEIGHT | NOT
  332 + EDITTEXT IDC_IMEI1_FROM_SCAN,44,15,109,12,ES_AUTOHSCROLL
  333 + EDITTEXT IDC_IMEI2_FROM_SCAN,44,33,109,12,ES_AUTOHSCROLL
  334 + DEFPUSHBUTTON "Start",IDC_BTN_START,169,16,103,25,BS_CENTER |
  335 + BS_VCENTER
  336 + DEFPUSHBUTTON "",IDC_BTN_SYSCONFIG,262,62,9,8,NOT WS_VISIBLE
  337 + DEFPUSHBUTTON "",IDC_BTN_QUIT,262,71,9,8,NOT WS_VISIBLE
  338 + LTEXT "Total:",IDC_STATIC,7,105,27,8
  339 + LTEXT "Pass:",IDC_STATIC_PASS,103,105,27,10
  340 + LTEXT "Fail:",IDC_STATIC,200,105,27,10
  341 + COMBOBOX IDC_COMBO_COMPORT,262,83,16,51,CBS_DROPDOWNLIST |
  342 + CBS_SORT | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP
  343 + CONTROL 133,IDC_BITMAP_RESAULT,"Static",SS_BITMAP,167,56,93,45
  344 + GROUPBOX "IMEI form Scan",IDC_STATIC,0,2,282,45
  345 + LISTBOX IDC_LOG_LIST,0,118,293,133,LBS_NOINTEGRALHEIGHT | NOT
320 346 WS_BORDER | WS_VSCROLL | WS_TABSTOP
  347 + LTEXT "",IDC_COUNT_TOTAL,35,105,29,8,SS_SUNKEN
  348 + LTEXT "",IDC_COUNT_PASS,143,105,32,8,SS_SUNKEN
  349 + LTEXT "",IDC_COUNT_FAIL,241,105,37,8,SS_SUNKEN
  350 + LTEXT "IMEI1",IDC_STATIC,8,15,20,12,SS_CENTERIMAGE
  351 + LTEXT "IMEI2",IDC_STATIC,8,33,20,12,SS_CENTERIMAGE
  352 + GROUPBOX "IMEI from phone",IDC_STATIC,2,53,158,49
  353 + LTEXT "IMEI1",IDC_STATIC,10,65,20,12,SS_CENTERIMAGE
  354 + LTEXT "IMEI2",IDC_STATIC,10,84,20,12,SS_CENTERIMAGE
  355 + LTEXT "",IDC_STATIC,46,65,109,12,SS_SUNKEN
  356 + LTEXT "",IDC_STATIC,46,84,109,12,SS_CENTERIMAGE | SS_SUNKEN
  357 + DEFPUSHBUTTON "",IDOK,270,69,9,8,NOT WS_VISIBLE
321 358 END
322 359
323 360 IDD_SCANDATA_DIALOG DIALOGEX 0, 0, 236, 316
... ... @@ -555,9 +592,8 @@ BEGIN
555 592
556 593 IDD_SNWRITER_DIALOG, DIALOG
557 594 BEGIN
558   - RIGHTMARGIN, 178
559 595 TOPMARGIN, 7
560   - BOTTOMMARGIN, 239
  596 + BOTTOMMARGIN, 238
561 597 END
562 598
563 599 IDD_SCANDATA_DIALOG, DIALOG
... ...
... ... @@ -16,6 +16,7 @@
16 16 #include "AutoGenDlg.h"
17 17 #include "HdcpEncryption.h"
18 18 #include "spmeta.h"
  19 +#include "Choosedbdlg.h"
19 20
20 21 #ifdef _DEBUG
21 22 #define new DEBUG_NEW
... ... @@ -88,14 +89,13 @@ CSNWriterDlg::CSNWriterDlg(CWnd* pParent /*=NULL*/)
88 89 m_strTotal = _T("");
89 90 m_strPass = _T("");
90 91 m_strFail = _T("");
91   - myversion = _T("");
92   - my_str_ap_path = _T("");
93   - my_str_bp_path = _T("");
94 92 myrslt_qc = _T("");
95 93 myrslt_smt = _T("");
96 94 myrslt_cft = _T("");
97 95 myrslt_sw = _T("");
98 96 myrslt_imei = _T("");
  97 + myscanimei1 = _T("");
  98 + myscanimei2 = _T("");
99 99 //}}AFX_DATA_INIT
100 100 // Note that LoadIcon does not require a subsequent DestroyIcon in Win32
101 101 m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
... ... @@ -105,21 +105,16 @@ void CSNWriterDlg::DoDataExchange(CDataExchange* pDX)
105 105 {
106 106 CDialog::DoDataExchange(pDX);
107 107 //{{AFX_DATA_MAP(CSNWriterDlg)
  108 + DDX_Control(pDX, IDC_IMEI2_FROM_SCAN, myctrlscan2);
  109 + DDX_Control(pDX, IDC_IMEI1_FROM_SCAN, myctrlscan1);
108 110 DDX_Control(pDX, IDC_LOG_LIST, myloglist);
109 111 DDX_Control(pDX, IDC_BITMAP_RESAULT, myctrlbit);
110 112 DDX_Control(pDX, IDC_COMBO_COMPORT, m_cComPortBox);
111   - DDX_Control(pDX, IDC_PROGRESS_SN, m_ProgressSN);
112 113 DDX_Text(pDX, IDC_COUNT_TOTAL, m_strTotal);
113 114 DDX_Text(pDX, IDC_COUNT_PASS, m_strPass);
114 115 DDX_Text(pDX, IDC_COUNT_FAIL, m_strFail);
115   - DDX_Text(pDX, IDC_EDT_VERSION, myversion);
116   - DDX_Text(pDX, IDC_STR_AP_PATH, my_str_ap_path);
117   - DDX_Text(pDX, IDC_STR_BP_PATH, my_str_bp_path);
118   - DDX_Text(pDX, IDC_RSLT_QC, myrslt_qc);
119   - DDX_Text(pDX, IDC_RSLT_SMT, myrslt_smt);
120   - DDX_Text(pDX, IDC_RSLT_CFT, myrslt_cft);
121   - DDX_Text(pDX, IDC_RSLT_SW, myrslt_sw);
122   - DDX_Text(pDX, IDC_RSLT_WRITE_IMEI, myrslt_imei);
  116 + DDX_Text(pDX, IDC_IMEI1_FROM_SCAN, myscanimei1);
  117 + DDX_Text(pDX, IDC_IMEI2_FROM_SCAN, myscanimei2);
123 118 //}}AFX_DATA_MAP
124 119
125 120
... ... @@ -139,7 +134,6 @@ BEGIN_MESSAGE_MAP(CSNWriterDlg, CDialog)
139 134 ON_BN_CLICKED(IDC_BTN_START, OnBtnStart)
140 135 ON_BN_CLICKED(IDC_BTN_QUIT, OnBtnQuit)
141 136 ON_BN_CLICKED(IDC_BTN_SYSCONFIG, OnBtnSysconfig)
142   - ON_CBN_SELCHANGE(IDC_COMBO_COMPORT, OnSelchangeComboComport)
143 137 ON_WM_CTLCOLOR()
144 138 ON_COMMAND(IDR_ABOUT_SN, OnAboutSn)
145 139 ON_COMMAND(IDR_ATCMD_MODE, OnAtcmdMode)
... ... @@ -166,9 +160,9 @@ BEGIN_MESSAGE_MAP(CSNWriterDlg, CDialog)
166 160 ON_COMMAND(IDR_BACKNV_TOPC, OnBacknvTopc)
167 161 ON_COMMAND(IDR_OEM_LOCK, OnFastbootOemLock)
168 162 ON_BN_CLICKED(IDC_BT_SAVE_SWVER, OnBtSaveSwver)
169   - ON_BN_CLICKED(IDC_BTN_AP_PATH, OnBtnApPath)
170   - ON_BN_CLICKED(IDC_BTN_BP_PATH, OnBtnBpPath)
171   - ON_WM_SYSCOMMAND()
  163 + ON_EN_SETFOCUS(IDC_IMEI2_FROM_SCAN, OnSetfocusImei2FromScan)
  164 + ON_WM_SYSCOMMAND()
  165 + ON_EN_SETFOCUS(IDC_IMEI1_FROM_SCAN, OnSetfocusImei1FromScan)
172 166 //}}AFX_MSG_MAP
173 167 END_MESSAGE_MAP()
174 168
... ... @@ -208,7 +202,7 @@ BOOL CSNWriterDlg::OnInitDialog()
208 202 //g_MainDlgHandle = (DWORD)this;
209 203
210 204 m_SNMenu.LoadMenu(IDR_SN_MENU);
211   - m_hSNMenu = m_SNMenu.GetSafeHmenu();
  205 + //m_hSNMenu = m_SNMenu.GetSafeHmenu();
212 206
213 207 #ifdef _LOAD_SKIN_
214 208 skinppSetDrawMenu(m_hSNMenu, TRUE);
... ... @@ -230,6 +224,16 @@ BOOL CSNWriterDlg::OnInitDialog()
230 224 // Get main dialog handle
231 225 g_pMainDlg = (CSNWriterDlg*)this;
232 226 ParameterInit();
  227 + CChoosedbdlg choosedlg;
  228 + if (choosedlg.DoModal() == IDOK)
  229 + {
  230 +// myctrlscan1.SetFocus();
  231 + GetDlgItem(IDC_IMEI2_FROM_SCAN)->SetFocus();
  232 + }
  233 + else
  234 + {
  235 + CDialog::OnCancel();
  236 + }
233 237 myctrlbit.ShowWindow(SW_HIDE);
234 238 m_cComPortBox.ShowWindow(SW_HIDE);
235 239
... ... @@ -413,20 +417,15 @@ void CSNWriterDlg::EnableUIItem()
413 417 // GetDlgItem(IDC_MAINUI_TEMP2)->ShowWindow(FALSE);
414 418
415 419 SetDlgItemText(IDC_BTN_START, "Start");
416   - myversion = CString(g_sMetaComm.check_sw_ver);
417   - my_str_ap_path = CString(g_sMetaComm.sDBFileOption.strAPDbpath);
418   - my_str_bp_path = CString(g_sMetaComm.sDBFileOption.strMD1Dbpath);
419   - GetDlgItem(IDC_EDT_VERSION)->SetWindowText(myversion);
420   - GetDlgItem(IDC_STR_AP_PATH)->SetWindowText(my_str_ap_path);
421   - GetDlgItem(IDC_STR_BP_PATH)->SetWindowText(my_str_bp_path);
422   - //
  420 +
  421 +
423 422 //UpdateData(FALSE);
424 423 }
425 424
426 425 void CSNWriterDlg::DisableUIItem()
427 426 {
428 427 GetDlgItem(IDC_BTN_SYSCONFIG)->EnableWindow(FALSE);
429   - GetDlgItem(IDC_COMBO_COMPORT)->EnableWindow(FALSE);
  428 +// GetDlgItem(IDC_COMBO_COMPORT)->EnableWindow(FALSE);
430 429 m_SNMenu.EnableMenuItem( 0, MF_GRAYED | MF_DISABLED | MF_BYPOSITION );
431 430 m_SNMenu.EnableMenuItem( 1, MF_GRAYED | MF_DISABLED | MF_BYPOSITION );
432 431 m_SNMenu.EnableMenuItem( 2, MF_GRAYED | MF_DISABLED | MF_BYPOSITION );
... ... @@ -598,17 +597,6 @@ HCURSOR CSNWriterDlg::OnQueryDragIcon()
598 597
599 598 void CSNWriterDlg::OnBtnStart()
600 599 {
601   - // TODO: Add your control notification handler code here
602   -// OnSelchangeComboTargetType();
603   - if (my_str_ap_path== "" ||my_str_bp_path== "")
604   - {
605   - MessageBox("请指定DB文件");
606   - return;
607   - }
608   - if (myversion == "")
609   - {
610   - MessageBox("请输入版本号");
611   - }
612 600 OnSelchangeComboComport();
613 601 E_TARGET_TYPE eTargetType = GetTargetType();
614 602
... ... @@ -1083,47 +1071,29 @@ void CSNWriterDlg::OnOptionCheckQcFlag()
1083 1071
1084 1072 void CSNWriterDlg::OnBtSaveSwver()
1085 1073 {
1086   - UpdateData(TRUE);
1087   - memset(g_sMetaComm.check_sw_ver,0x0,sizeof(g_sMetaComm.check_sw_ver));
1088   - memcpy(g_sMetaComm.check_sw_ver,myversion.GetBuffer(myversion.GetLength()),myversion.GetLength());
1089   - SaveParaToSetupFile();
1090 1074 }
1091 1075
1092   -void CSNWriterDlg::OnBtnApPath()
1093   -{
1094   - char szFilter[]="Database files(*.*)|*.*";
1095   - CFileDialog dlg(TRUE, NULL, NULL,
1096   - OFN_FILEMUSTEXIST|OFN_EXPLORER|OFN_ENABLESIZING|0x10000000/*OFN_FORCESHOWHIDDEN*/,
1097   - szFilter, this);
1098   - dlg.m_ofn.lpstrTitle = _T("Select Modem_1 database file...");
1099   - if(dlg.DoModal() == IDOK)
1100   - {
1101   - g_sMetaComm.sDBFileOption.bDBInitModem_1 = false;
1102   - my_str_ap_path = dlg.GetPathName();
1103   - }
1104   - UpdateData(FALSE);
1105   - strcpy(g_sMetaComm.sDBFileOption.strAPDbpath,my_str_ap_path.GetBuffer(my_str_ap_path.GetLength()));
1106 1076
1107 1077
1108 1078
  1079 +void CSNWriterDlg::OnOK()
  1080 +{
  1081 + if (GetFocus() == GetDlgItem(IDC_IMEI1_FROM_SCAN))
  1082 + {
  1083 + myctrlscan2.SetFocus();
  1084 + }
  1085 + else
  1086 + {
  1087 + GetDlgItem(IDC_BTN_START)->SetFocus();
  1088 + }
  1089 +
1109 1090 }
1110 1091
1111   -void CSNWriterDlg::OnBtnBpPath()
  1092 +void CSNWriterDlg::OnSetfocusImei2FromScan()
1112 1093 {
1113   - char szFilter[]="Database files(*.*)|*.*";
1114   - CFileDialog dlg(TRUE, NULL, NULL,
1115   - OFN_FILEMUSTEXIST|OFN_EXPLORER|OFN_ENABLESIZING|0x10000000/*OFN_FORCESHOWHIDDEN*/,
1116   - szFilter, this);
1117   - dlg.m_ofn.lpstrTitle = _T("Select Modem_1 database file...");
1118   - if(dlg.DoModal() == IDOK)
1119   - {
1120   - g_sMetaComm.sDBFileOption.bDBInitModem_1 = false;
1121   - my_str_bp_path = dlg.GetPathName();
1122   - }
1123   - UpdateData(FALSE);
1124   -
1125   - strcpy(g_sMetaComm.sDBFileOption.strMD1Dbpath,my_str_bp_path.GetBuffer(my_str_bp_path.GetLength()));
1126   -
1127 1094 }
1128 1095
1129   -
  1096 +void CSNWriterDlg::OnSetfocusImei1FromScan()
  1097 +{
  1098 +
  1099 +}
... ...
... ... @@ -27,22 +27,22 @@ public:
27 27 // Dialog Data
28 28 //{{AFX_DATA(CSNWriterDlg)
29 29 enum { IDD = IDD_SNWRITER_DIALOG };
  30 + CEdit myctrlscan2;
  31 + CEdit myctrlscan1;
30 32 CListBox myloglist;
31 33 CStatic myctrlbit;
32 34 CComboBox m_cTargetTypeBox;
33 35 CComboBox m_cComPortBox;
34   - CProgressCtrl m_ProgressSN;
35 36 CString m_strTotal;
36 37 CString m_strPass;
37 38 CString m_strFail;
38   - CString myversion;
39   - CString my_str_ap_path;
40   - CString my_str_bp_path;
41 39 CString myrslt_qc;
42 40 CString myrslt_smt;
43 41 CString myrslt_cft;
44 42 CString myrslt_sw;
45 43 CString myrslt_imei;
  44 + CString myscanimei1;
  45 + CString myscanimei2;
46 46 //}}AFX_DATA
47 47
48 48 // ClassWizard generated virtual function overrides
... ... @@ -93,8 +93,9 @@ protected:
93 93 afx_msg void OnBacknvTopc();
94 94 afx_msg void OnFastbootOemLock();
95 95 afx_msg void OnBtSaveSwver();
96   - afx_msg void OnBtnApPath();
97   - afx_msg void OnBtnBpPath();
  96 + virtual void OnOK();
  97 + afx_msg void OnSetfocusImei2FromScan();
  98 + afx_msg void OnSetfocusImei1FromScan();
98 99 //}}AFX_MSG
99 100 DECLARE_MESSAGE_MAP()
100 101
... ...
... ... @@ -19,6 +19,7 @@
19 19 #define IDB_BITMAP_LOGO 148
20 20 #define IDI_ICON1 154
21 21 #define IDD_ENCRYPTION_DIALOG 155
  22 +#define IDD_FIRST_CHOOSE_DB 158
22 23 #define IDC_COUNT_TOTAL 1000
23 24 #define IDC_BTN_SYSCONFIG 1001
24 25 #define IDC_BTN_START 1002
... ... @@ -211,6 +212,12 @@
211 212 #define IDC_BTN_LOG 1165
212 213 #define IDC_LOCK_OTP 1166
213 214 #define IDC_LOG_LIST 1170
  215 +#define IDC_IMEI1_FROM_SCAN 1171
  216 +#define IDC_IMEI2_FROM_SCAN 1172
  217 +#define IDC_EDIT1 1172
  218 +#define IDC_BUTTON1 1173
  219 +#define IDC_EDIT2 1174
  220 +#define IDC_BUTTON4 1175
214 221 #define IDR_OPTION_SWITCHTOOL 32772
215 222 #define IDR_OPTION_EXTMODEM 32773
216 223 #define IDR_OPTION_SECURITY_USB 32774
... ... @@ -240,9 +247,9 @@
240 247 //
241 248 #ifdef APSTUDIO_INVOKED
242 249 #ifndef APSTUDIO_READONLY_SYMBOLS
243   -#define _APS_NEXT_RESOURCE_VALUE 158
  250 +#define _APS_NEXT_RESOURCE_VALUE 159
244 251 #define _APS_NEXT_COMMAND_VALUE 32798
245   -#define _APS_NEXT_CONTROL_VALUE 1171
  252 +#define _APS_NEXT_CONTROL_VALUE 1177
246 253 #define _APS_NEXT_SYMED_VALUE 101
247 254 #endif
248 255 #endif
... ...
Please register or login to post a comment