root/trunk/ConfigurationsDlg.h

Revision 5, 4.1 kB (checked in by qbert, 6 years ago)

Initial ( and last :( ) commit

Line 
1 #if !defined(AFX_CONFIGURATIONSDLG_H__3274FF42_8B84_4F8A_A001_8E145F559848__INCLUDED_)
2 #define AFX_CONFIGURATIONSDLG_H__3274FF42_8B84_4F8A_A001_8E145F559848__INCLUDED_
3
4 #if _MSC_VER > 1000
5 #pragma once
6 #endif // _MSC_VER > 1000
7 // ConfigurationsDlg.h : header file
8 //
9 #include "resource.h"
10 /////////////////////////////////////////////////////////////////////////////
11 // CConfigurationsDlg dialog
12
13 class CConfigurationsDlg : public CRHGenericChildDialog
14 {
15 // Construction
16 public:
17     CConfigurationsDlg(CWnd* pParent = NULL);   // standard constructor
18 virtual int CRHGetDialogID() { return IDD; }
19 void Save () {
20
21
22     if ( Globals::currentProject )
23     {
24         UpdateData();
25
26
27         string currentConfig = Globals::currentProject->GetCache("CurrentConfiguration");
28
29         Globals::currentProject->SetCache(currentConfig + "_inline",m_inline);
30         Globals::currentProject->SetCache(currentConfig + "_optimize",m_optimize);
31         Globals::currentProject->SetCache(currentConfig + "_allowDeprecated",m_allowDeprecated);
32         Globals::currentProject->SetCache(currentConfig + "_warnings",m_warnings);
33         Globals::currentProject->SetCache(currentConfig + "_verbose",m_verbose);
34         Globals::currentProject->SetCache(currentConfig + "_release",m_release);
35         Globals::currentProject->SetCache(currentConfig + "_debugG",m_debug);
36         Globals::currentProject->SetCache(currentConfig + "_pHooks",m_pHooks);
37         Globals::currentProject->SetCache(currentConfig + "_unittest",m_unittest);
38
39         string configs = "";
40         for ( int i = 0 ; i < m_cbConfigs.GetCount();i++ )
41         {
42             CString str;
43             m_cbConfigs.GetLBText(i,str);
44             configs += str.GetBuffer(0);
45             configs += ",";
46
47         }
48         configs = configs.substr(0,configs.length() - 1);
49         //AfxMessageBox(configs.c_str());
50
51         Globals::currentProject->SetCache("Configurations",configs);
52
53     }
54
55
56 } 
57
58 void UpdatePage ()
59     {
60
61     if ( Globals::currentProject )
62     {
63        
64         string currentConfig = Globals::currentProject->GetCache("CurrentConfiguration");
65         //AfxMessageBox(currentConfig.c_str());
66        
67         m_inline = Globals::currentProject->GetCache(currentConfig + "_inline") == "1";
68         m_optimize = Globals::currentProject->GetCache(currentConfig + "_optimize") == "1";
69         m_allowDeprecated = Globals::currentProject->GetCache(currentConfig + "_allowDeprecated") == "1";
70         m_warnings = Globals::currentProject->GetCache(currentConfig + "_warnings") == "1";
71         m_verbose = Globals::currentProject->GetCache(currentConfig + "_verbose") == "1";
72         m_release = Globals::currentProject->GetCache(currentConfig + "_release") == "1";
73         m_debug = Globals::currentProject->GetCache(currentConfig + "_debugG") == "1";
74         m_pHooks = Globals::currentProject->GetCache(currentConfig + "_pHooks") == "1";
75         m_unittest = Globals::currentProject->GetCache(currentConfig + "_unittest") == "1";
76     }
77     else
78     {
79
80         m_inline = false;
81         m_optimize = false;
82         m_allowDeprecated = false;
83         m_warnings = false;
84         m_verbose = false;
85         m_release = false;
86         m_debug = false;
87         m_pHooks = false;
88         m_unittest = false;
89
90
91     }
92
93
94        
95     UpdateData(FALSE);
96
97 }
98 // Dialog Data
99     //{{AFX_DATA(CConfigurationsDlg)
100     enum { IDD = IDD_PROJECT_CONFIGURATIONS_PAGE };
101     CComboBox   m_cbConfigs;
102     CXTButton   m_remove;
103     CXTButton   m_add;
104     int     m_configurations;
105     BOOL    m_inline;
106     BOOL    m_optimize;
107     BOOL    m_allowDeprecated;
108     BOOL    m_warnings;
109     BOOL    m_verbose;
110     BOOL    m_release;
111     BOOL    m_debug;
112     BOOL    m_pHooks;
113     BOOL    m_unittest;
114     //}}AFX_DATA
115
116
117 // Overrides
118     // ClassWizard generated virtual function overrides
119     //{{AFX_VIRTUAL(CConfigurationsDlg)
120     protected:
121     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
122     //}}AFX_VIRTUAL
123
124 // Implementation
125 protected:
126    
127     // Generated message map functions
128     //{{AFX_MSG(CConfigurationsDlg)
129     virtual BOOL OnInitDialog();
130     afx_msg void OnAdd();
131     afx_msg void OnConfigChange();
132     afx_msg void OnRemove();
133     //}}AFX_MSG
134     DECLARE_MESSAGE_MAP()
135 };
136
137 //{{AFX_INSERT_LOCATION}}
138 // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
139
140 #endif // !defined(AFX_CONFIGURATIONSDLG_H__3274FF42_8B84_4F8A_A001_8E145F559848__INCLUDED_)
Note: See TracBrowser for help on using the browser.