|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 #if !defined(AFX_STATDESKTOPDLG_H__3BAC3E09_6B00_11D5_B4C5_00C04F437BB4__INCLUDED_) |
|
23 #define AFX_STATDESKTOPDLG_H__3BAC3E09_6B00_11D5_B4C5_00C04F437BB4__INCLUDED_ |
|
24 |
|
25 #if _MSC_VER > 1000 |
|
26 #pragma once |
|
27 #endif // _MSC_VER > 1000 |
|
28 |
|
29 #include <STATExp.h> |
|
30 |
|
31 #include "ini.h" |
|
32 |
|
33 #include "MessageReporterImp.h" |
|
34 |
|
35 ///////////////////////////////////////////////////////////////////////////// |
|
36 // CSTATDesktopDlg dialog |
|
37 |
|
38 class CSTATDesktopDlg : public CDialog |
|
39 { |
|
40 // Construction |
|
41 public: |
|
42 CSTATDesktopDlg(CWnd* pParent = NULL); // standard constructor |
|
43 |
|
44 // Dialog Data |
|
45 //{{AFX_DATA(CSTATDesktopDlg) |
|
46 enum { IDD = IDD_STATDESKTOP_DIALOG }; |
|
47 CEdit m_Connection; |
|
48 CButton m_ViewLog; |
|
49 CProgressCtrl m_Progress; |
|
50 CButton m_BrowseLog; |
|
51 CButton m_Append; |
|
52 CButton m_BrowseImage; |
|
53 CEdit m_Delay; |
|
54 CListBox m_Output; |
|
55 CButton m_VerifyImage; |
|
56 CEdit m_LogFileName; |
|
57 CButton m_LogToFile; |
|
58 CEdit m_ImageBox; |
|
59 CEdit m_Script; |
|
60 CEdit m_ImageLocation; |
|
61 CSliderCtrl m_SliderPos; |
|
62 CSliderCtrl m_PercentageDiff; |
|
63 //}}AFX_DATA |
|
64 |
|
65 // ClassWizard generated virtual function overrides |
|
66 //{{AFX_VIRTUAL(CSTATDesktopDlg) |
|
67 protected: |
|
68 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support |
|
69 //}}AFX_VIRTUAL |
|
70 |
|
71 // Implementation |
|
72 protected: |
|
73 HICON m_hIcon; |
|
74 |
|
75 // Generated message map functions |
|
76 //{{AFX_MSG(CSTATDesktopDlg) |
|
77 virtual BOOL OnInitDialog(); |
|
78 afx_msg void OnSysCommand(UINT nID, LPARAM lParam); |
|
79 afx_msg void OnPaint(); |
|
80 afx_msg HCURSOR OnQueryDragIcon(); |
|
81 afx_msg void OnBrowse(); |
|
82 afx_msg void OnEditscript(); |
|
83 afx_msg void OnExit(); |
|
84 afx_msg void OnRun(); |
|
85 afx_msg void OnLogToFile(); |
|
86 afx_msg void OnReleasedcaptureSpeedslider(NMHDR* pNMHDR, LRESULT* pResult); |
|
87 afx_msg void OnChangeTimedelay(); |
|
88 afx_msg void OnBrowseimage(); |
|
89 virtual void OnCancel(); |
|
90 afx_msg void OnImageverify(); |
|
91 afx_msg void OnBrowseLog(); |
|
92 afx_msg void OnView(); |
|
93 afx_msg void OnManage(); |
|
94 afx_msg void OnDestroy(); |
|
95 afx_msg LRESULT OnDoneCommand(WPARAM command, LPARAM ); |
|
96 afx_msg LRESULT OnDoneScript(WPARAM iScriptExitCode, LPARAM ); |
|
97 afx_msg LRESULT OnLogMesage(WPARAM, LPARAM pLogMessage ); |
|
98 //}}AFX_MSG |
|
99 DECLARE_MESSAGE_MAP() |
|
100 |
|
101 private: |
|
102 void ReadSettings(); |
|
103 void SaveSettings(); |
|
104 bool CallProcess(LPCTSTR szApplication, LPTSTR szCommandLine, LPCTSTR szDirectory); |
|
105 int SetImageVerification(); |
|
106 void Message(const char* message); |
|
107 void MessageFormat(const char *message, ...); |
|
108 void EnableFields(bool bEnable); |
|
109 int ConnectToEngine(); |
|
110 bool ShowScreenshot(const CString& filename); //displays last screenshot in window |
|
111 void CleanUp(const CString& message, bool bEnableFields = true); |
|
112 void CleanUp(LPCTSTR message, bool bEnableFields = true); |
|
113 void OpenFile(LPTSTR file); |
|
114 void RunIt(); |
|
115 |
|
116 //variables |
|
117 HMODULE ihLib; |
|
118 int iHandle; |
|
119 PROC_VERSION iptrVersion; |
|
120 PROC_GETERROR iptrGetError; |
|
121 PROC_GETERRORTEXT iptrGetErrorText; |
|
122 PROC_SETCONNECTIONLOGGING iptrSetConnectionLogging; |
|
123 PROC_CLOSECONNECTIONLOGGING iptrCloseConnectionLogging; |
|
124 PROC_CONNECT iptrConnect; |
|
125 PROC_DISCONNECT iptrDisconnect; |
|
126 PROC_SETCOMMANDDELAY iptrSetCommandDelay; |
|
127 PROC_SETCOMMANDLOGGING iptrSetCommandLogging; |
|
128 PROC_SETIMAGEVERIFICATION iptrSetImageVerification; |
|
129 PROC_OPENSCRIPTFILE iptrOpenScriptFile; |
|
130 PROC_RUNSCRIPT iptrRunScript; |
|
131 PROC_SENDRAWCOMMAND iptrSendRawCommand; |
|
132 PROC_SENDCOMMANDFILE iptrSendCommandFile; |
|
133 PROC_GETCOMMANDCOUNT iptrGetCommandCount; |
|
134 PROC_GETCURRENTCOMMANDNUMBER iptrGetCurrentCommandNumber; |
|
135 PROC_STOPPROCESSING iptrStopProcessing; |
|
136 PROC_GETSNAPSHOT iptrGetSnapShot; |
|
137 |
|
138 MessageReporterImp *iMessageReporter; |
|
139 |
|
140 CStatIniFile statIniFile; |
|
141 TCHAR szBuffer[2048]; // global buffer for strings |
|
142 HANDLE hThreadHandle; |
|
143 int iLastVerify; // stores the state of verify checkbox |
|
144 int iLastLog; // stores the state of log checkbox |
|
145 bool bRunning; // flag whether processing or not |
|
146 |
|
147 /****BITMAP STUFF****/ |
|
148 CPalette m_Palette; |
|
149 unsigned char *m_pDib, *m_pDibBits; |
|
150 DWORD m_dwDibSize; |
|
151 BITMAPINFOHEADER *m_pBIH; |
|
152 RGBQUAD *m_pPalette; |
|
153 int m_nPaletteEntries; |
|
154 }; |
|
155 |
|
156 //{{AFX_INSERT_LOCATION}} |
|
157 // Microsoft Visual C++ will insert additional declarations immediately before the previous line. |
|
158 |
|
159 #endif // !defined(AFX_STATDESKTOPDLG_H__3BAC3E09_6B00_11D5_B4C5_00C04F437BB4__INCLUDED_) |