// Advnext.cpp : implementation of the CMainFrame class
//
#include "stdafx.h"
#include "tutorial.h"
#include "tmouse.h"
#include "mainfrm.h"
#include "time.h"
#include "TrcDlg.h"
                    
#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif                       

extern void Delay(int nDelay,BOOL bShow=0);

/*-------------------------------------------------------*/
/*             AdvanceRrigger();                         */
/*-------------------------------------------------------*/
void CMainFrame::AdvanceTrigger()
{
  switch(m_uNextAction){
    case 1:
       Trigger_Sel();
       break;    
    case 2:
       Trigger_Level();
       break;
    case 3:
       Trigger_Level_Content();
       break; 
    case 4:
       Trigger_Introduce();
       break;    
    case 5:
       Trigger_Content();
       m_uNextCaseID=ID_ADVANCE_FILTER;
       m_uNextAction=0;
       break;
    default:
       m_uNextCaseID=ID_ADVANCE_FILTER;
       m_uNextAction=0;
       break;
    }
}                                                          

/*-------------------------------------------------------*/ 
/*            Trigger next                               */
/*-------------------------------------------------------*/
void CMainFrame::Trigger_Content()
{
  SetSysFilter(1);
  ((CTrcDlg *)m_pDlg)->SelLogic(FALSE);
  SetSysFilter(0);
}

void CMainFrame::Trigger_Introduce()
{
  m_pMsgWnd->SetContent("TRIGGER.TXT");
  Delay(100);
  SetArrow(2,0,180);
}
                                   
void CMainFrame::Trigger_Level_Content()
{  
  SetSysFilter(1);
  ((CTrcDlg *)m_pDlg)->SelLogic();
  SetSysFilter(0);
}                                 

void CMainFrame::Trigger_Level()
{        
  ((CTrcDlg *)m_pDlg)->SetLevel();
  m_pMsgWnd->SetContent("TRGLEVEL.TXT");
  Delay(100);
  SetArrow(2,1,60);
}           

void CMainFrame::Trigger_Sel()
{
  ((CTrcDlg *)m_pDlg)->SelTrigger();
  m_pMsgWnd->SetTitleFont(24,10,1600);
  //int nHeight=36,int nWidth=18,int nWeight=1600);
  m_pMsgWnd->SetTitle("TRACE - TRIGGER");
  m_pMsgWnd->SetContent("TRCTRCI.TXT");
}