newntui/discovermdi/src/dockablebrowser.cpp
//-----------------------------------------------------------------------------------------------
// Export elements from the given set into the DiscoverAll and show this set in the browser
//-----------------------------------------------------------------------------------------------
Export elements from the given set into the DiscoverAll and show this set in the browser
Export elements from the given set into the DiscoverAll and show this set in the browser
void CDockableBrowser::BrowseGivenSet(CString & name, int col) {
CString query;
   if(name.GetLength()==0) {
	    if(m_CurrentHistoryEntry) {
		   CHistoryEntry entry;
		   entry=m_History.GetAt(m_CurrentHistoryEntry);
		   if(entry.m_Command.GetLength()>0) {
               query.Format("set DiscoverAll [%s]",entry.m_Command);
               CQueryResults* Results  = (CQueryResults *) GetDlgItem(IDC_RESULTS);
               Results->SetQuery(query);
               Results->Calculate();
               Results->SetQuery("");
               Results->Update();
               CCategoriesCombo* Category = (CCategoriesCombo *) GetDlgItem(IDC_CATEGORIES);
               Category->Unselect();
               CString sizeStr = ExecuteCommand(CString("size $DiscoverSelection"));
               CMainFrame* main=(CMainFrame*) AfxGetMainWnd();
               main->m_SelectionSize=atoi(sizeStr);
               DisplayInfoString();
		   }
		}
		return;
   }
   if(strnicmp(name,"_DI_",4)==0)
      query.Format("set DiscoverAll [set_copy %s]",name);
   else
      query.Format("set DiscoverAll $%s",name);
   CQueryResults* Results  = (CQueryResults *) GetDlgItem(IDC_RESULTS);
   Results->SetQuery(query);
   Results->Calculate();
   Results->SetQuery("");
   Results->Update();
   SaveHistory();
   CCategoriesCombo* Category = (CCategoriesCombo *) GetDlgItem(IDC_CATEGORIES);
   Category->Unselect();
   CString sizeStr = ExecuteCommand(CString("size $DiscoverSelection"));
   CMainFrame* main=(CMainFrame*) AfxGetMainWnd();
   main->m_SelectionSize=atoi(sizeStr);
   DisplayInfoString();
}
void CDockableBrowser :: BrowseGivenSet ( CString & name , int col ) { CString query ; if ( name . GetLength ( ) == 0 ) { if ( m_CurrentHistoryEntry ) { CHistoryEntry entry ; entry = m_History . GetAt ( m_CurrentHistoryEntry ) ; if ( entry . m_Command . GetLength ( ) > 0 ) { query . Format ( " " , entry . m_Command ) ; CQueryResults * Results = ( CQueryResults * ) GetDlgItem ( IDC_RESULTS ) ; Results -> SetQuery ( query ) ; Results -> Calculate ( ) ; Results -> SetQuery ( " " ) ; Results -> Update ( ) ; CCategoriesCombo * Category = ( CCategoriesCombo * ) GetDlgItem ( IDC_CATEGORIES ) ; Category -> Unselect ( ) ; CString sizeStr = ExecuteCommand ( CString ( " " ) ) ; CMainFrame * main = ( CMainFrame * ) AfxGetMainWnd ( ) ; main -> m_SelectionSize = atoi ( sizeStr ) ; DisplayInfoString ( ) ; } } return ; } if ( strnicmp ( name , " " , 4 ) == 0 ) query . Format ( " " , name ) ; else query . Format ( " " , name ) ; CQueryResults * Results = ( CQueryResults * ) GetDlgItem ( IDC_RESULTS ) ; Results -> SetQuery ( query ) ; Results -> Calculate ( ) ; Results -> SetQuery ( " " ) ; Results -> Update ( ) ; SaveHistory ( ) ; CCategoriesCombo * Category = ( CCategoriesCombo * ) GetDlgItem ( IDC_CATEGORIES ) ; Category -> Unselect ( ) ; CString sizeStr = ExecuteCommand ( CString ( " " ) ) ; CMainFrame * main = ( CMainFrame * ) AfxGetMainWnd ( ) ; main -> m_SelectionSize = atoi ( sizeStr ) ; DisplayInfoString ( ) ; }
Export elements from the given set into the DiscoverAll and show this set in the browser
Export elements from the given set into the DiscoverAll and show this set in the browser