4.0.8 & convert utf8
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
#排除所有的编译目录
|
#排除所有的编译目录
|
||||||
**/Win32/
|
**/Win32/
|
||||||
|
|
||||||
|
#排除scratch和docs
|
||||||
|
.scratch/
|
||||||
|
docs/
|
||||||
|
|
||||||
#排除历史和恢复目录
|
#排除历史和恢复目录
|
||||||
__history/
|
__history/
|
||||||
__recovery/
|
__recovery/
|
||||||
@@ -10,3 +14,4 @@ __recovery/
|
|||||||
*.cbpr
|
*.cbpr
|
||||||
*.local
|
*.local
|
||||||
*.rc
|
*.rc
|
||||||
|
*.dsv
|
||||||
@@ -0,0 +1,237 @@
|
|||||||
|
# AGENTS.md
|
||||||
|
|
||||||
|
Windows-only codebase. Embarcadero **RAD Studio 13.2 (ProjectVersion 20.5), VCL, C++ personality**. No test framework, no linter, no CI. This `AGENTS.md` lives inside the `RBmaster/` subdirectory — all paths below are relative to it, and shared directories (`Global/`, `Upgrade/`, `CEF4Delphi/`, `res/`, `Deploy/`) are one level up (`..\Global\` etc.).
|
||||||
|
|
||||||
|
## Encoding — UTF-8, keep it that way
|
||||||
|
|
||||||
|
**All C++ sources, headers, `.dfm`s and `.rc`s in `RBmaster/`, `..\Global/`, `..\Upgrade/` and `..\res/` are UTF-8.** This was converted from GBK/CP936 (`..\ToUTF8.py`, pre-conversion backups in `..\backup_before_utf8\`). Verified: 0 of 94 source files fail a strict UTF-8 decode.
|
||||||
|
|
||||||
|
- **Write UTF-8. Never write GBK/CP936.** Re-encoding a file back to CP936 silently corrupts every Chinese comment and literal (`L"红蓝大师"` is RBmaster's `APPNAME`, at `..\Global\GlobalUnit.h:193`).
|
||||||
|
- **BOM is mixed and that is fine.** 51 of 94 files start with a UTF-8 BOM (most `.cpp`); 43 do not (mostly ASCII-only `.h` / `.dfm` / `.rc`). Don't "normalize" this — just match whatever the file you are editing already does, and never let a single file end up half-and-half.
|
||||||
|
- Comments and user-facing strings are **Simplified Chinese**. Keep it that way.
|
||||||
|
- `..\Upgrade\` already committed its conversion (`bd3861f convert utf8`). The RBmaster-side conversion plus `AGENTS.md` and `opencode.json` were **staged but not committed** at the time of writing — so `git diff` will show whole-file rewrites until that commit lands. Expect it; don't try to "fix" it by reverting.
|
||||||
|
- `AGENTS.md` itself and `opencode.json` are UTF-8 **without** BOM.
|
||||||
|
|
||||||
|
There is **no working C++ LSP** for this repo (no `compile_commands.json`, no C++ toolchain aware of the VCL include paths). Editor diagnostics report hundreds of bogus errors — `vcl.h file not found`, `Unknown type name 'String'`, `Unknown type name 'TObject'`. **Ignore them.** Trust the C++Builder IDE or a real `msbuild` run instead.
|
||||||
|
|
||||||
|
## Agent tooling constraints
|
||||||
|
|
||||||
|
`opencode.json` (project root) sets:
|
||||||
|
|
||||||
|
```json
|
||||||
|
"permission": {
|
||||||
|
"external_directory": { "*": "ask" },
|
||||||
|
"bash": { "*": "allow" }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- **`bash: allow`** — shell commands run without a prompt. This is the project default and it is **committed**, so it applies to everyone on the team, not just you.
|
||||||
|
- **`external_directory: ask`** — anything outside `RBmaster/` still needs a prompt: `..\Global\`, `..\Upgrade\`, `..\res\`, `..\CEF4Delphi\`, `..\Baccarats.groupproj`. This covers both the file tools (`read`, `grep`, `edit`, `write`) and shell paths — a `bash` command that touches `..\` will be gated by this rule, **not** by the bash rule. Opening bash does not buy you access outside the repo.
|
||||||
|
- Consequence: before planning an edit that crosses the boundary, expect one prompt per such command. Batch them. If a shared contract genuinely cannot be edited, say so rather than silently changing only the RBmaster half.
|
||||||
|
|
||||||
|
## This is ONE codebase, MANY products
|
||||||
|
|
||||||
|
`..\Global\GlobalUnit.h:54-348` is a `#if defined(_PRODUCT_)` chain. The active product sets `APPNAME`, `APPABBR`, `SOFTWARE_ID`, `SORTWARE_VER`, `SINGLE_INSTANCE`, `GLOBAL_VAR_FILE`. ~20 products share this source (`_RBM_` = 红蓝大师, id 23, `GlobalUnit.h:193-195`; `_RBMabc_` id 24, `_ABG_` id 18, `_SPTHDG_` id 13, …). Most branches are commented out.
|
||||||
|
|
||||||
|
- Active product is selected by a **preprocessor define**, currently `_RBM_` — set in `RBmaster.cbproj:80` (`<Defines>_RBM_;$(Defines)</Defines>`), not in source.
|
||||||
|
- To change product: edit the `.cbproj` `<Defines>`, **not** `GlobalUnit.h`.
|
||||||
|
- `GLOBAL_VAR_FILE` (`glbvrf.cnf` for `_RBM_`, `GlobalUnit.h:347`) is the server-list file — it is the **4th arg to AppUpgrade**, not an app-local config.
|
||||||
|
|
||||||
|
Do not "clean up" the commented-out product blocks; they are the product matrix.
|
||||||
|
|
||||||
|
## Layout & ownership
|
||||||
|
|
||||||
|
| Path (relative to cwd=`RBmaster/`) | What |
|
||||||
|
|---|---|
|
||||||
|
| `.` (this dir) | **Main program.** Own repo. `RBmaster.exe` |
|
||||||
|
| `..\Upgrade\` | **Auto-updater**, separate repo. `AppUpgrade.exe` |
|
||||||
|
| `..\Global\` | Shared code, compiled into RBmaster only. `TBaseThread`/`TBaseWebThread`, `CSema`, `HttpThread` (WinINet), `CommonV8Handler` (CEF V8 bridge), `SHA2`, `paramcodec`. **Not a separate build target** |
|
||||||
|
| `..\CEF4Delphi\` | Vendored Chromium Embedded Framework. Live for RBmaster, dead for Upgrade |
|
||||||
|
| `..\res\` | Icons/bitmaps/wav (`AppIcon.ico`, `rnb.psd`, `snd1-6.wav`, …); `..\res\RBmaster.Artwork\` is RAD Studio deployment artwork |
|
||||||
|
|
||||||
|
`Global/` has no project file — its 7 `.cpp` files (`BaseThread`, `CommonV8Handler`, `GlobalUnit`, `HttpThread`, `ResourceHandler`, `SHA2`, `SimpleMutex`) are listed as `..\Global\*.cpp` entries inside `RBmaster.cbproj`, and all 7 are present there. **Adding a new file to `Global/` requires a manual `<CppCompile Include>` edit to the cbproj.** Search paths are `..\Global\;` and `..\CEF4Delphi\$(Platform)\hpps`.
|
||||||
|
|
||||||
|
## Git — two repos, not three
|
||||||
|
|
||||||
|
`RBmaster/` is a git repo; `..\Upgrade\` is its own. Tree root (`..\Baccarats.groupproj`, `..\Deploy\`) is **not** under version control and has no shared history between the two repos.
|
||||||
|
|
||||||
|
- `RBmaster/` → `ssh://git@gitea/rnb/winapp.git`, branch `main` (81 tracked files)
|
||||||
|
- `..\Upgrade\` → `ssh://git@gitea/BCB_common/AppUpgrade.git`, branch `main`
|
||||||
|
|
||||||
|
Commit only from inside the respective subdirectory.
|
||||||
|
|
||||||
|
Commit messages are mixed Chinese/English, often just a version string (e.g. `4.0.7版`). Match that style.
|
||||||
|
|
||||||
|
### `.gitignore` — the rules that will surprise you
|
||||||
|
|
||||||
|
Verbatim, `RBmaster/.gitignore`:
|
||||||
|
|
||||||
|
```
|
||||||
|
**/Win32/
|
||||||
|
.scratch/
|
||||||
|
docs/
|
||||||
|
__history/
|
||||||
|
__recovery/
|
||||||
|
*.~dsk
|
||||||
|
*.cbpr
|
||||||
|
*.local
|
||||||
|
*.dsv
|
||||||
|
*.rc
|
||||||
|
```
|
||||||
|
|
||||||
|
- **`docs/` is gitignored.** `docs/agents/*.md` exists on disk but is **not committed**. Skills that reference it will read a file that no other checkout has.
|
||||||
|
- **`.scratch/` is gitignored** — the local-markdown issue tracker is per-developer by design.
|
||||||
|
- **`*.rc` is gitignored**, so `RBmaster_resources.rc` is **untracked**. It compiles but will never be committed unless the rule is changed.
|
||||||
|
- `*.local` and `*.dsv` cover `RBmaster.cbproj.local` and `RBmaster.dsv` — IDE state, correctly ignored.
|
||||||
|
- `AGENTS.md` and `opencode.json` **are** tracked.
|
||||||
|
- A stray `master` branch exists locally alongside `main` and points at the initial commit. Don't commit to it.
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
Both projects output to `..\Deploy\$(Platform)\$(Config)\` (i.e. `..\Deploy\Win32\Debug\`). That dir is gitignored/absent.
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# Per project (rsvars.bat / $(BDS) must be on PATH first)
|
||||||
|
msbuild RBmaster.cbproj /t:Build /p:Config=Debug /p:Platform=Win32
|
||||||
|
msbuild ..\Upgrade\AppUpgrade.cbproj /t:Build /p:Config=Debug /p:Platform=Win32
|
||||||
|
|
||||||
|
# Both at once — `Baccarats.groupproj` (tree-root; not reachable when cwd=RBmaster/ — run the two projects individually instead)
|
||||||
|
msbuild ..\Baccarats.groupproj /t:Build /p:Config=Debug /p:Platform=Win32
|
||||||
|
```
|
||||||
|
|
||||||
|
Platforms: `Win32`, `Win64`, `Win64x` (all defined in the cbproj; `Win32` is the enabled one). Configs: `Debug`, `Release`. Default is `Debug`.
|
||||||
|
|
||||||
|
`..\Baccarats.groupproj` references only `RBmaster\RBmaster.cbproj` and `Upgrade\AppUpgrade.cbproj`, and its `Import` of `$(BDS)\Bin\CodeGear.Group.Targets` is guarded by `Condition="Exists(...)"` — build the two projects individually if the group build silently does nothing.
|
||||||
|
|
||||||
|
Both projects set `AppExecutionLevel = requireAdministrator` in **every** config. The app will UAC-elevate during IDE-run and debugging.
|
||||||
|
|
||||||
|
RBmaster links `CEF4DelphiVCLRTL.lib` and `TPNGButton.lib` on top of the standard VCL set (`rtl`, `vcl`, `fmx`, `vclimg`, `xmlrtl`, `vclactnband`, `vclx`). `Upgrade` links only `rtl.lib;vcl.lib`.
|
||||||
|
|
||||||
|
## Runtime CLI switches (RBmaster)
|
||||||
|
|
||||||
|
Parsed at `RBmaster.cpp:229-235`, lowercased before comparison:
|
||||||
|
|
||||||
|
- `-d` → `g_bBacData = true`, creates the `data\` log directory
|
||||||
|
- `-testing` → `g_bTesting = true`, enables CEF logging (`RBmaster.cpp:92`), and skips the single-instance window-property registration (`RBmaster.cpp:294`, `:302`). It also simulates bet/account feedback across `BacABThread.cpp`, `BacDPThread.cpp:382`, `SettingFormUnit.cpp:263` (`m_cbSimAcc`) — a `-testing` run exercises a different code path than production.
|
||||||
|
|
||||||
|
Without `-testing` the app registers a window property (`APPABBR` = `rbmaster`, `RBmaster.cpp:295`) used by `IsRestart()` to detect an already-running instance and forward `UM_RESTORE`.
|
||||||
|
|
||||||
|
## Startup flow (`RBmaster.cpp`)
|
||||||
|
|
||||||
|
`_tWinMain` → `Startup()` (line 224):
|
||||||
|
|
||||||
|
1. `IsRestart()` (129-159) — finds an existing instance; if this process is that instance's child, it only runs `InitCef()` and exits (line 149). CEF child processes bootstrap here.
|
||||||
|
2. `InitCef()` (84) — configures `TCefApplication` before any form exists. `NoSandbox=true`, `IgnoreCertificateErrors=true`, `DisableWebSecurity=true`, `SingleProcess=false`, `SitePerProcess=true`.
|
||||||
|
3. `InitUserPath()` (205-219) — `ForceDirectories` for `user\`, and for `data\` only when `-d` was passed.
|
||||||
|
4. `Application->CreateForm(TMainForm)` (251).
|
||||||
|
5. **`TMainForm::Tag` is the control-flow channel** (244-291). It is set by the main form during construction to steer startup:
|
||||||
|
- `0` normal run · `-1` 加载应用模块失败 · `-3` 连接服务器失败 · `-4` 软件已停止运行 · `-5` CEF 初始化失败
|
||||||
|
- `2` update required → message box, `mode = 2` → `StartUpgrade(2)` (`show`)
|
||||||
|
- `4` new version available → yes/no prompt → `mode = 2` (`show`) or `mode = 0`
|
||||||
|
- any other positive value is taken as the upgrade `mode` verbatim and passed to `StartUpgrade(mode)` (289-290)
|
||||||
|
- `bRun = mode<=1` (287) — `mode` 0/1 keep running, `mode` 2/3 hand off to the updater and exit.
|
||||||
|
|
||||||
|
`RBmasterMain.cpp` is the main form, not the entrypoint. The entrypoint unit is `RBmaster.cpp` (`USEFORM("RBmasterMain.cpp", MainForm)` at line 222).
|
||||||
|
|
||||||
|
## The RBmaster ↔ Upgrade contract
|
||||||
|
|
||||||
|
`RBmaster.cpp:164-201` `StartUpgrade(mode)` duplicates the process token and `CreateProcessAsUser`s the updater. **RBmaster does not wait for it** — the updater must kill RBmaster itself.
|
||||||
|
|
||||||
|
Command line actually built at `RBmaster.cpp:186-196`:
|
||||||
|
|
||||||
|
```
|
||||||
|
<app>\AppUpgrade.exe {move|show|hide} <RBmaster exe name> <SOFTWARE_ID> <GLOBAL_VAR_FILE>
|
||||||
|
```
|
||||||
|
|
||||||
|
The keyword is chosen by RBmaster's `mode` (187-192): `mode==3` → `move`, `mode==2` → `show`, everything else → `hide`. **RBmaster never sends `MD5`.**
|
||||||
|
|
||||||
|
Verified mapping in `AppUpgrade.cpp:44-75` — **the first arg is a keyword, and its internal `mode` is inverted vs. the keyword's name**:
|
||||||
|
|
||||||
|
| Arg 1 | Internal `mode` | Form shown? |
|
||||||
|
|---|---|---|
|
||||||
|
| `MD5` | 1 | yes — compute + write `filemd5.lst` only |
|
||||||
|
| `show` | 0 | **yes** — download with visible UI |
|
||||||
|
| `hide` | 2 | **no** — headless thread |
|
||||||
|
| `move` | 3 | no — `Sleep(1000)` then replace files |
|
||||||
|
| anything else | 0 | yes |
|
||||||
|
|
||||||
|
Gotcha: `AppUpgrade.exe` with **no args returns immediately and does nothing** (`if( ParamStr(1).IsEmpty() ){ return 0; }`, ~line 44). `MD5` is the only mode that ignores `ParamStr(2..4)`.
|
||||||
|
|
||||||
|
RBmaster's own `mode` is a *different* numbering from AppUpgrade's internal `mode` — the translation happens in the keyword, not the number. Don't line them up.
|
||||||
|
|
||||||
|
Upstream API: `http://<server>/Api/getUpgradeUrl?sid=<SOFTWARE_ID>`, server list from `srv=` lines in the `GVF` binary file (`GLOBAL_VAR_VERSION 0x03`, header `GVF` + version WORD, `tGVFHeader`). User-Agent is hardcoded `RookIE/1.0`.
|
||||||
|
|
||||||
|
Downloads land in `<app_dir>\upgrade\`; `filemd5.lst` (`MD5_FILE_NAME`, `UpgradeThread.cpp:18`) is written by `TUpgradeThread::MakeMD5File()` (`UpgradeThread.cpp:318`) as tab-separated `filename<TAB>md5`. No code signing, no rollback — MD5 from the same server is the only integrity check.
|
||||||
|
|
||||||
|
## Threading contract
|
||||||
|
|
||||||
|
Workers post `UM_*` custom messages to the main form; the form handlers live in `RBmasterMain.cpp` (e.g. `UM_ONJSMessage` dispatch at `RBmasterMain.cpp:1752`).
|
||||||
|
|
||||||
|
**There are three thread base classes — "everything derives from `TBaseThread`" is wrong:**
|
||||||
|
|
||||||
|
| Base | Declared | Users |
|
||||||
|
|---|---|---|
|
||||||
|
| `TBaseThread : public TThread` | `..\Global\BaseThread.h:10` | `TAutoBetThread`, `TDataParseThread`, `TJSHandleThread` |
|
||||||
|
| `TBaseWebThread : public TThread` | `..\Global\HttpThread.h:107` | `TAsynHttpThread` (:122), `TAsynUrlThread` (:142), `TVeloThread` (:158) |
|
||||||
|
| `TThread` | — | `TUpgradeThread` (`..\Upgrade\UpgradeThread.h:22`), the updater's own worker |
|
||||||
|
|
||||||
|
Known workers:
|
||||||
|
|
||||||
|
| Unit | Class | Role |
|
||||||
|
|---|---|---|
|
||||||
|
| `BacABThread.h:13` | `TAutoBetThread : TBaseThread` | places bets by executing injected CEF JavaScript |
|
||||||
|
| `BacDPThread.h:12` | `TDataParseThread : TBaseThread` | parses pipe-delimited game feed, writes `%Y%m%d.txt` logs, posts `UM_ADDTABLE`/`UM_STATUS`/`UM_WEBDEAD` |
|
||||||
|
| `BacJSThread.h:19` | `TJSHandleThread : TBaseThread` | CEF↔C++ bridge round-trips (`UM_JSHANDLED`) |
|
||||||
|
| `..\Global\HttpThread.h:122` | `TAsynHttpThread : TBaseWebThread` | WinINet login/report/logout, posts `UM_HTTPRETURN` |
|
||||||
|
| `..\Global\HttpThread.h:142` | `TAsynUrlThread : TBaseWebThread` | WinINet URL fetch |
|
||||||
|
| `..\Global\HttpThread.h:158` | `TVeloThread : TBaseWebThread` | server-list failover — **defined in `..\Global\HttpThread.h`, not in `RBmasterMain.cpp`**; instantiated from `RBmasterMain.cpp:566`, `:3300` |
|
||||||
|
|
||||||
|
**The `UM_*` ids are a shared, sparse enum defined once in `..\Global\GlobalUnit.h:9-51`** (`WM_USER+0x1000` = `UM_VCCOMPLETE` upward). Adding a message means editing `GlobalUnit.h`, not a local header.
|
||||||
|
|
||||||
|
The updater uses a *different* set in `..\Upgrade\UpgradeThread.h`, and the ranges **do collide**:
|
||||||
|
|
||||||
|
| Updater | Value | RBmaster collision |
|
||||||
|
|---|---|---|
|
||||||
|
| `UM_SHOWTEXT` | `WM_USER+0x1000` | = `UM_VCCOMPLETE` |
|
||||||
|
| `UM_PROGRESS` | `WM_USER+0x1001` | = `UM_WEBLOADED` |
|
||||||
|
| `UM_COMPLETE` | `WM_USER+0x1003` | = `UM_IMAGELODED` |
|
||||||
|
|
||||||
|
They are harmless only because each message is handled inside its own process. Never unify the two headers by accident, and never assume a `WM_USER+0x100N` value is unambiguous across the two repos.
|
||||||
|
|
||||||
|
`HookJS.cpp` (`MyGameLink`, line 35) hooks `onSocketData` inside the page and pushes events back as `cefApp.OnJSMessage('<code>|<payload>')`. `<code>` is a **numeric message type, not a literal `N`** — observed codes are `0`, `3`, `4`, `5`, `7`, `9` (e.g. `'0|-2'`, `'3|'+vid+'|||12|'`, `'9|'+tableId+'|'+roundId+'|'+card[0]+'|'+card[1]`). C++ parses the leading integer in `RBmasterMain.cpp:1752`. Code `0` carries status/result codes (`0`, `-2`, `-3`) rather than data.
|
||||||
|
|
||||||
|
## Persistence
|
||||||
|
|
||||||
|
Files land **next to the exe**, not in AppData — so the install directory must be writable (it requires admin).
|
||||||
|
|
||||||
|
- `rbmvrf` — user vars / policies, `USER_VAR_FILE "\t\trbmvrf"` (`RBmasterMain.cpp:28`)
|
||||||
|
- `rbmgmf` — game + bet settings, `USER_GAME_FILE "\t\trbmgmf"` (`RBmasterMain.cpp:33`)
|
||||||
|
- `glbvrf.cnf` — `GLOBAL_VAR_FILE` server list
|
||||||
|
- `user\` — `ForceDirectories` at `RBmaster.cpp:210`
|
||||||
|
- `data\` — `ForceDirectories` at `RBmaster.cpp:216`, only with `-d`
|
||||||
|
- `cache\` — handed to CEF as the cache path in `InitCef()`; CEF creates it, the app never does
|
||||||
|
- `upgrade\`, `filemd5.lst` — updater
|
||||||
|
|
||||||
|
Saved in `FormClose` / `FileUserVars` / `FileGame`. `rbmvrf`/`rbmgmf` are custom binary (`TUVFHEADER` / `TUGFHEADER` + newline-delimited records), not INI — editing by hand will corrupt them.
|
||||||
|
|
||||||
|
## Gotchas
|
||||||
|
|
||||||
|
- CEF's `WindowlessRenderingEnabled` + `SingleProcess=false` means a **second process** is expected; don't debug by assuming one process tree.
|
||||||
|
- `..\Global\GlobalUnit.h:359-360` `DPIX`/`DPIY` scale everything through `g_xDpi`/`g_yDpi` — new UI code must not hardcode pixel positions.
|
||||||
|
- The default server `23.236.66.46:88` is a **commented-out** `#define DEFAULT_SERVER` in `..\Upgrade\UpgradeThread.cpp`; it is not live. Other hardcoded hosts/ports/URLs live in that file and in `TableIPFormUnit.cpp`.
|
||||||
|
- `RBmasterMain.dfm` uses inherited VCL style-form children; the IDE strips redundant `StyleElements` lines on save, producing large no-op-looking diffs. That's tooling noise, not a behavioral change.
|
||||||
|
- `opencode.json` blocks the file tools from `..\` — see **Agent tooling constraints** above before planning any cross-boundary change.
|
||||||
|
|
||||||
|
## Agent skills
|
||||||
|
|
||||||
|
### Issue tracker
|
||||||
|
|
||||||
|
Issues are local markdown under `.scratch/` — no CLI, no auth, no network. **`.scratch/` is gitignored**, so the tracker is per-developer and never shared. See `docs/agents/issue-tracker.md`.
|
||||||
|
|
||||||
|
### Triage labels
|
||||||
|
|
||||||
|
The five canonical roles written to each ticket's `Status:` line. See `docs/agents/triage-labels.md`.
|
||||||
|
|
||||||
|
### Domain docs
|
||||||
|
|
||||||
|
Single-context: `CONTEXT.md` + `docs/adr/` at this root. See `docs/agents/domain.md`. **Neither exists yet** — `CONTEXT.md` is absent and `docs/adr/` is empty; `docs/agents/domain.md:11` says to proceed silently in that case. Note `docs/agents/domain.md:35` claims these are committed with RBmaster, and `:37` claims the sources are GBK — **both are stale**, ignore those two lines.
|
||||||
+18
-18
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <vcl.h>
|
#include <vcl.h>
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
@@ -24,29 +24,29 @@ void __fastcall TActCodeForm::FormCreate(TObject *Sender)
|
|||||||
|
|
||||||
if(m_sCode.Length()){
|
if(m_sCode.Length()){
|
||||||
if(!m_tExpire)
|
if(!m_tExpire)
|
||||||
m_lbTips->Caption = "授权验证失败,请重新验证";
|
m_lbTips->Caption = "授权验证失败,请重新验证";
|
||||||
else if(m_tExpire < time(NULL))
|
else if(m_tExpire < time(NULL))
|
||||||
m_lbTips->Caption = "授权码已过期,请延期或更换";
|
m_lbTips->Caption = "授权码已过期,请延期或更换";
|
||||||
else{
|
else{
|
||||||
tm* dt = localtime((long*)&m_tExpire);
|
tm* dt = localtime((long*)&m_tExpire);
|
||||||
m_lbTips->Caption = Format(String("有效期至:%.4d-%.2d-%.2d %.2d:%.2d"),
|
m_lbTips->Caption = Format(String("有效期至:%.4d-%.2d-%.2d %.2d:%.2d"),
|
||||||
ARRAYOFCONST((dt->tm_year+1900, dt->tm_mon+1, dt->tm_mday, dt->tm_hour, dt->tm_min)));
|
ARRAYOFCONST((dt->tm_year+1900, dt->tm_mon+1, dt->tm_mday, dt->tm_hour, dt->tm_min)));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_btnReset->Enabled = true;
|
m_btnReset->Enabled = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_lbTips->Caption = "请输入授权码并验证";
|
m_lbTips->Caption = "请输入授权码并验证";
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void __fastcall TActCodeForm::OnCodeChange(TObject *Sender)
|
void __fastcall TActCodeForm::OnCodeChange(TObject *Sender)
|
||||||
{
|
{
|
||||||
m_btnOk->Caption = m_leActCode->Text.Length()>0 ? "验证" : "关闭";
|
m_btnOk->Caption = m_leActCode->Text.Length()>0 ? "验证" : "关闭";
|
||||||
m_btnReset->Enabled = m_leActCode->Text.Length()>0;
|
m_btnReset->Enabled = m_leActCode->Text.Length()>0;
|
||||||
|
|
||||||
if(m_tExpire>0){
|
if(m_tExpire>0){
|
||||||
m_tExpire = 0;
|
m_tExpire = 0;
|
||||||
m_lbTips->Caption = "请输入授权码并验证";
|
m_lbTips->Caption = "请输入授权码并验证";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@@ -65,21 +65,21 @@ void __fastcall TActCodeForm::OnCodeKeyPress(TObject *Sender, System::WideChar &
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void __fastcall TActCodeForm::OnOkClick(TObject *Sender)
|
void __fastcall TActCodeForm::OnOkClick(TObject *Sender)
|
||||||
{
|
{
|
||||||
if(m_btnOk->Caption=="关闭"){
|
if(m_btnOk->Caption=="关闭"){
|
||||||
ModalResult = mrCancel;
|
ModalResult = mrCancel;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String code = m_leActCode->Text;
|
String code = m_leActCode->Text;
|
||||||
if(code.Length()<9 || code.Length()>10){
|
if(code.Length()<9 || code.Length()>10){
|
||||||
MessageBox(Handle, L"无效的授权码", L"验证", MB_ICONERROR | MB_OK);
|
MessageBox(Handle, L"无效的授权码", L"验证", MB_ICONERROR | MB_OK);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i=1; i<=code.Length(); i++){
|
for(int i=1; i<=code.Length(); i++){
|
||||||
char Key = code[i];
|
char Key = code[i];
|
||||||
if((Key>'9' || Key<'0') && (Key<'A' || Key>'F')){
|
if((Key>'9' || Key<'0') && (Key<'A' || Key>'F')){
|
||||||
MessageBox(Handle, L"无效的授权码", L"验证", MB_ICONERROR | MB_OK);
|
MessageBox(Handle, L"无效的授权码", L"验证", MB_ICONERROR | MB_OK);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -97,21 +97,21 @@ void __fastcall TActCodeForm::UMUserConfirm(TMessage &msg)
|
|||||||
Enabled = true;
|
Enabled = true;
|
||||||
|
|
||||||
if(msg.WParam==102)
|
if(msg.WParam==102)
|
||||||
m_lbTips->Caption = "无效的授权码,请重新输入";
|
m_lbTips->Caption = "无效的授权码,请重新输入";
|
||||||
else if(msg.WParam==106)
|
else if(msg.WParam==106)
|
||||||
m_lbTips->Caption = "该授权码正在其它设备上使用";
|
m_lbTips->Caption = "该授权码正在其它设备上使用";
|
||||||
else if(msg.WParam>0)
|
else if(msg.WParam>0)
|
||||||
m_lbTips->Caption = "授权验证异常,请稍后重试";
|
m_lbTips->Caption = "授权验证异常,请稍后重试";
|
||||||
else{
|
else{
|
||||||
m_tExpire = (int)msg.LParam;
|
m_tExpire = (int)msg.LParam;
|
||||||
|
|
||||||
if(m_tExpire < time(NULL))
|
if(m_tExpire < time(NULL))
|
||||||
m_lbTips->Caption = "授权码已过期,请延期或更换";
|
m_lbTips->Caption = "授权码已过期,请延期或更换";
|
||||||
else{
|
else{
|
||||||
tm* dt = localtime((long*)&m_tExpire);
|
tm* dt = localtime((long*)&m_tExpire);
|
||||||
m_lbTips->Caption = Format(String("有效期至:%.4d-%.2d-%.2d %.2d:%.2d"),
|
m_lbTips->Caption = Format(String("有效期至:%.4d-%.2d-%.2d %.2d:%.2d"),
|
||||||
ARRAYOFCONST((dt->tm_year+1900, dt->tm_mon+1, dt->tm_mday, dt->tm_hour, dt->tm_min)));
|
ARRAYOFCONST((dt->tm_year+1900, dt->tm_mon+1, dt->tm_mday, dt->tm_hour, dt->tm_min)));
|
||||||
m_btnOk->Caption = "关闭";
|
m_btnOk->Caption = "关闭";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -119,9 +119,9 @@ void __fastcall TActCodeForm::UMUserConfirm(TMessage &msg)
|
|||||||
void __fastcall TActCodeForm::OnResetClick(TObject *Sender)
|
void __fastcall TActCodeForm::OnResetClick(TObject *Sender)
|
||||||
{
|
{
|
||||||
m_leActCode->Text = "";
|
m_leActCode->Text = "";
|
||||||
m_lbTips->Caption = "请输入授权码并验证";
|
m_lbTips->Caption = "请输入授权码并验证";
|
||||||
PostMessage(Application->MainFormHandle, UM_USERCONFIRM, UR_RESET, 0 );
|
PostMessage(Application->MainFormHandle, UM_USERCONFIRM, UR_RESET, 0 );
|
||||||
m_btnOk->Caption = "关闭";
|
m_btnOk->Caption = "关闭";
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
+12
-12
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#include <vcl.h>
|
#include <vcl.h>
|
||||||
#include <System.StrUtils.hpp>
|
#include <System.StrUtils.hpp>
|
||||||
#include <System.JSON.hpp>
|
#include <System.JSON.hpp>
|
||||||
@@ -25,14 +25,14 @@ void __fastcall TAutoBetThread::Execute()
|
|||||||
{
|
{
|
||||||
TGame *pGame = g_aGames.GetGame(m_iGame);
|
TGame *pGame = g_aGames.GetGame(m_iGame);
|
||||||
if(pGame){
|
if(pGame){
|
||||||
for(int i=0; i<pGame->aManBets.size(); i++){ //优先处理手工下注
|
for(int i=0; i<pGame->aManBets.size(); i++){ //优先处理手工下注
|
||||||
TManBet& rMB = pGame->aManBets[i];
|
TManBet& rMB = pGame->aManBets[i];
|
||||||
if(rMB.state==ST_INIT){
|
if(rMB.state==ST_INIT){
|
||||||
rMB.state = ST_BETTING;
|
rMB.state = ST_BETTING;
|
||||||
int ret = RealBet(pGame, rMB.chips);
|
int ret = RealBet(pGame, rMB.chips);
|
||||||
if(!Terminated && ret!=0)
|
if(!Terminated && ret!=0)
|
||||||
pGame->BetResp(ret, rMB.chips);
|
pGame->BetResp(ret, rMB.chips);
|
||||||
goto EXIT; //一个线程只处理一个下注
|
goto EXIT; //一个线程只处理一个下注
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,7 +58,7 @@ void __fastcall TAutoBetThread::Execute()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if( pGame->nChip>=0 && pGame->iState==ST_BETTING && pGame->CanBet() ){//再次确认下注状态
|
if( pGame->nChip>=0 && pGame->iState==ST_BETTING && pGame->CanBet() ){//再次确认下注状态
|
||||||
if(g_bSimulate){
|
if(g_bSimulate){
|
||||||
pGame->bReal = false;
|
pGame->bReal = false;
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
|
|||||||
strJS += "tab.addChipByPlayType(" + IntToStr(pG->iBet) + "," + IntToStr(pG->nChip) + ");";
|
strJS += "tab.addChipByPlayType(" + IntToStr(pG->iBet) + "," + IntToStr(pG->nChip) + ");";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(g_bTesting){ //测试时模拟下注反馈
|
if(g_bTesting){ //测试时模拟下注反馈
|
||||||
int chip[3] = {0};
|
int chip[3] = {0};
|
||||||
if(chips)
|
if(chips)
|
||||||
memcpy(chip, chips, sizeof(chip));
|
memcpy(chip, chips, sizeof(chip));
|
||||||
@@ -203,7 +203,7 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
|
|||||||
"const td = gh ? gh.getTableDO(tid) : null;"
|
"const td = gh ? gh.getTableDO(tid) : null;"
|
||||||
"const gst = td ? td.getCurGameStatusText(td.getGameRoundId()) : 'INVALID';"
|
"const gst = td ? td.getCurGameStatusText(td.getGameRoundId()) : 'INVALID';"
|
||||||
"if(gst=='BETTING'){";
|
"if(gst=='BETTING'){";
|
||||||
if(g_bTesting){ //测试时模拟下注反馈
|
if(g_bTesting){ //测试时模拟下注反馈
|
||||||
int chip[3] = {0};
|
int chip[3] = {0};
|
||||||
if(chips)
|
if(chips)
|
||||||
memcpy(chip, chips, sizeof(chip));
|
memcpy(chip, chips, sizeof(chip));
|
||||||
@@ -247,7 +247,7 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
|
|||||||
|
|
||||||
"let res = 0;";
|
"let res = 0;";
|
||||||
|
|
||||||
if(!g_bTesting){// || g_fBalance>0){ //单独测试pushChip
|
if(!g_bTesting){// || g_fBalance>0){ //单独测试pushChip
|
||||||
if(chips){
|
if(chips){
|
||||||
for(int i=0; i<3; i++){
|
for(int i=0; i<3; i++){
|
||||||
if(chips[i]>0){
|
if(chips[i]>0){
|
||||||
@@ -277,7 +277,7 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(g_bTesting){ //测试时模拟下注反馈
|
if(g_bTesting){ //测试时模拟下注反馈
|
||||||
int chip[3] = {0};
|
int chip[3] = {0};
|
||||||
if(chips)
|
if(chips)
|
||||||
memcpy(chip, chips, sizeof(chip));
|
memcpy(chip, chips, sizeof(chip));
|
||||||
@@ -301,7 +301,7 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
|
|||||||
"return;"
|
"return;"
|
||||||
"}"
|
"}"
|
||||||
"}"
|
"}"
|
||||||
"cefApp.ReturnJQValue('');" //非正常状态返回
|
"cefApp.ReturnJQValue('');" //非正常状态返回
|
||||||
"})()";
|
"})()";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -323,10 +323,10 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
|
|||||||
else
|
else
|
||||||
DebugPrint("GetJQValue return: %s", strlst ? "''" : "null");
|
DebugPrint("GetJQValue return: %s", strlst ? "''" : "null");
|
||||||
|
|
||||||
if( ret>=0 || !Halt(1000) ) //得到结果 或 用户cancel中途退出
|
if( ret>=0 || !Halt(1000) ) //得到结果 或 用户cancel中途退出
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if(chips==NULL && g_bSimulate){ //改变了模式
|
if(chips==NULL && g_bSimulate){ //改变了模式
|
||||||
if(g_settings.bSimAccOn && g_settings.bNoBetLow && g_settings.fSimAcc < pG->nChip){
|
if(g_settings.bSimAccOn && g_settings.bNoBetLow && g_settings.fSimAcc < pG->nChip){
|
||||||
pG->BetResp(26, NULL);
|
pG->BetResp(26, NULL);
|
||||||
}
|
}
|
||||||
@@ -343,7 +343,7 @@ int __fastcall TAutoBetThread::RealBet(TGame* pG, int chips[])
|
|||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
if( !Terminated && ret<0 )
|
if( !Terminated && ret<0 )
|
||||||
DebugPrint("%s 下注超时", ((AnsiString)pG->vid).c_str());
|
DebugPrint("%s 下注超时", ((AnsiString)pG->vid).c_str());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret<0 ? 25 : ret;
|
return ret<0 ? 25 : ret;
|
||||||
|
|||||||
+51
-51
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#include <vcl.h>
|
#include <vcl.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#pragma package(smart_init)
|
#pragma package(smart_init)
|
||||||
|
|
||||||
//软件过期时间
|
//软件过期时间
|
||||||
#define TM_ABORT 125000
|
#define TM_ABORT 125000
|
||||||
void __fastcall WriteData( char* msg )
|
void __fastcall WriteData( char* msg )
|
||||||
{
|
{
|
||||||
@@ -27,7 +27,7 @@ void __fastcall WriteData( char* msg )
|
|||||||
// if(!FileExists(szDataFile)){
|
// if(!FileExists(szDataFile)){
|
||||||
// fp = fopen(szDataFile, "w");
|
// fp = fopen(szDataFile, "w");
|
||||||
// if(fp)
|
// if(fp)
|
||||||
// fprintf( fp, "时间,台桌,手数,结果\n" );
|
// fprintf( fp, "时间,台桌,手数,结果\n" );
|
||||||
// }
|
// }
|
||||||
// else{
|
// else{
|
||||||
// fp = fopen(szDataFile, "a");
|
// fp = fopen(szDataFile, "a");
|
||||||
@@ -36,7 +36,7 @@ void __fastcall WriteData( char* msg )
|
|||||||
if(!fp){
|
if(!fp){
|
||||||
fp = fopen(szDataFile, "w");
|
fp = fopen(szDataFile, "w");
|
||||||
if(fp)
|
if(fp)
|
||||||
fprintf( fp, "时间,台桌,手数,结果\n" );
|
fprintf( fp, "时间,台桌,手数,结果\n" );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
fseek(fp, 0, SEEK_END);
|
fseek(fp, 0, SEEK_END);
|
||||||
@@ -47,7 +47,7 @@ void __fastcall WriteData( char* msg )
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
g_bBacData = false;
|
g_bBacData = false;
|
||||||
ShowMessage("导出数据失败! errno=" + IntToStr((int)GetLastError()));
|
ShowMessage("导出数据失败! errno=" + IntToStr((int)GetLastError()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@@ -59,7 +59,7 @@ __fastcall TDataParseThread::TDataParseThread()
|
|||||||
m_hDataEvent = CreateEvent(NULL, FALSE, TRUE, NULL);
|
m_hDataEvent = CreateEvent(NULL, FALSE, TRUE, NULL);
|
||||||
|
|
||||||
// m_tmGST = 0;
|
// m_tmGST = 0;
|
||||||
// m_tmExpire = GetCompileTime() + 30 * 86400; //编译时间后30天过期
|
// m_tmExpire = GetCompileTime() + 30 * 86400; //编译时间后30天过期
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -89,7 +89,7 @@ void __fastcall TDataParseThread::ParseData(String sData)
|
|||||||
|
|
||||||
void __fastcall TDataParseThread::Execute()
|
void __fastcall TDataParseThread::Execute()
|
||||||
{
|
{
|
||||||
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED); //关闭系统休眠
|
SetThreadExecutionState(ES_CONTINUOUS | ES_SYSTEM_REQUIRED); //关闭系统休眠
|
||||||
|
|
||||||
while( !Terminated ){
|
while( !Terminated ){
|
||||||
while(m_aData.size()>0){
|
while(m_aData.size()>0){
|
||||||
@@ -111,17 +111,17 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
}
|
}
|
||||||
|
|
||||||
int iType = arr[0].ToInt();
|
int iType = arr[0].ToInt();
|
||||||
if( iType==0 ){ //连接异常断开
|
if( iType==0 ){ //连接异常断开
|
||||||
DebugPrint("连接异常断开");
|
DebugPrint("连接异常断开");
|
||||||
int reason = arr[1].ToInt();
|
int reason = arr[1].ToInt();
|
||||||
PostMessage( Application->MainFormHandle, UM_WEBDEAD, reason, 0 );
|
PostMessage( Application->MainFormHandle, UM_WEBDEAD, reason, 0 );
|
||||||
}
|
}
|
||||||
else if( iType==1 ){ //初始化所有台桌
|
else if( iType==1 ){ //初始化所有台桌
|
||||||
DebugPrint("!!! init all tables");
|
DebugPrint("!!! init all tables");
|
||||||
g_aGames.Init(arr[1]);
|
g_aGames.Init(arr[1]);
|
||||||
PostMessage( Application->MainFormHandle, UM_ADDTABLE, 0, 0 );
|
PostMessage( Application->MainFormHandle, UM_ADDTABLE, 0, 0 );
|
||||||
}
|
}
|
||||||
else if( iType==2 ){ //台桌Roadmap
|
else if( iType==2 ){ //台桌Roadmap
|
||||||
if(!g_aGames.empty() && arr[1].Length()){
|
if(!g_aGames.empty() && arr[1].Length()){
|
||||||
int iG = Vid2Gid(arr[1]);
|
int iG = Vid2Gid(arr[1]);
|
||||||
TGame* pGame = NULL;
|
TGame* pGame = NULL;
|
||||||
@@ -177,16 +177,16 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool bUpdateRoad = true;
|
bool bUpdateRoad = true;
|
||||||
if(pGame->gmstatus==12){ //维护台桌
|
if(pGame->gmstatus==12){ //维护台桌
|
||||||
if(oldSize && !newSize) //新局
|
if(oldSize && !newSize) //新局
|
||||||
pGame->AutoBetOn(); //台桌维护中无法正常处理shuffle状态,调用该接口显示和处理新局
|
pGame->AutoBetOn(); //台桌维护中无法正常处理shuffle状态,调用该接口显示和处理新局
|
||||||
}
|
}
|
||||||
else{ //正常台桌
|
else{ //正常台桌
|
||||||
pGame->gmstatus = 0; //设置结算状态,避免重复计算
|
pGame->gmstatus = 0; //设置结算状态,避免重复计算
|
||||||
// pGame->gmcode = "";
|
// pGame->gmcode = "";
|
||||||
|
|
||||||
if(oldSize<newSize){
|
if(oldSize<newSize){
|
||||||
pGame->HandleResult(oldSize+1==newSize ? 0 : 1); //0=正常处理 1=异常处理
|
pGame->HandleResult(oldSize+1==newSize ? 0 : 1); //0=正常处理 1=异常处理
|
||||||
bUpdateRoad = false;
|
bUpdateRoad = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -197,7 +197,7 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( iType==3 ){ //台桌状态
|
else if( iType==3 ){ //台桌状态
|
||||||
// 3 | vid | gmcode | wintype(timeout)
|
// 3 | vid | gmcode | wintype(timeout)
|
||||||
if(!g_aGames.empty() && arr.Length>=4){
|
if(!g_aGames.empty() && arr.Length>=4){
|
||||||
int iG = Vid2Gid(arr[1]);
|
int iG = Vid2Gid(arr[1]);
|
||||||
@@ -239,7 +239,7 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
pGame->AutoBetOff();
|
pGame->AutoBetOff();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(status==0 && !bNewCode){ //结算
|
if(status==0 && !bNewCode){ //结算
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
if(pGame->gmstatus!=2 && (g_iPlatform!=PF_AB || pGame->gmstatus!=11))
|
if(pGame->gmstatus!=2 && (g_iPlatform!=PF_AB || pGame->gmstatus!=11))
|
||||||
DebugPrint("!!! %s status %d -> %d",
|
DebugPrint("!!! %s status %d -> %d",
|
||||||
@@ -249,7 +249,7 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
#endif
|
#endif
|
||||||
pGame->gmstatus = status;
|
pGame->gmstatus = status;
|
||||||
|
|
||||||
if(arr.Length>=8){ //DB特殊处理
|
if(arr.Length>=8){ //DB特殊处理
|
||||||
if(arr[6].Length()){
|
if(arr[6].Length()){
|
||||||
pGame->bcard = UnifyCard(arr[6]);
|
pGame->bcard = UnifyCard(arr[6]);
|
||||||
pGame->pcard = UnifyCard(arr[7]);
|
pGame->pcard = UnifyCard(arr[7]);
|
||||||
@@ -274,12 +274,12 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
char data[128];
|
char data[128];
|
||||||
sprintf(data, "%s,%d,%s",
|
sprintf(data, "%s,%d,%s",
|
||||||
((AnsiString)arr[g_iPlatform==PF_PA ? 1 : 2]).c_str(),
|
((AnsiString)arr[g_iPlatform==PF_PA ? 1 : 2]).c_str(),
|
||||||
pGame->aRes.size(), wt==1 ? "庄" : wt==2 ? "闲" : "和");
|
pGame->aRes.size(), wt==1 ? "庄" : wt==2 ? "闲" : "和");
|
||||||
WriteData( data );
|
WriteData( data );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(status==1 && bNewStatus){// && pGame->gmstatus!=2){ //开始下注
|
else if(status==1 && bNewStatus){// && pGame->gmstatus!=2){ //开始下注
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
if(pGame->gmstatus!=0 && pGame->gmstatus<11)
|
if(pGame->gmstatus!=0 && pGame->gmstatus<11)
|
||||||
DebugPrint("!!! %s status %d -> %d",
|
DebugPrint("!!! %s status %d -> %d",
|
||||||
@@ -302,7 +302,7 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
: arr[5].ToInt();
|
: arr[5].ToInt();
|
||||||
pGame->AutoBetOn();
|
pGame->AutoBetOn();
|
||||||
}
|
}
|
||||||
else if(status==2 && !bNewCode){// && pGame->gmstatus==1 ){ //开牌中
|
else if(status==2 && !bNewCode){// && pGame->gmstatus==1 ){ //开牌中
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
if(pGame->gmstatus!=1)
|
if(pGame->gmstatus!=1)
|
||||||
DebugPrint("!!! %s status %d -> %d",
|
DebugPrint("!!! %s status %d -> %d",
|
||||||
@@ -313,12 +313,12 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
pGame->gmstatus = status;
|
pGame->gmstatus = status;
|
||||||
|
|
||||||
if(pGame->iState==ST_BETTED)
|
if(pGame->iState==ST_BETTED)
|
||||||
pGame->timeout = -1; //开始计算超时
|
pGame->timeout = -1; //开始计算超时
|
||||||
|
|
||||||
pGame->bcard = pGame->pcard = "";
|
pGame->bcard = pGame->pcard = "";
|
||||||
}
|
}
|
||||||
else if((status==11 || status==12) && bNewStatus){ //洗牌/维护
|
else if((status==11 || status==12) && bNewStatus){ //洗牌/维护
|
||||||
if(pGame->iState==ST_BETTED || pGame->iState==ST_EXPIRED){ //超时
|
if(pGame->iState==ST_BETTED || pGame->iState==ST_EXPIRED){ //超时
|
||||||
DebugPrint("!!! %s status %d -> %d with betted",
|
DebugPrint("!!! %s status %d -> %d with betted",
|
||||||
((AnsiString)pGame->vid).c_str(),
|
((AnsiString)pGame->vid).c_str(),
|
||||||
// ((AnsiString)arr[1]).c_str(),
|
// ((AnsiString)arr[1]).c_str(),
|
||||||
@@ -336,14 +336,14 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
char data[128];
|
char data[128];
|
||||||
sprintf(data, "%s,,%s",
|
sprintf(data, "%s,,%s",
|
||||||
((AnsiString)arr[g_iPlatform==PF_PA ? 1 : 2]).c_str(),
|
((AnsiString)arr[g_iPlatform==PF_PA ? 1 : 2]).c_str(),
|
||||||
"洗牌");
|
"洗牌");
|
||||||
WriteData( data );
|
WriteData( data );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
pGame->iState = ST_INIT;
|
pGame->iState = ST_INIT;
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
DebugPrint("!!! %s 台桌维护中", ((AnsiString)pGame->vid).c_str());//, ((AnsiString)arr[1]).c_str());
|
DebugPrint("!!! %s 台桌维护中", ((AnsiString)pGame->vid).c_str());//, ((AnsiString)arr[1]).c_str());
|
||||||
SendMessage( Application->MainFormHandle, UM_RESTORE, 0, 0 );
|
SendMessage( Application->MainFormHandle, UM_RESTORE, 0, 0 );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -355,7 +355,7 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(iType==4){ //多台状态
|
else if(iType==4){ //多台状态
|
||||||
//4 | e.payload.vid
|
//4 | e.payload.vid
|
||||||
DebugPrint("Enter HALL: %s", ((AnsiString)arr[1]).c_str());
|
DebugPrint("Enter HALL: %s", ((AnsiString)arr[1]).c_str());
|
||||||
|
|
||||||
@@ -375,7 +375,7 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
|
|
||||||
PostMessage(Application->MainFormHandle, UM_ENTER_TABLE, tab, 0);
|
PostMessage(Application->MainFormHandle, UM_ENTER_TABLE, tab, 0);
|
||||||
}
|
}
|
||||||
else if(iType==5){ //账户余额
|
else if(iType==5){ //账户余额
|
||||||
//5 | e.val
|
//5 | e.val
|
||||||
double amo;
|
double amo;
|
||||||
if(TryStrToFloat(arr[1], amo)){
|
if(TryStrToFloat(arr[1], amo)){
|
||||||
@@ -385,8 +385,8 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(iType==6){ //下注反馈
|
else if(iType==6){ //下注反馈
|
||||||
//6 | vid | retCode | gmcode | 庄 | 闲 | 平
|
//6 | vid | retCode | gmcode | 庄 | 闲 | 平
|
||||||
if(!g_aGames.empty() && arr[1].Length()){
|
if(!g_aGames.empty() && arr[1].Length()){
|
||||||
int iG = Vid2Gid(arr[1]);
|
int iG = Vid2Gid(arr[1]);
|
||||||
TGame* pGame = NULL;
|
TGame* pGame = NULL;
|
||||||
@@ -401,17 +401,17 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
int retCode = arr[2].ToInt();
|
int retCode = arr[2].ToInt();
|
||||||
|
|
||||||
if(retCode!=0){
|
if(retCode!=0){
|
||||||
if(g_iPlatform==PF_AB) //欧博错误码转换
|
if(g_iPlatform==PF_AB) //欧博错误码转换
|
||||||
retCode = retCode==101 ? 10 //限红低
|
retCode = retCode==101 ? 10 //限红低
|
||||||
: retCode==102 ? 11 //限红高
|
: retCode==102 ? 11 //限红高
|
||||||
: retCode==103 || retCode==100015 || retCode==6044 ? 25 //超时
|
: retCode==103 || retCode==100015 || retCode==6044 ? 25 //超时
|
||||||
: retCode==10101 || retCode==6035 || retCode==6042 ? 26 //余额不足
|
: retCode==10101 || retCode==6035 || retCode==6042 ? 26 //余额不足
|
||||||
: -1;
|
: -1;
|
||||||
else if(g_iPlatform==PF_DB) //多宝错误码转换
|
else if(g_iPlatform==PF_DB) //多宝错误码转换
|
||||||
retCode = retCode==210010 ? 10 //限红低
|
retCode = retCode==210010 ? 10 //限红低
|
||||||
: retCode==220030 ? 11 //限红高
|
: retCode==220030 ? 11 //限红高
|
||||||
: retCode==220004 || retCode==220006 || retCode==110041 ? 25 //超时
|
: retCode==220004 || retCode==220006 || retCode==110041 ? 25 //超时
|
||||||
: retCode==10469 || retCode==20126 ? 26 //余额不足
|
: retCode==10469 || retCode==20126 ? 26 //余额不足
|
||||||
: retCode;
|
: retCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -419,7 +419,7 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(iType==7){ //限额
|
else if(iType==7){ //限额
|
||||||
//7 | min | max
|
//7 | min | max
|
||||||
int minBet, maxBet;
|
int minBet, maxBet;
|
||||||
if(TryStrToInt(arr[1], minBet) && TryStrToInt(arr[2], maxBet)){
|
if(TryStrToInt(arr[1], minBet) && TryStrToInt(arr[2], maxBet)){
|
||||||
@@ -431,13 +431,13 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(iType==8){ //倒计时
|
else if(iType==8){ //倒计时
|
||||||
//8 | countdownList ABG专用
|
//8 | countdownList ABG专用
|
||||||
if(!g_aGames.empty() && arr[1].Length()){
|
if(!g_aGames.empty() && arr[1].Length()){
|
||||||
g_aGames.SetCountDown(arr[1]);
|
g_aGames.SetCountDown(arr[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(iType==9){ //翻牌
|
else if(iType==9){ //翻牌
|
||||||
//9 | gid | gmcode | bcard | pcard
|
//9 | gid | gmcode | bcard | pcard
|
||||||
if(!g_aGames.empty() && !arr[1].IsEmpty() && (!arr[3].IsEmpty() || !arr[4].IsEmpty())){
|
if(!g_aGames.empty() && !arr[1].IsEmpty() && (!arr[3].IsEmpty() || !arr[4].IsEmpty())){
|
||||||
int iG = Vid2Gid(arr[1]);
|
int iG = Vid2Gid(arr[1]);
|
||||||
@@ -452,11 +452,11 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
PostMessage(pGame->hTable, UM_TAB_UPDATE, UPDATE_STATUS, 0);
|
PostMessage(pGame->hTable, UM_TAB_UPDATE, UPDATE_STATUS, 0);
|
||||||
|
|
||||||
if(pGame->iState==ST_BETTED)
|
if(pGame->iState==ST_BETTED)
|
||||||
pGame->timeout = -1; //重新计算超时
|
pGame->timeout = -1; //重新计算超时
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// else if(iType==10){ //撤销注单
|
// else if(iType==10){ //撤销注单
|
||||||
// //10 | gid | gmcode
|
// //10 | gid | gmcode
|
||||||
// if(!g_aGames.empty() && arr[1].Length()){
|
// if(!g_aGames.empty() && arr[1].Length()){
|
||||||
// int iG = Vid2Gid(arr[1]);
|
// int iG = Vid2Gid(arr[1]);
|
||||||
@@ -464,7 +464,7 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
// int ind = g_aGames.FindGame(iG, pGame);
|
// int ind = g_aGames.FindGame(iG, pGame);
|
||||||
//
|
//
|
||||||
// if(pGame && pGame->gmcode==arr[2]){
|
// if(pGame && pGame->gmcode==arr[2]){
|
||||||
// DebugPrint("!!! %s 撤销注单 with status: %d",
|
// DebugPrint("!!! %s 撤销注单 with status: %d",
|
||||||
// ((AnsiString)pGame->vid).c_str(),
|
// ((AnsiString)pGame->vid).c_str(),
|
||||||
//// ((AnsiString)arr[1]).c_str(),
|
//// ((AnsiString)arr[1]).c_str(),
|
||||||
// pGame->gmstatus);
|
// pGame->gmstatus);
|
||||||
@@ -484,12 +484,12 @@ void __fastcall TDataParseThread::Execute()
|
|||||||
SetEvent(m_hDataEvent);
|
SetEvent(m_hDataEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 等待数据
|
// 等待数据
|
||||||
if( !Terminated )
|
if( !Terminated )
|
||||||
Suspended = true;
|
Suspended = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
SetThreadExecutionState( ES_CONTINUOUS );//打开系统休眠
|
SetThreadExecutionState( ES_CONTINUOUS );//打开系统休眠
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#ifndef BacDPThreadH
|
#ifndef BacDPThreadH
|
||||||
#define BacDPThreadH
|
#define BacDPThreadH
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ using namespace std;
|
|||||||
class TDataParseThread : public TBaseThread
|
class TDataParseThread : public TBaseThread
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
HANDLE m_hDataEvent; // Êý¾Ý´¦Àí»¥³â±äÁ¿
|
HANDLE m_hDataEvent; // 数据处理互斥变量
|
||||||
vector<String> m_aData;
|
vector<String> m_aData;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
+2
-2
@@ -1,11 +1,11 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef BacJSThreadH
|
#ifndef BacJSThreadH
|
||||||
#define BacJSThreadH
|
#define BacJSThreadH
|
||||||
|
|
||||||
#include "BaseThread.h"
|
#include "BaseThread.h"
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Êý¾Ý´¦ÀíÏß³Ì
|
// 数据处理线程
|
||||||
|
|
||||||
#define JS_OP_CHECKCEF 0
|
#define JS_OP_CHECKCEF 0
|
||||||
#define JS_OP_WSHANDLE0 1
|
#define JS_OP_WSHANDLE0 1
|
||||||
|
|||||||
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <vcl.h>
|
#include <vcl.h>
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
@@ -28,7 +28,7 @@ void __fastcall TBet03Frame::DiffEditExit(TObject *Sender)
|
|||||||
|
|
||||||
int num = 0;
|
int num = 0;
|
||||||
if(!TryStrToInt(pE->Text, num) || num<=0 || num>=30 ){
|
if(!TryStrToInt(pE->Text, num) || num<=0 || num>=30 ){
|
||||||
ShowMessage("请输入 1 - 30 之间的差值");
|
ShowMessage("请输入 1 - 30 之间的差值");
|
||||||
pE->Text = "5";
|
pE->Text = "5";
|
||||||
pE->SetFocus();
|
pE->SetFocus();
|
||||||
}
|
}
|
||||||
@@ -48,7 +48,7 @@ void __fastcall TBet03Frame::BetEditExit(TObject *Sender)
|
|||||||
TEdit* pE = (TEdit*)Sender;
|
TEdit* pE = (TEdit*)Sender;
|
||||||
String txt = pE->Text;
|
String txt = pE->Text;
|
||||||
if(txt.Length()==0 || txt.Length()>15){
|
if(txt.Length()==0 || txt.Length()>15){
|
||||||
ShowMessage("请输入 1 - 15 个下注项");
|
ShowMessage("请输入 1 - 15 个下注项");
|
||||||
pE->Text = pE==m_edBlP ? g_BPDiffBet.bets[0] : g_BPDiffBet.bets[1];
|
pE->Text = pE==m_edBlP ? g_BPDiffBet.bets[0] : g_BPDiffBet.bets[1];
|
||||||
pE->SetFocus();
|
pE->SetFocus();
|
||||||
}
|
}
|
||||||
@@ -56,7 +56,7 @@ void __fastcall TBet03Frame::BetEditExit(TObject *Sender)
|
|||||||
for(int i=1; i<=txt.Length(); i++){
|
for(int i=1; i<=txt.Length(); i++){
|
||||||
char Key = txt[i];
|
char Key = txt[i];
|
||||||
if(Key!='a' && Key!='s' && Key!='d' && Key!='x' && Key!='z'){
|
if(Key!='a' && Key!='s' && Key!='d' && Key!='x' && Key!='z'){
|
||||||
ShowMessage("请按说明输入合法下注项");
|
ShowMessage("请按说明输入合法下注项");
|
||||||
pE->SetFocus();
|
pE->SetFocus();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef BetLogFormUnitH
|
#ifndef BetLogFormUnitH
|
||||||
#define BetLogFormUnitH
|
#define BetLogFormUnitH
|
||||||
@@ -69,6 +69,6 @@ public: // User declarations
|
|||||||
};
|
};
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
extern PACKAGE TBetLogForm *BetLogForm;
|
extern PACKAGE TBetLogForm *BetLogForm;
|
||||||
extern vector<TBetLog*> g_aBetLogs; //¹Ò»úÈÕÖ¾
|
extern vector<TBetLog*> g_aBetLogs; //挂机日志
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <vcl.h>
|
#include <vcl.h>
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
@@ -24,7 +24,7 @@ void __fastcall TChip02Frame::EditChipExit(TObject *Sender)
|
|||||||
|
|
||||||
int num;
|
int num;
|
||||||
if(!TryStrToInt(pE->Text, num) || num<g_MinOnBet || num>g_MaxOnBet ){
|
if(!TryStrToInt(pE->Text, num) || num<g_MinOnBet || num>g_MaxOnBet ){
|
||||||
ShowMessage("×¢Âë½ð¶î²»Äܳ¬¹ýÏÞºì");
|
ShowMessage("注码金额不能超过限红");
|
||||||
pE->Text = pE==m_leMinChip ? "20" : "100";
|
pE->Text = pE==m_leMinChip ? "20" : "100";
|
||||||
pE->SetFocus();
|
pE->SetFocus();
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-18
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#include <vcl.h>
|
#include <vcl.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
@@ -10,10 +10,10 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#pragma package(smart_init)
|
#pragma package(smart_init)
|
||||||
|
|
||||||
TColor clrAxis = TColor(RGB(3,5,7)), //XY轴及边框
|
TColor clrAxis = TColor(RGB(3,5,7)), //XY轴及边框
|
||||||
clrLineTen = TColor(RGB(215,215,215)), //十倍横线
|
clrLineTen = TColor(RGB(215,215,215)), //十倍横线
|
||||||
clrLineNor = TColor(0x00EDEDED),// TColor(RGB(250,250,250)), //普通线
|
clrLineNor = TColor(0x00EDEDED),// TColor(RGB(250,250,250)), //普通线
|
||||||
clrHeadFont = TColor(RGB(83,109,165)), //头文字
|
clrHeadFont = TColor(RGB(83,109,165)), //头文字
|
||||||
clrSelect = TColor(RGB(150, 155, 159));
|
clrSelect = TColor(RGB(150, 155, 159));
|
||||||
TColor u_clrLink[] = {clBlue, clWebLimeGreen, clRed, clWebRoyalBlue};
|
TColor u_clrLink[] = {clBlue, clWebLimeGreen, clRed, clWebRoyalBlue};
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ void __fastcall TContentPanel::Paint()
|
|||||||
bool bPeakU = m_iPeakU>=0, bPeakL = m_iPeakL>=0;
|
bool bPeakU = m_iPeakU>=0, bPeakL = m_iPeakL>=0;
|
||||||
vector<TDot>& aDots = m_aDots.empty() ? g_aDots[m_iType] : m_aDots;
|
vector<TDot>& aDots = m_aDots.empty() ? g_aDots[m_iType] : m_aDots;
|
||||||
|
|
||||||
//绘制选中线
|
//绘制选中线
|
||||||
if(m_iHint>0){
|
if(m_iHint>0){
|
||||||
int x = m_xZero + m_iHint * m_xScaleGap;
|
int x = m_xZero + m_iHint * m_xScaleGap;
|
||||||
Canvas->Pen->Color = clrSelect;
|
Canvas->Pen->Color = clrSelect;
|
||||||
@@ -138,7 +138,7 @@ void __fastcall TContentPanel::Paint()
|
|||||||
int y1 = m_nTopBound + c;
|
int y1 = m_nTopBound + c;
|
||||||
|
|
||||||
if(l <= i && r >= i){
|
if(l <= i && r >= i){
|
||||||
//绘制连接线
|
//绘制连接线
|
||||||
Canvas->LineTo( x1, y1 );
|
Canvas->LineTo( x1, y1 );
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -153,12 +153,12 @@ void __fastcall TContentPanel::WMEraseBkgnd(TWMEraseBkgnd &Message)
|
|||||||
TCanvas* tempCanvas = new TCanvas;
|
TCanvas* tempCanvas = new TCanvas;
|
||||||
tempCanvas->Handle = Message.DC;
|
tempCanvas->Handle = Message.DC;
|
||||||
|
|
||||||
//背景色
|
//背景色
|
||||||
TRect rect( 0, 0, ClientWidth, ClientHeight );
|
TRect rect( 0, 0, ClientWidth, ClientHeight );
|
||||||
tempCanvas->Brush->Color = clBtnFace;//clWhite;
|
tempCanvas->Brush->Color = clBtnFace;//clWhite;
|
||||||
tempCanvas->FillRect( rect );
|
tempCanvas->FillRect( rect );
|
||||||
|
|
||||||
//外边框
|
//外边框
|
||||||
rect.left = m_nLeftBound;
|
rect.left = m_nLeftBound;
|
||||||
rect.right = m_nRightBound + 1;
|
rect.right = m_nRightBound + 1;
|
||||||
rect.top = m_nTopBound;
|
rect.top = m_nTopBound;
|
||||||
@@ -166,7 +166,7 @@ void __fastcall TContentPanel::WMEraseBkgnd(TWMEraseBkgnd &Message)
|
|||||||
tempCanvas->Brush->Color = clrAxis;
|
tempCanvas->Brush->Color = clrAxis;
|
||||||
tempCanvas->FrameRect( rect );
|
tempCanvas->FrameRect( rect );
|
||||||
|
|
||||||
//纵线
|
//纵线
|
||||||
int x = m_xZero,
|
int x = m_xZero,
|
||||||
t = rect.top+1,
|
t = rect.top+1,
|
||||||
b = rect.bottom-1;
|
b = rect.bottom-1;
|
||||||
@@ -177,7 +177,7 @@ void __fastcall TContentPanel::WMEraseBkgnd(TWMEraseBkgnd &Message)
|
|||||||
tempCanvas->LineTo( x, b );
|
tempCanvas->LineTo( x, b );
|
||||||
}
|
}
|
||||||
|
|
||||||
//刻度
|
//刻度
|
||||||
tempCanvas->Font->Color = clrHeadFont;
|
tempCanvas->Font->Color = clrHeadFont;
|
||||||
tempCanvas->Brush->Style = bsClear;
|
tempCanvas->Brush->Style = bsClear;
|
||||||
int y = m_nTopGap,//, iY0 = 0,
|
int y = m_nTopGap,//, iY0 = 0,
|
||||||
@@ -192,7 +192,7 @@ void __fastcall TContentPanel::WMEraseBkgnd(TWMEraseBkgnd &Message)
|
|||||||
y += m_yScaleGap;
|
y += m_yScaleGap;
|
||||||
}
|
}
|
||||||
|
|
||||||
//横线
|
//横线
|
||||||
tempCanvas->Brush->Style = bsSolid;
|
tempCanvas->Brush->Style = bsSolid;
|
||||||
y = m_nTopBound;
|
y = m_nTopBound;
|
||||||
int l = m_xZero+1,
|
int l = m_xZero+1,
|
||||||
@@ -306,7 +306,7 @@ void __fastcall TContentPanel::Resample()
|
|||||||
m_aDots.push_back(dots[0]);
|
m_aDots.push_back(dots[0]);
|
||||||
|
|
||||||
int total = dots.size(),
|
int total = dots.size(),
|
||||||
num = total-20; //保留最少20个点
|
num = total-20; //保留最少20个点
|
||||||
|
|
||||||
bool bNoSample = m_iSample==1,
|
bool bNoSample = m_iSample==1,
|
||||||
bMask = m_iMask>m_iSample;
|
bMask = m_iMask>m_iSample;
|
||||||
@@ -437,7 +437,7 @@ bool __fastcall TContentPanel::CalcXUnit()
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
bool __fastcall TContentPanel::CalcYUnit(int nMax, int nMin, bool bInit)
|
bool __fastcall TContentPanel::CalcYUnit(int nMax, int nMin, bool bInit)
|
||||||
{
|
{
|
||||||
if(bInit || nMax > m_nRowMax || nMin < m_nRowMin ){ //初始化||范围变动
|
if(bInit || nMax > m_nRowMax || nMin < m_nRowMin ){ //初始化||范围变动
|
||||||
int scale = 100 / m_nAmoUnit;
|
int scale = 100 / m_nAmoUnit;
|
||||||
if(nMax==nMin){
|
if(nMax==nMin){
|
||||||
m_nRowMax = (nMax / m_nAmoUnit + 1) * m_nAmoUnit;
|
m_nRowMax = (nMax / m_nAmoUnit + 1) * m_nAmoUnit;
|
||||||
@@ -451,7 +451,7 @@ bool __fastcall TContentPanel::CalcYUnit(int nMax, int nMin, bool bInit)
|
|||||||
nMax = (nMax / m_nAmoUnit + ((nMax % m_nAmoUnit) ? 1 : 0)) * m_nAmoUnit;
|
nMax = (nMax / m_nAmoUnit + ((nMax % m_nAmoUnit) ? 1 : 0)) * m_nAmoUnit;
|
||||||
nMin = (nMin / m_nAmoUnit - ((nMin % m_nAmoUnit) ? 1 : 0)) * m_nAmoUnit;
|
nMin = (nMin / m_nAmoUnit - ((nMin % m_nAmoUnit) ? 1 : 0)) * m_nAmoUnit;
|
||||||
|
|
||||||
//找可整除的0轴
|
//找可整除的0轴
|
||||||
int m = (nMax - nMin) * scale / 50;
|
int m = (nMax - nMin) * scale / 50;
|
||||||
if(0 == (nMin * scale) % m){
|
if(0 == (nMin * scale) % m){
|
||||||
m_nRowMax = nMax;
|
m_nRowMax = nMax;
|
||||||
@@ -463,9 +463,9 @@ bool __fastcall TContentPanel::CalcYUnit(int nMax, int nMin, bool bInit)
|
|||||||
tmpMin = nMin,
|
tmpMin = nMin,
|
||||||
rm = m_iType==3 ? 10000 : 10000000;
|
rm = m_iType==3 ? 10000 : 10000000;
|
||||||
|
|
||||||
//寻找最佳方案
|
//寻找最佳方案
|
||||||
bool bUp = g_aDots[m_iType].back().val > 0;
|
bool bUp = g_aDots[m_iType].back().val > 0;
|
||||||
for(int m1=m; m1 < (bUp ? rm : rm+1); m1+=2){ //最后的数据为负,优先扩下半区,或者尽量上下同扩
|
for(int m1=m; m1 < (bUp ? rm : rm+1); m1+=2){ //最后的数据为负,优先扩下半区,或者尽量上下同扩
|
||||||
if(m1>m && 0 == tmpMin % m1){
|
if(m1>m && 0 == tmpMin % m1){
|
||||||
rMax = nMax;
|
rMax = nMax;
|
||||||
rMin = tmpMin;
|
rMin = tmpMin;
|
||||||
@@ -474,7 +474,7 @@ bool __fastcall TContentPanel::CalcYUnit(int nMax, int nMin, bool bInit)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int tmpMax = nMax;
|
int tmpMax = nMax;
|
||||||
for(int m2=m1+2; -tmpMin>=m2 && m2 < (bUp ? rm+1: rm); m2+=2){ //最后的数据为正,优先扩上半区
|
for(int m2=m1+2; -tmpMin>=m2 && m2 < (bUp ? rm+1: rm); m2+=2){ //最后的数据为正,优先扩上半区
|
||||||
tmpMax += m_nAmoUnit;
|
tmpMax += m_nAmoUnit;
|
||||||
if(0==tmpMin % m2){
|
if(0==tmpMin % m2){
|
||||||
rMax = tmpMax;
|
rMax = tmpMax;
|
||||||
|
|||||||
+6
-6
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef ContentPanelH
|
#ifndef ContentPanelH
|
||||||
#define ContentPanelH
|
#define ContentPanelH
|
||||||
@@ -11,7 +11,7 @@ using namespace std;
|
|||||||
class TContentPanel : public Extctrls::TPanel
|
class TContentPanel : public Extctrls::TPanel
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
//显示相关
|
//显示相关
|
||||||
int m_nTopGap,
|
int m_nTopGap,
|
||||||
m_nLeftBound,
|
m_nLeftBound,
|
||||||
m_nRightBound,
|
m_nRightBound,
|
||||||
@@ -25,16 +25,16 @@ private:
|
|||||||
m_xScaleGap,
|
m_xScaleGap,
|
||||||
m_yScaleGap;
|
m_yScaleGap;
|
||||||
|
|
||||||
//刻度相关
|
//刻度相关
|
||||||
int m_nAmoMax, m_nAmoMin, m_iAmoUnit, m_nRowMax, m_nRowMin, m_nAmoUnit;
|
int m_nAmoMax, m_nAmoMin, m_iAmoUnit, m_nRowMax, m_nRowMin, m_nAmoUnit;
|
||||||
double m_yScale;
|
double m_yScale;
|
||||||
//峰值
|
//峰值
|
||||||
int m_iPeakU, m_iPeakL;
|
int m_iPeakU, m_iPeakL;
|
||||||
//点显示与压缩
|
//点显示与压缩
|
||||||
vector<TDot> m_aDots;
|
vector<TDot> m_aDots;
|
||||||
int m_nOriDots, m_iType, m_iSample, m_iMask;
|
int m_nOriDots, m_iType, m_iSample, m_iMask;
|
||||||
|
|
||||||
//显示时间
|
//显示时间
|
||||||
int m_iHint, m_xHalfGap, m_xMaxHint;
|
int m_iHint, m_xHalfGap, m_xMaxHint;
|
||||||
|
|
||||||
TLabel * m_lblHint[2];
|
TLabel * m_lblHint[2];
|
||||||
|
|||||||
+8
-8
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
|
|
||||||
@@ -10,27 +10,27 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void TSettings::FromVersionD(TSettingsD& d)
|
void TSettings::FromVersionD(TSettingsD& d)
|
||||||
{
|
{
|
||||||
//开始挂机
|
//开始挂机
|
||||||
bWaitNew = d.bWaitNew;
|
bWaitNew = d.bWaitNew;
|
||||||
bInitCurProfitByStart = d.bInitCurProfitByStart;
|
bInitCurProfitByStart = d.bInitCurProfitByStart;
|
||||||
bInitTabProfitByStart = d.bInitTabProfitByStart;
|
bInitTabProfitByStart = d.bInitTabProfitByStart;
|
||||||
bInitBetChipByStart = d.bInitBetChipByStart;
|
bInitBetChipByStart = d.bInitBetChipByStart;
|
||||||
bInitClearTabLog = d.bInitClearTabLog;
|
bInitClearTabLog = d.bInitClearTabLog;
|
||||||
|
|
||||||
//新局
|
//新局
|
||||||
bInitBetByGame = d.bInitBetByGame;
|
bInitBetByGame = d.bInitBetByGame;
|
||||||
bInitChipByGame = d.bInitChipByGame;
|
bInitChipByGame = d.bInitChipByGame;
|
||||||
bInitProfitByGame = d.bInitProfitByGame;
|
bInitProfitByGame = d.bInitProfitByGame;
|
||||||
bInitLogByGame = d.bInitLogByGame;
|
bInitLogByGame = d.bInitLogByGame;
|
||||||
|
|
||||||
//模拟本金
|
//模拟本金
|
||||||
fSimAcc = d.fSimAcc;
|
fSimAcc = d.fSimAcc;
|
||||||
bSimAccOn = d.bSimAccOn;
|
bSimAccOn = d.bSimAccOn;
|
||||||
bNoBetLow = d.bNoBetLow;
|
bNoBetLow = d.bNoBetLow;
|
||||||
bStopLow = d.bStopLow;
|
bStopLow = d.bStopLow;
|
||||||
bSyncReal = d.bSyncReal;
|
bSyncReal = d.bSyncReal;
|
||||||
|
|
||||||
//止赢止损
|
//止赢止损
|
||||||
bTotalStopLos = d.bTotalStopLos;
|
bTotalStopLos = d.bTotalStopLos;
|
||||||
bTotalStopWin = d.bTotalStopWin;
|
bTotalStopWin = d.bTotalStopWin;
|
||||||
bTableStopLos = d.bTableStopLos;
|
bTableStopLos = d.bTableStopLos;
|
||||||
@@ -58,7 +58,7 @@ void TSettings::FromVersionD(TSettingsD& d)
|
|||||||
iTableWinOp = d.iTableWinOp;
|
iTableWinOp = d.iTableWinOp;
|
||||||
iTableLosOp = d.iTableLosOp;
|
iTableLosOp = d.iTableLosOp;
|
||||||
|
|
||||||
//模实转换
|
//模实转换
|
||||||
bR2SLos = d.bR2SLos;
|
bR2SLos = d.bR2SLos;
|
||||||
bR2SWin = d.bR2SWin;
|
bR2SWin = d.bR2SWin;
|
||||||
bS2RLos = d.bS2RLos;
|
bS2RLos = d.bS2RLos;
|
||||||
@@ -68,10 +68,10 @@ void TSettings::FromVersionD(TSettingsD& d)
|
|||||||
nS2RLos = d.nS2RLos;
|
nS2RLos = d.nS2RLos;
|
||||||
nS2RWin = d.nS2RWin;
|
nS2RWin = d.nS2RWin;
|
||||||
|
|
||||||
//游台
|
//游台
|
||||||
iFloatMode = d.iFloatMode;
|
iFloatMode = d.iFloatMode;
|
||||||
|
|
||||||
//牌局选项
|
//牌局选项
|
||||||
bHoldBet = d.bHoldBet;
|
bHoldBet = d.bHoldBet;
|
||||||
bHaltBet = d.bHaltBet;
|
bHaltBet = d.bHaltBet;
|
||||||
nHoldBet = d.nHoldBet;
|
nHoldBet = d.nHoldBet;
|
||||||
|
|||||||
+126
-126
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef GameSettingsH
|
#ifndef GameSettingsH
|
||||||
#define GameSettingsH
|
#define GameSettingsH
|
||||||
@@ -6,78 +6,78 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//兼容USER_GAME_FILE VERSION 0x0D
|
//兼容USER_GAME_FILE VERSION 0x0D
|
||||||
class TSettingsD{
|
class TSettingsD{
|
||||||
public:
|
public:
|
||||||
//开始挂机
|
//开始挂机
|
||||||
bool bWaitNew, //开始挂机等待新局
|
bool bWaitNew, //开始挂机等待新局
|
||||||
bInitCurProfitByStart, //开始挂机重置当期赢利
|
bInitCurProfitByStart, //开始挂机重置当期赢利
|
||||||
bInitTabProfitByStart, //开始挂机重置台桌赢利
|
bInitTabProfitByStart, //开始挂机重置台桌赢利
|
||||||
bInitBetChipByStart; //开始挂机重置打法注码
|
bInitBetChipByStart; //开始挂机重置打法注码
|
||||||
|
|
||||||
//新局
|
//新局
|
||||||
bool bInitBetByGame, //新局初始化打法
|
bool bInitBetByGame, //新局初始化打法
|
||||||
bInitChipByGame, //新局初始化注码
|
bInitChipByGame, //新局初始化注码
|
||||||
bInitProfitByGame, //新局初始化赢利
|
bInitProfitByGame, //新局初始化赢利
|
||||||
bInitLogByGame; //新局清空台桌日志
|
bInitLogByGame; //新局清空台桌日志
|
||||||
|
|
||||||
//模拟本金
|
//模拟本金
|
||||||
double fSimAcc; //模拟账户余额
|
double fSimAcc; //模拟账户余额
|
||||||
bool bSimAccOn, //启用模拟本金
|
bool bSimAccOn, //启用模拟本金
|
||||||
bNoBetLow, //模拟余额少于注码时不下注
|
bNoBetLow, //模拟余额少于注码时不下注
|
||||||
bStopLow, //模拟余额低于限红时停止挂机
|
bStopLow, //模拟余额低于限红时停止挂机
|
||||||
bSyncReal; //实打时同步增减模拟余额
|
bSyncReal; //实打时同步增减模拟余额
|
||||||
|
|
||||||
//止赢止损
|
//止赢止损
|
||||||
bool bTotalStopLos, //总体止损
|
bool bTotalStopLos, //总体止损
|
||||||
bTotalStopWin, //总体止赢
|
bTotalStopWin, //总体止赢
|
||||||
bTableStopLos, //单桌止损
|
bTableStopLos, //单桌止损
|
||||||
bTableStopWin, //单桌止赢
|
bTableStopWin, //单桌止赢
|
||||||
bAccStopWin, //账户止赢
|
bAccStopWin, //账户止赢
|
||||||
bAccStopLos, //账户止损
|
bAccStopLos, //账户止损
|
||||||
bU2DStop, //回落止损
|
bU2DStop, //回落止损
|
||||||
bU2DMinPeak, //回落止损有最小峰值
|
bU2DMinPeak, //回落止损有最小峰值
|
||||||
bU2DPause; //回落止损暂停重启
|
bU2DPause; //回落止损暂停重启
|
||||||
int nTotalStopLos, //总体止损金额
|
int nTotalStopLos, //总体止损金额
|
||||||
nTotalStopWin, //总体止赢金额
|
nTotalStopWin, //总体止赢金额
|
||||||
nTableStopLos, //单桌止损金额
|
nTableStopLos, //单桌止损金额
|
||||||
nTableStopWin, //单桌止赢金额
|
nTableStopWin, //单桌止赢金额
|
||||||
nAccStopWin, //账户止赢金额
|
nAccStopWin, //账户止赢金额
|
||||||
nAccStopLos, //账户止损金额
|
nAccStopLos, //账户止损金额
|
||||||
nTotalWinPause, //总体止赢暂停分钟数
|
nTotalWinPause, //总体止赢暂停分钟数
|
||||||
nTotalLosPause, //总体止损暂停分钟数
|
nTotalLosPause, //总体止损暂停分钟数
|
||||||
nTableWinPause, //单桌止赢暂停分钟数
|
nTableWinPause, //单桌止赢暂停分钟数
|
||||||
nTableLosPause, //单桌止损暂停分钟数
|
nTableLosPause, //单桌止损暂停分钟数
|
||||||
nU2DStop, //回落止损金额
|
nU2DStop, //回落止损金额
|
||||||
nU2DMinPeak, //回落止损最小峰值
|
nU2DMinPeak, //回落止损最小峰值
|
||||||
nU2DPause; //回落止损暂停分钟数
|
nU2DPause; //回落止损暂停分钟数
|
||||||
int iTotalWinOp, //总体止赢后操作
|
int iTotalWinOp, //总体止赢后操作
|
||||||
iTotalLosOp, //总体止损后操作
|
iTotalLosOp, //总体止损后操作
|
||||||
iTableWinOp, //单桌止赢后操作
|
iTableWinOp, //单桌止赢后操作
|
||||||
iTableLosOp; //单桌止损后操作
|
iTableLosOp; //单桌止损后操作
|
||||||
|
|
||||||
//模实转换
|
//模实转换
|
||||||
bool bR2SLos, //实打亏损转模拟
|
bool bR2SLos, //实打亏损转模拟
|
||||||
bR2SWin, //实打赢利转模拟
|
bR2SWin, //实打赢利转模拟
|
||||||
bS2RLos, //模拟亏损转实打
|
bS2RLos, //模拟亏损转实打
|
||||||
bS2RWin; //模拟赢利转实打
|
bS2RWin; //模拟赢利转实打
|
||||||
int nR2SLos, //实打转模拟亏损金额
|
int nR2SLos, //实打转模拟亏损金额
|
||||||
nR2SWin, //实打转模拟赢利金额
|
nR2SWin, //实打转模拟赢利金额
|
||||||
nS2RLos, //模拟转实打亏损金额
|
nS2RLos, //模拟转实打亏损金额
|
||||||
nS2RWin; //模拟转实打赢利金额
|
nS2RWin; //模拟转实打赢利金额
|
||||||
|
|
||||||
//游台
|
//游台
|
||||||
bool bFloat; //是否开启游台
|
bool bFloat; //是否开启游台
|
||||||
int iFloatMode; //游台模式:0=不开启游台 1=每项换台 2=洗牌换台 4=输换台 8=赢换台 16=和换台
|
int iFloatMode; //游台模式:0=不开启游台 1=每项换台 2=洗牌换台 4=输换台 8=赢换台 16=和换台
|
||||||
|
|
||||||
//开始挂机
|
//开始挂机
|
||||||
bool bInitClearTabLog; //清空台桌下注记录
|
bool bInitClearTabLog; //清空台桌下注记录
|
||||||
|
|
||||||
//牌局选项
|
//牌局选项
|
||||||
bool bHoldBet, //开局X手后开始下注
|
bool bHoldBet, //开局X手后开始下注
|
||||||
bHaltBet; //开局X手后停止下注
|
bHaltBet; //开局X手后停止下注
|
||||||
int nHoldBet, //开局开始下注手数
|
int nHoldBet, //开局开始下注手数
|
||||||
nHaltBet; //开局停止下注手数
|
nHaltBet; //开局停止下注手数
|
||||||
|
|
||||||
TSettingsD() {
|
TSettingsD() {
|
||||||
memset( this, 0, sizeof(TSettingsD) );
|
memset( this, 0, sizeof(TSettingsD) );
|
||||||
@@ -95,76 +95,76 @@ public:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
//当前设置
|
//当前设置
|
||||||
class TSettings{
|
class TSettings{
|
||||||
public:
|
public:
|
||||||
//开始挂机
|
//开始挂机
|
||||||
bool bWaitNew, //开始挂机等待新局
|
bool bWaitNew, //开始挂机等待新局
|
||||||
bInitCurProfitByStart, //开始挂机重置当期赢利
|
bInitCurProfitByStart, //开始挂机重置当期赢利
|
||||||
bInitTabProfitByStart, //开始挂机重置台桌赢利
|
bInitTabProfitByStart, //开始挂机重置台桌赢利
|
||||||
bInitBetChipByStart, //开始挂机重置打法注码
|
bInitBetChipByStart, //开始挂机重置打法注码
|
||||||
bInitClearTabLog; //清空台桌下注记录
|
bInitClearTabLog; //清空台桌下注记录
|
||||||
|
|
||||||
//新局
|
//新局
|
||||||
bool bInitBetByGame, //新局初始化打法
|
bool bInitBetByGame, //新局初始化打法
|
||||||
bInitChipByGame, //新局初始化注码
|
bInitChipByGame, //新局初始化注码
|
||||||
bInitProfitByGame, //新局初始化赢利
|
bInitProfitByGame, //新局初始化赢利
|
||||||
bInitLogByGame; //新局清空台桌日志
|
bInitLogByGame; //新局清空台桌日志
|
||||||
|
|
||||||
//模拟本金
|
//模拟本金
|
||||||
double fSimAcc; //模拟账户余额
|
double fSimAcc; //模拟账户余额
|
||||||
bool bSimAccOn, //启用模拟本金
|
bool bSimAccOn, //启用模拟本金
|
||||||
bNoBetLow, //模拟余额少于注码时不下注
|
bNoBetLow, //模拟余额少于注码时不下注
|
||||||
bStopLow, //模拟余额低于限红时停止挂机
|
bStopLow, //模拟余额低于限红时停止挂机
|
||||||
bSyncReal; //实打时同步增减模拟余额
|
bSyncReal; //实打时同步增减模拟余额
|
||||||
|
|
||||||
//止赢止损
|
//止赢止损
|
||||||
bool bTotalStopLos, //总体止损
|
bool bTotalStopLos, //总体止损
|
||||||
bTotalStopWin, //总体止赢
|
bTotalStopWin, //总体止赢
|
||||||
bTableStopLos, //单桌止损
|
bTableStopLos, //单桌止损
|
||||||
bTableStopWin, //单桌止赢
|
bTableStopWin, //单桌止赢
|
||||||
bAccStopWin, //账户止赢
|
bAccStopWin, //账户止赢
|
||||||
bAccStopLos, //账户止损
|
bAccStopLos, //账户止损
|
||||||
bU2DStop, //回落止损
|
bU2DStop, //回落止损
|
||||||
bU2DMinPeak, //回落止损有最小峰值
|
bU2DMinPeak, //回落止损有最小峰值
|
||||||
bU2DPause; //回落止损暂停重启
|
bU2DPause; //回落止损暂停重启
|
||||||
int nTotalStopLos, //总体止损金额
|
int nTotalStopLos, //总体止损金额
|
||||||
nTotalStopWin, //总体止赢金额
|
nTotalStopWin, //总体止赢金额
|
||||||
nTableStopLos, //单桌止损金额
|
nTableStopLos, //单桌止损金额
|
||||||
nTableStopWin, //单桌止赢金额
|
nTableStopWin, //单桌止赢金额
|
||||||
nAccStopWin, //账户止赢金额
|
nAccStopWin, //账户止赢金额
|
||||||
nAccStopLos, //账户止损金额
|
nAccStopLos, //账户止损金额
|
||||||
nTotalWinPause, //总体止赢暂停分钟数
|
nTotalWinPause, //总体止赢暂停分钟数
|
||||||
nTotalLosPause, //总体止损暂停分钟数
|
nTotalLosPause, //总体止损暂停分钟数
|
||||||
nTableWinPause, //单桌止赢暂停分钟数
|
nTableWinPause, //单桌止赢暂停分钟数
|
||||||
nTableLosPause, //单桌止损暂停分钟数
|
nTableLosPause, //单桌止损暂停分钟数
|
||||||
nU2DStop, //回落止损金额
|
nU2DStop, //回落止损金额
|
||||||
nU2DMinPeak, //回落止损最小峰值
|
nU2DMinPeak, //回落止损最小峰值
|
||||||
nU2DPause; //回落止损暂停分钟数
|
nU2DPause; //回落止损暂停分钟数
|
||||||
int iTotalWinOp, //总体止赢后操作
|
int iTotalWinOp, //总体止赢后操作
|
||||||
iTotalLosOp, //总体止损后操作
|
iTotalLosOp, //总体止损后操作
|
||||||
iTableWinOp, //单桌止赢后操作
|
iTableWinOp, //单桌止赢后操作
|
||||||
iTableLosOp; //单桌止损后操作
|
iTableLosOp; //单桌止损后操作
|
||||||
|
|
||||||
//模实转换
|
//模实转换
|
||||||
bool bR2SLos, //实打亏损转模拟
|
bool bR2SLos, //实打亏损转模拟
|
||||||
bR2SWin, //实打赢利转模拟
|
bR2SWin, //实打赢利转模拟
|
||||||
bS2RLos, //模拟亏损转实打
|
bS2RLos, //模拟亏损转实打
|
||||||
bS2RWin; //模拟赢利转实打
|
bS2RWin; //模拟赢利转实打
|
||||||
int nR2SLos, //实打转模拟亏损金额
|
int nR2SLos, //实打转模拟亏损金额
|
||||||
nR2SWin, //实打转模拟赢利金额
|
nR2SWin, //实打转模拟赢利金额
|
||||||
nS2RLos, //模拟转实打亏损金额
|
nS2RLos, //模拟转实打亏损金额
|
||||||
nS2RWin; //模拟转实打赢利金额
|
nS2RWin; //模拟转实打赢利金额
|
||||||
|
|
||||||
//游台
|
//游台
|
||||||
int iFloatMode; //游台模式:0=不开启游台 1=每项换台 2=洗牌换台 4=输换台 8=赢换台 16=和换台
|
int iFloatMode; //游台模式:0=不开启游台 1=每项换台 2=洗牌换台 4=输换台 8=赢换台 16=和换台
|
||||||
|
|
||||||
//牌局选项
|
//牌局选项
|
||||||
bool bHoldBet, //开局X手后开始下注
|
bool bHoldBet, //开局X手后开始下注
|
||||||
bHaltBet; //开局X手后停止下注
|
bHaltBet; //开局X手后停止下注
|
||||||
int nHoldBet, //开局开始下注手数
|
int nHoldBet, //开局开始下注手数
|
||||||
nHaltBet; //开局停止下注手数
|
nHaltBet; //开局停止下注手数
|
||||||
bool bBetsNoTie; //连续下注忽略和
|
bool bBetsNoTie; //连续下注忽略和
|
||||||
|
|
||||||
TSettings() {
|
TSettings() {
|
||||||
memset( this, 0, sizeof(TSettings) );
|
memset( this, 0, sizeof(TSettings) );
|
||||||
|
|||||||
+192
-192
File diff suppressed because it is too large
Load Diff
+106
-106
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef GameUnitH
|
#ifndef GameUnitH
|
||||||
#define GameUnitH
|
#define GameUnitH
|
||||||
@@ -45,8 +45,8 @@
|
|||||||
#define UPDATE_TIME 2
|
#define UPDATE_TIME 2
|
||||||
#define UPDATE_MANBET 3
|
#define UPDATE_MANBET 3
|
||||||
#define UPDATE_MANRES 4
|
#define UPDATE_MANRES 4
|
||||||
#define UPDATE_RESET 5 //重置数据
|
#define UPDATE_RESET 5 //重置数据
|
||||||
#define UPDATE_IP 6 //重置独立策略
|
#define UPDATE_IP 6 //重置独立策略
|
||||||
|
|
||||||
#define STATE_AMOUNT 0
|
#define STATE_AMOUNT 0
|
||||||
#define STATE_BET_R 1
|
#define STATE_BET_R 1
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
#define ST_PAID 6
|
#define ST_PAID 6
|
||||||
#define ST_CANCELED 7
|
#define ST_CANCELED 7
|
||||||
#define ST_FAILED 8
|
#define ST_FAILED 8
|
||||||
#define ST_QUASH 9 //注单撤销
|
#define ST_QUASH 9 //注单撤销
|
||||||
#define ST_ROUND 10
|
#define ST_ROUND 10
|
||||||
#define ST_SHUFFLE 11
|
#define ST_SHUFFLE 11
|
||||||
|
|
||||||
@@ -90,54 +90,54 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
//图表数据
|
//图表数据
|
||||||
typedef struct tagDot{
|
typedef struct tagDot{
|
||||||
int val; //数值
|
int val; //数值
|
||||||
int ts; //时间
|
int ts; //时间
|
||||||
|
|
||||||
tagDot(){ memset( this, 0, sizeof(tagDot)); };
|
tagDot(){ memset( this, 0, sizeof(tagDot)); };
|
||||||
tagDot(int v, int t){ val=v,ts=t; };
|
tagDot(int v, int t){ val=v,ts=t; };
|
||||||
}TDot;
|
}TDot;
|
||||||
|
|
||||||
//挂机日志
|
//挂机日志
|
||||||
typedef struct tagBetLog{
|
typedef struct tagBetLog{
|
||||||
int ts; //时间
|
int ts; //时间
|
||||||
int num; //数值
|
int num; //数值
|
||||||
char tno[14];//台桌名
|
char tno[14];//台桌名
|
||||||
char ev; //事件
|
char ev; //事件
|
||||||
char op; //选项
|
char op; //选项
|
||||||
|
|
||||||
tagBetLog(){memset( this, 0, sizeof(tagBetLog));};
|
tagBetLog(){memset( this, 0, sizeof(tagBetLog));};
|
||||||
}TBetLog;
|
}TBetLog;
|
||||||
|
|
||||||
// 挂机数据
|
// 挂机数据
|
||||||
typedef struct tagBetData{
|
typedef struct tagBetData{
|
||||||
double profits[8]; //总赢利/总赢利峰值/总赢利谷值/当期赢利/实打总赢利/手工总赢利/当期模拟赢利/当期实打赢利
|
double profits[8]; //总赢利/总赢利峰值/总赢利谷值/当期赢利/实打总赢利/手工总赢利/当期模拟赢利/当期实打赢利
|
||||||
int amounts[3], //总流水/实打流水/手工流水
|
int amounts[3], //总流水/实打流水/手工流水
|
||||||
counts[4], //赢计数/输计数/最大连赢/连输计数
|
counts[4], //赢计数/输计数/最大连赢/连输计数
|
||||||
maxChip, //最大注额
|
maxChip, //最大注额
|
||||||
dead; //爆缆次数
|
dead; //爆缆次数
|
||||||
|
|
||||||
tagBetData(){Reset();};
|
tagBetData(){Reset();};
|
||||||
void Reset(){memset( this, 0, sizeof(tagBetData));};
|
void Reset(){memset( this, 0, sizeof(tagBetData));};
|
||||||
}TBetData;
|
}TBetData;
|
||||||
|
|
||||||
//手工下注
|
//手工下注
|
||||||
typedef struct tagManBet{
|
typedef struct tagManBet{
|
||||||
int chips[3]; //注码 0=庄 1=闲 2=平
|
int chips[3]; //注码 0=庄 1=闲 2=平
|
||||||
int state; //状态 ST_INIT/ST_BETTING/ST_BETTED
|
int state; //状态 ST_INIT/ST_BETTING/ST_BETTED
|
||||||
|
|
||||||
tagManBet(){memset( this, 0, sizeof(tagManBet));};
|
tagManBet(){memset( this, 0, sizeof(tagManBet));};
|
||||||
}TManBet;
|
}TManBet;
|
||||||
|
|
||||||
//阶梯注码
|
//阶梯注码
|
||||||
class TRankChip{
|
class TRankChip{
|
||||||
protected:
|
protected:
|
||||||
int iType, //注码类型
|
int iType, //注码类型
|
||||||
iRank, //注码层数
|
iRank, //注码层数
|
||||||
nRnkChip; //当层注码
|
nRnkChip; //当层注码
|
||||||
bool bWait; //等待结算
|
bool bWait; //等待结算
|
||||||
TChipPolicy* pPolicy; //注码方案
|
TChipPolicy* pPolicy; //注码方案
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TRankChip();
|
TRankChip();
|
||||||
@@ -150,12 +150,12 @@ public:
|
|||||||
virtual int __fastcall HandleResult(int res, double wl) = 0;
|
virtual int __fastcall HandleResult(int res, double wl) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
//层级注码
|
//层级注码
|
||||||
class TTierChip : public TRankChip{
|
class TTierChip : public TRankChip{
|
||||||
int nWLDiff, //本层赢输差
|
int nWLDiff, //本层赢输差
|
||||||
nAccChip, //累加注码
|
nAccChip, //累加注码
|
||||||
nLos, //当层输额
|
nLos, //当层输额
|
||||||
nCount; //当层下注计数
|
nCount; //当层下注计数
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TTierChip();
|
TTierChip();
|
||||||
@@ -165,11 +165,11 @@ public:
|
|||||||
virtual int __fastcall HandleResult(int res, double wl);
|
virtual int __fastcall HandleResult(int res, double wl);
|
||||||
};
|
};
|
||||||
|
|
||||||
//阶梯注码
|
//阶梯注码
|
||||||
class TLevelChip : public TRankChip{
|
class TLevelChip : public TRankChip{
|
||||||
protected:
|
protected:
|
||||||
bool bGlobal; //总体计算
|
bool bGlobal; //总体计算
|
||||||
double fWLDiff; //本层输赢金额
|
double fWLDiff; //本层输赢金额
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TLevelChip(bool bG=false);
|
TLevelChip(bool bG=false);
|
||||||
@@ -180,12 +180,12 @@ public:
|
|||||||
virtual int __fastcall HandleResult(int res, double wl);
|
virtual int __fastcall HandleResult(int res, double wl);
|
||||||
};
|
};
|
||||||
|
|
||||||
//组合阶梯注码
|
//组合阶梯注码
|
||||||
class TComboChip : public TLevelChip{
|
class TComboChip : public TLevelChip{
|
||||||
int iRnkSeq; //当层注码步骤
|
int iRnkSeq; //当层注码步骤
|
||||||
int nRnkMul; //当层倍数
|
int nRnkMul; //当层倍数
|
||||||
|
|
||||||
TChipPolicy* pRnkPolicy; //当层注码方案
|
TChipPolicy* pRnkPolicy; //当层注码方案
|
||||||
public:
|
public:
|
||||||
TComboChip(bool bG=false);
|
TComboChip(bool bG=false);
|
||||||
|
|
||||||
@@ -196,11 +196,11 @@ public:
|
|||||||
int __fastcall GetComboChip(int& iRnk, int& iSeq);
|
int __fastcall GetComboChip(int& iRnk, int& iSeq);
|
||||||
};
|
};
|
||||||
|
|
||||||
//赢输次差注码
|
//赢输次差注码
|
||||||
class TWLDiffChip : public TRankChip{
|
class TWLDiffChip : public TRankChip{
|
||||||
protected:
|
protected:
|
||||||
bool bGlobal; //总体计算
|
bool bGlobal; //总体计算
|
||||||
int nWLDiff; //输赢次差
|
int nWLDiff; //输赢次差
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TWLDiffChip(bool bG=false);
|
TWLDiffChip(bool bG=false);
|
||||||
@@ -211,7 +211,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//路珠图
|
//路珠图
|
||||||
class TRoadmap{
|
class TRoadmap{
|
||||||
public:
|
public:
|
||||||
vector<char*> aCols;
|
vector<char*> aCols;
|
||||||
@@ -224,63 +224,63 @@ public:
|
|||||||
void __fastcall CheckColumn();
|
void __fastcall CheckColumn();
|
||||||
};
|
};
|
||||||
|
|
||||||
//台桌
|
//台桌
|
||||||
class TTableFrame;
|
class TTableFrame;
|
||||||
class TGame
|
class TGame
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int iGame; //gameId
|
int iGame; //gameId
|
||||||
//台桌相关
|
//台桌相关
|
||||||
String vid; //房间号
|
String vid; //房间号
|
||||||
String gmcode;
|
String gmcode;
|
||||||
int gmstatus; //0=结算 1=下注 2=开牌 11=洗牌 12=维护
|
int gmstatus; //0=结算 1=下注 2=开牌 11=洗牌 12=维护
|
||||||
int timeout;
|
int timeout;
|
||||||
int countdown; //固定倒计时
|
int countdown; //固定倒计时
|
||||||
char winCount[3]; //庄闲计数 [0]庄 [1]闲 [2]平
|
char winCount[3]; //庄闲计数 [0]庄 [1]闲 [2]平
|
||||||
String bcard; //庄牌 2-3张 0-9 0,5,2
|
String bcard; //庄牌 2-3张 0-9 0,5,2
|
||||||
String pcard; //闲牌 3,4,_
|
String pcard; //闲牌 3,4,_
|
||||||
|
|
||||||
bool bRun, //运行
|
bool bRun, //运行
|
||||||
bRev, //反打
|
bRev, //反打
|
||||||
bPause, //暂停
|
bPause, //暂停
|
||||||
bReset, //是否重置打法注码
|
bReset, //是否重置打法注码
|
||||||
bBreak; //是否等待新局
|
bBreak; //是否等待新局
|
||||||
|
|
||||||
int iRoad;
|
int iRoad;
|
||||||
bool bIndPolicy; //是否独立策略
|
bool bIndPolicy; //是否独立策略
|
||||||
int iBetPolicy, iChipPolicy, nChipMul; //独立策略
|
int iBetPolicy, iChipPolicy, nChipMul; //独立策略
|
||||||
|
|
||||||
//下注相关
|
//下注相关
|
||||||
int iState; //INIT/BETTING/BETTED
|
int iState; //INIT/BETTING/BETTED
|
||||||
int iBet; //下注项
|
int iBet; //下注项
|
||||||
int nChip; //下注金额
|
int nChip; //下注金额
|
||||||
int iBetSeq; //下注手数+打法
|
int iBetSeq; //下注手数+打法
|
||||||
int iChipSeq; //注码步骤
|
int iChipSeq; //注码步骤
|
||||||
// bool bGlobalChip; //是否全局注码
|
// bool bGlobalChip; //是否全局注码
|
||||||
bool bReal; //模拟/实打 0=模拟 1=实打
|
bool bReal; //模拟/实打 0=模拟 1=实打
|
||||||
vector<char> aBets; //剩余连续下注项
|
vector<char> aBets; //剩余连续下注项
|
||||||
|
|
||||||
vector<TManBet> aManBets; //手工下注
|
vector<TManBet> aManBets; //手工下注
|
||||||
|
|
||||||
TRankChip * pRankChip; //层级注码
|
TRankChip * pRankChip; //层级注码
|
||||||
|
|
||||||
//统计相关
|
//统计相关
|
||||||
double profit; //当前赢利
|
double profit; //当前赢利
|
||||||
int seqCount[2]; //连赢/连输计数
|
int seqCount[2]; //连赢/连输计数
|
||||||
|
|
||||||
HWND hTable; //台桌句柄,通过消息操作UI
|
HWND hTable; //台桌句柄,通过消息操作UI
|
||||||
CSema* pSema;
|
CSema* pSema;
|
||||||
|
|
||||||
//路单数据
|
//路单数据
|
||||||
vector<char> aRes; //历史结果
|
vector<char> aRes; //历史结果
|
||||||
vector<char> aRoad[4]; //大路/大眼路/小路/小强路
|
vector<char> aRoad[4]; //大路/大眼路/小路/小强路
|
||||||
char lastRoad[4];
|
char lastRoad[4];
|
||||||
TRoadmap aMap[4]; //路珠图
|
TRoadmap aMap[4]; //路珠图
|
||||||
|
|
||||||
TGame(int iG);
|
TGame(int iG);
|
||||||
~TGame();
|
~TGame();
|
||||||
|
|
||||||
void __fastcall HandleResult(int op=0); //op =0正常处理 =1数据异常 =2结算超时 =3维护注销
|
void __fastcall HandleResult(int op=0); //op =0正常处理 =1数据异常 =2结算超时 =3维护注销
|
||||||
void __fastcall AutoBetOn(bool bReset=false);
|
void __fastcall AutoBetOn(bool bReset=false);
|
||||||
void __fastcall AutoBetOff(bool bBreak=false);
|
void __fastcall AutoBetOff(bool bBreak=false);
|
||||||
void __fastcall ManualBetOn(int chips[]);
|
void __fastcall ManualBetOn(int chips[]);
|
||||||
@@ -300,9 +300,9 @@ public:
|
|||||||
TBetLog* __fastcall NewBetLog();
|
TBetLog* __fastcall NewBetLog();
|
||||||
void __fastcall GameOn();
|
void __fastcall GameOn();
|
||||||
void __fastcall GameOff();
|
void __fastcall GameOff();
|
||||||
void __fastcall BetResp(int state, int chips[]=NULL); //state 下注状态 0=成功 10=低于限红 11=高于限红 25=已停止下注 26=余额不足 其它=未知
|
void __fastcall BetResp(int state, int chips[]=NULL); //state 下注状态 0=成功 10=低于限红 11=高于限红 25=已停止下注 26=余额不足 其它=未知
|
||||||
void __fastcall Pause(bool bP){bPause = bP;};
|
void __fastcall Pause(bool bP){bPause = bP;};
|
||||||
int __fastcall Color2Bet(TBetPolicy* pBP, char clr); //下三路下注 clr=红蓝 返回庄闲
|
int __fastcall Color2Bet(TBetPolicy* pBP, char clr); //下三路下注 clr=红蓝 返回庄闲
|
||||||
void __fastcall ClearRankChip();
|
void __fastcall ClearRankChip();
|
||||||
TRankChip* __fastcall GetRankChip(int type);
|
TRankChip* __fastcall GetRankChip(int type);
|
||||||
void __fastcall ResetIP();
|
void __fastcall ResetIP();
|
||||||
@@ -313,22 +313,22 @@ class TGameArray : public vector<TGame*>
|
|||||||
public:
|
public:
|
||||||
CSema* pSema;
|
CSema* pSema;
|
||||||
vector<TGame*> aGames;
|
vector<TGame*> aGames;
|
||||||
TBetData betData; //总输赢状态及计数
|
TBetData betData; //总输赢状态及计数
|
||||||
|
|
||||||
//游台相关
|
//游台相关
|
||||||
bool bFloat, //是否游台
|
bool bFloat, //是否游台
|
||||||
bSwitchable; //可否换台
|
bSwitchable; //可否换台
|
||||||
int iFloatGame; //下注台号
|
int iFloatGame; //下注台号
|
||||||
|
|
||||||
//全局注码
|
//全局注码
|
||||||
int iChipSeq, //全局注码步骤
|
int iChipSeq, //全局注码步骤
|
||||||
seqCount[2]; //连赢/连输计数
|
seqCount[2]; //连赢/连输计数
|
||||||
|
|
||||||
TRankChip * pRankChip; //层级注码
|
TRankChip * pRankChip; //层级注码
|
||||||
|
|
||||||
int runTime, //挂机时长
|
int runTime, //挂机时长
|
||||||
nBetted[3]; //待结算的下注 模拟/实打/全局计算
|
nBetted[3]; //待结算的下注 模拟/实打/全局计算
|
||||||
double fCurrProfitPeak; //最大当期赢利
|
double fCurrProfitPeak; //最大当期赢利
|
||||||
|
|
||||||
TGameArray();
|
TGameArray();
|
||||||
~TGameArray();
|
~TGameArray();
|
||||||
@@ -358,7 +358,7 @@ class TIPGame
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
String vid; //gameId
|
String vid; //gameId
|
||||||
int iBetPolicy, iChipPolicy, nChipMul; //独立策略
|
int iBetPolicy, iChipPolicy, nChipMul; //独立策略
|
||||||
TGame* pGame;
|
TGame* pGame;
|
||||||
|
|
||||||
TIPGame(String v, int b, int c, int m){pGame=NULL, vid=v,
|
TIPGame(String v, int b, int c, int m){pGame=NULL, vid=v,
|
||||||
@@ -384,18 +384,18 @@ public:
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
int __fastcall Vid2Gid(String vid);
|
int __fastcall Vid2Gid(String vid);
|
||||||
|
|
||||||
extern TSettings g_settings; //基本设置
|
extern TSettings g_settings; //基本设置
|
||||||
extern TGameArray g_aGames;
|
extern TGameArray g_aGames;
|
||||||
extern double g_fBalance; //账户余额
|
extern double g_fBalance; //账户余额
|
||||||
extern int g_iRoad; //全局路珠类型 0=六珠路 1=大路 2=大眼路 3=小路 4=小强路
|
extern int g_iRoad; //全局路珠类型 0=六珠路 1=大路 2=大眼路 3=小路 4=小强路
|
||||||
extern bool g_bSimulate, //模拟/实打
|
extern bool g_bSimulate, //模拟/实打
|
||||||
g_bGameOn, //开始挂机
|
g_bGameOn, //开始挂机
|
||||||
g_bShowSetting, //开始挂机时显示设置页面
|
g_bShowSetting, //开始挂机时显示设置页面
|
||||||
g_bDeadPause, //全局爆缆暂停
|
g_bDeadPause, //全局爆缆暂停
|
||||||
g_bBetPause; //总体止赢止损暂停
|
g_bBetPause; //总体止赢止损暂停
|
||||||
extern int g_MinOnBet, //最小注码
|
extern int g_MinOnBet, //最小注码
|
||||||
g_MaxOnBet; //最大注码
|
g_MaxOnBet; //最大注码
|
||||||
extern int g_nRBReport; //实打流水上报
|
extern int g_nRBReport; //实打流水上报
|
||||||
extern vector<TDot> g_aDots[4]; //资金图表数据 总赢利/模拟本金/账户余额/总输赢差
|
extern vector<TDot> g_aDots[4]; //资金图表数据 总赢利/模拟本金/账户余额/总输赢差
|
||||||
extern TIPGameArray g_aIPGames; //独立策略台桌
|
extern TIPGameArray g_aIPGames; //独立策略台桌
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+85
-85
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
|
|
||||||
#include "HookJS.h"
|
#include "HookJS.h"
|
||||||
@@ -39,7 +39,7 @@ String linkJS_PA =
|
|||||||
"VideoGameCore.GameLinkStore.prototype.onSocketDataOld = VideoGameCore.GameLinkStore.prototype.onSocketData;"
|
"VideoGameCore.GameLinkStore.prototype.onSocketDataOld = VideoGameCore.GameLinkStore.prototype.onSocketData;"
|
||||||
"VideoGameCore.GameLinkStore.prototype.onSocketData = function(e,t) {"
|
"VideoGameCore.GameLinkStore.prototype.onSocketData = function(e,t) {"
|
||||||
"if(e.respId==Cube.Game.Protocol.NO_BET_NOTIFY_PROTO_R){"
|
"if(e.respId==Cube.Game.Protocol.NO_BET_NOTIFY_PROTO_R){"
|
||||||
"console.log('长时间未下注');"
|
"console.log('长时间未下注');"
|
||||||
"reGameLink(1);"
|
"reGameLink(1);"
|
||||||
"return;"
|
"return;"
|
||||||
"}"
|
"}"
|
||||||
@@ -47,7 +47,7 @@ String linkJS_PA =
|
|||||||
"if(typeof myGameLink=='undefined') return;"
|
"if(typeof myGameLink=='undefined') return;"
|
||||||
|
|
||||||
"if(e.respId==Cube.Game.Protocol.ENTER_TABLE_PROTO_R && 'LINK'==e.payload.vid){"
|
"if(e.respId==Cube.Game.Protocol.ENTER_TABLE_PROTO_R && 'LINK'==e.payload.vid){"
|
||||||
"if(e.retCode==78){" //余额不足
|
"if(e.retCode==78){" //余额不足
|
||||||
"const store = VideoGameCore.GameLinkStore.instance;"
|
"const store = VideoGameCore.GameLinkStore.instance;"
|
||||||
"for(let i=0; i<store.vids.length; i++){"
|
"for(let i=0; i<store.vids.length; i++){"
|
||||||
"const ind = store.visibleVids.indexOf(store.vids[i]);"
|
"const ind = store.visibleVids.indexOf(store.vids[i]);"
|
||||||
@@ -102,10 +102,10 @@ String linkJS_PA =
|
|||||||
"cefApp.OnJSMessage('4|'+e.payload.vid);"
|
"cefApp.OnJSMessage('4|'+e.payload.vid);"
|
||||||
"}"
|
"}"
|
||||||
"else if(e.respId==VideoGameCore.GAME_SNAPSHOT_PROTO && checkVid(e.vid)"
|
"else if(e.respId==VideoGameCore.GAME_SNAPSHOT_PROTO && checkVid(e.vid)"
|
||||||
"&& !VideoGameCore.isGameMaintain(e.vid)){" //135190 //台桌维护不处理
|
"&& !VideoGameCore.isGameMaintain(e.vid)){" //135190 //台桌维护不处理
|
||||||
"const p=e.payload;"
|
"const p=e.payload;"
|
||||||
"if(p.gmstatus==2 && (p.bcard && p.bcard.length || p.pcard && p.pcard.length)){"
|
"if(p.gmstatus==2 && (p.bcard && p.bcard.length || p.pcard && p.pcard.length)){"
|
||||||
"const msg = '9|' + e.vid + '|' + p.gmcode + '|';" //翻牌
|
"const msg = '9|' + e.vid + '|' + p.gmcode + '|';" //翻牌
|
||||||
"const bc = p.bcard && p.bcard.length ? parseCards(p.bcard) : '';"
|
"const bc = p.bcard && p.bcard.length ? parseCards(p.bcard) : '';"
|
||||||
"const pc = p.pcard && p.pcard.length ? parseCards(p.pcard) : '';"
|
"const pc = p.pcard && p.pcard.length ? parseCards(p.pcard) : '';"
|
||||||
"cefApp.OnJSMessage(msg + bc + '|' + pc);"
|
"cefApp.OnJSMessage(msg + bc + '|' + pc);"
|
||||||
@@ -245,9 +245,9 @@ String baseJS_PA =
|
|||||||
"return room && room.gmtype===VideoGameCore.GAME_BAC"
|
"return room && room.gmtype===VideoGameCore.GAME_BAC"
|
||||||
"&& (room.platformtype===VideoGameCore.PLATFORM_CGY"
|
"&& (room.platformtype===VideoGameCore.PLATFORM_CGY"
|
||||||
"||room.platformtype===VideoGameCore.PLATFORM_EMA"
|
"||room.platformtype===VideoGameCore.PLATFORM_EMA"
|
||||||
"||room.platformtype===VideoGameCore.PLATFORM_CHO);" //新台桌类型
|
"||room.platformtype===VideoGameCore.PLATFORM_CHO);" //新台桌类型
|
||||||
"};"
|
"};"
|
||||||
"var ssTimeout=0, psTimeout=0, tmRetry=90;"//待机状态尝试恢复5分钟,否则90秒
|
"var ssTimeout=0, psTimeout=0, tmRetry=90;"//待机状态尝试恢复5分钟,否则90秒
|
||||||
"var chkSockets = ()=>{"
|
"var chkSockets = ()=>{"
|
||||||
"if(typeof myGameLink=='undefined') return;"
|
"if(typeof myGameLink=='undefined') return;"
|
||||||
|
|
||||||
@@ -256,11 +256,11 @@ String baseJS_PA =
|
|||||||
|
|
||||||
"ssTimeout++, psTimeout++;"
|
"ssTimeout++, psTimeout++;"
|
||||||
|
|
||||||
"if(ssTimeout>=tmRetry || psTimeout>=tmRetry){" //确认网络异常,退出登录
|
"if(ssTimeout>=tmRetry || psTimeout>=tmRetry){" //确认网络异常,退出登录
|
||||||
"cefApp.OnJSMessage('0|3');"
|
"cefApp.OnJSMessage('0|3');"
|
||||||
"}"
|
"}"
|
||||||
|
|
||||||
"if(ssTimeout>=10 && (ssTimeout % 5)==0){" //10秒没有ss网络数据,尝试每5秒reconnect
|
"if(ssTimeout>=10 && (ssTimeout % 5)==0){" //10秒没有ss网络数据,尝试每5秒reconnect
|
||||||
"console.log(ssTimeout + 's try reconnect ss!!!!');"
|
"console.log(ssTimeout + 's try reconnect ss!!!!');"
|
||||||
|
|
||||||
"const sSkt = VideoGameCore.singleSocket;"
|
"const sSkt = VideoGameCore.singleSocket;"
|
||||||
@@ -268,7 +268,7 @@ String baseJS_PA =
|
|||||||
"console.log('singleSocket connect: ', sSkt.connected, sSkt.readyState);"
|
"console.log('singleSocket connect: ', sSkt.connected, sSkt.readyState);"
|
||||||
"sSkt.connect();"
|
"sSkt.connect();"
|
||||||
"}"
|
"}"
|
||||||
"else if(sSkt && (sSkt.connected || (ssTimeout % 20)==0)){" //20秒一次断开重连
|
"else if(sSkt && (sSkt.connected || (ssTimeout % 20)==0)){" //20秒一次断开重连
|
||||||
"console.log('singleSocket close');"
|
"console.log('singleSocket close');"
|
||||||
"sSkt.close();"
|
"sSkt.close();"
|
||||||
"}"
|
"}"
|
||||||
@@ -277,7 +277,7 @@ String baseJS_PA =
|
|||||||
"}"
|
"}"
|
||||||
"}"
|
"}"
|
||||||
|
|
||||||
"if(psTimeout>=10 && (psTimeout % 10)==0){" //10秒没有ps网络数据,尝试每10秒reconnect
|
"if(psTimeout>=10 && (psTimeout % 10)==0){" //10秒没有ps网络数据,尝试每10秒reconnect
|
||||||
"console.log(psTimeout + 's try reconnect ps!!!!');"
|
"console.log(psTimeout + 's try reconnect ps!!!!');"
|
||||||
|
|
||||||
"const pSkt = VideoGameCore.PlazaSocket.instance;"
|
"const pSkt = VideoGameCore.PlazaSocket.instance;"
|
||||||
@@ -300,7 +300,7 @@ String baseJS_PA =
|
|||||||
"let t = e.data;"
|
"let t = e.data;"
|
||||||
"if(t && t.respId){"
|
"if(t && t.respId){"
|
||||||
"if(t.respId==vgc.EXCEPTION_EXIT_R ){" // 131142
|
"if(t.respId==vgc.EXCEPTION_EXIT_R ){" // 131142
|
||||||
"cefApp.OnJSMessage('0|0');" //重复登入
|
"cefApp.OnJSMessage('0|0');" //重复登入
|
||||||
"}"
|
"}"
|
||||||
"else if(t.respId==vgc.UPDATE_BALANCE_R){" //131106
|
"else if(t.respId==vgc.UPDATE_BALANCE_R){" //131106
|
||||||
"console.log('UPDATE_BALANCE_R_1', JSON.stringify(t));"
|
"console.log('UPDATE_BALANCE_R_1', JSON.stringify(t));"
|
||||||
@@ -327,7 +327,7 @@ String baseJS_PA =
|
|||||||
|
|
||||||
"psTimeout = 0;"
|
"psTimeout = 0;"
|
||||||
"if(vgc.isGameMaintain(t.vid)){"
|
"if(vgc.isGameMaintain(t.vid)){"
|
||||||
"cefApp.OnJSMessage('3|'+t.vid+'|||12|');" //维护中
|
"cefApp.OnJSMessage('3|'+t.vid+'|||12|');" //维护中
|
||||||
|
|
||||||
"const store = vgc.GameLinkStore.instance;"
|
"const store = vgc.GameLinkStore.instance;"
|
||||||
"if(store && store.roomInfosMap.get(t.vid)){"
|
"if(store && store.roomInfosMap.get(t.vid)){"
|
||||||
@@ -337,10 +337,10 @@ String baseJS_PA =
|
|||||||
"};"
|
"};"
|
||||||
"}"
|
"}"
|
||||||
"else{"
|
"else{"
|
||||||
"if(!vgc.singleSocket.connected || ssTimeout>2){" //singleSocket断开时接管 //可能产生数据冲突ps数据滞后于ss
|
"if(!vgc.singleSocket.connected || ssTimeout>2){" //singleSocket断开时接管 //可能产生数据冲突ps数据滞后于ss
|
||||||
"const p=t.payload;"
|
"const p=t.payload;"
|
||||||
"if(p.gmstatus==2 && (p.bcard && p.bcard.length || p.pcard && p.pcard.length)){"
|
"if(p.gmstatus==2 && (p.bcard && p.bcard.length || p.pcard && p.pcard.length)){"
|
||||||
"const msg = '9|' + t.vid + '|' + p.gmcode + '|';" //翻牌
|
"const msg = '9|' + t.vid + '|' + p.gmcode + '|';" //翻牌
|
||||||
"const bc = p.bcard && p.bcard.length ? parseCards(p.bcard) : '';"
|
"const bc = p.bcard && p.bcard.length ? parseCards(p.bcard) : '';"
|
||||||
"const pc = p.pcard && p.pcard.length ? parseCards(p.pcard) : '';"
|
"const pc = p.pcard && p.pcard.length ? parseCards(p.pcard) : '';"
|
||||||
"cefApp.OnJSMessage(msg + bc + '|' + pc);"
|
"cefApp.OnJSMessage(msg + bc + '|' + pc);"
|
||||||
@@ -400,7 +400,7 @@ String baseJS_PA =
|
|||||||
// "console.log(t.type, JSON.stringify(t));"
|
// "console.log(t.type, JSON.stringify(t));"
|
||||||
"if(t.type==egret.Event.CLOSE){"
|
"if(t.type==egret.Event.CLOSE){"
|
||||||
"const sSkt = vgc.singleSocket;"
|
"const sSkt = vgc.singleSocket;"
|
||||||
"if(sSkt && !sSkt.connected && sSkt.readyState>1){" //singleSocket中断
|
"if(sSkt && !sSkt.connected && sSkt.readyState>1){" //singleSocket中断
|
||||||
"console.log('reconnect singleSocket on CLOSE');"
|
"console.log('reconnect singleSocket on CLOSE');"
|
||||||
"sSkt.connect();"
|
"sSkt.connect();"
|
||||||
"}"
|
"}"
|
||||||
@@ -503,7 +503,7 @@ String goLinkJS_AB =
|
|||||||
"const instCEM = Netbet.component.entity.manager.ComponentEventManager.getInstance();"
|
"const instCEM = Netbet.component.entity.manager.ComponentEventManager.getInstance();"
|
||||||
"if(instGD && instCEM){"
|
"if(instGD && instCEM){"
|
||||||
"setTimeout(()=>{"
|
"setTimeout(()=>{"
|
||||||
"instGD.setGameHallGameFilterList(" //设置台桌类型
|
"instGD.setGameHallGameFilterList(" //设置台桌类型
|
||||||
"'MULTITABLE',"
|
"'MULTITABLE',"
|
||||||
"[{"
|
"[{"
|
||||||
"'parentItem': {'name': 'Baccarat', 'status': 'selected'},"
|
"'parentItem': {'name': 'Baccarat', 'status': 'selected'},"
|
||||||
@@ -517,7 +517,7 @@ String goLinkJS_AB =
|
|||||||
"]"
|
"]"
|
||||||
"}]"
|
"}]"
|
||||||
");"
|
");"
|
||||||
"instCEM.alNavBtnClick({'navBtnName': 'MULTITABLE'});" //进入多台
|
"instCEM.alNavBtnClick({'navBtnName': 'MULTITABLE'});" //进入多台
|
||||||
"}, 200);"
|
"}, 200);"
|
||||||
"}"
|
"}"
|
||||||
"}";
|
"}";
|
||||||
@@ -531,13 +531,13 @@ String stopJS_AB =
|
|||||||
|
|
||||||
String msgJS_AB =
|
String msgJS_AB =
|
||||||
"if(typeof iv_login=='undefined'){"
|
"if(typeof iv_login=='undefined'){"
|
||||||
"console.warn = function (e) {};" //禁止打印warn
|
"console.warn = function (e) {};" //禁止打印warn
|
||||||
"const iframe = document.createElement('iframe');" //重定位log
|
"const iframe = document.createElement('iframe');" //重定位log
|
||||||
"iframe.style.display = 'none';"
|
"iframe.style.display = 'none';"
|
||||||
"document.body.appendChild(iframe);"
|
"document.body.appendChild(iframe);"
|
||||||
"window.console.log = iframe.contentWindow.console.log;"
|
"window.console.log = iframe.contentWindow.console.log;"
|
||||||
|
|
||||||
"var ssTimeout=0, psTimeout=0, tmRetry=90;" //计时器
|
"var ssTimeout=0, psTimeout=0, tmRetry=90;" //计时器
|
||||||
|
|
||||||
"function msgHandler(e){"
|
"function msgHandler(e){"
|
||||||
"console.log(JSON.stringify(e));"
|
"console.log(JSON.stringify(e));"
|
||||||
@@ -547,19 +547,19 @@ String msgJS_AB =
|
|||||||
"cefApp.OnJSMessage('0|0');"
|
"cefApp.OnJSMessage('0|0');"
|
||||||
"};"
|
"};"
|
||||||
|
|
||||||
"const chkGameType = function(t){" //是否百家乐
|
"const chkGameType = function(t){" //是否百家乐
|
||||||
"return t<=110 || t==1011 || t==1012;"
|
"return t<=110 || t==1011 || t==1012;"
|
||||||
"};"
|
"};"
|
||||||
|
|
||||||
"const chgTableStatus = function(t){" //转换台桌状态
|
"const chgTableStatus = function(t){" //转换台桌状态
|
||||||
"return t==999 ? 12 : t==102 ? 11 : t==100 ? 1 "
|
"return t==999 ? 12 : t==102 ? 11 : t==100 ? 1 "
|
||||||
": (t==110 || t==113 || t>=103 && t<=108) ? 2 "
|
": (t==110 || t==113 || t>=103 && t<=108) ? 2 "
|
||||||
": 0;"
|
": 0;"
|
||||||
"};"
|
"};"
|
||||||
|
|
||||||
"function updHandler(e,t){"
|
"function updHandler(e,t){"
|
||||||
"if(e=='login'){" //登录
|
"if(e=='login'){" //登录
|
||||||
"if(t.A==0){" //成功,获取用户信息
|
"if(t.A==0){" //成功,获取用户信息
|
||||||
"const un = t.C.BB;"
|
"const un = t.C.BB;"
|
||||||
"const amo = (t.C.DD/100).toFixed(2);"
|
"const amo = (t.C.DD/100).toFixed(2);"
|
||||||
"const cur = t.C.LL;"
|
"const cur = t.C.LL;"
|
||||||
@@ -568,10 +568,10 @@ String msgJS_AB =
|
|||||||
|
|
||||||
"cefApp.GetUserInfo(un, amo, cur, low, high);"
|
"cefApp.GetUserInfo(un, amo, cur, low, high);"
|
||||||
"}"
|
"}"
|
||||||
"else " //失败
|
"else " //失败
|
||||||
"cefApp.OnJSMessage('0|-3');"
|
"cefApp.OnJSMessage('0|-3');"
|
||||||
"}"
|
"}"
|
||||||
"else if(e=='setPlayerHandicap'){" //限额
|
"else if(e=='setPlayerHandicap'){" //限额
|
||||||
"for(let i=0; i<t.C.length; i++){"
|
"for(let i=0; i<t.C.length; i++){"
|
||||||
"if(t.C[i].AA.includes(101)){"
|
"if(t.C[i].AA.includes(101)){"
|
||||||
"const low = t.C[i].BB;"
|
"const low = t.C[i].BB;"
|
||||||
@@ -581,31 +581,31 @@ String msgJS_AB =
|
|||||||
"}"
|
"}"
|
||||||
"}"
|
"}"
|
||||||
"}"
|
"}"
|
||||||
"else if(e=='pushUserInfo'){" //账户余额
|
"else if(e=='pushUserInfo'){" //账户余额
|
||||||
"cefApp.OnJSMessage('5|'+(t.A/100).toFixed(2));"
|
"cefApp.OnJSMessage('5|'+(t.A/100).toFixed(2));"
|
||||||
"console.log(e, JSON.stringify(t));"
|
"console.log(e, JSON.stringify(t));"
|
||||||
"}"
|
"}"
|
||||||
"else if(e=='getGameHall'){" //所有台桌
|
"else if(e=='getGameHall'){" //所有台桌
|
||||||
// "console.log(e, JSON.stringify(t));"
|
// "console.log(e, JSON.stringify(t));"
|
||||||
|
|
||||||
"const hallId = t.C;"
|
"const hallId = t.C;"
|
||||||
"cefApp.OnJSMessage('4|'+hallId);"
|
"cefApp.OnJSMessage('4|'+hallId);"
|
||||||
|
|
||||||
// "if(hallId==100){" //多桌
|
// "if(hallId==100){" //多桌
|
||||||
"let msg = '1|';"
|
"let msg = '1|';"
|
||||||
"t.D.forEach(a=>{"
|
"t.D.forEach(a=>{"
|
||||||
"if(chkGameType(a.DD)){" //百家乐
|
"if(chkGameType(a.DD)){" //百家乐
|
||||||
"let p='';"
|
"let p='';"
|
||||||
"if(a.WW3 && a.WW3.length)"
|
"if(a.WW3 && a.WW3.length)"
|
||||||
"a.WW3[0].forEach(v=>p+=v[0]);"
|
"a.WW3[0].forEach(v=>p+=v[0]);"
|
||||||
"let s = chgTableStatus(a.Z3);" //台桌状态
|
"let s = chgTableStatus(a.Z3);" //台桌状态
|
||||||
"msg += a.AA+','+a.BB+','+a.HH.CC+','+s+','+p+';'"
|
"msg += a.AA+','+a.BB+','+a.HH.CC+','+s+','+p+';'"
|
||||||
"}"
|
"}"
|
||||||
"});"
|
"});"
|
||||||
"cefApp.OnJSMessage(msg);"
|
"cefApp.OnJSMessage(msg);"
|
||||||
// "}"
|
// "}"
|
||||||
"}"
|
"}"
|
||||||
"else if(e=='getRoadData'){" //历史结果
|
"else if(e=='getRoadData'){" //历史结果
|
||||||
"const inst = Netbet.component.entity.gameHallDO.getInstance();"
|
"const inst = Netbet.component.entity.gameHallDO.getInstance();"
|
||||||
"const td = inst.getTableDO(t.C);"
|
"const td = inst.getTableDO(t.C);"
|
||||||
"if(td && chkGameType(td.getGameType()) && t.G && t.G.length==1){"
|
"if(td && chkGameType(td.getGameType()) && t.G && t.G.length==1){"
|
||||||
@@ -616,7 +616,7 @@ String msgJS_AB =
|
|||||||
// "console.log(e, JSON.stringify(t));"
|
// "console.log(e, JSON.stringify(t));"
|
||||||
"}"
|
"}"
|
||||||
"}"
|
"}"
|
||||||
"else if(e=='getCountDown'){" //倒计时
|
"else if(e=='getCountDown'){" //倒计时
|
||||||
"let msg = '8|';"
|
"let msg = '8|';"
|
||||||
"const inst = Netbet.component.entity.gameHallDO.getInstance();"
|
"const inst = Netbet.component.entity.gameHallDO.getInstance();"
|
||||||
"t.C.forEach(v=>{ "
|
"t.C.forEach(v=>{ "
|
||||||
@@ -626,7 +626,7 @@ String msgJS_AB =
|
|||||||
"});"
|
"});"
|
||||||
"cefApp.OnJSMessage(msg);"
|
"cefApp.OnJSMessage(msg);"
|
||||||
"}"
|
"}"
|
||||||
"else if(e=='pushGameStatus'){" //台桌状态
|
"else if(e=='pushGameStatus'){" //台桌状态
|
||||||
"const inst = Netbet.component.entity.gameHallDO.getInstance();"
|
"const inst = Netbet.component.entity.gameHallDO.getInstance();"
|
||||||
"t.A.forEach(v=>{"
|
"t.A.forEach(v=>{"
|
||||||
"const td = inst.getTableDO(v.AA);"
|
"const td = inst.getTableDO(v.AA);"
|
||||||
@@ -642,7 +642,7 @@ String msgJS_AB =
|
|||||||
|
|
||||||
// "if(log) console.log(e, JSON.stringify(t));"
|
// "if(log) console.log(e, JSON.stringify(t));"
|
||||||
"}"
|
"}"
|
||||||
"else if(e=='pushRawCards'){" //发牌
|
"else if(e=='pushRawCards'){" //发牌
|
||||||
"const inst = Netbet.component.entity.gameHallDO.getInstance();"
|
"const inst = Netbet.component.entity.gameHallDO.getInstance();"
|
||||||
"const td = inst.getTableDO(t.A);"
|
"const td = inst.getTableDO(t.A);"
|
||||||
"if(td && chkGameType(td.getGameType()) && t.B && t.B.length==2){"
|
"if(td && chkGameType(td.getGameType()) && t.B && t.B.length==2){"
|
||||||
@@ -667,7 +667,7 @@ String msgJS_AB =
|
|||||||
"cefApp.OnJSMessage(msg);"
|
"cefApp.OnJSMessage(msg);"
|
||||||
"}"
|
"}"
|
||||||
"}"
|
"}"
|
||||||
"else if(e=='gameBet'){" //下注反馈
|
"else if(e=='gameBet'){" //下注反馈
|
||||||
"console.log(e, JSON.stringify(t));"
|
"console.log(e, JSON.stringify(t));"
|
||||||
|
|
||||||
"let msg='6|'+t.D+'|'+t.A+'|'+t.H+'|';"
|
"let msg='6|'+t.D+'|'+t.A+'|'+t.H+'|';"
|
||||||
@@ -676,7 +676,7 @@ String msgJS_AB =
|
|||||||
"msg += bets[0]+'|'+bets[1]+'|'+bets[2];"
|
"msg += bets[0]+'|'+bets[1]+'|'+bets[2];"
|
||||||
"cefApp.OnJSMessage(msg);"
|
"cefApp.OnJSMessage(msg);"
|
||||||
"}"
|
"}"
|
||||||
"else if(e=='pushGameTableResults'){" //保活?
|
"else if(e=='pushGameTableResults'){" //保活?
|
||||||
"const inst = Netbet.component.entity.gameHallDO.getInstance();"
|
"const inst = Netbet.component.entity.gameHallDO.getInstance();"
|
||||||
"const td = inst.getTableDO(t.A);"
|
"const td = inst.getTableDO(t.A);"
|
||||||
"if(td && chkGameType(td.getGameType())){"
|
"if(td && chkGameType(td.getGameType())){"
|
||||||
@@ -702,9 +702,9 @@ String msgJS_AB =
|
|||||||
|
|
||||||
"function multiTableBet(e,t,a){"
|
"function multiTableBet(e,t,a){"
|
||||||
"const td = Netbet.component.entity.gameHallDO.getInstance().getTableDO(e);"
|
"const td = Netbet.component.entity.gameHallDO.getInstance().getTableDO(e);"
|
||||||
"const bo = td.getBettingObj();" //获取bettingObj 重点!
|
"const bo = td.getBettingObj();" //获取bettingObj 重点!
|
||||||
"const t2s = ['banker','player','tie'];"
|
"const t2s = ['banker','player','tie'];"
|
||||||
"t.forEach((bt,i)=>{bt && (bo.pendingBet[t2s[bt-1001]] += a[i]);});" //修改pendingBet
|
"t.forEach((bt,i)=>{bt && (bo.pendingBet[t2s[bt-1001]] += a[i]);});" //修改pendingBet
|
||||||
|
|
||||||
"const bp = {betTypes: t, betAmounts: a};"
|
"const bp = {betTypes: t, betAmounts: a};"
|
||||||
"const sa = Netbet.component.entity.GameDO.getInstance().getSendApi();"
|
"const sa = Netbet.component.entity.GameDO.getInstance().getSendApi();"
|
||||||
@@ -712,13 +712,13 @@ String msgJS_AB =
|
|||||||
"Netbet.component.entity.GameDO.getInstance().setSendApi(sa);"
|
"Netbet.component.entity.GameDO.getInstance().setSendApi(sa);"
|
||||||
|
|
||||||
"const rid = td.getGameRoundId();"
|
"const rid = td.getGameRoundId();"
|
||||||
"bo.gameRoundId = rid;" //gameRoundId为当前局号
|
"bo.gameRoundId = rid;" //gameRoundId为当前局号
|
||||||
"td.setBettingObj(bo);" //保存BettingObj
|
"td.setBettingObj(bo);" //保存BettingObj
|
||||||
|
|
||||||
"const E = {a:e, c:td.getGameStatue().inningsID, d:rid, e:102, f:bp.betTypes, "
|
"const E = {a:e, c:td.getGameStatue().inningsID, d:rid, e:102, f:bp.betTypes, "
|
||||||
"h:bp.betAmounts, i:1, j:Netbet.component.tools.Tools.bv(rid, bp, 1)"
|
"h:bp.betAmounts, i:1, j:Netbet.component.tools.Tools.bv(rid, bp, 1)"
|
||||||
"};"
|
"};"
|
||||||
"Netbet.component.entity.RequestManager.getInstance().instantRequest('gameBet', E);" //发送下注消息
|
"Netbet.component.entity.RequestManager.getInstance().instantRequest('gameBet', E);" //发送下注消息
|
||||||
|
|
||||||
// "console.log(JSON.stringify(E));"
|
// "console.log(JSON.stringify(E));"
|
||||||
"};"
|
"};"
|
||||||
@@ -735,7 +735,7 @@ String msgJS_AB =
|
|||||||
"clearInterval(iv_login);"
|
"clearInterval(iv_login);"
|
||||||
"console.log('addListener');"
|
"console.log('addListener');"
|
||||||
|
|
||||||
//拦截api消息
|
//拦截api消息
|
||||||
// "instAM._event.on('apiEvent', apiHandler);"
|
// "instAM._event.on('apiEvent', apiHandler);"
|
||||||
"const amUpd = instAM.update;"
|
"const amUpd = instAM.update;"
|
||||||
"instAM.update = function(e,t){"
|
"instAM.update = function(e,t){"
|
||||||
@@ -743,7 +743,7 @@ String msgJS_AB =
|
|||||||
"updHandler(e,t);"
|
"updHandler(e,t);"
|
||||||
"};"
|
"};"
|
||||||
|
|
||||||
//拦截消息框,确认网站异常
|
//拦截消息框,确认网站异常
|
||||||
"const mfunc = instM.func;"
|
"const mfunc = instM.func;"
|
||||||
"instM.func = function(){"
|
"instM.func = function(){"
|
||||||
"const t = arguments[0];"
|
"const t = arguments[0];"
|
||||||
@@ -838,9 +838,9 @@ String userJS_DB =
|
|||||||
|
|
||||||
"if(limit.length>0){"
|
"if(limit.length>0){"
|
||||||
"App.setting.setDuotaiTypeState([2001,2002]);"
|
"App.setting.setDuotaiTypeState([2001,2002]);"
|
||||||
"App.setting.setModeType(3);" //路单模式
|
"App.setting.setModeType(3);" //路单模式
|
||||||
"App.setting.setCustomIconState(0);" //关闭视频
|
"App.setting.setCustomIconState(0);" //关闭视频
|
||||||
"App.setting.setGAME_AUDIO(0);" //关闭音频
|
"App.setting.setGAME_AUDIO(0);" //关闭音频
|
||||||
|
|
||||||
"const pi = App.user.playerInfo;"
|
"const pi = App.user.playerInfo;"
|
||||||
"console.log(pi.loginName, pi.balance, pi.currency, limit[0], limit[1]);"
|
"console.log(pi.loginName, pi.balance, pi.currency, limit[0], limit[1]);"
|
||||||
@@ -903,7 +903,7 @@ String msgJS_DB =
|
|||||||
"return o;"
|
"return o;"
|
||||||
"};"
|
"};"
|
||||||
|
|
||||||
"const chgTableStatus = function(t){" //转换台桌状态
|
"const chgTableStatus = function(t){" //转换台桌状态
|
||||||
"return t==1 ? 11 "
|
"return t==1 ? 11 "
|
||||||
": t==2 ? 1 "
|
": t==2 ? 1 "
|
||||||
": t==3 ? 2 "
|
": t==3 ? 2 "
|
||||||
@@ -911,33 +911,33 @@ String msgJS_DB =
|
|||||||
": 0;"
|
": 0;"
|
||||||
"};"
|
"};"
|
||||||
|
|
||||||
"const chkGameType = function(e,t){" //是否百家乐
|
"const chkGameType = function(e,t){" //是否百家乐
|
||||||
"const g = e.getGameTalbeInfo(t);"
|
"const g = e.getGameTalbeInfo(t);"
|
||||||
"return g && (g.gameTypeId==2001 || g.gameTypeId==2002);"
|
"return g && (g.gameTypeId==2001 || g.gameTypeId==2002);"
|
||||||
"};"
|
"};"
|
||||||
|
|
||||||
//设置注码
|
//设置注码
|
||||||
"var pushChip = async function(tableId, bet, chip){"//bet 1=庄2=闲3=和
|
"var pushChip = async function(tableId, bet, chip){"//bet 1=庄2=闲3=和
|
||||||
"const g = App.PresenterManager.presenterDic.dict.MultiplayPresenter.model.getGameTalbeInfo(tableId);"
|
"const g = App.PresenterManager.presenterDic.dict.MultiplayPresenter.model.getGameTalbeInfo(tableId);"
|
||||||
"let res = -1;"
|
"let res = -1;"
|
||||||
"await Promise.race(["
|
"await Promise.race(["
|
||||||
"App.BetManager.pushChip2({"
|
"App.BetManager.pushChip2({"
|
||||||
"'tableId': tableId," //台号
|
"'tableId': tableId," //台号
|
||||||
"'betAreaId': (bet+3000)," //betId: 3001庄 3002闲 3003和
|
"'betAreaId': (bet+3000)," //betId: 3001庄 3002闲 3003和
|
||||||
"'value': chip," //注码
|
"'value': chip," //注码
|
||||||
//////////////////////
|
//////////////////////
|
||||||
//test
|
//test
|
||||||
// "'betAreaId': 3012," 5818超级幸运七 3012幸运六
|
// "'betAreaId': 3012," 5818超级幸运七 3012幸运六
|
||||||
// "'value': 1,"
|
// "'value': 1,"
|
||||||
//
|
//
|
||||||
//////////////////////
|
//////////////////////
|
||||||
"'isMultiplayBet': true," //多台
|
"'isMultiplayBet': true," //多台
|
||||||
"'noFastBet': true," //非快速下注
|
"'noFastBet': true," //非快速下注
|
||||||
"'roundId': g.roundId" //局号
|
"'roundId': g.roundId" //局号
|
||||||
"}),"
|
"}),"
|
||||||
"new Promise((resolve, reject) => {" //超时处理(1秒)
|
"new Promise((resolve, reject) => {" //超时处理(1秒)
|
||||||
"setTimeout(() => {"
|
"setTimeout(() => {"
|
||||||
"reject('超时');"
|
"reject('超时');"
|
||||||
"}, 1000);"
|
"}, 1000);"
|
||||||
"})"
|
"})"
|
||||||
"])"
|
"])"
|
||||||
@@ -945,26 +945,26 @@ String msgJS_DB =
|
|||||||
".catch((e)=>{"
|
".catch((e)=>{"
|
||||||
"console.log(g.physicsTableNo, tableId, e.message);"
|
"console.log(g.physicsTableNo, tableId, e.message);"
|
||||||
|
|
||||||
// "if(e.message.indexOf('超时')>=0) res = -1;"
|
// "if(e.message.indexOf('超时')>=0) res = -1;"
|
||||||
// "else "
|
// "else "
|
||||||
"if(e.message.indexOf('已下注')>=0) res = 4;"
|
"if(e.message.indexOf('已下注')>=0) res = 4;"
|
||||||
"else if(e.message.indexOf('不足')>=0) res = 26;"
|
"else if(e.message.indexOf('不足')>=0) res = 26;"
|
||||||
"else if(e.message.indexOf('最低限红')>=0) res = 10;"
|
"else if(e.message.indexOf('最低限红')>=0) res = 10;"
|
||||||
"else if(e.message.indexOf('限额不满足')>=0) res = 11;"
|
"else if(e.message.indexOf('限额不满足')>=0) res = 11;"
|
||||||
"else res = 5;"
|
"else res = 5;"
|
||||||
"});"
|
"});"
|
||||||
// "console.log('pushChip inside result:', res);"
|
// "console.log('pushChip inside result:', res);"
|
||||||
"return res;"
|
"return res;"
|
||||||
"};"
|
"};"
|
||||||
|
|
||||||
//取消注码
|
//取消注码
|
||||||
"var cancelBet = function(tableId){"
|
"var cancelBet = function(tableId){"
|
||||||
"MultiplayConst.betStatus[tableId] = 0;"
|
"MultiplayConst.betStatus[tableId] = 0;"
|
||||||
"App.BetManager.cancelUnsureBet(tableId, {isMulti: 1});"
|
"App.BetManager.cancelUnsureBet(tableId, {isMulti: 1});"
|
||||||
"App.BetManager.cancelUnsureBet(tableId);"
|
"App.BetManager.cancelUnsureBet(tableId);"
|
||||||
"};"
|
"};"
|
||||||
|
|
||||||
//确认下注
|
//确认下注
|
||||||
"var sureBet = function(tableId){"
|
"var sureBet = function(tableId){"
|
||||||
"const g = App.PresenterManager.presenterDic.dict.MultiplayPresenter.model.getGameTalbeInfo(tableId);"
|
"const g = App.PresenterManager.presenterDic.dict.MultiplayPresenter.model.getGameTalbeInfo(tableId);"
|
||||||
"const bi = App.BetManager.getUnsureBetInfo(tableId);"
|
"const bi = App.BetManager.getUnsureBetInfo(tableId);"
|
||||||
@@ -1022,7 +1022,7 @@ String msgJS_DB =
|
|||||||
"}"
|
"}"
|
||||||
"break;"
|
"break;"
|
||||||
"}"
|
"}"
|
||||||
"case 105: {"//BET 下注返回
|
"case 105: {"//BET 下注返回
|
||||||
"console.log(e, JSON.stringify(t));"
|
"console.log(e, JSON.stringify(t));"
|
||||||
|
|
||||||
"const o = t.res;"
|
"const o = t.res;"
|
||||||
@@ -1031,7 +1031,7 @@ String msgJS_DB =
|
|||||||
"roundId = 0;"
|
"roundId = 0;"
|
||||||
"const bets=[0,0,0];"
|
"const bets=[0,0,0];"
|
||||||
|
|
||||||
"if(t.errorId){" //失败
|
"if(t.errorId){" //失败
|
||||||
"const r = JSON.parse(o);"
|
"const r = JSON.parse(o);"
|
||||||
"errCode = parseInt(r.errorId);"
|
"errCode = parseInt(r.errorId);"
|
||||||
"const d = JSON.parse(r.data);"
|
"const d = JSON.parse(r.data);"
|
||||||
@@ -1066,7 +1066,7 @@ String msgJS_DB =
|
|||||||
|
|
||||||
"break;"
|
"break;"
|
||||||
"}"
|
"}"
|
||||||
"case 106: {"//OPEN_CARD 开牌
|
"case 106: {"//OPEN_CARD 开牌
|
||||||
// "console.log(e, JSON.stringify(t));"
|
// "console.log(e, JSON.stringify(t));"
|
||||||
|
|
||||||
"const o = t.res;"
|
"const o = t.res;"
|
||||||
@@ -1089,7 +1089,7 @@ String msgJS_DB =
|
|||||||
|
|
||||||
"break;"
|
"break;"
|
||||||
"}"
|
"}"
|
||||||
"case 107: {"//SETTLEMENT 结算
|
"case 107: {"//SETTLEMENT 结算
|
||||||
"const o = t.res;"
|
"const o = t.res;"
|
||||||
"const g = model.getGameTalbeInfo(o.tableId);"
|
"const g = model.getGameTalbeInfo(o.tableId);"
|
||||||
"if(g){"
|
"if(g){"
|
||||||
@@ -1117,15 +1117,15 @@ String msgJS_DB =
|
|||||||
"else if(o.activePoints.indexOf(3002)>-1) wt=2;"
|
"else if(o.activePoints.indexOf(3002)>-1) wt=2;"
|
||||||
|
|
||||||
"const msg = '3|'+o.tableId+'|'+g.physicsTableNo+'|'+o.roundId+'|0|'+wt"
|
"const msg = '3|'+o.tableId+'|'+g.physicsTableNo+'|'+o.roundId+'|0|'+wt"
|
||||||
"+'|'+card[0]+'|'+card[1];" //DB特殊处理
|
"+'|'+card[0]+'|'+card[1];" //DB特殊处理
|
||||||
"cefApp.OnJSMessage(msg);"
|
"cefApp.OnJSMessage(msg);"
|
||||||
"}"
|
"}"
|
||||||
"break"
|
"break"
|
||||||
"}"
|
"}"
|
||||||
// "case 112: {"//CHANGE_CARD 换牌
|
// "case 112: {"//CHANGE_CARD 换牌
|
||||||
// "break;"
|
// "break;"
|
||||||
// "}"
|
// "}"
|
||||||
"case 113: {"//JUMP_ROUND 本局取消
|
"case 113: {"//JUMP_ROUND 本局取消
|
||||||
"console.log(e, JSON.stringify(t));"
|
"console.log(e, JSON.stringify(t));"
|
||||||
|
|
||||||
"const o = t.res;"
|
"const o = t.res;"
|
||||||
@@ -1140,7 +1140,7 @@ String msgJS_DB =
|
|||||||
// "case 116: {" //ROAD_PAPER
|
// "case 116: {" //ROAD_PAPER
|
||||||
// "break;"
|
// "break;"
|
||||||
// "}"
|
// "}"
|
||||||
"case 148: {" //TABLE_STATUS_CHANGE //状态改变
|
"case 148: {" //TABLE_STATUS_CHANGE //状态改变
|
||||||
"console.log(e, JSON.stringify(t));"
|
"console.log(e, JSON.stringify(t));"
|
||||||
|
|
||||||
"const h = t.res;"
|
"const h = t.res;"
|
||||||
@@ -1155,7 +1155,7 @@ String msgJS_DB =
|
|||||||
"}"
|
"}"
|
||||||
"break;"
|
"break;"
|
||||||
"}"
|
"}"
|
||||||
"case 160: {"//STOP_BET 停止下注
|
"case 160: {"//STOP_BET 停止下注
|
||||||
"const o = t.res;"
|
"const o = t.res;"
|
||||||
"const g = model.getGameTalbeInfo(o.tableId);"
|
"const g = model.getGameTalbeInfo(o.tableId);"
|
||||||
"if(g){"
|
"if(g){"
|
||||||
@@ -1195,7 +1195,7 @@ String msgJS_DB =
|
|||||||
"cefApp.OnJSMessage('5|'+o.balance);"
|
"cefApp.OnJSMessage('5|'+o.balance);"
|
||||||
"break;"
|
"break;"
|
||||||
"}"
|
"}"
|
||||||
"case 10016: {" //RUSH_LOGIN 账号在其他设备上登录
|
"case 10016: {" //RUSH_LOGIN 账号在其他设备上登录
|
||||||
"cefApp.OnJSMessage('0|0');"
|
"cefApp.OnJSMessage('0|0');"
|
||||||
"break;"
|
"break;"
|
||||||
"}"
|
"}"
|
||||||
@@ -1227,7 +1227,7 @@ String msgJS_DB =
|
|||||||
"const a = App.BetManager.tableBetDic.getValue(Object.keys(App.BetManager.tableBetDic.dict)[0]).chipAreas;"
|
"const a = App.BetManager.tableBetDic.getValue(Object.keys(App.BetManager.tableBetDic.dict)[0]).chipAreas;"
|
||||||
"for(const g of games){"
|
"for(const g of games){"
|
||||||
"const p = g.roadPaper ? parseRoad(g.roadPaper.beatPlateRoad) : '';"
|
"const p = g.roadPaper ? parseRoad(g.roadPaper.beatPlateRoad) : '';"
|
||||||
"let s = chgTableStatus(g.gameStatus);" //台桌状态
|
"let s = chgTableStatus(g.gameStatus);" //台桌状态
|
||||||
"msg += g.tableId+','+g.physicsTableNo+','+g.roundId+','+s+','+p+';';"
|
"msg += g.tableId+','+g.physicsTableNo+','+g.roundId+','+s+','+p+';';"
|
||||||
"ids.push(g.tableId);"
|
"ids.push(g.tableId);"
|
||||||
|
|
||||||
@@ -1275,27 +1275,27 @@ String msgJS_DB =
|
|||||||
"}, 500);"
|
"}, 500);"
|
||||||
|
|
||||||
|
|
||||||
"var sTimeout=0, tmRetry=90;" //计时器
|
"var sTimeout=0, tmRetry=90;" //计时器
|
||||||
"var chkSockets = ()=>{"
|
"var chkSockets = ()=>{"
|
||||||
"sTimeout++;"
|
"sTimeout++;"
|
||||||
|
|
||||||
"if(sTimeout>=tmRetry){" //确认网络异常,退出登录
|
"if(sTimeout>=tmRetry){" //确认网络异常,退出登录
|
||||||
"cefApp.OnJSMessage('0|3');"
|
"cefApp.OnJSMessage('0|3');"
|
||||||
"}"
|
"}"
|
||||||
|
|
||||||
"if(sTimeout>=10 && (sTimeout % 5)==0){" //10秒没有ss网络数据,尝试每5秒reconnect
|
"if(sTimeout>=10 && (sTimeout % 5)==0){" //10秒没有ss网络数据,尝试每5秒reconnect
|
||||||
"console.log(sTimeout + 's try reconnect!!!!');"
|
"console.log(sTimeout + 's try reconnect!!!!');"
|
||||||
|
|
||||||
// "const multi = App.PresenterManager.presenterDic.dict.MultiplayPresenter;"
|
// "const multi = App.PresenterManager.presenterDic.dict.MultiplayPresenter;"
|
||||||
"if(App.Socket.status==0||App.Socket.status==3){" //Socket若断开则连接
|
"if(App.Socket.status==0||App.Socket.status==3){" //Socket若断开则连接
|
||||||
"console.log('App.Socket connect: ', App.Socket.status);"
|
"console.log('App.Socket connect: ', App.Socket.status);"
|
||||||
"App.Socket.connect();"
|
"App.Socket.connect();"
|
||||||
"}"
|
"}"
|
||||||
"else if(App.Socket.status==2 && (sTimeout % 20)==0){" //20秒一次手动重连
|
"else if(App.Socket.status==2 && (sTimeout % 20)==0){" //20秒一次手动重连
|
||||||
"console.log('App.Socket reconnect');"
|
"console.log('App.Socket reconnect');"
|
||||||
"App.Socket.reconnect();"
|
"App.Socket.reconnect();"
|
||||||
"}"
|
"}"
|
||||||
"else{" //尝试重入多台
|
"else{" //尝试重入多台
|
||||||
"console.log('multi reentry: ', App.Socket.status);"
|
"console.log('multi reentry: ', App.Socket.status);"
|
||||||
"App.gameManager.sendEnterMultiPlay(32);"
|
"App.gameManager.sendEnterMultiPlay(32);"
|
||||||
"}"
|
"}"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef PolicyEditFormUnitH
|
#ifndef PolicyEditFormUnitH
|
||||||
#define PolicyEditFormUnitH
|
#define PolicyEditFormUnitH
|
||||||
@@ -98,9 +98,9 @@ private: // User declarations
|
|||||||
bool m_bRowChanged, m_bColChanged, m_bRoadChanged;
|
bool m_bRowChanged, m_bColChanged, m_bRoadChanged;
|
||||||
|
|
||||||
TRadioButton *m_aDeadRB[3];
|
TRadioButton *m_aDeadRB[3];
|
||||||
TFrame *m_frmSP; //ÌØÊâ²ßÂÔÃæ°å
|
TFrame *m_frmSP; //特殊策略面板
|
||||||
|
|
||||||
vector<int> m_aCPMap; //ComboÓ³Éä
|
vector<int> m_aCPMap; //Combo映射
|
||||||
|
|
||||||
void __fastcall UpdateGrid();
|
void __fastcall UpdateGrid();
|
||||||
String __fastcall AutoNewName();
|
String __fastcall AutoNewName();
|
||||||
@@ -109,7 +109,7 @@ private: // User declarations
|
|||||||
void __fastcall SGSelCell(int ACol, int ARow);
|
void __fastcall SGSelCell(int ACol, int ARow);
|
||||||
void __fastcall Clear();
|
void __fastcall Clear();
|
||||||
void __fastcall CalcNewName();
|
void __fastcall CalcNewName();
|
||||||
void __fastcall InitChipGrid(int kind); //0=ÆÕͨעÂë 1=²ã¼¶×¢Âë
|
void __fastcall InitChipGrid(int kind); //0=普通注码 1=层级注码
|
||||||
void __fastcall ClearSPFrame();
|
void __fastcall ClearSPFrame();
|
||||||
void __fastcall SetView(int type);
|
void __fastcall SetView(int type);
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<ProjectGuid>{E33F7AC5-C0ED-4835-A5D5-7FBD27D9BA56}</ProjectGuid>
|
<ProjectGuid>{E33F7AC5-C0ED-4835-A5D5-7FBD27D9BA56}</ProjectGuid>
|
||||||
<ProjectVersion>20.4</ProjectVersion>
|
<ProjectVersion>20.5</ProjectVersion>
|
||||||
<FrameworkType>VCL</FrameworkType>
|
<FrameworkType>VCL</FrameworkType>
|
||||||
<AppType>Application</AppType>
|
<AppType>Application</AppType>
|
||||||
<MainSource>RBmaster.cpp</MainSource>
|
<MainSource>RBmaster.cpp</MainSource>
|
||||||
@@ -80,7 +80,7 @@
|
|||||||
<Defines>_RBM_;$(Defines)</Defines>
|
<Defines>_RBM_;$(Defines)</Defines>
|
||||||
<ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking>
|
<ILINK_DisableIncrementalLinking>true</ILINK_DisableIncrementalLinking>
|
||||||
<IncludePath>..\Global\;..\CEF4Delphi\$(Platform)\hpps;$(IncludePath)</IncludePath>
|
<IncludePath>..\Global\;..\CEF4Delphi\$(Platform)\hpps;$(IncludePath)</IncludePath>
|
||||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=4.0.7.0;InternalName=RBmaster;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=红蓝大师;ProductVersion=3.0;Comments=</VerInfo_Keys>
|
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=4.0.8.0;InternalName=RBmaster;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=红蓝大师;ProductVersion=3.0;Comments=</VerInfo_Keys>
|
||||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||||
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
|
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
|
||||||
<AllPackageLibs>rtl.lib;vcl.lib;fmx.lib;vclimg.lib;xmlrtl.lib;vclactnband.lib;vclx.lib;CEF4DelphiVCLRTL.lib;vclwinx.lib;bindengine.lib;TPNGButton.lib</AllPackageLibs>
|
<AllPackageLibs>rtl.lib;vcl.lib;fmx.lib;vclimg.lib;xmlrtl.lib;vclactnband.lib;vclx.lib;CEF4DelphiVCLRTL.lib;vclwinx.lib;bindengine.lib;TPNGButton.lib</AllPackageLibs>
|
||||||
@@ -102,7 +102,7 @@
|
|||||||
<UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
|
<UWP_CppLogo150>$(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png</UWP_CppLogo150>
|
||||||
<VerInfo_MajorVer>4</VerInfo_MajorVer>
|
<VerInfo_MajorVer>4</VerInfo_MajorVer>
|
||||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||||
<VerInfo_Release>7</VerInfo_Release>
|
<VerInfo_Release>8</VerInfo_Release>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||||
<Debugger_CWD>..\Deploy\$(Platform)\$(Config)\</Debugger_CWD>
|
<Debugger_CWD>..\Deploy\$(Platform)\$(Config)\</Debugger_CWD>
|
||||||
@@ -166,7 +166,7 @@
|
|||||||
<ILINK_TranslatedLibraryPath>$(BDSLIB)\$(PLATFORM)\debug\$(LANGDIR);$(ILINK_TranslatedLibraryPath)</ILINK_TranslatedLibraryPath>
|
<ILINK_TranslatedLibraryPath>$(BDSLIB)\$(PLATFORM)\debug\$(LANGDIR);$(ILINK_TranslatedLibraryPath)</ILINK_TranslatedLibraryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||||
<VerInfo_Keys>CompanyName=;FileVersion=4.0.7.0;InternalName=RBmaster;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=红蓝大师;ProductVersion=3.0;Comments=;ProgramID=;FileDescription=</VerInfo_Keys>
|
<VerInfo_Keys>CompanyName=;FileVersion=4.0.8.0;InternalName=RBmaster;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=红蓝大师;ProductVersion=3.0;Comments=;ProgramID=;FileDescription=</VerInfo_Keys>
|
||||||
<LinkPackageStatics>rtl.lib;vcl.lib;fmx.lib;vclimg.lib;xmlrtl.lib;vclactnband.lib;vclx.lib;CEF4DelphiVCLRTL.lib;vclwinx.lib;bindengine.lib;TPNGButton.lib</LinkPackageStatics>
|
<LinkPackageStatics>rtl.lib;vcl.lib;fmx.lib;vclimg.lib;xmlrtl.lib;vclactnband.lib;vclx.lib;CEF4DelphiVCLRTL.lib;vclwinx.lib;bindengine.lib;TPNGButton.lib</LinkPackageStatics>
|
||||||
<AppExecutionLevel>requireAdministrator</AppExecutionLevel>
|
<AppExecutionLevel>requireAdministrator</AppExecutionLevel>
|
||||||
<BT_BuildType>Debug</BT_BuildType>
|
<BT_BuildType>Debug</BT_BuildType>
|
||||||
@@ -189,7 +189,7 @@
|
|||||||
<TASM_Debugging>None</TASM_Debugging>
|
<TASM_Debugging>None</TASM_Debugging>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||||
<VerInfo_Keys>CompanyName=;FileVersion=4.0.7.0;InternalName=RBmaster;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=红蓝大师;ProductVersion=3.0;Comments=;ProgramID=;FileDescription=</VerInfo_Keys>
|
<VerInfo_Keys>CompanyName=;FileVersion=4.0.8.0;InternalName=RBmaster;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=红蓝大师;ProductVersion=3.0;Comments=;ProgramID=;FileDescription=</VerInfo_Keys>
|
||||||
<LinkPackageStatics>rtl.lib;vcl.lib;fmx.lib;vclimg.lib;xmlrtl.lib;vclactnband.lib;vclx.lib;CEF4DelphiVCLRTL.lib;vclwinx.lib;bindengine.lib;TPNGButton.lib</LinkPackageStatics>
|
<LinkPackageStatics>rtl.lib;vcl.lib;fmx.lib;vclimg.lib;xmlrtl.lib;vclactnband.lib;vclx.lib;CEF4DelphiVCLRTL.lib;vclwinx.lib;bindengine.lib;TPNGButton.lib</LinkPackageStatics>
|
||||||
<AppExecutionLevel>requireAdministrator</AppExecutionLevel>
|
<AppExecutionLevel>requireAdministrator</AppExecutionLevel>
|
||||||
<Debugger_CWD>..\Deploy\$(Platform)\$(Config)\</Debugger_CWD>
|
<Debugger_CWD>..\Deploy\$(Platform)\$(Config)\</Debugger_CWD>
|
||||||
|
|||||||
+19
-19
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#include <vcl.h>
|
#include <vcl.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#include <System.IOUtils.hpp>
|
#include <System.IOUtils.hpp>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
#pragma package(smart_init)
|
#pragma package(smart_init)
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// 获取父进程函数
|
// 获取父进程函数
|
||||||
typedef struct _PROCESS_BASIC_INFORMATIONWOW64 {
|
typedef struct _PROCESS_BASIC_INFORMATIONWOW64 {
|
||||||
NTSTATUS ExitStatus;
|
NTSTATUS ExitStatus;
|
||||||
ULONG64 PebBaseAddress;
|
ULONG64 PebBaseAddress;
|
||||||
@@ -26,7 +26,7 @@ typedef struct _PROCESS_BASIC_INFORMATIONWOW64 {
|
|||||||
|
|
||||||
typedef LONG (WINAPI *PNTQUERYINFORMATIONPROCESS)(HANDLE,UINT,PVOID,ULONG,PULONG);
|
typedef LONG (WINAPI *PNTQUERYINFORMATIONPROCESS)(HANDLE,UINT,PVOID,ULONG,PULONG);
|
||||||
|
|
||||||
DWORD GetParentProcessId(DWORD pid)//获取指定进程的父进程ID
|
DWORD GetParentProcessId(DWORD pid)//获取指定进程的父进程ID
|
||||||
{
|
{
|
||||||
DWORD dwParentPID = 0;
|
DWORD dwParentPID = 0;
|
||||||
HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
|
HANDLE hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid);
|
||||||
@@ -66,7 +66,7 @@ DWORD GetParentProcessId(DWORD pid)//
|
|||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
// 定义枚举窗口回调函数
|
// 定义枚举窗口回调函数
|
||||||
BOOL CALLBACK EnumWndProc(HWND hwnd, LPARAM lParam)
|
BOOL CALLBACK EnumWndProc(HWND hwnd, LPARAM lParam)
|
||||||
{
|
{
|
||||||
HANDLE h = GetProp(hwnd, _TEXT(APPABBR));
|
HANDLE h = GetProp(hwnd, _TEXT(APPABBR));
|
||||||
@@ -79,7 +79,7 @@ BOOL CALLBACK EnumWndProc(HWND hwnd, LPARAM lParam)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
// CEF初始化函数
|
// CEF初始化函数
|
||||||
|
|
||||||
bool InitCef()
|
bool InitCef()
|
||||||
{
|
{
|
||||||
@@ -105,9 +105,9 @@ bool InitCef()
|
|||||||
GlobalCEFApp->NoSandbox = true;
|
GlobalCEFApp->NoSandbox = true;
|
||||||
GlobalCEFApp->MuteAudio = true;
|
GlobalCEFApp->MuteAudio = true;
|
||||||
GlobalCEFApp->EnableGPU = true;
|
GlobalCEFApp->EnableGPU = true;
|
||||||
GlobalCEFApp->SitePerProcess = true; //78.0以上iframe运行js代码必须设置
|
GlobalCEFApp->SitePerProcess = true; //78.0以上iframe运行js代码必须设置
|
||||||
GlobalCEFApp->DisableWebSecurity = true; //78.0以上iframe运行js代码必须设置
|
GlobalCEFApp->DisableWebSecurity = true; //78.0以上iframe运行js代码必须设置
|
||||||
GlobalCEFApp->DisableSiteIsolationTrials = true; //78.0以上iframe运行js代码必须设置
|
GlobalCEFApp->DisableSiteIsolationTrials = true; //78.0以上iframe运行js代码必须设置
|
||||||
GlobalCEFApp->DisableChromeLoginPrompt = true;
|
GlobalCEFApp->DisableChromeLoginPrompt = true;
|
||||||
GlobalCEFApp->EnableMediaStream = false; //true; //
|
GlobalCEFApp->EnableMediaStream = false; //true; //
|
||||||
GlobalCEFApp->LogProcessInfo = false; //true; //
|
GlobalCEFApp->LogProcessInfo = false; //true; //
|
||||||
@@ -125,12 +125,12 @@ bool InitCef()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
// 子进程判断函数
|
// 子进程判断函数
|
||||||
bool IsRestart()
|
bool IsRestart()
|
||||||
{
|
{
|
||||||
HWND hWnd = NULL;
|
HWND hWnd = NULL;
|
||||||
if(SINGLE_INSTANCE){
|
if(SINGLE_INSTANCE){
|
||||||
EnumWindows(EnumWndProc,(LPARAM)&hWnd); //枚举所有运行的窗口
|
EnumWindows(EnumWndProc,(LPARAM)&hWnd); //枚举所有运行的窗口
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
String strFullName = TPath::GetFullPath(Application->ExeName);
|
String strFullName = TPath::GetFullPath(Application->ExeName);
|
||||||
@@ -160,7 +160,7 @@ bool IsRestart()
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
// 程序自动升级函数
|
// 程序自动升级函数
|
||||||
void StartUpgrade( int mode )
|
void StartUpgrade( int mode )
|
||||||
{
|
{
|
||||||
HANDLE hToken = NULL,
|
HANDLE hToken = NULL,
|
||||||
@@ -180,8 +180,8 @@ void StartUpgrade( int mode )
|
|||||||
si.cbReserved2 = NULL;
|
si.cbReserved2 = NULL;
|
||||||
si.lpReserved2 = NULL;
|
si.lpReserved2 = NULL;
|
||||||
si.dwFlags = STARTF_USESHOWWINDOW;
|
si.dwFlags = STARTF_USESHOWWINDOW;
|
||||||
si.wShowWindow = mode==2 ? SW_SHOWNORMAL //显示进程窗口
|
si.wShowWindow = mode==2 ? SW_SHOWNORMAL //显示进程窗口
|
||||||
: SW_HIDE; //隐藏进程窗口
|
: SW_HIDE; //隐藏进程窗口
|
||||||
|
|
||||||
String command = "\"" + (String)g_AppPath + UPDATE_APP_NAME + "\"";
|
String command = "\"" + (String)g_AppPath + UPDATE_APP_NAME + "\"";
|
||||||
if( mode==3 )
|
if( mode==3 )
|
||||||
@@ -258,22 +258,22 @@ bool Startup()
|
|||||||
bRun = true;
|
bRun = true;
|
||||||
}
|
}
|
||||||
else if( tag==-1 ){
|
else if( tag==-1 ){
|
||||||
ShowMessage( "加载应用模块失败,退出程序" );
|
ShowMessage( "加载应用模块失败,退出程序" );
|
||||||
}
|
}
|
||||||
else if( tag==-3 ){
|
else if( tag==-3 ){
|
||||||
ShowMessage( "连接服务器失败,退出程序" );
|
ShowMessage( "连接服务器失败,退出程序" );
|
||||||
}
|
}
|
||||||
else if( tag==-4 ){
|
else if( tag==-4 ){
|
||||||
ShowMessage( "软件已停止运行,退出程序" );
|
ShowMessage( "软件已停止运行,退出程序" );
|
||||||
}
|
}
|
||||||
else if( tag==-5 ){
|
else if( tag==-5 ){
|
||||||
ShowMessage( "初始化网络模块失败,退出程序" );
|
ShowMessage( "初始化网络模块失败,退出程序" );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
int mode = tag;
|
int mode = tag;
|
||||||
if( tag==4 ){
|
if( tag==4 ){
|
||||||
int mrRet = MessageBox(NULL, L"检测到有新的版本,是否立即升级?",
|
int mrRet = MessageBox(NULL, L"检测到有新的版本,是否立即升级?",
|
||||||
APPNAME, MB_ICONQUESTION | MB_YESNO);
|
APPNAME, MB_ICONQUESTION | MB_YESNO);
|
||||||
if( mrRet==mrYes )
|
if( mrRet==mrYes )
|
||||||
mode = 2;
|
mode = 2;
|
||||||
@@ -281,7 +281,7 @@ bool Startup()
|
|||||||
mode = 0;
|
mode = 0;
|
||||||
}
|
}
|
||||||
else if( tag==2 ){
|
else if( tag==2 ){
|
||||||
ShowMessage( "软件运行需更新相关组件,即将启动更新程序" );
|
ShowMessage( "软件运行需更新相关组件,即将启动更新程序" );
|
||||||
}
|
}
|
||||||
|
|
||||||
bRun = mode<=1;
|
bRun = mode<=1;
|
||||||
|
|||||||
+207
-207
File diff suppressed because it is too large
Load Diff
@@ -139708,126 +139708,12 @@ object MainForm: TMainForm
|
|||||||
ParentDoubleBuffered = False
|
ParentDoubleBuffered = False
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
inherited m_panInfo1: TPanel
|
inherited m_panInfo1: TPanel
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
OnMouseMove = FormMouseMove
|
OnMouseMove = FormMouseMove
|
||||||
inherited m_lblCurProfit: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label7: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblPeakU: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label9: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblPeakL: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label11: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblWinCount: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label13: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblLosCount: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label15: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblSWin: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label17: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblSLos: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label19: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblDead: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label3: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label2: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblMaxChip: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblSRProfit: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblSRTitle: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
inherited m_panInfo2: TPanel
|
inherited m_panInfo2: TPanel
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
OnMouseMove = FormMouseMove
|
OnMouseMove = FormMouseMove
|
||||||
inherited m_lblManAmount: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblRealAmount: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label14: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label16: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblRealProfit: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label20: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblManProfit: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label39: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblAccountTitle: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label4: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label5: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblAccount: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblAmount: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblTotProfit: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblLimits: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label10: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited m_lblAccName: TLabel
|
inherited m_lblAccName: TLabel
|
||||||
PopupMenu = m_pmCopyAccount
|
PopupMenu = m_pmCopyAccount
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
|
||||||
inherited Label22: TLabel
|
|
||||||
StyleElements = [seFont, seClient, seBorder]
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
+26
-26
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef RBmasterMainH
|
#ifndef RBmasterMainH
|
||||||
#define RBmasterMainH
|
#define RBmasterMainH
|
||||||
@@ -113,28 +113,28 @@ private: // User declarations
|
|||||||
String m_loginValues[6];
|
String m_loginValues[6];
|
||||||
String m_url;
|
String m_url;
|
||||||
|
|
||||||
String m_sActCode; //授权码
|
String m_sActCode; //授权码
|
||||||
int m_tExpire; //授权有效期
|
int m_tExpire; //授权有效期
|
||||||
UINT m_idDevice; //设备号
|
UINT m_idDevice; //设备号
|
||||||
|
|
||||||
WORD m_version[4];
|
WORD m_version[4];
|
||||||
|
|
||||||
TThread *m_vlThread, //Velo线程
|
TThread *m_vlThread, //Velo线程
|
||||||
*m_jsThread, //JS处理线程
|
*m_jsThread, //JS处理线程
|
||||||
*m_urThread, //用户鉴权线程
|
*m_urThread, //用户鉴权线程
|
||||||
*m_dpThread; //数据解析线程
|
*m_dpThread; //数据解析线程
|
||||||
|
|
||||||
TTimer *m_pDPTimer, //数据处理定时器
|
TTimer *m_pDPTimer, //数据处理定时器
|
||||||
*m_pUtilTimer; //工具定时器,Tag区分用途
|
*m_pUtilTimer; //工具定时器,Tag区分用途
|
||||||
int m_tmChart, //图表定时计数
|
int m_tmChart, //图表定时计数
|
||||||
m_tmWebFocus, //网页激活定时计数
|
m_tmWebFocus, //网页激活定时计数
|
||||||
// m_tmWebTimeout, //网页无数据超时
|
// m_tmWebTimeout, //网页无数据超时
|
||||||
m_tmCount, //秒计数器
|
m_tmCount, //秒计数器
|
||||||
m_tmLogon, //登录时间
|
m_tmLogon, //登录时间
|
||||||
m_tmDailyLogin, //每日登录时间
|
m_tmDailyLogin, //每日登录时间
|
||||||
m_tmDailyReport, //每日上报时间
|
m_tmDailyReport, //每日上报时间
|
||||||
m_tmDeadPause, //爆缆暂停定时计数
|
m_tmDeadPause, //爆缆暂停定时计数
|
||||||
m_tmBetPause; //止赢止损暂停定时计数
|
m_tmBetPause; //止赢止损暂停定时计数
|
||||||
|
|
||||||
bool m_bWebLogon,
|
bool m_bWebLogon,
|
||||||
m_bClosing,
|
m_bClosing,
|
||||||
@@ -152,14 +152,14 @@ private: // User declarations
|
|||||||
// bool m_bV8Waiting;
|
// bool m_bV8Waiting;
|
||||||
|
|
||||||
vector<TTableFrame*> m_aTables;
|
vector<TTableFrame*> m_aTables;
|
||||||
vector<TThread*> m_aABThreads; //自动下注线程组
|
vector<TThread*> m_aABThreads; //自动下注线程组
|
||||||
int m_nTabShow, m_nTabRun;
|
int m_nTabShow, m_nTabRun;
|
||||||
|
|
||||||
bool m_bDragReady, //鼠标拖动进行选择操作
|
bool m_bDragReady, //鼠标拖动进行选择操作
|
||||||
m_bDraging;
|
m_bDraging;
|
||||||
TTimer *m_pDragTimer; //拖动滚屏定时器
|
TTimer *m_pDragTimer; //拖动滚屏定时器
|
||||||
int m_iLastSel; //最后单独选中台桌
|
int m_iLastSel; //最后单独选中台桌
|
||||||
set<int> m_aSelTabs; //选中台桌集合
|
set<int> m_aSelTabs; //选中台桌集合
|
||||||
|
|
||||||
int __fastcall TryUpdate();
|
int __fastcall TryUpdate();
|
||||||
int __fastcall InitGlobalVars();
|
int __fastcall InitGlobalVars();
|
||||||
@@ -180,7 +180,7 @@ private: // User declarations
|
|||||||
void __fastcall OnWSConnectError();
|
void __fastcall OnWSConnectError();
|
||||||
void __fastcall ResetGame();
|
void __fastcall ResetGame();
|
||||||
void __fastcall GameOn();
|
void __fastcall GameOn();
|
||||||
void __fastcall GameOff(int iReason=0); //用户停止或退出
|
void __fastcall GameOff(int iReason=0); //用户停止或退出
|
||||||
void __fastcall ManualOn();
|
void __fastcall ManualOn();
|
||||||
void __fastcall ManualOff();
|
void __fastcall ManualOff();
|
||||||
void __fastcall StartJSThread(int iOp);
|
void __fastcall StartJSThread(int iOp);
|
||||||
@@ -237,7 +237,7 @@ private: // User declarations
|
|||||||
const _di_ICefRequest request, const _di_ICefCallback callback, /* out */ TCefReturnValue &Result);
|
const _di_ICefRequest request, const _di_ICefCallback callback, /* out */ TCefReturnValue &Result);
|
||||||
|
|
||||||
|
|
||||||
//消息处理
|
//消息处理
|
||||||
MESSAGE void __fastcall FormMove(TWMMove &msg);
|
MESSAGE void __fastcall FormMove(TWMMove &msg);
|
||||||
MESSAGE void __fastcall SystemMenuCommand(TWMMenuSelect &Msg);
|
MESSAGE void __fastcall SystemMenuCommand(TWMMenuSelect &Msg);
|
||||||
|
|
||||||
|
|||||||
+4
-4
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <vcl.h>
|
#include <vcl.h>
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
@@ -110,7 +110,7 @@ void __fastcall TResetForm::OkClick(TObject *Sender)
|
|||||||
if(m_cbCurrProfit->Checked){
|
if(m_cbCurrProfit->Checked){
|
||||||
g_aGames.betData.profits[3] = g_aGames.fCurrProfitPeak = 0;
|
g_aGames.betData.profits[3] = g_aGames.fCurrProfitPeak = 0;
|
||||||
g_aGames.betData.profits[6] = g_aGames.betData.profits[7] = 0;
|
g_aGames.betData.profits[6] = g_aGames.betData.profits[7] = 0;
|
||||||
for(int i=0; i<g_aGames.size(); i++){ //台桌数据也要重置
|
for(int i=0; i<g_aGames.size(); i++){ //台桌数据也要重置
|
||||||
TGame* pG = g_aGames[i];
|
TGame* pG = g_aGames[i];
|
||||||
pG->profit = 0;
|
pG->profit = 0;
|
||||||
if(pG->hTable) PostMessage(pG->hTable, UM_TAB_UPDATE, UPDATE_RESET, 0);
|
if(pG->hTable) PostMessage(pG->hTable, UM_TAB_UPDATE, UPDATE_RESET, 0);
|
||||||
@@ -135,7 +135,7 @@ void __fastcall TResetForm::OkClick(TObject *Sender)
|
|||||||
}
|
}
|
||||||
if(m_cbSWin->Checked){
|
if(m_cbSWin->Checked){
|
||||||
g_aGames.betData.counts[2] = 0;
|
g_aGames.betData.counts[2] = 0;
|
||||||
for(int i=0; i<g_aGames.size(); i++){ //台桌数据也要重置
|
for(int i=0; i<g_aGames.size(); i++){ //台桌数据也要重置
|
||||||
TGame* pG = g_aGames[i];
|
TGame* pG = g_aGames[i];
|
||||||
pG->seqCount[0] = 0;
|
pG->seqCount[0] = 0;
|
||||||
if(pG->hTable) PostMessage(pG->hTable, UM_TAB_UPDATE, UPDATE_RESET, 1);
|
if(pG->hTable) PostMessage(pG->hTable, UM_TAB_UPDATE, UPDATE_RESET, 1);
|
||||||
@@ -144,7 +144,7 @@ void __fastcall TResetForm::OkClick(TObject *Sender)
|
|||||||
}
|
}
|
||||||
if(m_cbSLos->Checked){
|
if(m_cbSLos->Checked){
|
||||||
g_aGames.betData.counts[3] = 0;
|
g_aGames.betData.counts[3] = 0;
|
||||||
for(int i=0; i<g_aGames.size(); i++){ //台桌数据也要重置
|
for(int i=0; i<g_aGames.size(); i++){ //台桌数据也要重置
|
||||||
TGame* pG = g_aGames[i];
|
TGame* pG = g_aGames[i];
|
||||||
pG->seqCount[1] = 0;
|
pG->seqCount[1] = 0;
|
||||||
if(pG->hTable) PostMessage(pG->hTable, UM_TAB_UPDATE, UPDATE_RESET, 2);
|
if(pG->hTable) PostMessage(pG->hTable, UM_TAB_UPDATE, UPDATE_RESET, 2);
|
||||||
|
|||||||
+29
-29
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <vcl.h>
|
#include <vcl.h>
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
@@ -15,7 +15,7 @@ TSettingForm *SettingForm = NULL;
|
|||||||
__fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
__fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
||||||
: TForm(Owner)
|
: TForm(Owner)
|
||||||
{
|
{
|
||||||
//开始挂机
|
//开始挂机
|
||||||
m_cbWaitNew->Checked = g_settings.bWaitNew;
|
m_cbWaitNew->Checked = g_settings.bWaitNew;
|
||||||
m_cbInitClearTabLog->Checked = g_settings.bInitClearTabLog;
|
m_cbInitClearTabLog->Checked = g_settings.bInitClearTabLog;
|
||||||
m_cbInitBetChipByStart->Checked = g_settings.bInitBetChipByStart;
|
m_cbInitBetChipByStart->Checked = g_settings.bInitBetChipByStart;
|
||||||
@@ -23,13 +23,13 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_cbInitCurProfitByStart->Checked = g_settings.bInitCurProfitByStart;
|
m_cbInitCurProfitByStart->Checked = g_settings.bInitCurProfitByStart;
|
||||||
|
|
||||||
|
|
||||||
//台桌新局
|
//台桌新局
|
||||||
m_cbInitBetByGame->Checked = g_settings.bInitBetByGame;
|
m_cbInitBetByGame->Checked = g_settings.bInitBetByGame;
|
||||||
m_cbInitChipByGame->Checked = g_settings.bInitChipByGame;
|
m_cbInitChipByGame->Checked = g_settings.bInitChipByGame;
|
||||||
m_cbInitProfitByGame->Checked = g_settings.bInitProfitByGame;
|
m_cbInitProfitByGame->Checked = g_settings.bInitProfitByGame;
|
||||||
m_cbInitLogByGame->Checked = g_settings.bInitLogByGame;
|
m_cbInitLogByGame->Checked = g_settings.bInitLogByGame;
|
||||||
|
|
||||||
//模拟本金
|
//模拟本金
|
||||||
m_aRelatedCB[0] = m_cbSimAcc;
|
m_aRelatedCB[0] = m_cbSimAcc;
|
||||||
m_aRelatedCtrl[0].push_back(m_edSimAcc);
|
m_aRelatedCtrl[0].push_back(m_edSimAcc);
|
||||||
m_aRelatedCtrl[0].push_back(m_cbNoBetLow);
|
m_aRelatedCtrl[0].push_back(m_cbNoBetLow);
|
||||||
@@ -42,7 +42,7 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_cbStopLow->Checked = g_settings.bStopLow;
|
m_cbStopLow->Checked = g_settings.bStopLow;
|
||||||
m_cbSyncReal->Checked = g_settings.bSyncReal;
|
m_cbSyncReal->Checked = g_settings.bSyncReal;
|
||||||
|
|
||||||
//总体止赢
|
//总体止赢
|
||||||
m_aRelatedCB[1] = m_cbTotalStopWin;
|
m_aRelatedCB[1] = m_cbTotalStopWin;
|
||||||
m_aRelatedCtrl[1].push_back(m_edTotalStopWin);
|
m_aRelatedCtrl[1].push_back(m_edTotalStopWin);
|
||||||
m_aRelatedCtrl[1].push_back(m_edTotalWinPause);
|
m_aRelatedCtrl[1].push_back(m_edTotalWinPause);
|
||||||
@@ -60,7 +60,7 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_aTotalWinRB[2] = m_rbTotalWin2;
|
m_aTotalWinRB[2] = m_rbTotalWin2;
|
||||||
m_aTotalWinRB[g_settings.iTotalWinOp]->Checked = true;
|
m_aTotalWinRB[g_settings.iTotalWinOp]->Checked = true;
|
||||||
|
|
||||||
//总体止损
|
//总体止损
|
||||||
m_aRelatedCB[2] = m_cbTotalStopLos;
|
m_aRelatedCB[2] = m_cbTotalStopLos;
|
||||||
m_aRelatedCtrl[2].push_back(m_edTotalStopLos);
|
m_aRelatedCtrl[2].push_back(m_edTotalStopLos);
|
||||||
m_aRelatedCtrl[2].push_back(m_edTotalLosPause);
|
m_aRelatedCtrl[2].push_back(m_edTotalLosPause);
|
||||||
@@ -78,7 +78,7 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_aTotalLosRB[2] = m_rbTotalLos2;
|
m_aTotalLosRB[2] = m_rbTotalLos2;
|
||||||
m_aTotalLosRB[g_settings.iTotalLosOp]->Checked = true;
|
m_aTotalLosRB[g_settings.iTotalLosOp]->Checked = true;
|
||||||
|
|
||||||
//赢利回落
|
//赢利回落
|
||||||
m_aRelatedCB[3] = m_cbU2DStop;
|
m_aRelatedCB[3] = m_cbU2DStop;
|
||||||
m_aRelatedCtrl[3].push_back(m_cbU2DPause);
|
m_aRelatedCtrl[3].push_back(m_cbU2DPause);
|
||||||
m_aRelatedCtrl[3].push_back(m_cbU2DMinPeak);
|
m_aRelatedCtrl[3].push_back(m_cbU2DMinPeak);
|
||||||
@@ -95,7 +95,7 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_edU2DMinPeak->Text = g_settings.nU2DMinPeak;
|
m_edU2DMinPeak->Text = g_settings.nU2DMinPeak;
|
||||||
m_edU2DPause->Text = g_settings.nU2DPause;
|
m_edU2DPause->Text = g_settings.nU2DPause;
|
||||||
|
|
||||||
//账户止赢
|
//账户止赢
|
||||||
m_aRelatedCB[4] = m_cbAccStopWin;
|
m_aRelatedCB[4] = m_cbAccStopWin;
|
||||||
m_aRelatedCtrl[4].push_back(m_edAccStopWin);
|
m_aRelatedCtrl[4].push_back(m_edAccStopWin);
|
||||||
m_aRelatedCtrl[4].push_back(m_lbAccStopWin);
|
m_aRelatedCtrl[4].push_back(m_lbAccStopWin);
|
||||||
@@ -103,7 +103,7 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_cbAccStopWin->Checked = g_settings.bAccStopWin;
|
m_cbAccStopWin->Checked = g_settings.bAccStopWin;
|
||||||
m_edAccStopWin->Text = g_settings.nAccStopWin;
|
m_edAccStopWin->Text = g_settings.nAccStopWin;
|
||||||
|
|
||||||
//账户止损
|
//账户止损
|
||||||
m_aRelatedCB[5] = m_cbAccStopLos;
|
m_aRelatedCB[5] = m_cbAccStopLos;
|
||||||
m_aRelatedCtrl[5].push_back(m_edAccStopLos);
|
m_aRelatedCtrl[5].push_back(m_edAccStopLos);
|
||||||
m_aRelatedCtrl[5].push_back(m_lbAccStopLos);
|
m_aRelatedCtrl[5].push_back(m_lbAccStopLos);
|
||||||
@@ -111,7 +111,7 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_cbAccStopLos->Checked = g_settings.bAccStopLos;
|
m_cbAccStopLos->Checked = g_settings.bAccStopLos;
|
||||||
m_edAccStopLos->Text = g_settings.nAccStopLos;
|
m_edAccStopLos->Text = g_settings.nAccStopLos;
|
||||||
|
|
||||||
//单桌止赢
|
//单桌止赢
|
||||||
m_aRelatedCB[6] = m_cbTableStopWin;
|
m_aRelatedCB[6] = m_cbTableStopWin;
|
||||||
m_aRelatedCtrl[6].push_back(m_edTableStopWin);
|
m_aRelatedCtrl[6].push_back(m_edTableStopWin);
|
||||||
m_aRelatedCtrl[6].push_back(m_edTableWinPause);
|
m_aRelatedCtrl[6].push_back(m_edTableWinPause);
|
||||||
@@ -129,7 +129,7 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_aTableWinRB[2] = m_rbTableWin2;
|
m_aTableWinRB[2] = m_rbTableWin2;
|
||||||
m_aTableWinRB[g_settings.iTableWinOp]->Checked = true;
|
m_aTableWinRB[g_settings.iTableWinOp]->Checked = true;
|
||||||
|
|
||||||
//单桌止损
|
//单桌止损
|
||||||
m_aRelatedCB[7] = m_cbTableStopLos;
|
m_aRelatedCB[7] = m_cbTableStopLos;
|
||||||
m_aRelatedCtrl[7].push_back(m_edTableStopLos);
|
m_aRelatedCtrl[7].push_back(m_edTableStopLos);
|
||||||
m_aRelatedCtrl[7].push_back(m_edTableLosPause);
|
m_aRelatedCtrl[7].push_back(m_edTableLosPause);
|
||||||
@@ -148,7 +148,7 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_aTableLosRB[g_settings.iTableLosOp]->Checked = true;
|
m_aTableLosRB[g_settings.iTableLosOp]->Checked = true;
|
||||||
|
|
||||||
|
|
||||||
//模拟赢转实打
|
//模拟赢转实打
|
||||||
m_aRelatedCB[8] = m_cbS2RWin;
|
m_aRelatedCB[8] = m_cbS2RWin;
|
||||||
m_aRelatedCtrl[8].push_back(m_edS2RWin);
|
m_aRelatedCtrl[8].push_back(m_edS2RWin);
|
||||||
m_aRelatedCtrl[8].push_back(m_lbS2RWin);
|
m_aRelatedCtrl[8].push_back(m_lbS2RWin);
|
||||||
@@ -156,7 +156,7 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_cbS2RWin->Checked = g_settings.bS2RWin;
|
m_cbS2RWin->Checked = g_settings.bS2RWin;
|
||||||
m_edS2RWin->Text = g_settings.nS2RWin;
|
m_edS2RWin->Text = g_settings.nS2RWin;
|
||||||
|
|
||||||
//模拟输转实打
|
//模拟输转实打
|
||||||
m_aRelatedCB[9] = m_cbS2RLos;
|
m_aRelatedCB[9] = m_cbS2RLos;
|
||||||
m_aRelatedCtrl[9].push_back(m_edS2RLos);
|
m_aRelatedCtrl[9].push_back(m_edS2RLos);
|
||||||
m_aRelatedCtrl[9].push_back(m_lbS2RLos);
|
m_aRelatedCtrl[9].push_back(m_lbS2RLos);
|
||||||
@@ -164,7 +164,7 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_cbS2RLos->Checked = g_settings.bS2RLos;
|
m_cbS2RLos->Checked = g_settings.bS2RLos;
|
||||||
m_edS2RLos->Text = g_settings.nS2RLos;
|
m_edS2RLos->Text = g_settings.nS2RLos;
|
||||||
|
|
||||||
//实打赢转模拟
|
//实打赢转模拟
|
||||||
m_aRelatedCB[10] = m_cbR2SWin;
|
m_aRelatedCB[10] = m_cbR2SWin;
|
||||||
m_aRelatedCtrl[10].push_back(m_edR2SWin);
|
m_aRelatedCtrl[10].push_back(m_edR2SWin);
|
||||||
m_aRelatedCtrl[10].push_back(m_lbR2SWin);
|
m_aRelatedCtrl[10].push_back(m_lbR2SWin);
|
||||||
@@ -172,7 +172,7 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_cbR2SWin->Checked = g_settings.bR2SWin;
|
m_cbR2SWin->Checked = g_settings.bR2SWin;
|
||||||
m_edR2SWin->Text = g_settings.nR2SWin;
|
m_edR2SWin->Text = g_settings.nR2SWin;
|
||||||
|
|
||||||
//实打输转模拟
|
//实打输转模拟
|
||||||
m_aRelatedCB[11] = m_cbR2SLos;
|
m_aRelatedCB[11] = m_cbR2SLos;
|
||||||
m_aRelatedCtrl[11].push_back(m_edR2SLos);
|
m_aRelatedCtrl[11].push_back(m_edR2SLos);
|
||||||
m_aRelatedCtrl[11].push_back(m_lbR2SLos);
|
m_aRelatedCtrl[11].push_back(m_lbR2SLos);
|
||||||
@@ -180,11 +180,11 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_cbR2SLos->Checked = g_settings.bR2SLos;
|
m_cbR2SLos->Checked = g_settings.bR2SLos;
|
||||||
m_edR2SLos->Text = g_settings.nR2SLos;
|
m_edR2SLos->Text = g_settings.nR2SLos;
|
||||||
|
|
||||||
//游台
|
//游台
|
||||||
m_cbFloat->Hint = "勾选开启游台模式:每次只有一个台桌下注\n"
|
m_cbFloat->Hint = "勾选开启游台模式:每次只有一个台桌下注\n"
|
||||||
"开启游台时,至少勾选一种换台方式\n"
|
"开启游台时,至少勾选一种换台方式\n"
|
||||||
"只勾选一种换台方式,表示仅当该条件成立时才换台\n"
|
"只勾选一种换台方式,表示仅当该条件成立时才换台\n"
|
||||||
"若勾选了多种方式,则任意选中的条件成立时就换台";
|
"若勾选了多种方式,则任意选中的条件成立时就换台";
|
||||||
|
|
||||||
m_aRelatedCB[12] = m_cbFloat;
|
m_aRelatedCB[12] = m_cbFloat;
|
||||||
m_aRelatedCtrl[12].push_back(m_cbFloatEach);
|
m_aRelatedCtrl[12].push_back(m_cbFloatEach);
|
||||||
@@ -212,7 +212,7 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
m_cbFloat->OnClick = OnRelatedCBClick;
|
m_cbFloat->OnClick = OnRelatedCBClick;
|
||||||
}
|
}
|
||||||
|
|
||||||
//牌局选项
|
//牌局选项
|
||||||
m_aRelatedCB[13] = m_cbHoldBet;
|
m_aRelatedCB[13] = m_cbHoldBet;
|
||||||
m_aRelatedCtrl[13].push_back(m_edHoldBet);
|
m_aRelatedCtrl[13].push_back(m_edHoldBet);
|
||||||
m_aRelatedCtrl[13].push_back(m_lbHoldBet);
|
m_aRelatedCtrl[13].push_back(m_lbHoldBet);
|
||||||
@@ -229,7 +229,7 @@ __fastcall TSettingForm::TSettingForm(TComponent* Owner)
|
|||||||
|
|
||||||
m_cbBetsNoTie->Checked = g_settings.bBetsNoTie;
|
m_cbBetsNoTie->Checked = g_settings.bBetsNoTie;
|
||||||
|
|
||||||
//页脚
|
//页脚
|
||||||
m_cbStartShow->Checked = g_bShowSetting;
|
m_cbStartShow->Checked = g_bShowSetting;
|
||||||
|
|
||||||
if(g_bGameOn){
|
if(g_bGameOn){
|
||||||
@@ -254,7 +254,7 @@ void __fastcall TSettingForm::OkClick(TObject *Sender)
|
|||||||
if(m_cbSimAcc->Checked!=g_settings.bSimAccOn || fSimAcc!=g_settings.fSimAcc){
|
if(m_cbSimAcc->Checked!=g_settings.bSimAccOn || fSimAcc!=g_settings.fSimAcc){
|
||||||
if(m_cbSimAcc->Checked && fSimAcc!=g_settings.fSimAcc){
|
if(m_cbSimAcc->Checked && fSimAcc!=g_settings.fSimAcc){
|
||||||
g_settings.fSimAcc = fSimAcc;
|
g_settings.fSimAcc = fSimAcc;
|
||||||
PostMessage(Application->MainFormHandle, UM_CHART_UPDATE, 1, 1); //初始化图表
|
PostMessage(Application->MainFormHandle, UM_CHART_UPDATE, 1, 1); //初始化图表
|
||||||
}
|
}
|
||||||
|
|
||||||
g_settings.bSimAccOn = m_cbSimAcc->Checked;
|
g_settings.bSimAccOn = m_cbSimAcc->Checked;
|
||||||
@@ -262,7 +262,7 @@ void __fastcall TSettingForm::OkClick(TObject *Sender)
|
|||||||
|
|
||||||
if(g_bTesting && m_cbSimAcc->Checked){
|
if(g_bTesting && m_cbSimAcc->Checked){
|
||||||
g_fBalance = fSimAcc;
|
g_fBalance = fSimAcc;
|
||||||
PostMessage(Application->MainFormHandle, UM_CHART_UPDATE, 2, 1); //初始化图表
|
PostMessage(Application->MainFormHandle, UM_CHART_UPDATE, 2, 1); //初始化图表
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -355,7 +355,7 @@ void __fastcall TSettingForm::TotalPauseExit(TObject *Sender)
|
|||||||
TEdit* pE = (TEdit*)Sender;
|
TEdit* pE = (TEdit*)Sender;
|
||||||
int num = pE->Text.ToInt();
|
int num = pE->Text.ToInt();
|
||||||
if(num<1 || num>30){
|
if(num<1 || num>30){
|
||||||
ShowMessage("请输入1-30的分钟数");
|
ShowMessage("请输入1-30的分钟数");
|
||||||
pE->SetFocus();
|
pE->SetFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -371,7 +371,7 @@ void __fastcall TSettingForm::TablePauseExit(TObject *Sender)
|
|||||||
TEdit* pE = (TEdit*)Sender;
|
TEdit* pE = (TEdit*)Sender;
|
||||||
int num = pE->Text.ToInt();
|
int num = pE->Text.ToInt();
|
||||||
if(num<0 || num>15){
|
if(num<0 || num>15){
|
||||||
ShowMessage("请输入0-15的分钟数");
|
ShowMessage("请输入0-15的分钟数");
|
||||||
pE->SetFocus();
|
pE->SetFocus();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -386,7 +386,7 @@ void __fastcall TSettingForm::SimAccExit(TObject *Sender)
|
|||||||
{
|
{
|
||||||
double fSimAcc;
|
double fSimAcc;
|
||||||
if(!TryStrToFloat(m_edSimAcc->Text, fSimAcc) || fSimAcc<20 || fSimAcc>1000000){
|
if(!TryStrToFloat(m_edSimAcc->Text, fSimAcc) || fSimAcc<20 || fSimAcc>1000000){
|
||||||
ShowMessage("请输入 20-1000000 的模拟本金");
|
ShowMessage("请输入 20-1000000 的模拟本金");
|
||||||
m_edSimAcc->Text = "10000";
|
m_edSimAcc->Text = "10000";
|
||||||
m_edSimAcc->SetFocus();
|
m_edSimAcc->SetFocus();
|
||||||
}
|
}
|
||||||
@@ -401,7 +401,7 @@ void __fastcall TSettingForm::OnRelatedCBClick(TObject *Sender)
|
|||||||
for(int i=0; i<vc.size(); i++)
|
for(int i=0; i<vc.size(); i++)
|
||||||
vc[i]->Enabled = pCB->Checked;
|
vc[i]->Enabled = pCB->Checked;
|
||||||
|
|
||||||
if(pCB==m_cbFloat){ //单独处理游台
|
if(pCB==m_cbFloat){ //单独处理游台
|
||||||
if(pCB->Checked){
|
if(pCB->Checked){
|
||||||
m_aFloatCB[0]->OnClick = NULL;
|
m_aFloatCB[0]->OnClick = NULL;
|
||||||
m_aFloatCB[0]->Checked = true;
|
m_aFloatCB[0]->Checked = true;
|
||||||
@@ -434,7 +434,7 @@ void __fastcall TSettingForm::OnFloatOpClick(TObject *Sender)
|
|||||||
pCB->OnClick = NULL;
|
pCB->OnClick = NULL;
|
||||||
pCB->Checked = true;
|
pCB->Checked = true;
|
||||||
pCB->OnClick = OnFloatOpClick;
|
pCB->OnClick = OnFloatOpClick;
|
||||||
ShowMessage("至少选择一种换台方式");
|
ShowMessage("至少选择一种换台方式");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-6
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <vcl.h>
|
#include <vcl.h>
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
@@ -15,8 +15,8 @@ __fastcall TTableIPForm::TTableIPForm(TComponent* Owner, TGame* pG)
|
|||||||
{
|
{
|
||||||
m_pGame = pG;
|
m_pGame = pG;
|
||||||
|
|
||||||
m_cbIndPolicy->Hint = "启用独立策略后,台桌将按自己的打法和注码进行投注\n"
|
m_cbIndPolicy->Hint = "启用独立策略后,台桌将按自己的打法和注码进行投注\n"
|
||||||
"同时,将不参与注码的总体计算,也不参与游台下注";
|
"同时,将不参与注码的总体计算,也不参与游台下注";
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
void __fastcall TTableIPForm::FormCreate(TObject *Sender)
|
void __fastcall TTableIPForm::FormCreate(TObject *Sender)
|
||||||
@@ -48,13 +48,13 @@ void __fastcall TTableIPForm::OkClick(TObject *Sender)
|
|||||||
{
|
{
|
||||||
if(m_cbIndPolicy->Checked){
|
if(m_cbIndPolicy->Checked){
|
||||||
if(m_iBet<0){
|
if(m_iBet<0){
|
||||||
ShowMessage("请选择打法策略");
|
ShowMessage("请选择打法策略");
|
||||||
m_cbBets->SetFocus();
|
m_cbBets->SetFocus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_iChip<0){
|
if(m_iChip<0){
|
||||||
ShowMessage("请选择注码策略");
|
ShowMessage("请选择注码策略");
|
||||||
m_cbChips->SetFocus();
|
m_cbChips->SetFocus();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@ void __fastcall TTableIPForm::ChipMulExit(TObject *Sender)
|
|||||||
{
|
{
|
||||||
int mul = m_leChipMul->Text.ToInt();
|
int mul = m_leChipMul->Text.ToInt();
|
||||||
if(mul<=0){
|
if(mul<=0){
|
||||||
ShowMessage("请输入投注倍数");
|
ShowMessage("请输入投注倍数");
|
||||||
m_leChipMul->SetFocus();
|
m_leChipMul->SetFocus();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|||||||
+79
-79
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <vcl.h>
|
#include <vcl.h>
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
@@ -17,11 +17,11 @@
|
|||||||
#define COLOR_BETTING TColor(0x00CDFAFF) //F5F0FF
|
#define COLOR_BETTING TColor(0x00CDFAFF) //F5F0FF
|
||||||
#define COLOR_BETTED TColor(0x00E1E4FF)
|
#define COLOR_BETTED TColor(0x00E1E4FF)
|
||||||
#define COLOR_RESULT TColor(0x00D7B95C) //2FFFAD 5CB9D7
|
#define COLOR_RESULT TColor(0x00D7B95C) //2FFFAD 5CB9D7
|
||||||
#define RD_6B 0 //六珠路
|
#define RD_6B 0 //六珠路
|
||||||
#define RD_BIG 1 //大路
|
#define RD_BIG 1 //大路
|
||||||
#define RD_EYE 2 //大眼路
|
#define RD_EYE 2 //大眼路
|
||||||
#define RD_LIT 3 //小路
|
#define RD_LIT 3 //小路
|
||||||
#define RD_COC 4 //小强路
|
#define RD_COC 4 //小强路
|
||||||
|
|
||||||
#define TIP_TYPE_BET 0
|
#define TIP_TYPE_BET 0
|
||||||
#define TIP_TYPE_RES 1
|
#define TIP_TYPE_RES 1
|
||||||
@@ -31,11 +31,11 @@ __fastcall TTableFrame::TTableFrame(TComponent* Owner)
|
|||||||
: TFrame(Owner)
|
: TFrame(Owner)
|
||||||
{
|
{
|
||||||
m_sgBets->Canvas->Font = m_sgBets->Font;
|
m_sgBets->Canvas->Font = m_sgBets->Font;
|
||||||
m_sgBets->Cells[0][0] = "序号";
|
m_sgBets->Cells[0][0] = "序号";
|
||||||
m_sgBets->Cells[1][0] = "下注";
|
m_sgBets->Cells[1][0] = "下注";
|
||||||
m_sgBets->Cells[2][0] = "金额";
|
m_sgBets->Cells[2][0] = "金额";
|
||||||
m_sgBets->Cells[3][0] = "输赢";
|
m_sgBets->Cells[3][0] = "输赢";
|
||||||
m_sgBets->Cells[4][0] = "赢利";
|
m_sgBets->Cells[4][0] = "赢利";
|
||||||
m_sgBets->ColWidths[0] = 32;//DPIX(32);
|
m_sgBets->ColWidths[0] = 32;//DPIX(32);
|
||||||
m_sgBets->ColWidths[1] = 32;//DPIX(32);
|
m_sgBets->ColWidths[1] = 32;//DPIX(32);
|
||||||
m_sgBets->ColWidths[2] = 36;//DPIX(36);
|
m_sgBets->ColWidths[2] = 36;//DPIX(36);
|
||||||
@@ -172,7 +172,7 @@ void __fastcall TTableFrame::UpdateStatus()
|
|||||||
m_panBet->Enabled = true;
|
m_panBet->Enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lbCards->Caption = "开始下注 ";
|
m_lbCards->Caption = "开始下注 ";
|
||||||
m_lbTimeout->Caption = IntToStr(m_pGame->timeout);
|
m_lbTimeout->Caption = IntToStr(m_pGame->timeout);
|
||||||
}
|
}
|
||||||
else if(m_pGame->gmstatus==11 || m_pGame->gmstatus==12){
|
else if(m_pGame->gmstatus==11 || m_pGame->gmstatus==12){
|
||||||
@@ -181,11 +181,11 @@ void __fastcall TTableFrame::UpdateStatus()
|
|||||||
m_pBetChipLabels[i]->Hide();
|
m_pBetChipLabels[i]->Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lbCards->Caption = m_pGame->gmstatus==11 ? "洗牌中..." : "维护中...";
|
m_lbCards->Caption = m_pGame->gmstatus==11 ? "洗牌中..." : "维护中...";
|
||||||
}
|
}
|
||||||
else if(m_pGame->gmstatus==2){
|
else if(m_pGame->gmstatus==2){
|
||||||
if(m_pGame->bcard.IsEmpty() && m_pGame->pcard.IsEmpty()){
|
if(m_pGame->bcard.IsEmpty() && m_pGame->pcard.IsEmpty()){
|
||||||
m_lbCards->Caption = "开牌中...";
|
m_lbCards->Caption = "开牌中...";
|
||||||
|
|
||||||
memset(m_aManChips, 0, sizeof(m_aManChips));
|
memset(m_aManChips, 0, sizeof(m_aManChips));
|
||||||
for(int i=0; i<3; i++)
|
for(int i=0; i<3; i++)
|
||||||
@@ -196,7 +196,7 @@ void __fastcall TTableFrame::UpdateStatus()
|
|||||||
m_btnBetCancel->Enabled = false;
|
m_btnBetCancel->Enabled = false;
|
||||||
|
|
||||||
if(m_panBet->Visible){
|
if(m_panBet->Visible){
|
||||||
ShowTip("停止下注", TIP_TYPE_BET);
|
ShowTip("停止下注", TIP_TYPE_BET);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@@ -218,7 +218,7 @@ void __fastcall TTableFrame::UpdateStatus()
|
|||||||
m_lbCards->Caption = c;
|
m_lbCards->Caption = c;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_lbCards->Caption = "结算中...";
|
m_lbCards->Caption = "结算中...";
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lbRCount->Caption = IntToStr(m_pGame->winCount[0]);
|
m_lbRCount->Caption = IntToStr(m_pGame->winCount[0]);
|
||||||
@@ -275,7 +275,7 @@ void __fastcall TTableFrame::RoadDrawCell(TObject *Sender, System::LongInt ACol,
|
|||||||
TColor rPC = pen->Color;
|
TColor rPC = pen->Color;
|
||||||
int rPW = pen->Width;
|
int rPW = pen->Width;
|
||||||
|
|
||||||
if(iRoad==RD_6B || iRoad==RD_LIT){ //珠仔路/小路为实心圆
|
if(iRoad==RD_6B || iRoad==RD_LIT){ //珠仔路/小路为实心圆
|
||||||
if( c==1 )
|
if( c==1 )
|
||||||
brush->Color = clRed;
|
brush->Color = clRed;
|
||||||
else if( c==2 )
|
else if( c==2 )
|
||||||
@@ -283,7 +283,7 @@ void __fastcall TTableFrame::RoadDrawCell(TObject *Sender, System::LongInt ACol,
|
|||||||
else if( c==3 )
|
else if( c==3 )
|
||||||
brush->Color = clWebLightSeaGreen;
|
brush->Color = clWebLightSeaGreen;
|
||||||
}
|
}
|
||||||
else{ //大路/大眼路/小强路
|
else{ //大路/大眼路/小强路
|
||||||
pen->Width = iRoad==RD_COC ? dpi7 : dpi3;
|
pen->Width = iRoad==RD_COC ? dpi7 : dpi3;
|
||||||
if( c==1 )
|
if( c==1 )
|
||||||
pen->Color = clRed;
|
pen->Color = clRed;
|
||||||
@@ -299,7 +299,7 @@ void __fastcall TTableFrame::RoadDrawCell(TObject *Sender, System::LongInt ACol,
|
|||||||
if(t>0)
|
if(t>0)
|
||||||
pen->Color = clWebLightSeaGreen;
|
pen->Color = clWebLightSeaGreen;
|
||||||
|
|
||||||
if(iRoad==RD_COC || t>0){ //绘制斜条
|
if(iRoad==RD_COC || t>0){ //绘制斜条
|
||||||
canvas->MoveTo(rc.left, rc.bottom);
|
canvas->MoveTo(rc.left, rc.bottom);
|
||||||
canvas->LineTo(rc.right, rc.top);
|
canvas->LineTo(rc.right, rc.top);
|
||||||
}
|
}
|
||||||
@@ -365,9 +365,9 @@ void __fastcall TTableFrame::BetsDrawCell(TObject *Sender, System::LongInt ACol,
|
|||||||
int x=Rect.left,y=Rect.top;
|
int x=Rect.left,y=Rect.top;
|
||||||
TSize szTxt = pSG->Canvas->TextExtent(strText);
|
TSize szTxt = pSG->Canvas->TextExtent(strText);
|
||||||
|
|
||||||
if( ARow==0 ){ //画下框线
|
if( ARow==0 ){ //画下框线
|
||||||
x += (Rect.Width() - szTxt.cx) / 2; // -- 水平居中
|
x += (Rect.Width() - szTxt.cx) / 2; // -- 水平居中
|
||||||
y += (Rect.Height() - szTxt.cy) / 2;// -- 垂直居中
|
y += (Rect.Height() - szTxt.cy) / 2;// -- 垂直居中
|
||||||
|
|
||||||
TBrushStyle rBS = pSG->Canvas->Brush->Style;
|
TBrushStyle rBS = pSG->Canvas->Brush->Style;
|
||||||
TColor rCl = pSG->Canvas->Brush->Color;
|
TColor rCl = pSG->Canvas->Brush->Color;
|
||||||
@@ -394,12 +394,12 @@ void __fastcall TTableFrame::BetsDrawCell(TObject *Sender, System::LongInt ACol,
|
|||||||
pSG->Canvas->Pen->Style = rPS;
|
pSG->Canvas->Pen->Style = rPS;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
if(ACol==1 || ACol==3)//水平居中
|
if(ACol==1 || ACol==3)//水平居中
|
||||||
x += (Rect.Width() - szTxt.cx) / 2;
|
x += (Rect.Width() - szTxt.cx) / 2;
|
||||||
else //水平靠右
|
else //水平靠右
|
||||||
x += (Rect.Width() - szTxt.cx) - DPIX(4);
|
x += (Rect.Width() - szTxt.cx) - DPIX(4);
|
||||||
|
|
||||||
y += (Rect.Height() - szTxt.cy) / 2;// -- 垂直居中
|
y += (Rect.Height() - szTxt.cy) / 2;// -- 垂直居中
|
||||||
|
|
||||||
bool bEven = ARow % 2;
|
bool bEven = ARow % 2;
|
||||||
|
|
||||||
@@ -424,17 +424,17 @@ void __fastcall TTableFrame::BetsDrawCell(TObject *Sender, System::LongInt ACol,
|
|||||||
pSG->Canvas->Brush->Color = bEven ? clWhite : COLOR_OVEN;
|
pSG->Canvas->Brush->Color = bEven ? clWhite : COLOR_OVEN;
|
||||||
|
|
||||||
if(ACol==0){
|
if(ACol==0){
|
||||||
if(strText=="爆缆")
|
if(strText=="爆缆")
|
||||||
pSG->Canvas->Font->Color = clRed;
|
pSG->Canvas->Font->Color = clRed;
|
||||||
else if(strText=="新局")
|
else if(strText=="新局")
|
||||||
pSG->Canvas->Font->Color = clGreen;
|
pSG->Canvas->Font->Color = clGreen;
|
||||||
}
|
}
|
||||||
else if(ACol==3){
|
else if(ACol==3){
|
||||||
if(strText=="赢")
|
if(strText=="赢")
|
||||||
pSG->Canvas->Font->Color = clRed;
|
pSG->Canvas->Font->Color = clRed;
|
||||||
else if(strText=="输")
|
else if(strText=="输")
|
||||||
pSG->Canvas->Font->Color = clBlue;
|
pSG->Canvas->Font->Color = clBlue;
|
||||||
else if(strText=="和")
|
else if(strText=="和")
|
||||||
pSG->Canvas->Font->Color = clGreen;
|
pSG->Canvas->Font->Color = clGreen;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -543,7 +543,7 @@ void __fastcall TTableFrame::UMLogUpdate(TMessage &msg)
|
|||||||
ClearLogsClick(NULL);
|
ClearLogsClick(NULL);
|
||||||
|
|
||||||
m_logRows++;
|
m_logRows++;
|
||||||
m_sgBets->Cells[0][m_logRows] = "新局";
|
m_sgBets->Cells[0][m_logRows] = "新局";
|
||||||
UpdateLogs();
|
UpdateLogs();
|
||||||
}
|
}
|
||||||
else if(iState==ST_NOBET){
|
else if(iState==ST_NOBET){
|
||||||
@@ -555,9 +555,9 @@ void __fastcall TTableFrame::UMLogUpdate(TMessage &msg)
|
|||||||
else if(iState==ST_BETSET||iState==ST_BETTING){
|
else if(iState==ST_BETSET||iState==ST_BETTING){
|
||||||
m_logRows++;
|
m_logRows++;
|
||||||
m_sgBets->Cells[0][m_logRows] = m_pGame->iBetSeq & 0xFFFF;
|
m_sgBets->Cells[0][m_logRows] = m_pGame->iBetSeq & 0xFFFF;
|
||||||
m_sgBets->Cells[1][m_logRows] = m_pGame->iBet==1 ? "庄"
|
m_sgBets->Cells[1][m_logRows] = m_pGame->iBet==1 ? "庄"
|
||||||
: m_pGame->iBet==2 ? "闲"
|
: m_pGame->iBet==2 ? "闲"
|
||||||
: "和";
|
: "和";
|
||||||
m_sgBets->Cells[2][m_logRows] = m_pGame->nChip;
|
m_sgBets->Cells[2][m_logRows] = m_pGame->nChip;
|
||||||
UpdateLogs();
|
UpdateLogs();
|
||||||
}
|
}
|
||||||
@@ -571,89 +571,89 @@ void __fastcall TTableFrame::UMLogUpdate(TMessage &msg)
|
|||||||
int res = msg.LParam;
|
int res = msg.LParam;
|
||||||
m_sgBets->Cells[3][m_logRows] = "X";
|
m_sgBets->Cells[3][m_logRows] = "X";
|
||||||
|
|
||||||
// if(iState==ST_QUASH) //注单撤销
|
// if(iState==ST_QUASH) //注单撤销
|
||||||
// m_sgBets->Cells[4][m_logRows] = "撤销";
|
// m_sgBets->Cells[4][m_logRows] = "撤销";
|
||||||
// else
|
// else
|
||||||
if(res==26)
|
if(res==26)
|
||||||
m_sgBets->Cells[4][m_logRows] = "余额";
|
m_sgBets->Cells[4][m_logRows] = "余额";
|
||||||
else if(res==25)
|
else if(res==25)
|
||||||
m_sgBets->Cells[4][m_logRows] = "超时";
|
m_sgBets->Cells[4][m_logRows] = "超时";
|
||||||
else if(res==10 || res==11)
|
else if(res==10 || res==11)
|
||||||
m_sgBets->Cells[4][m_logRows] = "限红";
|
m_sgBets->Cells[4][m_logRows] = "限红";
|
||||||
else if(res==2)
|
else if(res==2)
|
||||||
m_sgBets->Cells[4][m_logRows] = "维护";
|
m_sgBets->Cells[4][m_logRows] = "维护";
|
||||||
else if(res==3)
|
else if(res==3)
|
||||||
m_sgBets->Cells[4][m_logRows] = "网络";
|
m_sgBets->Cells[4][m_logRows] = "网络";
|
||||||
else if(res==4)
|
else if(res==4)
|
||||||
m_sgBets->Cells[4][m_logRows] = "违规";
|
m_sgBets->Cells[4][m_logRows] = "违规";
|
||||||
else{
|
else{
|
||||||
m_sgBets->Cells[4][m_logRows] = "未知";
|
m_sgBets->Cells[4][m_logRows] = "未知";
|
||||||
DebugPrint("%s 下注失败 %d", ((AnsiString)m_pGame->vid).c_str(), res);
|
DebugPrint("%s 下注失败 %d", ((AnsiString)m_pGame->vid).c_str(), res);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_sgBets->Invalidate();
|
m_sgBets->Invalidate();
|
||||||
}
|
}
|
||||||
else if((iState==ST_CANCELED || iState==ST_QUASH) && m_logRows>0){ //注单取消或撤销
|
else if((iState==ST_CANCELED || iState==ST_QUASH) && m_logRows>0){ //注单取消或撤销
|
||||||
for(int i=0; i<5; i++)
|
for(int i=0; i<5; i++)
|
||||||
m_sgBets->Cells[i][m_logRows] = "";
|
m_sgBets->Cells[i][m_logRows] = "";
|
||||||
m_logRows--;
|
m_logRows--;
|
||||||
UpdateLogs();
|
UpdateLogs();
|
||||||
}
|
}
|
||||||
else if(iState==ST_PAID){ //显示输赢结果日志
|
else if(iState==ST_PAID){ //显示输赢结果日志
|
||||||
int ret = msg.LParam & 0xFFFF;
|
int ret = msg.LParam & 0xFFFF;
|
||||||
int dead = (msg.LParam >> 16) & 0xFF;
|
int dead = (msg.LParam >> 16) & 0xFF;
|
||||||
int stop = msg.LParam >> 24;
|
int stop = msg.LParam >> 24;
|
||||||
|
|
||||||
if(ret==0){ //有错误发生
|
if(ret==0){ //有错误发生
|
||||||
m_sgBets->Cells[3][m_logRows] = "X";
|
m_sgBets->Cells[3][m_logRows] = "X";
|
||||||
m_sgBets->Cells[4][m_logRows] = "结算";
|
m_sgBets->Cells[4][m_logRows] = "结算";
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
m_sgBets->Cells[3][m_logRows] = ret==1 ? "赢" : ret==2 ? "输" : "和";
|
m_sgBets->Cells[3][m_logRows] = ret==1 ? "赢" : ret==2 ? "输" : "和";
|
||||||
m_sgBets->Cells[4][m_logRows] = FormatFloat("0", m_pGame->profit);
|
m_sgBets->Cells[4][m_logRows] = FormatFloat("0", m_pGame->profit);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(g_bGameOn && (dead || stop)){
|
if(g_bGameOn && (dead || stop)){
|
||||||
int pause = 0;
|
int pause = 0;
|
||||||
if(dead && (m_pGame->bIndPolicy || !g_aGames.pRankChip)){ //独立策略或非全局注码
|
if(dead && (m_pGame->bIndPolicy || !g_aGames.pRankChip)){ //独立策略或非全局注码
|
||||||
m_logRows++;
|
m_logRows++;
|
||||||
m_sgBets->Cells[0][m_logRows] = "爆缆";
|
m_sgBets->Cells[0][m_logRows] = "爆缆";
|
||||||
if(dead==3){
|
if(dead==3){
|
||||||
int iCP = m_pGame->bIndPolicy ? m_pGame->iChipPolicy : g_iChipPolicy;
|
int iCP = m_pGame->bIndPolicy ? m_pGame->iChipPolicy : g_iChipPolicy;
|
||||||
TChipPolicy* pCP = (TChipPolicy*)g_aChipPolicies[iCP];
|
TChipPolicy* pCP = (TChipPolicy*)g_aChipPolicies[iCP];
|
||||||
m_sgBets->Cells[1][m_logRows] = pCP->deadPause ? "暂停" : "重启";
|
m_sgBets->Cells[1][m_logRows] = pCP->deadPause ? "暂停" : "重启";
|
||||||
|
|
||||||
if(pause<pCP->deadPause)
|
if(pause<pCP->deadPause)
|
||||||
pause = pCP->deadPause;
|
pause = pCP->deadPause;
|
||||||
}
|
}
|
||||||
else if(dead==2)
|
else if(dead==2)
|
||||||
m_sgBets->Cells[1][m_logRows] = "局停";
|
m_sgBets->Cells[1][m_logRows] = "局停";
|
||||||
else if(dead==1)
|
else if(dead==1)
|
||||||
m_sgBets->Cells[1][m_logRows] = "停止";
|
m_sgBets->Cells[1][m_logRows] = "停止";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(stop){
|
if(stop){
|
||||||
m_logRows++;
|
m_logRows++;
|
||||||
m_sgBets->Cells[0][m_logRows] = ret==1 ? "止赢" : "止损";
|
m_sgBets->Cells[0][m_logRows] = ret==1 ? "止赢" : "止损";
|
||||||
if(stop==3){
|
if(stop==3){
|
||||||
int nPause = ret==1 ? g_settings.nTableWinPause : g_settings.nTableLosPause;
|
int nPause = ret==1 ? g_settings.nTableWinPause : g_settings.nTableLosPause;
|
||||||
m_sgBets->Cells[1][m_logRows] = nPause ? "暂停" : "重启";
|
m_sgBets->Cells[1][m_logRows] = nPause ? "暂停" : "重启";
|
||||||
|
|
||||||
if(pause<nPause)
|
if(pause<nPause)
|
||||||
pause = nPause;
|
pause = nPause;
|
||||||
}
|
}
|
||||||
else if(stop==2)
|
else if(stop==2)
|
||||||
m_sgBets->Cells[1][m_logRows] = "局停";
|
m_sgBets->Cells[1][m_logRows] = "局停";
|
||||||
else if(stop==1)
|
else if(stop==1)
|
||||||
m_sgBets->Cells[1][m_logRows] = "停止";
|
m_sgBets->Cells[1][m_logRows] = "停止";
|
||||||
}
|
}
|
||||||
|
|
||||||
UpdateLogs();
|
UpdateLogs();
|
||||||
|
|
||||||
if(dead==1 && (m_pGame->bIndPolicy || !g_aGames.pRankChip) || stop==1){ //本桌停止
|
if(dead==1 && (m_pGame->bIndPolicy || !g_aGames.pRankChip) || stop==1){ //本桌停止
|
||||||
SetRun(false);
|
SetRun(false);
|
||||||
}
|
}
|
||||||
else if(pause){ //暂停
|
else if(pause){ //暂停
|
||||||
m_pGame->Pause(true);
|
m_pGame->Pause(true);
|
||||||
|
|
||||||
ClearPauseTimer();
|
ClearPauseTimer();
|
||||||
@@ -669,12 +669,12 @@ void __fastcall TTableFrame::UMLogUpdate(TMessage &msg)
|
|||||||
|
|
||||||
if(!g_aGames.bFloat){
|
if(!g_aGames.bFloat){
|
||||||
if(ret==1)
|
if(ret==1)
|
||||||
m_lbSeq->Caption = "连赢:" + IntToStr(m_pGame->seqCount[0]);
|
m_lbSeq->Caption = "连赢:" + IntToStr(m_pGame->seqCount[0]);
|
||||||
else if(ret==2)
|
else if(ret==2)
|
||||||
m_lbSeq->Caption = "连输:" + IntToStr(m_pGame->seqCount[1]);
|
m_lbSeq->Caption = "连输:" + IntToStr(m_pGame->seqCount[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_lbProfit->Caption = "赢利: " + FormatFloat("0", m_pGame->profit);
|
m_lbProfit->Caption = "赢利: " + FormatFloat("0", m_pGame->profit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@@ -700,7 +700,7 @@ void __fastcall TTableFrame::UMUpdate(TMessage &msg)
|
|||||||
int res = msg.LParam;
|
int res = msg.LParam;
|
||||||
|
|
||||||
if(m_panBet->Visible){
|
if(m_panBet->Visible){
|
||||||
String tip = res==0 ? "下注成功" : res==26 ? "余额不足" : "下注失败";
|
String tip = res==0 ? "下注成功" : res==26 ? "余额不足" : "下注失败";
|
||||||
ShowTip(tip, TIP_TYPE_BET);
|
ShowTip(tip, TIP_TYPE_BET);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -743,11 +743,11 @@ void __fastcall TTableFrame::UMUpdate(TMessage &msg)
|
|||||||
else if(type==UPDATE_RESET){
|
else if(type==UPDATE_RESET){
|
||||||
int type = msg.LParam;
|
int type = msg.LParam;
|
||||||
if(type==0)
|
if(type==0)
|
||||||
m_lbProfit->Caption = "赢利: ";
|
m_lbProfit->Caption = "赢利: ";
|
||||||
else if(type==1)
|
else if(type==1)
|
||||||
m_lbSeq->Caption = "连赢:";
|
m_lbSeq->Caption = "连赢:";
|
||||||
else if(type==2)
|
else if(type==2)
|
||||||
m_lbSeq->Caption = "连输:";
|
m_lbSeq->Caption = "连输:";
|
||||||
else if(type==3)
|
else if(type==3)
|
||||||
ClearPauseTimer();
|
ClearPauseTimer();
|
||||||
}
|
}
|
||||||
@@ -851,9 +851,9 @@ void __fastcall TTableFrame::BetOkClick(TObject *Sender)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!g_bTesting && tot>g_fBalance)
|
if(!g_bTesting && tot>g_fBalance)
|
||||||
ShowTip("余额不足", TIP_TYPE_BET);
|
ShowTip("余额不足", TIP_TYPE_BET);
|
||||||
else if(tot>g_MaxOnBet)
|
else if(tot>g_MaxOnBet)
|
||||||
ShowTip("超出限红", TIP_TYPE_BET);
|
ShowTip("超出限红", TIP_TYPE_BET);
|
||||||
else if(tot>0 && m_pGame)
|
else if(tot>0 && m_pGame)
|
||||||
m_pGame->ManualBetOn(m_aManChips);
|
m_pGame->ManualBetOn(m_aManChips);
|
||||||
}
|
}
|
||||||
@@ -966,34 +966,34 @@ void __fastcall TTableFrame::IPClick(TObject *Sender)
|
|||||||
}
|
}
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
char* u_sRoad[5] = {"六珠路","大路","大眼路","小路","小强路"}; //路珠名称
|
char* u_sRoad[5] = {"六珠路","大路","大眼路","小路","小强路"}; //路珠名称
|
||||||
void __fastcall TTableFrame::UpdateIP()
|
void __fastcall TTableFrame::UpdateIP()
|
||||||
{
|
{
|
||||||
String hint;
|
String hint;
|
||||||
if(m_pGame->bIndPolicy){
|
if(m_pGame->bIndPolicy){
|
||||||
hint = "独立策略(点击修改设置)";
|
hint = "独立策略(点击修改设置)";
|
||||||
|
|
||||||
if(m_pGame->iBetPolicy<0)
|
if(m_pGame->iBetPolicy<0)
|
||||||
hint += "\n打法:全局策略";
|
hint += "\n打法:全局策略";
|
||||||
else
|
else
|
||||||
hint += "\n打法:" + g_aBetPolicies[m_pGame->iBetPolicy]->name;
|
hint += "\n打法:" + g_aBetPolicies[m_pGame->iBetPolicy]->name;
|
||||||
|
|
||||||
hint += "\n路单:" + String(u_sRoad[m_pGame->iRoad<0 ? g_iRoad : m_pGame->iRoad]);
|
hint += "\n路单:" + String(u_sRoad[m_pGame->iRoad<0 ? g_iRoad : m_pGame->iRoad]);
|
||||||
|
|
||||||
if(m_pGame->iChipPolicy<0)
|
if(m_pGame->iChipPolicy<0)
|
||||||
hint += "\n注码:全局策略";
|
hint += "\n注码:全局策略";
|
||||||
else{
|
else{
|
||||||
TBasePolicy* pPolicy = g_aChipPolicies[m_pGame->iChipPolicy];
|
TBasePolicy* pPolicy = g_aChipPolicies[m_pGame->iChipPolicy];
|
||||||
hint += "\n注码:" + pPolicy->name;
|
hint += "\n注码:" + pPolicy->name;
|
||||||
|
|
||||||
if(pPolicy->kind!=KIND_CHIP_COM)
|
if(pPolicy->kind!=KIND_CHIP_COM)
|
||||||
hint += "\n倍数:" + IntToStr(m_pGame->nChipMul);
|
hint += "\n倍数:" + IntToStr(m_pGame->nChipMul);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
hint = "全局策略(点击设置独立策略)";
|
hint = "全局策略(点击设置独立策略)";
|
||||||
if(m_pGame->iRoad>=0){
|
if(m_pGame->iRoad>=0){
|
||||||
hint += "\n路单:" + String(u_sRoad[m_pGame->iRoad]);
|
hint += "\n路单:" + String(u_sRoad[m_pGame->iRoad]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
-9
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef TableUnitH
|
#ifndef TableUnitH
|
||||||
#define TableUnitH
|
#define TableUnitH
|
||||||
@@ -86,16 +86,16 @@ private: // User declarations
|
|||||||
bool m_bCursorOnRoad,
|
bool m_bCursorOnRoad,
|
||||||
m_bCursorOnLog;
|
m_bCursorOnLog;
|
||||||
|
|
||||||
TTimer *m_pTipTimer, //显示提示定时器
|
TTimer *m_pTipTimer, //显示提示定时器
|
||||||
*m_pPauseTimer; //止赢暂停定时器
|
*m_pPauseTimer; //止赢暂停定时器
|
||||||
int m_aManChips[3], //待下注
|
int m_aManChips[3], //待下注
|
||||||
m_aBetChips[3]; //已下注
|
m_aBetChips[3]; //已下注
|
||||||
TLabel *m_pManChipLabels[3], //待下注
|
TLabel *m_pManChipLabels[3], //待下注
|
||||||
*m_pBetChipLabels[3]; //已下注
|
*m_pBetChipLabels[3]; //已下注
|
||||||
|
|
||||||
TPngImage * m_imgOps[3];
|
TPngImage * m_imgOps[3];
|
||||||
|
|
||||||
//选中相关
|
//选中相关
|
||||||
bool m_bSel;
|
bool m_bSel;
|
||||||
TForm *m_fmMask;
|
TForm *m_fmMask;
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ private: // User declarations
|
|||||||
void __fastcall UpdateLogs();
|
void __fastcall UpdateLogs();
|
||||||
void __fastcall UpdateIP();
|
void __fastcall UpdateIP();
|
||||||
|
|
||||||
//消息处理
|
//消息处理
|
||||||
MESSAGE void __fastcall UMUpdate(TMessage &msg);
|
MESSAGE void __fastcall UMUpdate(TMessage &msg);
|
||||||
MESSAGE void __fastcall UMChangeRoad(TMessage &msg);
|
MESSAGE void __fastcall UMChangeRoad(TMessage &msg);
|
||||||
MESSAGE void __fastcall UMSetManual(TMessage &msg);
|
MESSAGE void __fastcall UMSetManual(TMessage &msg);
|
||||||
|
|||||||
+3
-3
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#include <vcl.h>
|
#include <vcl.h>
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
|
|
||||||
@@ -8,9 +8,9 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
#pragma package(smart_init)
|
#pragma package(smart_init)
|
||||||
|
|
||||||
int g_iPlatform = 0; //游戏平台
|
int g_iPlatform = 0; //游戏平台
|
||||||
unsigned g_tmCurrent = 0,
|
unsigned g_tmCurrent = 0,
|
||||||
g_tmIdle = 0; //软件无操作时间
|
g_tmIdle = 0; //软件无操作时间
|
||||||
bool g_bBacData = false;
|
bool g_bBacData = false;
|
||||||
|
|
||||||
void __fastcall ResetIdle()
|
void __fastcall ResetIdle()
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef UtilityUnitH
|
#ifndef UtilityUnitH
|
||||||
#define UtilityUnitH
|
#define UtilityUnitH
|
||||||
@@ -21,7 +21,7 @@ String __fastcall UnifyCard(String card);
|
|||||||
//bool __fastcall IsGameOn();
|
//bool __fastcall IsGameOn();
|
||||||
int __fastcall IsPolicyInUse(int type, int iPolicy);
|
int __fastcall IsPolicyInUse(int type, int iPolicy);
|
||||||
|
|
||||||
extern int g_iPlatform; //ÓÎϷƽ̨
|
extern int g_iPlatform; //游戏平台
|
||||||
extern unsigned g_tmCurrent, g_tmIdle;
|
extern unsigned g_tmCurrent, g_tmIdle;
|
||||||
extern bool g_bBacData;
|
extern bool g_bBacData;
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://opencode.ai/config.json",
|
||||||
|
"permission": {
|
||||||
|
"external_directory": { "*": "ask" },
|
||||||
|
"bash": { "*": "allow" }
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user