newntui/discovermdi/src/simplifytree.cpp
//---------------------------------------------------------------------------------------------------
// This private function will send file ids to stop exclusion
// and will end simplify;
//---------------------------------------------------------------------------------------------------
This private function will send file ids to stop exclusion
and will end simplify.
This private function will send file ids to stop exclusion and will end simplify .
void CSimplifyTree::EndSimplify() {
CSimplifyChildFrame* frame = (CSimplifyChildFrame *) GetParent()->GetParent();
CString query;
BSTR sysQuery;
	if(m_SimplifyRunning != FALSE) {
		if(m_FilesUpdated==FALSE && m_FilesToExclude>0) {
			if(MessageBox("Simplify has detected unnecessary header files.\nWould you like to remove them from your source code?",
						   "Simplify *.h", 
						   MB_ICONQUESTION | MB_YESNO)==IDYES) {
				   DisableMarkedExclusions(m_Tree.GetRootItem());
				   query="save_and_quit_simplify";
				   frame->m_Selection->SetItemStatus(m_CurrentItem,2);
			 } else {
				   DisableAllExclusions(m_Tree.GetRootItem());
				   query="quit_simplify";
				   frame->m_Selection->SetItemStatus(m_CurrentItem,1);
			}
		} else {
			if(m_FilesToExclude>0) query="save_and_quit_simplify";
			else                   query="quit_simplify";
			frame->m_Selection->SetItemStatus(m_CurrentItem,1);
		}
		m_FilesUpdated=FALSE;
		m_FilesToExclude = 0;
		sysQuery=query.AllocSysString();
		DataSourceAccessSync(&sysQuery);
		SysFreeString(sysQuery); 
		m_SimplifyRunning = FALSE;
	}	
}
void CSimplifyTree :: EndSimplify ( ) { CSimplifyChildFrame * frame = ( CSimplifyChildFrame * ) GetParent ( ) -> GetParent ( ) ; CString query ; BSTR sysQuery ; if ( m_SimplifyRunning != FALSE ) { if ( m_FilesUpdated == FALSE && m_FilesToExclude > 0 ) { if ( MessageBox ( " \n " , " " , MB_ICONQUESTION | MB_YESNO ) == IDYES ) { DisableMarkedExclusions ( m_Tree . GetRootItem ( ) ) ; query = " " ; frame -> m_Selection -> SetItemStatus ( m_CurrentItem , 2 ) ; } else { DisableAllExclusions ( m_Tree . GetRootItem ( ) ) ; query = " " ; frame -> m_Selection -> SetItemStatus ( m_CurrentItem , 1 ) ; } } else { if ( m_FilesToExclude > 0 ) query = " " ; else query = " " ; frame -> m_Selection -> SetItemStatus ( m_CurrentItem , 1 ) ; } m_FilesUpdated = FALSE ; m_FilesToExclude = 0 ; sysQuery = query . AllocSysString ( ) ; DataSourceAccessSync ( & sysQuery ) ; SysFreeString ( sysQuery ) ; m_SimplifyRunning = FALSE ; } }
This private function will send file ids to stop exclusion
and will end simplify;
This private function will send file ids to stop exclusion and will end simplify ;