diff --git a/server/2015Remote/2015Remote.rc b/server/2015Remote/2015Remote.rc index 2522559..7de5a1a 100644 Binary files a/server/2015Remote/2015Remote.rc and b/server/2015Remote/2015Remote.rc differ diff --git a/server/2015Remote/2015RemoteDlg.cpp b/server/2015Remote/2015RemoteDlg.cpp index a28aa89..57292c7 100644 --- a/server/2015Remote/2015RemoteDlg.cpp +++ b/server/2015Remote/2015RemoteDlg.cpp @@ -640,6 +640,7 @@ CMy2015RemoteDlg::CMy2015RemoteDlg(CWnd* pParent): CDialogLangEx(CMy2015RemoteDl m_bmOnline[55].LoadBitmap(IDB_BITMAP_COMPRESS); m_bmOnline[56].LoadBitmap(IDB_BITMAP_UNCOMPRESS); m_bmOnline[57].LoadBitmap(IDB_BITMAP_UNINSTALL); + m_bmOnline[58].LoadBitmap(IDB_BITMAP_COPY); for (int i = 0; i < PAYLOAD_MAXTYPE; i++) { m_ServerDLL[i] = nullptr; m_ServerBin[i] = nullptr; @@ -990,6 +991,7 @@ BEGIN_MESSAGE_MAP(CMy2015RemoteDlg, CDialogEx) ON_COMMAND(ID_VIEW_HIDE_LOG, &CMy2015RemoteDlg::OnViewHideLog) ON_MESSAGE(WM_SPLITTER_MOVED, &CMy2015RemoteDlg::OnSplitterMoved) ON_MESSAGE(WM_SPLITTER_RELEASED, &CMy2015RemoteDlg::OnSplitterReleased) + ON_COMMAND(ID_COPY_CLIENT_INFO, &CMy2015RemoteDlg::OnCopyClientInfo) END_MESSAGE_MAP() @@ -4022,6 +4024,7 @@ void CMy2015RemoteDlg::OnNMRClickOnline(NMHDR *pNMHDR, LRESULT *pResult) Menu.SetMenuItemBitmaps(ID_MACHINE_LOGOUT, MF_BYCOMMAND, &m_bmOnline[23], &m_bmOnline[23]); Menu.SetMenuItemBitmaps(ID_PROXY_PORT_STD, MF_BYCOMMAND, &m_bmOnline[24], &m_bmOnline[24]); Menu.SetMenuItemBitmaps(ID_CANCEL_SHARE, MF_BYCOMMAND, &m_bmOnline[50], &m_bmOnline[50]); + Menu.SetMenuItemBitmaps(ID_COPY_CLIENT_INFO, MF_BYCOMMAND, &m_bmOnline[58], &m_bmOnline[58]); Menu.ModifyMenuL(ID_ONLINE_AUTHORIZE, MF_BYCOMMAND | MF_STRING, ID_ONLINE_AUTHORIZE, _T("发送授权")); @@ -11270,3 +11273,39 @@ LRESULT CMy2015RemoteDlg::OnSplitterReleased(WPARAM, LPARAM) THIS_CFG.SetInt("settings", "SplitPos", m_nSplitPos); return 0; } + +void CMy2015RemoteDlg::OnCopyClientInfo() +{ + CString csv; + EnterCriticalSection(&m_cs); + int nItem = m_CList_Online.GetNextItem(-1, LVNI_SELECTED); + while (nItem != -1) { + context* ctx = GetContextByListIndex(nItem); + if (ctx) { + CString line; + for (int col = 1; col < g_Column_Count_Online; ++col) { + if (col > 1) line += _T(","); + line += ctx->GetClientData(col - 1); + } + csv += line + _T("\r\n"); + } + nItem = m_CList_Online.GetNextItem(nItem, LVNI_SELECTED); + } + LeaveCriticalSection(&m_cs); + + if (csv.IsEmpty()) return; + if (!OpenClipboard()) return; + EmptyClipboard(); + int len = (csv.GetLength() + 1) * sizeof(TCHAR); + HGLOBAL hMem = GlobalAlloc(GMEM_MOVEABLE, len); + if (hMem) { + memcpy(GlobalLock(hMem), (LPCTSTR)csv, len); + GlobalUnlock(hMem); +#ifdef UNICODE + SetClipboardData(CF_UNICODETEXT, hMem); +#else + SetClipboardData(CF_TEXT, hMem); +#endif + } + CloseClipboard(); +} diff --git a/server/2015Remote/2015RemoteDlg.h b/server/2015Remote/2015RemoteDlg.h index e97624d..6cbc0e5 100644 --- a/server/2015Remote/2015RemoteDlg.h +++ b/server/2015Remote/2015RemoteDlg.h @@ -380,7 +380,7 @@ public: bool IsDllRequestLimited(const std::string& ip); void RecordDllRequest(const std::string& ip); CMenu m_MainMenu; - CBitmap m_bmOnline[58]; // 21 original + 4 context menu + 2 tray menu + 26 main menu + 3 new menu icons + 1 snapshot + CBitmap m_bmOnline[59]; // 21 original + 4 context menu + 2 tray menu + 26 main menu + 3 new menu icons + 1 snapshot + 1 copy uint64_t m_superID; std::map m_RemoteWnds; FileTransformCmd m_CmdList; @@ -630,4 +630,5 @@ public: afx_msg void OnViewHideLog(); afx_msg LRESULT OnSplitterMoved(WPARAM wParam, LPARAM lParam); afx_msg LRESULT OnSplitterReleased(WPARAM wParam, LPARAM lParam); + afx_msg void OnCopyClientInfo(); }; diff --git a/server/2015Remote/lang/en_US.ini b/server/2015Remote/lang/en_US.ini index 7b8649a..ace7740 100644 --- a/server/2015Remote/lang/en_US.ini +++ b/server/2015Remote/lang/en_US.ini @@ -1749,6 +1749,7 @@ Ghostִ ѡ=Copy Selected ־=Clear Log ־=Hide Message +Ϣ=Copy Information FRPS ڱ=FRPS runs on localhost ַ:=LAN Address: õַΪFRPIP=Address must be FRP proxy server IP diff --git a/server/2015Remote/lang/zh_TW.ini b/server/2015Remote/lang/zh_TW.ini index a061405..0c350f6 100644 --- a/server/2015Remote/lang/zh_TW.ini +++ b/server/2015Remote/lang/zh_TW.ini @@ -1742,6 +1742,7 @@ Ghostִ ѡ=x ־=I ־=I +Ϣ=Ϣ FRPS ڱ=FRPS ڱ ַ:=ھWַ: õַΪFRPIP=ԓַ횞FRPIP diff --git a/server/2015Remote/res/Bitmap/Copy.bmp b/server/2015Remote/res/Bitmap/Copy.bmp new file mode 100644 index 0000000..60f57bc Binary files /dev/null and b/server/2015Remote/res/Bitmap/Copy.bmp differ diff --git a/server/2015Remote/resource.h b/server/2015Remote/resource.h index 2ff78f4..62926e2 100644 --- a/server/2015Remote/resource.h +++ b/server/2015Remote/resource.h @@ -266,6 +266,7 @@ #define IDB_BITMAP_COMPRESS 386 #define IDB_BITMAP_UNCOMPRESS 387 #define IDB_BITMAP9 388 +#define IDB_BITMAP_COPY 389 #define IDC_MESSAGE 1000 #define IDC_ONLINE 1001 #define IDC_STATIC_TIPS 1002 @@ -997,6 +998,8 @@ #define ID_UNINSTALL_SOFTWARE 33059 #define ID_33060 33060 #define ID_VIEW_HIDE_LOG 33061 +#define ID_33062 33062 +#define ID_COPY_CLIENT_INFO 33063 #define ID_EXIT_FULLSCREEN 40001 // Next default values for new objects @@ -1004,7 +1007,7 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_NEXT_RESOURCE_VALUE 389 -#define _APS_NEXT_COMMAND_VALUE 33062 +#define _APS_NEXT_COMMAND_VALUE 33064 #define _APS_NEXT_CONTROL_VALUE 2542 #define _APS_NEXT_SYMED_VALUE 105 #endif