newntui/discovermdi/src/dockablebrowser.cpp
//----------------------------------------------------------------------------------------
// Sets the current results and browser set from history - previous history element
//----------------------------------------------------------------------------------------
Sets the current results and browser set from history - previous history element
Sets the current results and browser set from history - previous history element
void CDockableBrowser::PrevHistory(void) {
POSITION pos = m_CurrentHistoryEntry;
    if(m_ResultWasEmpty==FALSE) m_History.GetPrev(pos);
	m_ResultWasEmpty=FALSE;
	if(pos) {
        CQueriesCombo* Query=(CQueriesCombo*) GetDlgItem(IDC_QUERIES);
        Query->Clear();
	    CCategoriesCombo* Category = (CCategoriesCombo *) GetDlgItem(IDC_CATEGORIES);
	    Category->Unselect();
		m_CurrentHistoryEntry=pos;
		CHistoryEntry entry;
		entry=m_History.GetAt(pos);
	    CQueryResults* Results  = (CQueryResults *) GetDlgItem(IDC_RESULTS);
        CString command;
		if(entry.m_Command.GetLength()==0) {
		    command.Format("set DiscoverAll $%s",entry.m_ServerVariable);
		} else {
			command = entry.m_Command;
		}
        Results->SetQuery(command);
        Results->Calculate();
        Results->SetQuery("");
        Results->SetFilter("");
        Results->Update();
        ExecuteCommand(CString("set DiscoverSelection [nil_set]"));
        CString sizeStr = ExecuteCommand(CString("size $DiscoverSelection"));
        CMainFrame* main=(CMainFrame*) AfxGetMainWnd();
        main->m_SelectionSize=atoi(sizeStr);
        DisplayInfoString();
	}
}
void CDockableBrowser :: PrevHistory ( void ) { POSITION pos = m_CurrentHistoryEntry ; if ( m_ResultWasEmpty == FALSE ) m_History . GetPrev ( pos ) ; m_ResultWasEmpty = FALSE ; if ( pos ) { CQueriesCombo * Query = ( CQueriesCombo * ) GetDlgItem ( IDC_QUERIES ) ; Query -> Clear ( ) ; CCategoriesCombo * Category = ( CCategoriesCombo * ) GetDlgItem ( IDC_CATEGORIES ) ; Category -> Unselect ( ) ; m_CurrentHistoryEntry = pos ; CHistoryEntry entry ; entry = m_History . GetAt ( pos ) ; CQueryResults * Results = ( CQueryResults * ) GetDlgItem ( IDC_RESULTS ) ; CString command ; if ( entry . m_Command . GetLength ( ) == 0 ) { command . Format ( " " , entry . m_ServerVariable ) ; } else { command = entry . m_Command ; } Results -> SetQuery ( command ) ; Results -> Calculate ( ) ; Results -> SetQuery ( " " ) ; Results -> SetFilter ( " " ) ; Results -> Update ( ) ; ExecuteCommand ( CString ( " " ) ) ; CString sizeStr = ExecuteCommand ( CString ( " " ) ) ; CMainFrame * main = ( CMainFrame * ) AfxGetMainWnd ( ) ; main -> m_SelectionSize = atoi ( sizeStr ) ; DisplayInfoString ( ) ; } }
Sets the current results and browser set from history - previous history element
Sets the current results and browser set from history - previous history element