CPDetectorDialog::CPDetectorDialog(wxWindow* parent) { wxXmlResource::Get()->LoadDialog(this, parent, wxT("cpdetector_dialog")); #ifdef __WXMSW__ wxIcon myIcon(huginApp::Get()->GetXRCPath() + wxT("data/hugin.ico"),wxBITMAP_TYPE_ICO); #else wxIcon myIcon(huginApp::Get()->GetXRCPath() + wxT("data/hugin.png"),wxBITMAP_TYPE_PNG); #endif SetIcon(myIcon); //restore frame position and size RestoreFramePosition(this,wxT("CPDetectorDialog")); m_edit_desc = XRCCTRL(*this, "prefs_cpdetector_desc", wxTextCtrl); m_edit_prog = XRCCTRL(*this, "prefs_cpdetector_program", wxTextCtrl); m_edit_args = XRCCTRL(*this, "prefs_cpdetector_args", wxTextCtrl); m_label_args_cleanup = XRCCTRL(*this, "prefs_cpdetector_args_label_cleanup", wxStaticText); m_edit_args_cleanup = XRCCTRL(*this, "prefs_cpdetector_args_cleanup", wxTextCtrl); m_edit_prog_descriptor = XRCCTRL(*this, "prefs_cpdetector_program_descriptor", wxTextCtrl); m_edit_args_descriptor = XRCCTRL(*this, "prefs_cpdetector_args_descriptor", wxTextCtrl); m_edit_prog_matcher = XRCCTRL(*this, "prefs_cpdetector_program_matcher", wxTextCtrl); m_edit_args_matcher = XRCCTRL(*this, "prefs_cpdetector_args_matcher", wxTextCtrl); m_edit_prog_stack = XRCCTRL(*this, "prefs_cpdetector_program_stack", wxTextCtrl); m_edit_args_stack = XRCCTRL(*this, "prefs_cpdetector_args_stack", wxTextCtrl); m_check_option = XRCCTRL(*this, "prefs_cpdetector_option", wxCheckBox); m_cpdetector_type = XRCCTRL(*this, "prefs_cpdetector_type", wxChoice); m_choice_step = XRCCTRL(*this, "choicebook_steps", wxChoicebook); m_cpdetector_type->SetSelection(1); ChangeType(); };
void CPDetectorDialog::UpdateFields(CPDetectorConfig* cpdet_config,int index) { m_edit_desc->SetValue(cpdet_config->settings[index].GetCPDetectorDesc()); //program names and arguments if(cpdet_config->settings[index].IsTwoStepDetector()) { m_choice_step->SetSelection(1); m_edit_prog_descriptor->SetValue(cpdet_config->settings[index].GetProg()); m_edit_prog_matcher->SetValue(cpdet_config->settings[index].GetProgMatcher()); m_edit_args_descriptor->SetValue(cpdet_config->settings[index].GetArgs()); m_edit_args_matcher->SetValue(cpdet_config->settings[index].GetArgsMatcher()); } else { m_choice_step->SetSelection(0); m_edit_prog->SetValue(cpdet_config->settings[index].GetProg()); m_edit_args->SetValue(cpdet_config->settings[index].GetArgs()); if(cpdet_config->settings[index].IsCleanupPossible()) { m_edit_args_cleanup->SetValue(cpdet_config->settings[index].GetArgsCleanup()); }; }; if(cpdet_config->settings[index].ContainsStacks()) { m_edit_prog_stack->SetValue(cpdet_config->settings[index].GetProgStack()); m_edit_args_stack->SetValue(cpdet_config->settings[index].GetArgsStack()); }; m_cpdetector_type->SetSelection(cpdet_config->settings[index].GetType()); m_check_option->SetValue(cpdet_config->settings[index].GetOption()); ChangeType(); };
void DynamicObject::ChangeTypeIf(const Type* oldType) { if (this->type == oldType) { ChangeType(); } }
//----------------------------------------------------------------------------- // Function: DisplayWatchListChanged // Purpose: Called to display a PPEER_EVENT_WATCHLIST_CHANGED_DATA structure // Parameters: // pWatchlistChangedData [in] : pointer to a PPEER_EVENT_WATCHLIST_CHANGED_DATA structure // void DisplayWatchListChanged(const PEER_EVENT_WATCHLIST_CHANGED_DATA *pWatchlistChangedData) { if (pWatchlistChangedData) { PrintContact(pWatchlistChangedData->pContact); wprintf(L"\tChange Type: %s\n", ChangeType(pWatchlistChangedData->changeType)); } }
void PageSprayModel::OnRadioConstCv() { // TODO: Add your control notification handler code here UpdateData(TRUE); m_nLossType = 0; SetLossStatus(); ChangeType(); UpdateData(FALSE); }
CLinkValue::CLinkValue(WORD VType) { m_lLink=-1; ChangeType(VType); m_lValueChanges=0; m_lValuesIgnored=0; m_dwTransactionID=0; m_lCfgSequence=-1; m_iLastChgDirn=0; };
//----------------------------------------------------------------------------- // Function: DisplayObjectChanged // Purpose: Called to display a PPEER_EVENT_OBJECT_CHANGED_DATA structure // Parameters: // pObjectChangedData [in] : pointer to a PPEER_EVENT_OBJECT_CHANGED_DATA structure // void DisplayObjectChanged(const PEER_EVENT_OBJECT_CHANGED_DATA *pObjectChangedData) { if (pObjectChangedData) { PrintContact(pObjectChangedData->pContact); PrintEndpoint(pObjectChangedData->pEndpoint); wprintf(L"\tChange Type: %s\n", ChangeType(pObjectChangedData->changeType)); PrintObject(pObjectChangedData->pObject); } }
//----------------------------------------------------------------------------- // Function: DisplayApplicationChanged // Purpose: Called to display a PPEER_EVENT_APPLICATION_CHANGED_DATA structure // Parameters: // pApplicationChangedData [in] : pointer to a PPEER_EVENT_APPLICATION_CHANGED_DATA structure // void DisplayApplicationChanged(const PEER_EVENT_APPLICATION_CHANGED_DATA *pApplicationChangedData) { if (pApplicationChangedData) { PrintContact(pApplicationChangedData->pContact); PrintEndpoint(pApplicationChangedData->pEndpoint); wprintf(L"\tChange Type: %s\n", ChangeType(pApplicationChangedData->changeType)); PrintApplication(pApplicationChangedData->pApplication); } }
bool HitStatusProgress::_pre_behavior(const Variant& target, Dictionary env) { Character *character = ((Object*)target)->cast_to<Character>(); if (character) { if (character->get_hit_status() != NULL) { return true; }else { ChangeType(HitStatus::HS_NO_HIT); } } return false; }
//----------------------------------------------------------------------------- // Function: DisplayPresenceChanged // Purpose: Called to display a PPEER_EVENT_PRESENCE_CHANGED_DATA structure // Parameters: // pPresenceChangedData [in] : pointer to a PPEER_EVENT_PRESENCE_CHANGED_DATA structure // void DisplayPresenceChanged(const PEER_EVENT_PRESENCE_CHANGED_DATA *pPresenceChangedData) { if (pPresenceChangedData) { PrintContact(pPresenceChangedData->pContact); PrintEndpoint(pPresenceChangedData->pEndpoint); wprintf(L"\tChange Type: %s\n", ChangeType(pPresenceChangedData->changeType)); wprintf(L"\tPresence: "); PrintPresenceInformation(pPresenceChangedData->pPresenceInfo); } }
Vector2 HitStatusProgress::process_hit(const Variant &target, Dictionary env) { Character *character = ((Object*)target)->cast_to<Character>(); Ref<HitStatus> hit_status = character->get_hit_status(); if (hit_status != NULL) { bool start = !hit_status->started; if (start) { character->freeze(hit_status->get_freeze_time()); switch (hit_status->get_hit_type()) { case HitStatus::HS_HIT_STUN: hit_status->set_life_time(hit_status->get_stun_time()); break; case HitStatus::HS_PURSUIT: case HitStatus::HS_LAUNCHER: hit_status->set_life_time(hit_status->get_launcher_time()); break; } } hit_status->step(character, env); HitStatus::HSType type = hit_status->get_hit_type(); Vector2 velocity; if (type <= HitStatus::HS_HIT_STUN) { if (hit_type <= HitStatus::HS_HIT_STUN && character->get_on_floor()) { velocity = hit_status->get_stun_velocity(); ChangeType(HitStatus::HS_HIT_STUN); }else { velocity = hit_status->get_velocity(); if (start) hit_status->set_life_time(hit_status->get_launcher_time()); hit_status->set_hit_type(HitStatus::HS_LAUNCHER); ChangeType(HitStatus::HS_LAUNCHER); } }else if (type == HitStatus::HS_PURSUIT || type == HitStatus::HS_LAUNCHER) { velocity = hit_status->get_velocity(); if (start) { hit_status->set_life_time(hit_status->get_launcher_time()); } if (type == HitStatus::HS_LAUNCHER && velocity.y > 0 && character->get_on_floor()) { hit_status->set_hit_type(HitStatus::HS_OTG); ChangeType(HitStatus::HS_OTG); }else { ChangeType(type); } }else if (type == HitStatus::HS_OTG) { velocity = hit_status->get_velocity(); velocity.x *= 0.8; velocity.y = ((Vector2)env["move"]).y; hit_status->set_velocity(velocity); ChangeType(HitStatus::HS_OTG); } return velocity; }else { ChangeType(HitStatus::HS_NO_HIT); return Vector2(); } }
//----------------------------------------------------------------------------- // Function: DisplayPeopleNearMeChanged // Purpose: Called to display a PPEER_EVENT_PEOPLE_NEAR_ME_CHANGED_DATA structure // Parameters: // pPNMChangedData [in] : pointer to a PPEER_EVENT_PEOPLE_NEAR_ME_CHANGED_DATA structure // VOID CALLBACK DisplayPeopleNearMeChanged(const PEER_EVENT_PEOPLE_NEAR_ME_CHANGED_DATA *pPNMChangedData) { if (pPNMChangedData) { wprintf(L"\tChange Type: %s\n", ChangeType(pPNMChangedData->changeType)); if (pPNMChangedData->pPeopleNearMe == NULL) { wprintf(L"\t Endpoint: <Me>\n"); } else { PrintEndpoint(&pPNMChangedData->pPeopleNearMe->endpoint); wprintf(L"\t NickName: %s\n", pPNMChangedData->pPeopleNearMe->pwzNickName); } } }
void PagePumpModel::SetTypeStatus() { int nCmdTab = SW_HIDE; int nCmdFlow = SW_SHOW; if(m_nType ==0) { nCmdTab = SW_SHOW; nCmdFlow = SW_HIDE; } m_tab.ShowWindow(nCmdTab); GetDlgItem(IDC_BCONFIG)->ShowWindow(nCmdTab); GetDlgItem(IDC_STATICFLOW)->ShowWindow(nCmdFlow); m_EditFlowRate.ShowWindow(nCmdFlow); m_cmbFlowRateUnit.ShowWindow(nCmdFlow); InitFlowUnit(); ChangeType(); }
//下释放 void CMatchGame::OnDownBtnReleased() { ChangeType(DIR_DOWN, false); }
//下按下 void CMatchGame::OnDownBtnPressed() { ChangeType(DIR_DOWN, true); }
//上释放 void CMatchGame::OnUpBtnReleased() { ChangeType(DIR_UP, false); }
//上按下 void CMatchGame::OnUpBtnPressed() { ChangeType(DIR_UP, true); }
//右释放 void CMatchGame::OnRightBtnReleased() { ChangeType(DIR_RIGHT, false); }
//右按下 void CMatchGame::OnRightBtnPressed() { ChangeType(DIR_RIGHT, true); }
//左释放 void CMatchGame::OnLeftBtnReleased() { ChangeType(DIR_LEFT, false); }
//左按下 void CMatchGame::OnLeftBtnPressed() { ChangeType(DIR_LEFT, true); }
void PagePumpModel::OnSelchangeFlowUnit() { // TODO: Add your control notification handler code here ChangeType(); }
PlotQueryInfo::ChangeType PlotQueryInfo::GetChangeType() const { return ChangeType(changeType); }
void CPDetectorDialog::OnTypeChange(wxCommandEvent &e) { ChangeType(); };