GME
13
|
00001 // AggregateOptionsDlg.cpp : implementation file 00002 // 00003 00004 #include "stdafx.h" 00005 #include "gmeactivebrowser.h" 00006 #include "AggregateOptionsDlg.h" 00007 00008 #include "ActiveBrowserPropertyPage.h" 00009 00010 #ifdef _DEBUG 00011 #define new DEBUG_NEW 00012 #undef THIS_FILE 00013 static char THIS_FILE[] = __FILE__; 00014 #endif 00015 00017 // CAggregateOptionsDlg dialog 00018 00019 00020 CAggregateOptionsDlg::CAggregateOptionsDlg(CWnd* pParent /*=NULL*/) 00021 : CDialog(CAggregateOptionsDlg::IDD, pParent) 00022 { 00023 //{{AFX_DATA_INIT(CAggregateOptionsDlg) 00024 m_bDisplayAtoms = FALSE; 00025 m_bDisplayConnections = FALSE; 00026 m_bDisplayModels = FALSE; 00027 m_bDisplayReferences = FALSE; 00028 m_bDisplaySets = FALSE; 00029 m_SortOptions = -1; 00030 m_bStoreTreeInRegistry = FALSE; 00031 //}}AFX_DATA_INIT 00032 } 00033 00034 00035 void CAggregateOptionsDlg::DoDataExchange(CDataExchange* pDX) 00036 { 00037 CDialog::DoDataExchange(pDX); 00038 //{{AFX_DATA_MAP(CAggregateOptionsDlg) 00039 DDX_Check(pDX, IDC_DISPLAY_ATOMS, m_bDisplayAtoms); 00040 DDX_Check(pDX, IDC_DISPLAY_CONNECTIONS, m_bDisplayConnections); 00041 DDX_Check(pDX, IDC_DISPLAY_MODELS, m_bDisplayModels); 00042 DDX_Check(pDX, IDC_DISPLAY_REFERENCES, m_bDisplayReferences); 00043 DDX_Check(pDX, IDC_DISPLAY_SETS, m_bDisplaySets); 00044 DDX_Radio(pDX, IDC_SORT, m_SortOptions); 00045 DDX_Check(pDX, IDC_STORE_TREE_REGISTRY, m_bStoreTreeInRegistry); 00046 //}}AFX_DATA_MAP 00047 } 00048 00049 00050 BEGIN_MESSAGE_MAP(CAggregateOptionsDlg, CDialog) 00051 //{{AFX_MSG_MAP(CAggregateOptionsDlg) 00052 //}}AFX_MSG_MAP 00053 END_MESSAGE_MAP() 00054 00056 // CAggregateOptionsDlg message handlers 00057 00058 void CAggregateOptionsDlg::OnOK() 00059 { 00060 if(!UpdateData(TRUE))return; 00061 00062 CAggregatePropertyPage*pParentPage=(CAggregatePropertyPage*)m_pParentWnd; 00063 00064 if( pParentPage->m_Options.m_bDispAtom==m_bDisplayAtoms&& 00065 pParentPage->m_Options.m_bDispConnections==m_bDisplayConnections&& 00066 pParentPage->m_Options.m_bDispModel==m_bDisplayModels&& 00067 pParentPage->m_Options.m_bDispReference==m_bDisplayReferences&& 00068 pParentPage->m_Options.m_bDispSet==m_bDisplaySets) 00069 { 00070 m_bIsRefreshNeeded=FALSE; 00071 } 00072 else 00073 { 00074 pParentPage->m_Options.m_bDispAtom=m_bDisplayAtoms; 00075 pParentPage->m_Options.m_bDispConnections=m_bDisplayConnections; 00076 pParentPage->m_Options.m_bDispModel=m_bDisplayModels; 00077 pParentPage->m_Options.m_bDispReference=m_bDisplayReferences; 00078 pParentPage->m_Options.m_bDispSet=m_bDisplaySets; 00079 00080 m_bIsRefreshNeeded=TRUE; 00081 } 00082 if(pParentPage->m_Options.m_soSortOptions==(eSortOptions)m_SortOptions) 00083 { 00084 m_bIsResortNeeded=FALSE; 00085 } 00086 else 00087 { 00088 pParentPage->m_Options.m_soSortOptions=(eSortOptions)m_SortOptions; 00089 00090 m_bIsResortNeeded=TRUE; 00091 } 00092 00093 00094 pParentPage->m_Options.m_bStoreTreeInRegistry=m_bStoreTreeInRegistry; 00095 pParentPage->m_Options.SaveToRegistry(); 00096 00097 00098 CDialog::OnOK(); 00099 } 00100 00101 void CAggregateOptionsDlg::OnCancel() 00102 { 00103 // TODO: Add extra cleanup here 00104 00105 CDialog::OnCancel(); 00106 } 00107 00108 BOOL CAggregateOptionsDlg::OnInitDialog() 00109 { 00110 00111 CDialog::OnInitDialog(); 00112 00113 CAggregatePropertyPage*pParentPage=(CAggregatePropertyPage*)m_pParentWnd; 00114 00115 m_bDisplayAtoms=pParentPage->m_Options.m_bDispAtom; 00116 m_bDisplayConnections=pParentPage->m_Options.m_bDispConnections; 00117 m_bDisplayModels=pParentPage->m_Options.m_bDispModel; 00118 m_bDisplayReferences=pParentPage->m_Options.m_bDispReference; 00119 m_bDisplaySets=pParentPage->m_Options.m_bDispSet; 00120 00121 m_bStoreTreeInRegistry=pParentPage->m_Options.m_bStoreTreeInRegistry; 00122 m_SortOptions=pParentPage->m_Options.m_soSortOptions; 00123 00124 UpdateData(FALSE); 00125 00126 return TRUE; // return TRUE unless you set the focus to a control 00127 // EXCEPTION: OCX Property Pages should return FALSE 00128 }