Policy to UTF8
This commit is contained in:
+4
-1
@@ -1,4 +1,4 @@
|
|||||||
#排除所有的编译目录
|
#排除所有的编译目录
|
||||||
**/Win32/
|
**/Win32/
|
||||||
|
|
||||||
#排除scratch和docs
|
#排除scratch和docs
|
||||||
@@ -15,3 +15,6 @@ __recovery/
|
|||||||
*.local
|
*.local
|
||||||
*.rc
|
*.rc
|
||||||
*.dsv
|
*.dsv
|
||||||
|
*.md
|
||||||
|
*.doc
|
||||||
|
*.txt
|
||||||
+1
-1
@@ -601,7 +601,7 @@ void __fastcall TGame::CalcBet()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(up){ //不定长
|
if(up){ //不定长
|
||||||
while(ch==aRes[pos]) pos--; //一直找到不同颜色
|
while(pos>=0 && ch==aRes[pos]) pos--; //一直找到不同颜色
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -963,7 +963,7 @@ void __fastcall TPolicyEditForm::OnSaveClick(TObject *Sender)
|
|||||||
//是否层级注码
|
//是否层级注码
|
||||||
int kind = m_cbKind->ItemIndex;
|
int kind = m_cbKind->ItemIndex;
|
||||||
pTmpPolicy = kind==KIND_CHIP_HAN ? new TTierPolicy
|
pTmpPolicy = kind==KIND_CHIP_HAN ? new TTierPolicy
|
||||||
: kind==KIND_CHIP_LEV || kind<=KIND_CHIP_COM ? new TLevelPolicy
|
: kind==KIND_CHIP_LEV || kind==KIND_CHIP_COM ? new TLevelPolicy
|
||||||
: kind==KIND_CHIP_WLD ? new TWLDiffPolicy
|
: kind==KIND_CHIP_WLD ? new TWLDiffPolicy
|
||||||
: new TChipPolicy;
|
: new TChipPolicy;
|
||||||
pTmpPolicy->kind = kind;
|
pTmpPolicy->kind = kind;
|
||||||
|
|||||||
+5
-3
@@ -898,6 +898,7 @@ void __fastcall LoadSystemBetPolicies()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
void __fastcall LoadUserBetPolicies()
|
void __fastcall LoadUserBetPolicies()
|
||||||
{
|
{
|
||||||
char szFile[256];
|
char szFile[256];
|
||||||
@@ -922,8 +923,9 @@ void __fastcall LoadUserBetPolicies()
|
|||||||
|
|
||||||
int num;
|
int num;
|
||||||
fread(&num, sizeof(int), 1, fp);
|
fread(&num, sizeof(int), 1, fp);
|
||||||
fread(buf, sizeof(char), num, fp);
|
fread(buf, sizeof(char), num, fp);
|
||||||
pPolicy->name = buf;
|
|
||||||
|
pPolicy->name = head[3]<=3 ? GBKToUTF8(buf) : String(buf);
|
||||||
pPolicy->actived = true;
|
pPolicy->actived = true;
|
||||||
|
|
||||||
fread(&pPolicy->type, sizeof(int), 1, fp);
|
fread(&pPolicy->type, sizeof(int), 1, fp);
|
||||||
@@ -1176,7 +1178,7 @@ void __fastcall LoadUserChipPolicies()
|
|||||||
|
|
||||||
pPolicy->type = type;
|
pPolicy->type = type;
|
||||||
pPolicy->kind = kind;
|
pPolicy->kind = kind;
|
||||||
pPolicy->name = name;
|
pPolicy->name = head[3]<=7 ? GBKToUTF8(name) : String(name);
|
||||||
pPolicy->id = id;
|
pPolicy->id = id;
|
||||||
pPolicy->actived = true;
|
pPolicy->actived = true;
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -108,7 +108,7 @@
|
|||||||
<Debugger_CWD>..\Deploy\$(Platform)\$(Config)\</Debugger_CWD>
|
<Debugger_CWD>..\Deploy\$(Platform)\$(Config)\</Debugger_CWD>
|
||||||
<IncludePath>$(BDSINCLUDE)\windows\vcl;$(IncludePath)</IncludePath>
|
<IncludePath>$(BDSINCLUDE)\windows\vcl;$(IncludePath)</IncludePath>
|
||||||
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||||
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
|
<Manifest_File>app.manifest</Manifest_File>
|
||||||
<UWP_CppLogo44>..\res\RBmaster.Artwork\Windows\Uwp_44.png</UWP_CppLogo44>
|
<UWP_CppLogo44>..\res\RBmaster.Artwork\Windows\Uwp_44.png</UWP_CppLogo44>
|
||||||
<UWP_CppLogo150>..\res\RBmaster.Artwork\Windows\Uwp_150.png</UWP_CppLogo150>
|
<UWP_CppLogo150>..\res\RBmaster.Artwork\Windows\Uwp_150.png</UWP_CppLogo150>
|
||||||
<AppExecutionLevel>requireAdministrator</AppExecutionLevel>
|
<AppExecutionLevel>requireAdministrator</AppExecutionLevel>
|
||||||
@@ -172,6 +172,7 @@
|
|||||||
<BT_BuildType>Debug</BT_BuildType>
|
<BT_BuildType>Debug</BT_BuildType>
|
||||||
<Debugger_RunParams>-testing</Debugger_RunParams>
|
<Debugger_RunParams>-testing</Debugger_RunParams>
|
||||||
<Icon_MainIcon>..\res\RBmaster.Artwork\Windows\AppIcon.ico</Icon_MainIcon>
|
<Icon_MainIcon>..\res\RBmaster.Artwork\Windows\AppIcon.ico</Icon_MainIcon>
|
||||||
|
<Manifest_File>app.manifest</Manifest_File>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
|
<PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
|
||||||
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
<AppEnableRuntimeThemes>true</AppEnableRuntimeThemes>
|
||||||
|
|||||||
+2
-27
@@ -105,34 +105,9 @@ char* websites[WSNUM] = { "gci.dsn20102022.co",
|
|||||||
"gci.4kh1mb8gkpb5.com",
|
"gci.4kh1mb8gkpb5.com",
|
||||||
"gci.myf7f3bx.com"
|
"gci.myf7f3bx.com"
|
||||||
};
|
};
|
||||||
char* urServer = "177.4.10.212"; //"127.0.0.1:10800"; //
|
char* urServer = "124.220.61.195:98"; //"127.0.0.1:10800"; //
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
int UTF8ToGBK( const char *pcUtf8, AnsiString& strGBK )
|
|
||||||
{
|
|
||||||
int nUnicodeLen = MultiByteToWideChar(CP_UTF8, 0, pcUtf8, -1, NULL, 0);
|
|
||||||
|
|
||||||
wchar_t * pcUnicode = new wchar_t[nUnicodeLen+1];
|
|
||||||
memset(pcUnicode, 0, nUnicodeLen * 2 + 2);
|
|
||||||
|
|
||||||
//utf8 to unicode
|
|
||||||
MultiByteToWideChar(CP_UTF8, 0, pcUtf8, -1, pcUnicode, nUnicodeLen);
|
|
||||||
|
|
||||||
//unicode to GBK
|
|
||||||
int nGBKLen = WideCharToMultiByte(CP_ACP, 0, pcUnicode, -1, NULL, 0, NULL, NULL);
|
|
||||||
|
|
||||||
char *pcGBK=new char[nGBKLen + 1];
|
|
||||||
memset(pcGBK, 0, nGBKLen + 1);
|
|
||||||
|
|
||||||
WideCharToMultiByte(CP_ACP, 0, pcUnicode, -1, pcGBK, nGBKLen, NULL, NULL);
|
|
||||||
|
|
||||||
strGBK=pcGBK;
|
|
||||||
delete[] pcGBK;
|
|
||||||
delete[] pcUnicode;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
//---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
__fastcall TMainForm::TMainForm(TComponent* Owner)
|
__fastcall TMainForm::TMainForm(TComponent* Owner)
|
||||||
: TForm(Owner)
|
: TForm(Owner)
|
||||||
@@ -280,7 +255,7 @@ void __fastcall TMainForm::FormShow(TObject *Sender)
|
|||||||
m_pUtilTimer->Tag = -1;
|
m_pUtilTimer->Tag = -1;
|
||||||
m_pUtilTimer->OnTimer = UtilTimerProc;
|
m_pUtilTimer->OnTimer = UtilTimerProc;
|
||||||
m_pUtilTimer->Interval = 500;
|
m_pUtilTimer->Interval = 500;
|
||||||
m_pUtilTimer->Enabled = true; //false; //
|
m_pUtilTimer->Enabled = false; //true; //
|
||||||
|
|
||||||
m_cbBetWays->SelLength = 0;
|
m_cbBetWays->SelLength = 0;
|
||||||
m_cbBetChips->SelLength = 0;
|
m_cbBetChips->SelLength = 0;
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<assemblyIdentity type="win32" name="YourAppName" version="1.0.0.0"/>
|
||||||
|
<application>
|
||||||
|
<windowsSettings>
|
||||||
|
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
</assembly>
|
||||||
Reference in New Issue
Block a user