📄 filetransferlog.cpp
字号:
// Copyright (C) 2006 Teamviewer GmbH. All Rights Reserved.
// Copyright (C) 2002 Ultr@VNC Team Members. All Rights Reserved.
// Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
//
// This file is part of TeamViewer.
//
// TeamViewer is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
// USA.
//
// If the source code for TeamViewer is not available from the place
// whence you received this file, check http://www.teamviewer.com
// for information on obtaining it.
#include "stdhdrs.h"
#include "..\..\vncviewer\SessionDialog.h"
#include "..\..\vncviewer\vncviewer.h"
#include "vncClient.h"
#include "vncMenu.h"
#include "roGateway.h"
#include "localization.h"
#include "global.h"
#include "FileTransferLog.h"
extern HINSTANCE hAppInstance;
using namespace std;
FileTransferLog::FileTransferLog(vncClient* client)
{
m_hwnd=NULL;
m_client=client;
}
void FileTransferLog::DoDialog()
{
if(m_hwnd==NULL)
{
m_hwnd=CreateDialogParam(hAppInstance, DIALOG_MAKEINTRESOURCE(IDD_FILETRANSFER_LOG),
0, (DLGPROC) FileTransferLog::DialogProcedure, (LONG) this);
}
else
{
ShowWindow(m_hwnd,SW_NORMAL);
}
}
BOOL CALLBACK FileTransferLog::DialogProcedure( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
{
FileTransferLog* _this = (FileTransferLog *) GetWindowLong(hwnd, GWL_USERDATA);
switch (uMsg) {
case WM_INITDIALOG:
{
SetWindowLong(hwnd, GWL_USERDATA, lParam);
FileTransferLog *_this = (FileTransferLog *) lParam;
CentreWindow(hwnd);
SetForegroundWindow(hwnd);
break;
}
case WM_CLOSE:
{
_this->Hide();
return FALSE;
}
case WM_COMMAND:
{
switch (LOWORD(wParam))
{
case IDC_FORBID_FILETRANSFER:
if(_this->m_client->ActiveMode() == rfbMC_FiletransferServer ||
_this->m_client->m_thread->m_tvinfo->getPartnerInfo(tvVersion) < "2.0")
_this->m_client->Kill();
else
{
_this->m_client->SetFileTransferEnabled(-1);
_this->m_client->LogFileOperation(IDS_FILETRANS_FORBIDDEN, "", "");
}
break;
case IDC_CLOSE:
case IDCANCEL:
{
_this->Hide();
break;
}
}
break;
}
case WM_ERASEBKGND:
return EraseBkgnd(hwnd, wParam);
case WM_CTLCOLORBTN:
return CtlColorBtn(wParam);
case WM_CTLCOLORSTATIC:
return CtlColorStatic(hwnd, wParam, lParam);
}
return 0;
}
void FileTransferLog::Hide()
{
m_client->m_userHasAuthorizedAll=false;
ShowWindow(m_hwnd, SW_MINIMIZE);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -