Commit 2f166a553b19fdad035e16a1ab6939eacf4a0b8a
1 parent
d42d4044
当处于check imei模式时, 不需要调用system config, 只需要指定DB路径就可以了
Showing
5 changed files
with
187 additions
and
4 deletions
| @@ -20,6 +20,7 @@ | @@ -20,6 +20,7 @@ | ||
| 20 | #define IDI_ICON1 154 | 20 | #define IDI_ICON1 154 |
| 21 | #define IDD_ENCRYPTION_DIALOG 155 | 21 | #define IDD_ENCRYPTION_DIALOG 155 |
| 22 | #define IDD_CHECK_WORKMODE 157 | 22 | #define IDD_CHECK_WORKMODE 157 |
| 23 | +#define IDD_DIALOG_DB_CHOOSE 160 | ||
| 23 | #define IDC_COUNT_TOTAL 1000 | 24 | #define IDC_COUNT_TOTAL 1000 |
| 24 | #define IDC_BTN_SYSCONFIG 1001 | 25 | #define IDC_BTN_SYSCONFIG 1001 |
| 25 | #define IDC_BTN_START 1002 | 26 | #define IDC_BTN_START 1002 |
| @@ -195,6 +196,10 @@ | @@ -195,6 +196,10 @@ | ||
| 195 | #define IDC_STR_SWVERSION 1167 | 196 | #define IDC_STR_SWVERSION 1167 |
| 196 | #define IDC_STATIC_SWVER 1169 | 197 | #define IDC_STATIC_SWVER 1169 |
| 197 | #define IDC_COMBO2 1172 | 198 | #define IDC_COMBO2 1172 |
| 199 | +#define IDC_EDIT1_AP_PATH 1173 | ||
| 200 | +#define IDC_BUTTONAP 1174 | ||
| 201 | +#define IDC_EDIT1_BP_PATH 1175 | ||
| 202 | +#define IDC_BUTTONBP 1176 | ||
| 198 | #define IDR_OPTION_SWITCHTOOL 32772 | 203 | #define IDR_OPTION_SWITCHTOOL 32772 |
| 199 | #define IDR_OPTION_EXTMODEM 32773 | 204 | #define IDR_OPTION_EXTMODEM 32773 |
| 200 | #define IDR_OPTION_SECURITY_USB 32774 | 205 | #define IDR_OPTION_SECURITY_USB 32774 |
| @@ -224,9 +229,9 @@ | @@ -224,9 +229,9 @@ | ||
| 224 | // | 229 | // |
| 225 | #ifdef APSTUDIO_INVOKED | 230 | #ifdef APSTUDIO_INVOKED |
| 226 | #ifndef APSTUDIO_READONLY_SYMBOLS | 231 | #ifndef APSTUDIO_READONLY_SYMBOLS |
| 227 | -#define _APS_NEXT_RESOURCE_VALUE 160 | 232 | +#define _APS_NEXT_RESOURCE_VALUE 161 |
| 228 | #define _APS_NEXT_COMMAND_VALUE 32798 | 233 | #define _APS_NEXT_COMMAND_VALUE 32798 |
| 229 | -#define _APS_NEXT_CONTROL_VALUE 1173 | 234 | +#define _APS_NEXT_CONTROL_VALUE 1175 |
| 230 | #define _APS_NEXT_SYMED_VALUE 101 | 235 | #define _APS_NEXT_SYMED_VALUE 101 |
| 231 | #endif | 236 | #endif |
| 232 | #endif | 237 | #endif |
| @@ -27,8 +27,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED | @@ -27,8 +27,7 @@ LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED | ||
| 27 | // | 27 | // |
| 28 | 28 | ||
| 29 | IDD_CHECK_WORKMODE DIALOG DISCARDABLE 0, 0, 145, 70 | 29 | IDD_CHECK_WORKMODE DIALOG DISCARDABLE 0, 0, 145, 70 |
| 30 | -STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||
| 31 | -CAPTION "Dialog" | 30 | +STYLE DS_MODALFRAME | WS_POPUP |
| 32 | FONT 14, "΢ÈíÑźÚ" | 31 | FONT 14, "΢ÈíÑźÚ" |
| 33 | BEGIN | 32 | BEGIN |
| 34 | DEFPUSHBUTTON "OK",IDOK,15,43,50,14 | 33 | DEFPUSHBUTTON "OK",IDOK,15,43,50,14 |
| @@ -38,6 +37,19 @@ BEGIN | @@ -38,6 +37,19 @@ BEGIN | ||
| 38 | LTEXT "please choose work station",IDC_STATIC,26,5,92,8 | 37 | LTEXT "please choose work station",IDC_STATIC,26,5,92,8 |
| 39 | END | 38 | END |
| 40 | 39 | ||
| 40 | +IDD_DIALOG_DB_CHOOSE DIALOG DISCARDABLE 0, 0, 292, 88 | ||
| 41 | +STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||
| 42 | +CAPTION "choose DB file" | ||
| 43 | +FONT 10, "΢ÈíÑźÚ" | ||
| 44 | +BEGIN | ||
| 45 | + DEFPUSHBUTTON "OK",IDOK,83,65,50,14 | ||
| 46 | + PUSHBUTTON "Cancel",IDCANCEL,158,65,50,14 | ||
| 47 | + EDITTEXT IDC_EDIT1_AP_PATH,10,16,204,14,ES_AUTOHSCROLL | ||
| 48 | + PUSHBUTTON "AP file",IDC_BUTTONAP,225,16,50,14 | ||
| 49 | + EDITTEXT IDC_EDIT1_BP_PATH,10,33,204,14,ES_AUTOHSCROLL | ||
| 50 | + PUSHBUTTON "BP file",IDC_BUTTONBP,225,33,50,14 | ||
| 51 | +END | ||
| 52 | + | ||
| 41 | 53 | ||
| 42 | ///////////////////////////////////////////////////////////////////////////// | 54 | ///////////////////////////////////////////////////////////////////////////// |
| 43 | // | 55 | // |
| @@ -54,6 +66,14 @@ BEGIN | @@ -54,6 +66,14 @@ BEGIN | ||
| 54 | TOPMARGIN, 7 | 66 | TOPMARGIN, 7 |
| 55 | BOTTOMMARGIN, 63 | 67 | BOTTOMMARGIN, 63 |
| 56 | END | 68 | END |
| 69 | + | ||
| 70 | + IDD_DIALOG_DB_CHOOSE, DIALOG | ||
| 71 | + BEGIN | ||
| 72 | + LEFTMARGIN, 7 | ||
| 73 | + RIGHTMARGIN, 285 | ||
| 74 | + TOPMARGIN, 7 | ||
| 75 | + BOTTOMMARGIN, 81 | ||
| 76 | + END | ||
| 57 | END | 77 | END |
| 58 | #endif // APSTUDIO_INVOKED | 78 | #endif // APSTUDIO_INVOKED |
| 59 | 79 |
| @@ -17,6 +17,9 @@ | @@ -17,6 +17,9 @@ | ||
| 17 | #include "AutoGenDlg.h" | 17 | #include "AutoGenDlg.h" |
| 18 | #include "HdcpEncryption.h" | 18 | #include "HdcpEncryption.h" |
| 19 | #include "chooseworkmode.h" | 19 | #include "chooseworkmode.h" |
| 20 | +#include "choose_db_file.h" | ||
| 21 | + | ||
| 22 | + | ||
| 20 | 23 | ||
| 21 | #ifdef _DEBUG | 24 | #ifdef _DEBUG |
| 22 | #define new DEBUG_NEW | 25 | #define new DEBUG_NEW |
| @@ -208,6 +211,19 @@ BOOL CSNWriterDlg::OnInitDialog() | @@ -208,6 +211,19 @@ BOOL CSNWriterDlg::OnInitDialog() | ||
| 208 | CDialog::OnCancel(); | 211 | CDialog::OnCancel(); |
| 209 | } | 212 | } |
| 210 | 213 | ||
| 214 | + | ||
| 215 | + | ||
| 216 | + if (g_topwell_workmode == TOPWELL_MODE_CHECK_IMEI) | ||
| 217 | + { | ||
| 218 | + Cchoose_db_file choosedb_dlg; | ||
| 219 | + if (choosedb_dlg.DoModal() == IDCANCEL) | ||
| 220 | + { | ||
| 221 | + CDialog::OnCancel(); | ||
| 222 | + } | ||
| 223 | + } | ||
| 224 | + | ||
| 225 | + | ||
| 226 | + | ||
| 211 | m_SNMenu.LoadMenu(IDR_SN_MENU); | 227 | m_SNMenu.LoadMenu(IDR_SN_MENU); |
| 212 | m_hSNMenu = m_SNMenu.GetSafeHmenu(); | 228 | m_hSNMenu = m_SNMenu.GetSafeHmenu(); |
| 213 | 229 |
choose_db_file.cpp
0 → 100644
| 1 | +// choose_db_file.cpp : implementation file | ||
| 2 | +// | ||
| 3 | + | ||
| 4 | +#include "stdafx.h" | ||
| 5 | +#include "sn writer.h" | ||
| 6 | +#include "choose_db_file.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 | +///////////////////////////////////////////////////////////////////////////// | ||
| 15 | +// Cchoose_db_file dialog | ||
| 16 | + | ||
| 17 | +extern META_Common_struct g_sMetaComm; | ||
| 18 | + | ||
| 19 | +Cchoose_db_file::Cchoose_db_file(CWnd* pParent /*=NULL*/) | ||
| 20 | + : CDialog(Cchoose_db_file::IDD, pParent) | ||
| 21 | +{ | ||
| 22 | + //{{AFX_DATA_INIT(Cchoose_db_file) | ||
| 23 | + mystr2_ap_path = _T(""); | ||
| 24 | + mystr2_bp_path = _T(""); | ||
| 25 | + //}}AFX_DATA_INIT | ||
| 26 | +} | ||
| 27 | + | ||
| 28 | + | ||
| 29 | +void Cchoose_db_file::DoDataExchange(CDataExchange* pDX) | ||
| 30 | +{ | ||
| 31 | + CDialog::DoDataExchange(pDX); | ||
| 32 | + //{{AFX_DATA_MAP(Cchoose_db_file) | ||
| 33 | + DDX_Text(pDX, IDC_EDIT1_AP_PATH, mystr2_ap_path); | ||
| 34 | + DDX_Text(pDX, IDC_EDIT1_BP_PATH, mystr2_bp_path); | ||
| 35 | + //}}AFX_DATA_MAP | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | + | ||
| 39 | +BEGIN_MESSAGE_MAP(Cchoose_db_file, CDialog) | ||
| 40 | + //{{AFX_MSG_MAP(Cchoose_db_file) | ||
| 41 | + ON_BN_CLICKED(IDC_BUTTONAP, OnButtonap) | ||
| 42 | + ON_BN_CLICKED(IDC_BUTTONBP, OnButtonbp) | ||
| 43 | + //}}AFX_MSG_MAP | ||
| 44 | +END_MESSAGE_MAP() | ||
| 45 | + | ||
| 46 | +///////////////////////////////////////////////////////////////////////////// | ||
| 47 | +// Cchoose_db_file message handlers | ||
| 48 | + | ||
| 49 | +void Cchoose_db_file::OnButtonap() | ||
| 50 | +{ | ||
| 51 | + char szFilter[]="Database files(*.*)|*.*"; | ||
| 52 | + CFileDialog dlg(TRUE, NULL, NULL, | ||
| 53 | + OFN_FILEMUSTEXIST|OFN_EXPLORER|OFN_ENABLESIZING|0x10000000/*OFN_FORCESHOWHIDDEN*/, | ||
| 54 | + szFilter, this); | ||
| 55 | + dlg.m_ofn.lpstrTitle = _T("Select Modem_1 database file..."); | ||
| 56 | + if(dlg.DoModal() == IDOK) | ||
| 57 | + { | ||
| 58 | + g_sMetaComm.sDBFileOption.bDBInitModem_1 = false; | ||
| 59 | + mystr2_ap_path = dlg.GetPathName(); | ||
| 60 | + } | ||
| 61 | + UpdateData(FALSE); | ||
| 62 | + strncpy(g_sMetaComm.sDBFileOption.strAPDbpath,(LPCTSTR)mystr2_ap_path,strlen(mystr2_ap_path)+1); | ||
| 63 | + | ||
| 64 | + | ||
| 65 | +} | ||
| 66 | + | ||
| 67 | +void Cchoose_db_file::OnButtonbp() | ||
| 68 | +{ | ||
| 69 | + char szFilter[]="Database files(*.*)|*.*"; | ||
| 70 | + CFileDialog dlg(TRUE, NULL, NULL, | ||
| 71 | + OFN_FILEMUSTEXIST|OFN_EXPLORER|OFN_ENABLESIZING|0x10000000/*OFN_FORCESHOWHIDDEN*/, | ||
| 72 | + szFilter, this); | ||
| 73 | + dlg.m_ofn.lpstrTitle = _T("Select Modem_1 database file..."); | ||
| 74 | + if(dlg.DoModal() == IDOK) | ||
| 75 | + { | ||
| 76 | + g_sMetaComm.sDBFileOption.bDBInitModem_1 = false; | ||
| 77 | + mystr2_bp_path = dlg.GetPathName(); | ||
| 78 | + } | ||
| 79 | + UpdateData(FALSE); | ||
| 80 | + strncpy(g_sMetaComm.sDBFileOption.strMD1Dbpath,(LPCTSTR)mystr2_bp_path,strlen(mystr2_bp_path)+1); | ||
| 81 | + | ||
| 82 | +} | ||
| 83 | + | ||
| 84 | +void Cchoose_db_file::OnOK() | ||
| 85 | +{ | ||
| 86 | + if (mystr2_bp_path == "" || mystr2_ap_path == "") | ||
| 87 | + { | ||
| 88 | + MessageBox("please choose file!"); | ||
| 89 | + return; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + CDialog::OnOK(); | ||
| 93 | +} |
choose_db_file.h
0 → 100644
| 1 | +#if !defined(AFX_CHOOSE_DB_FILE_H__17FC6809_62A1_413E_A13E_A67D9EE96FF4__INCLUDED_) | ||
| 2 | +#define AFX_CHOOSE_DB_FILE_H__17FC6809_62A1_413E_A13E_A67D9EE96FF4__INCLUDED_ | ||
| 3 | + | ||
| 4 | +#if _MSC_VER > 1000 | ||
| 5 | +#pragma once | ||
| 6 | +#endif // _MSC_VER > 1000 | ||
| 7 | +// choose_db_file.h : header file | ||
| 8 | +// | ||
| 9 | + | ||
| 10 | +///////////////////////////////////////////////////////////////////////////// | ||
| 11 | +// Cchoose_db_file dialog | ||
| 12 | + | ||
| 13 | +class Cchoose_db_file : public CDialog | ||
| 14 | +{ | ||
| 15 | +// Construction | ||
| 16 | +public: | ||
| 17 | + Cchoose_db_file(CWnd* pParent = NULL); // standard constructor | ||
| 18 | + | ||
| 19 | +// Dialog Data | ||
| 20 | + //{{AFX_DATA(Cchoose_db_file) | ||
| 21 | + enum { IDD = IDD_DIALOG_DB_CHOOSE }; | ||
| 22 | + CString mystr2_ap_path; | ||
| 23 | + CString mystr2_bp_path; | ||
| 24 | + //}}AFX_DATA | ||
| 25 | + | ||
| 26 | + | ||
| 27 | +// Overrides | ||
| 28 | + // ClassWizard generated virtual function overrides | ||
| 29 | + //{{AFX_VIRTUAL(Cchoose_db_file) | ||
| 30 | + protected: | ||
| 31 | + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support | ||
| 32 | + //}}AFX_VIRTUAL | ||
| 33 | + | ||
| 34 | +// Implementation | ||
| 35 | +protected: | ||
| 36 | + | ||
| 37 | + // Generated message map functions | ||
| 38 | + //{{AFX_MSG(Cchoose_db_file) | ||
| 39 | + afx_msg void OnButtonap(); | ||
| 40 | + afx_msg void OnButtonbp(); | ||
| 41 | + virtual void OnOK(); | ||
| 42 | + //}}AFX_MSG | ||
| 43 | + DECLARE_MESSAGE_MAP() | ||
| 44 | +}; | ||
| 45 | + | ||
| 46 | +//{{AFX_INSERT_LOCATION}} | ||
| 47 | +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. | ||
| 48 | + | ||
| 49 | +#endif // !defined(AFX_CHOOSE_DB_FILE_H__17FC6809_62A1_413E_A13E_A67D9EE96FF4__INCLUDED_) |
Please
register
or
login
to post a comment