bool VE_SD::Module1::Run() { try { // Geo Pre-Calculate if (!Internal->GeoPreCal() // Geo Pre-Calculate || !Internal->WaterLevelCal() // Water Level Cal || !Internal->WavePressureCal() // Wave Pressure Moment Cal || !Internal->WeightCal() // Self Weight Moment Cal || !Internal->BodySafeCheck() // Safe Check!!!!! || !Internal->BreakerSafeCheck() // Breaker Safe Check || !Internal->UpperSafeCheck() //Upper Block Safe Check || !Internal->BasementSafeCheck() // Basement Safe Check ) { MsgAdd(); ErrMsg += "*** Module - 1 計算失敗 *** \r\n"; } } catch (std::exception& e) { MsgAdd(); ErrMsg += "*** Module - 1 程式錯誤,請確認輸入條件 *** \r\n"; return false; } // Mesg Print MsgAdd(); //Mesg ErrMsg += "*** Module - 1 計算結束 *** \r\n"; //Test--- return true; }
/****************************************************************************************************************** 함수명 : CInterface::OnLButtonUp() 작성자 : 작성일 : 목적 : Mouse LButtonUp이 일어났을때 인터페이스에서 할일을 정의한다. 입력 : POINT ptMouse 출력 : BOOL [일자][수정자] : 수정내용 *******************************************************************************************************************/ BOOL CInterface::OnLButtonUp(POINT ptMouse) { m_bMoveFocusedWnd = FALSE; if ( m_xMsgBox.IsActive() ) // 용기 { HRESULT hResult; hResult = m_xMsgBox.OnButtonUp(ptMouse); if ( hResult != 0 ) { switch ( m_nIdxMsgBox ) { case 12: { switch ( hResult ) // 에디트 박스가 없음. { case 2: { DWORD dwCurrTick = timeGetTime(); if ( (dwCurrTick - g_xGameProc.m_xMyHero.m_dwLastPKStruckTime> 10000) && (dwCurrTick - g_xGameProc.m_xMyHero.m_dwLastMagicTime > 10000) && (dwCurrTick - g_xGameProc.m_xMyHero.m_dwLastHitTime > 10000) || (g_xGameProc.m_xMyHero.m_bCurrMtn == _MT_DIE ) ) SendMessage(g_xMainWnd.GetSafehWnd(), WM_DESTROY, NULL, NULL); else { DWORD dwFont, dwBack; dwFont = GetChatColor(3); dwBack = GetChatColor(2); MsgAdd(dwFont, dwBack, "전투중에는 접속을 끊을 수 없습니다."); } } break; case 4: m_xMsgBox.HideMessageBox(); break; } } break; } } } else { if ( m_xScrlBar.OnLButtonUp(ptMouse) ) { return TRUE; } for( INT nCnt = 0; nCnt < _MAX_INTER_BTN; nCnt++ ) { if ( m_xInterBtn[nCnt].OnLButtonUp(ptMouse) ) { switch ( nCnt ) { case _BTN_ID_QUEST: WindowActivate(_WND_ID_QUEST); break; case _BTN_ID_OPTION: WindowActivate(_WND_ID_OPTION); break; case _BTN_ID_HORSE: WindowActivate(_WND_ID_HORSE); break; case _BTN_ID_CHANGE: WindowActivate(_WND_ID_EXCHANGE); break; case _BTN_ID_GUILD: g_xClientSocket.SendGuildHome(); break; case _BTN_ID_GROUP: WindowActivate(_WND_ID_GROUP); break; case _BTN_ID_POPUP: WindowActivate(_WND_ID_CHATPOP); break; case _BTN_ID_BAG: WindowActivate(_WND_ID_INVENTORY); break; case _BTN_ID_MUGONG: m_bShowKey = !m_bShowKey; break; case _BTN_ID_BELT: { if ( m_shBeltHeight >= 46 ) { m_shBeltHeight = 46; } else if ( m_shBeltHeight <= 0 ) { m_shBeltHeight = 0; } if ( m_shBeltHeight == 46 ) { m_bBeltState = _BELT_STATE_DOWN; } else if ( m_shBeltHeight == 0 ) { m_bBeltState = _BELT_STATE_UP; } } break; case _BTN_ID_EXIT: { CHAR szMsg[MAX_PATH]; HINSTANCE hLib; m_nIdxMsgBox = 12; hLib = LoadLibrary("Ats.dll"); // Load Dll LoadString(hLib,m_nIdxMsgBox,szMsg, MAX_PATH); FreeLibrary(hLib); m_xMsgBox.ShowMessageBox(szMsg, 2); // YES/No ? } break; case _BTN_ID_MAGIC: if ( m_xStatusWnd.GetStatusWndType() != _TYPE_SETMAGIC ) { if ( !WindowActivate(_WND_ID_STATUS) ) WindowActivate(_WND_ID_STATUS); } else WindowActivate(_WND_ID_STATUS); m_xStatusWnd.SetStatusWndType(_TYPE_SETMAGIC); break; case _BTN_ID_CHAR: if ( m_xStatusWnd.GetStatusWndType() != _TYPE_EQUIP ) { if ( !WindowActivate(_WND_ID_STATUS) ) WindowActivate(_WND_ID_STATUS); } else WindowActivate(_WND_ID_STATUS); m_xStatusWnd.SetStatusWndType(_TYPE_EQUIP); break; } } } INT nInterfaceWndInRect; nInterfaceWndInRect = GetWindowInMousePos(ptMouse); // 각 윈도우의 OnLButtonUp의 리턴값이 TRUE이면 윈도우즈는 Close된다. if ( nInterfaceWndInRect != -1 ) { switch ( nInterfaceWndInRect ) { case _WND_ID_INVENTORY: if ( m_xInventoryWnd.OnLButtonUp(&m_stCommonItem, ptMouse) ) WindowActivate(_WND_ID_INVENTORY); break; case _WND_ID_STATUS: if ( m_xStatusWnd.OnLButtonUp(&m_stCommonItem, ptMouse) ) WindowActivate(_WND_ID_STATUS); break; case _WND_ID_STORE: if ( m_xStoreWnd.OnLButtonUp(ptMouse) ) WindowActivate(_WND_ID_STORE); break; case _WND_ID_EXCHANGE: if ( m_xExchangeWnd.OnLButtonUp(ptMouse) ) WindowActivate(_WND_ID_EXCHANGE); break; case _WND_ID_GUILDMASTER: { if ( m_xGuildMasterWnd.OnLButtonUp(ptMouse) ) WindowActivate(_WND_ID_EXCHANGE); break; } case _WND_ID_GUILD: if ( m_xGuildWnd.OnLButtonUp(ptMouse) ) WindowActivate(_WND_ID_GUILD); break; case _WND_ID_GROUP: if ( m_xGroupWnd.OnLButtonUp(ptMouse) ) WindowActivate(_WND_ID_GROUP); break; case _WND_ID_GROUPPOP: if ( m_xGroupPopWnd.OnLButtonUp(ptMouse) ) WindowActivate(_WND_ID_GROUPPOP); break; case _WND_ID_CHATPOP: if ( m_xChatPopWnd.OnLButtonUp(ptMouse) ) WindowActivate(_WND_ID_CHATPOP); break; case _WND_ID_QUEST: if ( m_xQuestWnd.OnLButtonUp(ptMouse) ) WindowActivate(_WND_ID_QUEST); break; case _WND_ID_OPTION: if ( m_xOptionWnd.OnLButtonUp(ptMouse) ) WindowActivate(_WND_ID_OPTION); break; case _WND_ID_HORSE: if ( m_xHorseWnd.OnLButtonUp(ptMouse) ) WindowActivate(_WND_ID_HORSE); break; case _WND_ID_NPCCHAT: if ( m_xNPCWnd.OnLButtonUp(ptMouse) ) WindowActivate(_WND_ID_NPCCHAT); break; // 용기 } return TRUE; } } return FALSE; }