Improvement: Prepare for optimization of online capacity

This commit is contained in:
yuanyuanxiang
2025-04-07 18:18:36 +08:00
parent 69afaf19c0
commit 72459de00e
26 changed files with 931 additions and 231 deletions

View File

@@ -7,7 +7,6 @@
#include "afxdialogex.h"
#include "client/CursorInfo.h"
// CSettingDlg <20>Ի<EFBFBD><D4BB><EFBFBD>
IMPLEMENT_DYNAMIC(CSettingDlg, CDialog)
@@ -18,6 +17,8 @@ CSettingDlg::CSettingDlg(CWnd* pParent)
, m_nMax_Connect(0)
, m_sScreenCapture(_T("GDI"))
, m_sScreenCompress(_T("<EFBFBD><EFBFBD>Ļ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"))
, m_nReportInterval(5)
, m_sSoftwareDetect(_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ"))
{
}
@@ -36,6 +37,12 @@ void CSettingDlg::DoDataExchange(CDataExchange* pDX)
DDV_MaxChars(pDX, m_sScreenCapture, 32);
DDX_Control(pDX, IDC_COMBO_SCREEN_COMPRESS, m_ComboScreenCompress);
DDX_CBString(pDX, IDC_COMBO_SCREEN_COMPRESS, m_sScreenCompress);
DDX_Control(pDX, IDC_EDIT_REPORTINTERVAL, m_EditReportInterval);
DDX_Text(pDX, IDC_EDIT_REPORTINTERVAL, m_nReportInterval);
DDV_MinMaxInt(pDX, m_nReportInterval, 0, 3600);
DDX_Control(pDX, IDC_COMBO_SOFTWAREDETECT, m_ComboSoftwareDetect);
DDX_CBString(pDX, IDC_COMBO_SOFTWAREDETECT, m_sSoftwareDetect);
DDV_MaxChars(pDX, m_sSoftwareDetect, 256);
}
BEGIN_MESSAGE_MAP(CSettingDlg, CDialog)
@@ -84,7 +91,26 @@ BOOL CSettingDlg::OnInitDialog()
m_ComboScreenCapture.InsertString(0, "GDI");
m_ComboScreenCapture.InsertString(1, "DXGI");
m_sScreenCapture = DXGI ? "DXGI" : "GDI";
m_ComboScreenCapture.InsertString(2, "VIRTUAL");
m_sScreenCapture = DXGI==1 ? "DXGI" : (DXGI == 2 ? "VIRTUAL" : "GDI");
m_ComboSoftwareDetect.InsertString(SOFTWARE_CAMERA, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ");
m_ComboSoftwareDetect.InsertString(SOFTWARE_TELEGRAM, "<EFBFBD>");
auto str = ((CMy2015RemoteApp*)AfxGetApp())->m_iniFile.GetStr("settings", "ReportInterval", "5");
m_nReportInterval = atoi(str.GetBuffer());
n = ((CMy2015RemoteApp*)AfxGetApp())->m_iniFile.GetInt("settings", "SoftwareDetect");
switch (n)
{
case SOFTWARE_CAMERA:
m_sSoftwareDetect = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ";
break;
case SOFTWARE_TELEGRAM:
m_sSoftwareDetect = "<EFBFBD>";
break;
default:
m_sSoftwareDetect = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͷ";
break;
}
UpdateData(FALSE);
@@ -105,6 +131,10 @@ void CSettingDlg::OnBnClickedButtonSettingapply()
n = m_ComboScreenCompress.GetCurSel();
((CMy2015RemoteApp*)AfxGetApp())->m_iniFile.SetInt("settings", "ScreenCompress", n);
((CMy2015RemoteApp*)AfxGetApp())->m_iniFile.SetInt("settings", "ReportInterval", m_nReportInterval);
n = m_ComboSoftwareDetect.GetCurSel();
((CMy2015RemoteApp*)AfxGetApp())->m_iniFile.SetInt("settings", "SoftwareDetect", n);
m_ApplyButton.EnableWindow(FALSE);
m_ApplyButton.ShowWindow(SW_HIDE);
}