Initial commit
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "UtilityUnit.h"
|
||||
#include "GlobalUnit.h"
|
||||
#include "RBmasterMain.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#pragma package(smart_init)
|
||||
|
||||
int g_iPlatform = 0; //游戏平台
|
||||
unsigned g_tmCurrent = 0,
|
||||
g_tmIdle = 0; //软件无操作时间
|
||||
bool g_bBacData = false;
|
||||
|
||||
void __fastcall ResetIdle()
|
||||
{
|
||||
if(g_tmIdle==600)
|
||||
MainForm->GetCefFrame( MAIN_FRAME )->ExecuteJavaScript("tmRetry=90;console.log('tmRetry:',tmRetry);", "", 0);
|
||||
|
||||
g_tmIdle = 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
_di_ICefFrame __fastcall GetCefFrame( int type )
|
||||
{
|
||||
return MainForm->GetCefFrame( type );
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
TStringList* __fastcall GetJQValue( String& str, _di_ICefFrame frame )
|
||||
{
|
||||
return MainForm->GetJQValue( str, frame );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall SetStatus( int iStatus, String str )
|
||||
{
|
||||
MainForm->m_strStatus = str;
|
||||
MainForm->Perform(UM_STATUS, iStatus, (NativeInt)0 );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall UpdateStatistics()
|
||||
{
|
||||
MainForm->Perform(UM_STATISTICS, 0, (NativeInt)0 );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
void __fastcall AutoBetEnd(int code)
|
||||
{
|
||||
PostMessage( MainForm->Handle, UM_AUTOBETEND, code, 0 );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
//bool __fastcall IsGameOn()
|
||||
//{
|
||||
// return MainForm->IsGameOn();
|
||||
//}
|
||||
////---------------------------------------------------------------------------
|
||||
|
||||
int __fastcall IsPolicyInUse(int type, int iPolicy)
|
||||
{
|
||||
return MainForm->IsPolicyInUse(type, iPolicy);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
char sufCard[3][8] = {"_,_,_", ",_,_", ",_"};
|
||||
String __fastcall UnifyCard(String card)
|
||||
{
|
||||
String uc;
|
||||
|
||||
int len = card.Length();
|
||||
if(len==0)
|
||||
uc = sufCard[0];
|
||||
else if(len==1)
|
||||
uc = card + sufCard[1];
|
||||
else if(len==3)
|
||||
uc = card + sufCard[2];
|
||||
else if(len==5)
|
||||
uc = card;
|
||||
else
|
||||
DebugPrint("!!!====abnormal card : %s", ((AnsiString)uc).c_str());
|
||||
|
||||
return uc;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user