void CScript_EventPseudoModel::Script_EventPseudoModel_Reset(
    CFXJSE_Arguments* pArguments) {
    IXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
    if (!pScriptContext) {
        return;
    }
    CXFA_EventParam* pEventParam = pScriptContext->GetEventParam();
    if (!pEventParam) {
        return;
    }
    pEventParam->Reset();
}
void CScript_EventPseudoModel::Script_EventPseudoModel_Emit(
    CFXJSE_Arguments* pArguments) {
    IXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
    if (!pScriptContext) {
        return;
    }
    CXFA_EventParam* pEventParam = pScriptContext->GetEventParam();
    if (!pEventParam) {
        return;
    }
    IXFA_Notify* pNotify = m_pDocument->GetParser()->GetNotify();
    if (!pNotify) {
        return;
    }
    IXFA_WidgetHandler* pWidgetHandler = pNotify->GetWidgetHandler();
    if (!pWidgetHandler) {
        return;
    }
    pWidgetHandler->ProcessEvent(pEventParam->m_pTarget, pEventParam);
}
void CScript_EventPseudoModel::Script_EventPseudoModel_Property(
    FXJSE_HVALUE hValue,
    FX_DWORD dwFlag,
    FX_BOOL bSetting) {
    IXFA_ScriptContext* pScriptContext = m_pDocument->GetScriptContext();
    if (!pScriptContext) {
        return;
    }
    CXFA_EventParam* pEventParam = pScriptContext->GetEventParam();
    if (!pEventParam) {
        return;
    }
    switch (dwFlag) {
    case XFA_EVENT_CANCELACTION:
        Script_EventPseudoModel_BooleanProperty(
            hValue, pEventParam->m_bCancelAction, bSetting);
        break;
    case XFA_EVENT_CHANGE:
        Script_EventPseudoModel_StringProperty(hValue, pEventParam->m_wsChange,
                                               bSetting);
        break;
    case XFA_EVENT_COMMITKEY:
        Script_EventPseudoModel_InterProperty(hValue, pEventParam->m_iCommitKey,
                                              bSetting);
        break;
    case XFA_EVENT_FULLTEXT:
        Script_EventPseudoModel_StringProperty(hValue, pEventParam->m_wsFullText,
                                               bSetting);
        break;
    case XFA_EVENT_KEYDOWN:
        Script_EventPseudoModel_BooleanProperty(hValue, pEventParam->m_bKeyDown,
                                                bSetting);
        break;
    case XFA_EVENT_MODIFIER:
        Script_EventPseudoModel_BooleanProperty(hValue, pEventParam->m_bModifier,
                                                bSetting);
        break;
    case XFA_EVENT_NEWCONTENTTYPE:
        Script_EventPseudoModel_StringProperty(
            hValue, pEventParam->m_wsNewContentType, bSetting);
        break;
    case XFA_EVENT_NEWTEXT:
        Script_EventPseudoModel_StringProperty(hValue, pEventParam->m_wsNewText,
                                               bSetting);
        break;
    case XFA_EVENT_PREVCONTENTTYPE:
        Script_EventPseudoModel_StringProperty(
            hValue, pEventParam->m_wsPrevContentType, bSetting);
        break;
    case XFA_EVENT_PREVTEXT:
        Script_EventPseudoModel_StringProperty(hValue, pEventParam->m_wsPrevText,
                                               bSetting);
        break;
    case XFA_EVENT_REENTER:
        Script_EventPseudoModel_BooleanProperty(hValue, pEventParam->m_bReenter,
                                                bSetting);
        break;
    case XFA_EVENT_SELEND:
        Script_EventPseudoModel_InterProperty(hValue, pEventParam->m_iSelEnd,
                                              bSetting);
        break;
    case XFA_EVENT_SELSTART:
        Script_EventPseudoModel_InterProperty(hValue, pEventParam->m_iSelStart,
                                              bSetting);
        break;
    case XFA_EVENT_SHIFT:
        Script_EventPseudoModel_BooleanProperty(hValue, pEventParam->m_bShift,
                                                bSetting);
        break;
    case XFA_EVENT_SOAPFAULTCODE:
        Script_EventPseudoModel_StringProperty(
            hValue, pEventParam->m_wsSoapFaultCode, bSetting);
        break;
    case XFA_EVENT_SOAPFAULTSTRING:
        Script_EventPseudoModel_StringProperty(
            hValue, pEventParam->m_wsSoapFaultString, bSetting);
        break;
    case XFA_EVENT_TARGET:
        break;
    default:
        break;
    }
}