Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
BIN
Server/ManageTool/ChatParser/ChatParser.aps
Normal file
BIN
Server/ManageTool/ChatParser/ChatParser.aps
Normal file
Binary file not shown.
76
Server/ManageTool/ChatParser/ChatParser.cpp
Normal file
76
Server/ManageTool/ChatParser/ChatParser.cpp
Normal file
@@ -0,0 +1,76 @@
|
||||
// ChatParser.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ChatParser.h"
|
||||
#include "ChatParserDlg.h"
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// CChatParserApp
|
||||
|
||||
BEGIN_MESSAGE_MAP(CChatParserApp, CWinApp)
|
||||
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CChatParserApp <20><><EFBFBD><EFBFBD>
|
||||
|
||||
CChatParserApp::CChatParserApp()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
// InitInstance<63><65> <20><><EFBFBD><EFBFBD> <20>߿<EFBFBD><DFBF><EFBFBD> <20>ʱ<EFBFBD>ȭ <20>۾<EFBFBD><DBBE><EFBFBD> <20><>ġ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> CChatParserApp <20><>ü<EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
CChatParserApp theApp;
|
||||
|
||||
|
||||
// CChatParserApp <20>ʱ<EFBFBD>ȭ
|
||||
|
||||
BOOL CChatParserApp::InitInstance()
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20>Ŵ<EFBFBD><C5B4>佺Ʈ<E4BDBA><C6AE> ComCtl32.dll <20><><EFBFBD><EFBFBD> 6 <20>̻<EFBFBD><CCBB><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD>־<EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD>, Windows XP <20><EFBFBD> <20>ݵ<EFBFBD><DDB5><EFBFBD> InitCommonControlsEx()<29><> <20>ʿ<EFBFBD><CABF>մϴ<D5B4>.
|
||||
// InitCommonControlsEx()<29><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> â<><C3A2> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
INITCOMMONCONTROLSEX InitCtrls;
|
||||
InitCtrls.dwSize = sizeof(InitCtrls);
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD>
|
||||
// <20><> <20><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
InitCtrls.dwICC = ICC_WIN95_CLASSES;
|
||||
InitCommonControlsEx(&InitCtrls);
|
||||
|
||||
CWinApp::InitInstance();
|
||||
|
||||
// ǥ<><C7A5> <20>ʱ<EFBFBD>ȭ
|
||||
// <20>̵<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ũ<>⸦ <20><><EFBFBD>̷<EFBFBD><CCB7><EFBFBD>
|
||||
// <20>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD> <20>ʿ<EFBFBD> <20><><EFBFBD><EFBFBD> Ư<><C6AF> <20>ʱ<EFBFBD>ȭ
|
||||
// <20><>ƾ<EFBFBD><C6BE> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
// <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> Ű<><C5B0> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
// TODO: <20><> <20><><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> ȸ<><C8B8> <20>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD><CCB8><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>.
|
||||
SetRegistryKey(_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1>"));
|
||||
|
||||
CChatParserDlg dlg;
|
||||
m_pMainWnd = &dlg;
|
||||
INT_PTR nResponse = dlg.DoModal();
|
||||
if (nResponse == IDOK)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> [Ȯ<><C8AE>]<5D><> Ŭ<><C5AC><EFBFBD>Ͽ<EFBFBD> <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> ó<><C3B3><EFBFBD><EFBFBD>
|
||||
// <20>ڵ带 <20><>ġ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
else if (nResponse == IDCANCEL)
|
||||
{
|
||||
// TODO: <20><><EFBFBD> [<5B><><EFBFBD><EFBFBD>]<5D><> Ŭ<><C5AC><EFBFBD>Ͽ<EFBFBD> <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> ó<><C3B3><EFBFBD><EFBFBD>
|
||||
// <20>ڵ带 <20><>ġ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><EFBFBD><DEBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʰ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>ֵ<EFBFBD><D6B5><EFBFBD> FALSE<53><45>
|
||||
// <20><>ȯ<EFBFBD>մϴ<D5B4>.
|
||||
return FALSE;
|
||||
}
|
||||
31
Server/ManageTool/ChatParser/ChatParser.h
Normal file
31
Server/ManageTool/ChatParser/ChatParser.h
Normal file
@@ -0,0 +1,31 @@
|
||||
// ChatParser.h : PROJECT_NAME <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef __AFXWIN_H__
|
||||
#error "PCH<43><48> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD> 'stdafx.h'<27><> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>."
|
||||
#endif
|
||||
|
||||
#include "resource.h" // <20><> <20><>ȣ<EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
|
||||
// CChatParserApp:
|
||||
// <20><> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD> ChatParser.cpp<70><70> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
//
|
||||
|
||||
class CChatParserApp : public CWinApp
|
||||
{
|
||||
public:
|
||||
CChatParserApp();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
extern CChatParserApp theApp;
|
||||
204
Server/ManageTool/ChatParser/ChatParser.rc
Normal file
204
Server/ManageTool/ChatParser/ChatParser.rc
Normal file
@@ -0,0 +1,204 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "afxres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// <20>ѱ<EFBFBD><D1B1><EFBFBD> resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
|
||||
#ifdef _WIN32
|
||||
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
|
||||
#pragma code_page(949)
|
||||
#endif //_WIN32
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""afxres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_OLE_RESOURCES\r\n"
|
||||
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
|
||||
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
|
||||
"\r\n"
|
||||
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)\r\n"
|
||||
"LANGUAGE 18, 1\r\n"
|
||||
"#pragma code_page(949)\r\n"
|
||||
"#include ""res\\ChatParser.rc2"" // Microsoft Visual C++ <20>̿<EFBFBD><CCBF><EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD>Դϴ<D4B4>.\r\n"
|
||||
"#include ""afxres.rc"" // ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.\r\n"
|
||||
"#endif\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
//
|
||||
|
||||
// Icon with lowest ID value placed first to ensure application icon
|
||||
// remains consistent on all systems.
|
||||
IDR_MAINFRAME ICON "res\\ChatParser.ico"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Dialog
|
||||
//
|
||||
|
||||
IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "ChatParser <20><><EFBFBD><EFBFBD>"
|
||||
FONT 9, "MS <20><> <20><>ȭ <20><><EFBFBD><EFBFBD>", 0, 0, 0x1
|
||||
BEGIN
|
||||
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
|
||||
LTEXT "ChatParser <20><><EFBFBD><EFBFBD> 1.0",IDC_STATIC,40,10,119,8,SS_NOPREFIX
|
||||
LTEXT "Copyright (C) 2008",IDC_STATIC,40,25,119,8
|
||||
DEFPUSHBUTTON "Ȯ<><C8AE>",IDOK,178,7,50,16,WS_GROUP
|
||||
END
|
||||
|
||||
IDD_CHATPARSER_DIALOG DIALOGEX 0, 0, 499, 399
|
||||
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_APPWINDOW
|
||||
CAPTION "ChatParser"
|
||||
FONT 9, "<22><><EFBFBD><EFBFBD>", 400, 0, 0x81
|
||||
BEGIN
|
||||
PUSHBUTTON "Open",IDC_OPENFILE,433,7,59,14
|
||||
CONTROL "Oldversion",IDC_OLDVERSION,"Button",BS_AUTOCHECKBOX | NOT WS_VISIBLE | WS_TABSTOP,443,25,49,10
|
||||
LISTBOX IDC_CHATLIST,7,40,485,352,LBS_OWNERDRAWFIXED | LBS_HASSTRINGS | LBS_NOINTEGRALHEIGHT | LBS_EXTENDEDSEL | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP
|
||||
EDITTEXT IDC_OPEN_FILENAME,7,7,423,14,ES_AUTOHSCROLL | ES_READONLY
|
||||
COMBOBOX IDC_SERVERID,7,24,52,102,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
COMBOBOX IDC_ZONEID,61,24,48,124,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "find",IDC_FINDLIST,359,23,59,14
|
||||
COMBOBOX IDC_CHATTYPE,111,24,103,124,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
EDITTEXT IDC_FINDNAME,216,24,86,13,ES_AUTOHSCROLL
|
||||
CONTROL "FindName",IDC_FINDNAMECHK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,304,26,55,10
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "041203b5"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "TODO: <ȸ<><C8B8> <20≯<EFBFBD>>"
|
||||
VALUE "FileDescription", "TODO: <<3C><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>>"
|
||||
VALUE "FileVersion", "1.0.0.1"
|
||||
VALUE "InternalName", "ChatParser.exe"
|
||||
VALUE "LegalCopyright", "TODO: (c) <ȸ<><C8B8> <20≯<EFBFBD>>. All rights reserved."
|
||||
VALUE "OriginalFilename", "ChatParser.exe"
|
||||
VALUE "ProductName", "TODO: <<3C><>ǰ <20≯<EFBFBD>>"
|
||||
VALUE "ProductVersion", "1.0.0.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x412, 949
|
||||
END
|
||||
END
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DESIGNINFO
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
GUIDELINES DESIGNINFO
|
||||
BEGIN
|
||||
IDD_ABOUTBOX, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 228
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 48
|
||||
END
|
||||
|
||||
IDD_CHATPARSER_DIALOG, DIALOG
|
||||
BEGIN
|
||||
LEFTMARGIN, 7
|
||||
RIGHTMARGIN, 492
|
||||
TOPMARGIN, 7
|
||||
BOTTOMMARGIN, 392
|
||||
END
|
||||
END
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// String Table
|
||||
//
|
||||
|
||||
STRINGTABLE
|
||||
BEGIN
|
||||
IDS_ABOUTBOX "ChatParser <20><><EFBFBD><EFBFBD>(&A)..."
|
||||
END
|
||||
|
||||
#endif // <20>ѱ<EFBFBD><D1B1><EFBFBD> resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
#define _AFX_NO_SPLITTER_RESOURCES
|
||||
#define _AFX_NO_OLE_RESOURCES
|
||||
#define _AFX_NO_TRACKER_RESOURCES
|
||||
#define _AFX_NO_PROPERTY_RESOURCES
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_KOR)
|
||||
LANGUAGE 18, 1
|
||||
#pragma code_page(949)
|
||||
#include "res\ChatParser.rc2" // Microsoft Visual C++ <20>̿<EFBFBD><CCBF><EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD>Դϴ<D4B4>.
|
||||
#include "afxres.rc" // ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
#endif
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
20
Server/ManageTool/ChatParser/ChatParser.sln
Normal file
20
Server/ManageTool/ChatParser/ChatParser.sln
Normal file
@@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 10.00
|
||||
# Visual Studio 2008
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChatParser", "ChatParser.vcproj", "{380483B5-D873-4836-9D31-99C0791A6F4F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{380483B5-D873-4836-9D31-99C0791A6F4F}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{380483B5-D873-4836-9D31-99C0791A6F4F}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{380483B5-D873-4836-9D31-99C0791A6F4F}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{380483B5-D873-4836-9D31-99C0791A6F4F}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
Server/ManageTool/ChatParser/ChatParser.suo
Normal file
BIN
Server/ManageTool/ChatParser/ChatParser.suo
Normal file
Binary file not shown.
311
Server/ManageTool/ChatParser/ChatParser.vcproj
Normal file
311
Server/ManageTool/ChatParser/ChatParser.vcproj
Normal file
@@ -0,0 +1,311 @@
|
||||
<?xml version="1.0" encoding="ks_c_5601-1987"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9.00"
|
||||
Name="ChatParser"
|
||||
ProjectGUID="{380483B5-D873-4836-9D31-99C0791A6F4F}"
|
||||
RootNamespace="ChatParser"
|
||||
Keyword="MFCProj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
MkTypLibCompatible="false"
|
||||
ValidateParameters="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_DEBUG"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="1"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG"
|
||||
Culture="1042"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="2"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="1"
|
||||
CharacterSet="2"
|
||||
WholeProgramOptimization="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
MkTypLibCompatible="false"
|
||||
ValidateParameters="false"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG"
|
||||
MinimalRebuild="false"
|
||||
RuntimeLibrary="0"
|
||||
UsePrecompiledHeader="2"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG"
|
||||
Culture="1042"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="2"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="<22>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\ChatParser.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ChatParserDlg.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ChatParserSetup.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Clipboard.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\NFTokenizer.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RegFunctions.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.cpp"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
UsePrecompiledHeader="1"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XListBox.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\ChatParser.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ChatParserDlg.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ChatParserSetup.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Clipboard.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\NFTokenizer.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RegFunctions.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\Resource.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\stdafx.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XListBox.h"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="<22><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD>"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\res\ChatParser.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ChatParser.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\res\ChatParser.rc2"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\ReadMe.txt"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
<Global
|
||||
Name="RESOURCE_FILE"
|
||||
Value="ChatParser.rc"
|
||||
/>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
564
Server/ManageTool/ChatParser/ChatParserDlg.cpp
Normal file
564
Server/ManageTool/ChatParser/ChatParserDlg.cpp
Normal file
@@ -0,0 +1,564 @@
|
||||
// ChatParserDlg.cpp : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ChatParser.h"
|
||||
#include "ChatParserDlg.h"
|
||||
#include "NFTokenizer.h"
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
#define new DEBUG_NEW
|
||||
#endif
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> CAboutDlg <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
class CAboutDlg : public CDialog
|
||||
{
|
||||
public:
|
||||
CAboutDlg();
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
enum { IDD = IDD_ABOUTBOX };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
protected:
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
|
||||
{
|
||||
}
|
||||
|
||||
void CAboutDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CChatParserDlg <20><>ȭ <20><><EFBFBD><EFBFBD>
|
||||
|
||||
|
||||
|
||||
|
||||
CChatParserDlg::CChatParserDlg(CWnd* pParent /*=NULL*/)
|
||||
: CDialog(CChatParserDlg::IDD, pParent)
|
||||
{
|
||||
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
|
||||
}
|
||||
|
||||
void CChatParserDlg::DoDataExchange(CDataExchange* pDX)
|
||||
{
|
||||
CDialog::DoDataExchange(pDX);
|
||||
DDX_Control(pDX, IDC_CHATLIST, m_ChatList);
|
||||
DDX_Control(pDX, IDC_OLDVERSION, m_OldVersion);
|
||||
DDX_Control(pDX, IDC_SERVERID, m_ServerGroup);
|
||||
DDX_Control(pDX, IDC_ZONEID, m_ServerZone);
|
||||
DDX_Control(pDX, IDC_CHATTYPE, m_ChatType);
|
||||
DDX_Control(pDX, IDC_FINDNAMECHK, m_FindNameChk);
|
||||
DDX_Control(pDX, IDC_FINDNAME, m_FindName);
|
||||
}
|
||||
|
||||
BEGIN_MESSAGE_MAP(CChatParserDlg, CDialog)
|
||||
ON_WM_SYSCOMMAND()
|
||||
ON_WM_PAINT()
|
||||
ON_WM_QUERYDRAGICON()
|
||||
//}}AFX_MSG_MAP
|
||||
ON_BN_CLICKED(IDC_OPENFILE, &CChatParserDlg::OnBnClickedOpenfile)
|
||||
ON_BN_CLICKED(IDC_FINDLIST, &CChatParserDlg::OnBnClickedFindlist)
|
||||
ON_BN_CLICKED(IDC_FINDNAMECHK, &CChatParserDlg::OnBnClickedFindnamechk)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
|
||||
// CChatParserDlg <20><EFBFBD><DEBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>
|
||||
|
||||
BOOL CChatParserDlg::OnInitDialog()
|
||||
{
|
||||
CDialog::OnInitDialog();
|
||||
|
||||
// <20>ý<EFBFBD><C3BD><EFBFBD> <20><EFBFBD><DEB4><EFBFBD> "<22><><EFBFBD><EFBFBD>..." <20><EFBFBD> <20><EFBFBD><D7B8><EFBFBD> <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
// IDM_ABOUTBOX<4F><58> <20>ý<EFBFBD><C3BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>־<EFBFBD><D6BE><EFBFBD> <20>մϴ<D5B4>.
|
||||
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
|
||||
ASSERT(IDM_ABOUTBOX < 0xF000);
|
||||
|
||||
CMenu* pSysMenu = GetSystemMenu(FALSE);
|
||||
if (pSysMenu != NULL)
|
||||
{
|
||||
CString strAboutMenu;
|
||||
strAboutMenu.LoadString(IDS_ABOUTBOX);
|
||||
if (!strAboutMenu.IsEmpty())
|
||||
{
|
||||
pSysMenu->AppendMenu(MF_SEPARATOR);
|
||||
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
|
||||
}
|
||||
}
|
||||
|
||||
// <20><> <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><> â<><C3A2> <20><>ȭ <20><><EFBFBD>ڰ<EFBFBD> <20>ƴ<EFBFBD> <20><><EFBFBD>쿡<EFBFBD><ECBFA1>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>ũ<EFBFBD><C5A9> <20><> <20>۾<EFBFBD><DBBE><EFBFBD> <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
SetIcon(m_hIcon, TRUE); // ū <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
SetIcon(m_hIcon, FALSE); // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
// TODO: <20><><EFBFBD> <20>߰<EFBFBD> <20>ʱ<EFBFBD>ȭ <20>۾<EFBFBD><DBBE><EFBFBD> <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
SetDlgItemText(IDC_OPENFILE, GetMyINIString("LOCAL_STRING", "STRING_01"));
|
||||
SetDlgItemText(IDC_OLDVERSION, GetMyINIString("LOCAL_STRING", "STRING_02"));
|
||||
|
||||
SetDlgItemText(IDC_FINDLIST, GetMyINIString("LOCAL_STRING", "STRING_04"));
|
||||
|
||||
SetDlgItemText(IDC_FINDNAMECHK, GetMyINIString("LOCAL_STRING", "STRING_05"));
|
||||
m_FindName.EnableWindow(FALSE);
|
||||
|
||||
int iCount = atoi(GetMyINIString("SERVER_GROUP", "SERVER_GROUP_CNT"));
|
||||
|
||||
char strID[32];
|
||||
char strName[32];
|
||||
|
||||
m_ServerGroup.AddString("All");
|
||||
for(int i = 0; i < iCount; ++i)
|
||||
{
|
||||
wsprintf(strID, "SERVER_GROUP%d", i+1);
|
||||
m_ServerGroup.AddString(GetMyINIString("SERVER_GROUP", strID));
|
||||
}
|
||||
m_ServerGroup.SetCurSel(0);
|
||||
|
||||
|
||||
iCount = atoi(GetMyINIString("SERVER_ZONE", "SERVER_ZONE_CNT"));
|
||||
|
||||
m_ServerZone.AddString("All");
|
||||
for(int i = 0; i < iCount; ++i)
|
||||
{
|
||||
wsprintf(strID, "SERVER_ZONE%d", i+1);
|
||||
wsprintf(strName, "ZONE%s", GetMyINIString("SERVER_ZONE", strID));
|
||||
|
||||
m_ServerZone.AddString(strName);
|
||||
}
|
||||
m_ServerZone.SetCurSel(0);
|
||||
|
||||
|
||||
iCount = atoi(GetMyINIString("CHAT_TYPE", "CHAT_TYPE_CNT"));
|
||||
|
||||
m_ChatType.AddString("All");
|
||||
for(int i = 0; i < iCount; ++i)
|
||||
{
|
||||
wsprintf(strID, "CHAT_TYPE%d", i+1);
|
||||
m_ChatType.AddString(GetMyINIString("CHAT_TYPE", strID));
|
||||
}
|
||||
m_ChatType.SetCurSel(0);
|
||||
|
||||
|
||||
memset(&m_OpenFile, 0, sizeof(OPENFILENAME));
|
||||
|
||||
m_OpenFile.lStructSize = sizeof(OPENFILENAME);
|
||||
m_OpenFile.hwndOwner = m_hWnd;
|
||||
m_OpenFile.lpstrFilter = "Chat Log files\0*.log\0All files\0*.*";
|
||||
m_OpenFile.nMaxFile = MAX_PATH * MAX_PATH;
|
||||
m_OpenFile.Flags = OFN_FILEMUSTEXIST | OFN_LONGNAMES | OFN_EXPLORER;
|
||||
m_OpenFile.lpstrFile = m_szFileName;
|
||||
|
||||
return TRUE; // <20><>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ѿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TRUE<55><45> <20><>ȯ<EFBFBD>մϴ<D5B4>.
|
||||
}
|
||||
|
||||
void CChatParserDlg::OnSysCommand(UINT nID, LPARAM lParam)
|
||||
{
|
||||
if ((nID & 0xFFF0) == IDM_ABOUTBOX)
|
||||
{
|
||||
CAboutDlg dlgAbout;
|
||||
dlgAbout.DoModal();
|
||||
}
|
||||
else
|
||||
{
|
||||
CDialog::OnSysCommand(nID, lParam);
|
||||
}
|
||||
}
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD>ڿ<EFBFBD> <20>ּ<EFBFBD>ȭ <20><><EFBFBD>߸<EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><D7B8><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20>Ʒ<EFBFBD> <20>ڵ尡 <20>ʿ<EFBFBD><CABF>մϴ<D5B4>. <20><><EFBFBD><EFBFBD>/<2F><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> MFC <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD>쿡<EFBFBD><ECBFA1>
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ӿ<EFBFBD>ũ<EFBFBD><C5A9><EFBFBD><EFBFBD> <20><> <20>۾<EFBFBD><DBBE><EFBFBD> <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
void CChatParserDlg::OnPaint()
|
||||
{
|
||||
if (IsIconic())
|
||||
{
|
||||
CPaintDC dc(this); // <20><EFBFBD><D7B8>⸦ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̽<EFBFBD> <20><><EFBFBD>ؽ<EFBFBD>Ʈ
|
||||
|
||||
SendMessage(WM_ICONERASEBKGND, reinterpret_cast<WPARAM>(dc.GetSafeHdc()), 0);
|
||||
|
||||
// Ŭ<><C5AC><EFBFBD>̾<EFBFBD>Ʈ <20>簢<EFBFBD><E7B0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EEB5A5> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
int cxIcon = GetSystemMetrics(SM_CXICON);
|
||||
int cyIcon = GetSystemMetrics(SM_CYICON);
|
||||
CRect rect;
|
||||
GetClientRect(&rect);
|
||||
int x = (rect.Width() - cxIcon + 1) / 2;
|
||||
int y = (rect.Height() - cyIcon + 1) / 2;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><D7B8>ϴ<EFBFBD>.
|
||||
dc.DrawIcon(x, y, m_hIcon);
|
||||
}
|
||||
else
|
||||
{
|
||||
CDialog::OnPaint();
|
||||
}
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>ڰ<EFBFBD> <20>ּ<EFBFBD>ȭ<EFBFBD><C8AD> â<><C3A2> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ȿ<EFBFBD> Ŀ<><C4BF><EFBFBD><EFBFBD> ǥ<>õǵ<C3B5><C7B5><EFBFBD> <20>ý<EFBFBD><C3BD>ۿ<EFBFBD><DBBF><EFBFBD>
|
||||
// <20><> <20>Լ<EFBFBD><D4BC><EFBFBD> ȣ<><C8A3><EFBFBD>մϴ<D5B4>.
|
||||
HCURSOR CChatParserDlg::OnQueryDragIcon()
|
||||
{
|
||||
return static_cast<HCURSOR>(m_hIcon);
|
||||
}
|
||||
|
||||
// <20>߰<EFBFBD>
|
||||
void CChatParserDlg::AddLineToChatList(unsigned char cChatType, char* szMsg)
|
||||
{
|
||||
CXListBox::Color cBackColor = CXListBox::BackColor;
|
||||
CXListBox::Color cMessageColor = CXListBox::ChatNormal;
|
||||
|
||||
switch(cChatType)
|
||||
{
|
||||
case NORMAL:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::ChatNormal;
|
||||
break;
|
||||
case PARTY:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::ChatParty;
|
||||
break;
|
||||
case FRIEND:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::ChatFriend;
|
||||
break;
|
||||
case GUILD:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::ChatGuild;
|
||||
break;
|
||||
case CLIENT_LOG:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::ChatNormal;
|
||||
break;
|
||||
case STALL:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::ChatStall;
|
||||
break;
|
||||
case SHOUT:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::ChatShout;
|
||||
break;
|
||||
case ADMIN_NORMAL_CHAT:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::ChatAdminNormal;
|
||||
break;
|
||||
case ADMIN_SHOUT:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::ChatAdminShout;
|
||||
break;
|
||||
case WHISPER:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::ChatWhisper;
|
||||
break;
|
||||
case TRADE:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::ChatTrade;
|
||||
break;
|
||||
case NOTICE:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::ChatNotice;
|
||||
break;
|
||||
case DICE:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::ChatAdminShout;
|
||||
break;
|
||||
case GMREPORT:
|
||||
cBackColor = CXListBox::BackColor; cMessageColor = CXListBox::GMReport;
|
||||
break;
|
||||
}
|
||||
|
||||
m_ChatList.AddLine(cMessageColor, cBackColor, szMsg, FALSE);
|
||||
}
|
||||
|
||||
void CChatParserDlg::Cleanup()
|
||||
{
|
||||
m_ChatList.ResetContent();
|
||||
}
|
||||
|
||||
void CChatParserDlg::OnBnClickedOpenfile()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
ZeroMemory(m_szFileName, MAX_PATH);
|
||||
|
||||
if(GetOpenFileName(&m_OpenFile))
|
||||
{
|
||||
// <20>ļ<EFBFBD><C4BC>ϱ<EFBFBD>
|
||||
LoadFile();
|
||||
|
||||
SetDlgItemText(IDC_OPEN_FILENAME, m_szFileName);
|
||||
}
|
||||
}
|
||||
|
||||
void CChatParserDlg::LoadFile()
|
||||
{
|
||||
FILE* fp = fopen(m_szFileName, "rt");
|
||||
if(fp == NULL)
|
||||
return;
|
||||
|
||||
Cleanup();
|
||||
m_ChatData.clear();
|
||||
|
||||
int iCount = 0;
|
||||
|
||||
BOOL bOldVersion = FALSE;
|
||||
|
||||
if(m_OldVersion.GetCheck())
|
||||
bOldVersion = TRUE;
|
||||
|
||||
char strData[2048];
|
||||
int Len = 0;
|
||||
|
||||
CHATLIST st;
|
||||
|
||||
while(!feof(fp))
|
||||
{
|
||||
fgets(strData, 2048, fp);
|
||||
|
||||
if(strncmp(strData, "[Ty-NOR]", 8) == 0)
|
||||
break;
|
||||
else
|
||||
{
|
||||
std::string str = strData;
|
||||
std::string temp, temp2;
|
||||
Nave::NFTokenizerA token(str, "[");
|
||||
int iToken = token.CountTokens();
|
||||
DWORD dwServerID = 0;
|
||||
int Temp = 0;
|
||||
|
||||
for(int i = 0; i < iToken; ++i)
|
||||
{
|
||||
temp = token.NextToken();
|
||||
|
||||
if(i == 0) // <20>ð<EFBFBD>
|
||||
{
|
||||
sscanf(temp.c_str(), "%04d-%02d-%02d %02d:%02d:%02d",
|
||||
&st.sysTime.wYear, &st.sysTime.wMonth, &st.sysTime.wDay,
|
||||
&st.sysTime.wHour, &st.sysTime.wMinute, &st.sysTime.wSecond);
|
||||
}
|
||||
else if(i == 1)
|
||||
{
|
||||
sscanf(temp.c_str(), "ServerID:0x%08x", &dwServerID);
|
||||
}
|
||||
else if(i == 2)
|
||||
{
|
||||
temp2 = &temp[6];
|
||||
temp2.erase(temp2.end()-1);
|
||||
int n = temp2.find_first_of(" ");
|
||||
strcpy(st.strServerName, temp2.c_str());
|
||||
st.strServerName[n] = 0;
|
||||
}
|
||||
else if(i == 3)
|
||||
{
|
||||
sscanf(temp.c_str(), "Zone:%2d", &st.iZone);
|
||||
}
|
||||
else if(i == 4)
|
||||
{
|
||||
sscanf(temp.c_str(), "CH:%2d", &st.iChannel);
|
||||
}
|
||||
else if(i == 5)
|
||||
{
|
||||
sscanf(temp.c_str(), "X:%4d", &Temp);
|
||||
}
|
||||
else if(i == 6)
|
||||
{
|
||||
sscanf(temp.c_str(), "Z:%4d", &Temp);
|
||||
}
|
||||
else if(i == 7)
|
||||
{
|
||||
sscanf(temp.c_str(), "UID:%10d", &st.dwUID);
|
||||
}
|
||||
else if(i == 8)
|
||||
{
|
||||
sscanf(temp.c_str(), "CID:%10d", &st.dwCID);
|
||||
}
|
||||
else if(i == 9)
|
||||
{
|
||||
sscanf(temp.c_str(), "Type:%2d", &st.iChatType);
|
||||
}
|
||||
else if(i == 10)
|
||||
{
|
||||
temp2 = &temp[2];
|
||||
temp2.erase(temp2.end()-1);
|
||||
int n = temp2.find_last_not_of(" ");
|
||||
strcpy(st.strSenderName, temp2.c_str());
|
||||
st.strSenderName[n+1] = 0;
|
||||
}
|
||||
else if(i == 11)
|
||||
{
|
||||
temp2 = &temp[2];
|
||||
temp2.erase(temp2.end()-1);
|
||||
int n = temp2.find_last_not_of(" ");
|
||||
strcpy(st.strTargetName, temp2.c_str());
|
||||
st.strTargetName[n+1] = 0;
|
||||
}
|
||||
else if(i == 12)
|
||||
{
|
||||
strncpy(st.strMessage, temp.c_str(), temp.size()-2);
|
||||
st.strMessage[temp.size()-2] = 0;
|
||||
}
|
||||
}
|
||||
m_ChatData[iCount++] = st;
|
||||
|
||||
}
|
||||
/*
|
||||
if(strncmp(strData, "[Ty-NOR]", 8) == 0)
|
||||
break;
|
||||
else
|
||||
{
|
||||
// <20>ð<EFBFBD> <20>б<EFBFBD>
|
||||
sscanf(strData, "[%04d-%02d-%02d %02d:%02d:%02d]",
|
||||
&st.sysTime.wYear, &st.sysTime.wMonth, &st.sysTime.wDay,
|
||||
&st.sysTime.wHour, &st.sysTime.wMinute, &st.sysTime.wSecond);
|
||||
|
||||
// <20><EFBFBD>
|
||||
sscanf(&strData[21], "[Group:%s]", st.strServerName);
|
||||
|
||||
// <20><><EFBFBD>̵<EFBFBD><CCB5><EFBFBD>
|
||||
sscanf(&strData[44], "[Zone:%2d][CH:%2d][UID:%10d][CID:%10d][Type:%2d]", &st.iZone, &st.iChannel, &st.dwUID, &st.dwCID, &st.iChatType);
|
||||
|
||||
if(strncmp(&strData[101], "[S:", 3) == 0)
|
||||
{
|
||||
// Sender
|
||||
sscanf(&strData[101], "[S:%s]", st.strSenderName);
|
||||
|
||||
// Target
|
||||
sscanfe(&strData[120], "[T:%s]", st.strTargetName);
|
||||
if(st.strTargetName[0] == ']')
|
||||
ZeroMemory(st.strTargetName, 32);
|
||||
|
||||
// Msg
|
||||
strcpy(st.strMessage, &strData[140]);
|
||||
Len = (int)strlen(st.strMessage);
|
||||
if(st.strMessage[Len-2] == ']')
|
||||
st.strMessage[Len-2] = 0;
|
||||
else
|
||||
st.strMessage[Len-1] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Msg
|
||||
strcpy(st.strMessage, &strData[102]);
|
||||
Len = (int)strlen(st.strMessage);
|
||||
if(st.strMessage[Len-2] == ']')
|
||||
st.strMessage[Len-2] = 0;
|
||||
else
|
||||
st.strMessage[Len-1] = 0;
|
||||
}
|
||||
m_ChatData[iCount++] = st;
|
||||
|
||||
}
|
||||
*/
|
||||
}
|
||||
m_ChatList.AddString(GetMyINIString("LOCAL_STRING", "STRING_03"));
|
||||
|
||||
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void CChatParserDlg::OnBnClickedFindlist()
|
||||
{
|
||||
// TODO: <20><><EFBFBD> <20><>Ʈ<EFBFBD><C6AE> <20>˸<EFBFBD> ó<><C3B3><EFBFBD><EFBFBD> <20>ڵ带 <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
Cleanup();
|
||||
|
||||
char strData[2048];
|
||||
int Len = 0;
|
||||
|
||||
char strTemp[32];
|
||||
char strServerGroup[32];
|
||||
|
||||
int iGroupID = m_ServerGroup.GetCurSel();
|
||||
if(iGroupID != 0)
|
||||
{
|
||||
m_ServerGroup.GetWindowText(strServerGroup, 32);
|
||||
}
|
||||
|
||||
int iZoneID = m_ServerZone.GetCurSel();
|
||||
if(iZoneID != 0)
|
||||
{
|
||||
iZoneID = 0;
|
||||
m_ServerZone.GetWindowText(strTemp, 32);
|
||||
sscanf(strTemp, "ZONE%d", &iZoneID);
|
||||
}
|
||||
|
||||
int iChatType = m_ChatType.GetCurSel();
|
||||
if(iChatType != 0)
|
||||
{
|
||||
m_ChatType.GetWindowText(strTemp, 32);
|
||||
iChatType = GetChatType(strTemp);
|
||||
}
|
||||
|
||||
char strName[64];
|
||||
BOOL bFindName = FALSE;
|
||||
if(m_FindNameChk.GetCheck())
|
||||
{
|
||||
bFindName = TRUE;
|
||||
|
||||
m_FindName.GetWindowText(strName, 64);
|
||||
}
|
||||
else
|
||||
{
|
||||
ZeroMemory(strName, 64);
|
||||
}
|
||||
|
||||
// <20><><EFBFBD><EFBFBD>
|
||||
std::map<int, CHATLIST>::iterator obj = m_ChatData.begin();
|
||||
std::map<int, CHATLIST>::iterator end = m_ChatData.end();
|
||||
|
||||
BOOL bAddItem;
|
||||
|
||||
while(obj != end)
|
||||
{
|
||||
CHATLIST& st = obj->second;
|
||||
bAddItem = TRUE;
|
||||
|
||||
if(iGroupID != 0 && strcmp(strServerGroup, st.strServerName) != 0)
|
||||
{
|
||||
bAddItem = FALSE;
|
||||
}
|
||||
|
||||
if(iZoneID != 0 && st.iZone != iZoneID)
|
||||
{
|
||||
bAddItem = FALSE;
|
||||
}
|
||||
|
||||
if(iChatType != 0 && st.iChatType != iChatType)
|
||||
{
|
||||
bAddItem = FALSE;
|
||||
}
|
||||
|
||||
if(bFindName)
|
||||
{
|
||||
if(strcmp(strName, st.strSenderName) != 0 && strcmp(strName, st.strTargetName) != 0)
|
||||
bAddItem = FALSE;
|
||||
}
|
||||
|
||||
if(bAddItem)
|
||||
{
|
||||
if(st.iChatType-1 == WHISPER)
|
||||
{
|
||||
if(strlen(st.strTargetName) == 0)
|
||||
wsprintf(strData, "%-15s[Z:%02d/C:%d][%02d:%02d] %s", st.strServerName, st.iZone, st.iChannel, st.sysTime.wHour, st.sysTime.wMinute, st.strMessage);
|
||||
else
|
||||
wsprintf(strData, "%-15s[Z:%02d/C:%d][%02d:%02d] %s (To: %s)", st.strServerName, st.iZone, st.iChannel, st.sysTime.wHour, st.sysTime.wMinute, st.strMessage, st.strTargetName);
|
||||
}
|
||||
else
|
||||
{
|
||||
wsprintf(strData, "%-15s[Z:%02d/C:%d][%02d:%02d] %s", st.strServerName, st.iZone, st.iChannel, st.sysTime.wHour, st.sysTime.wMinute, st.strMessage);
|
||||
}
|
||||
|
||||
if(iChatType == 0)
|
||||
AddLineToChatList(st.iChatType-1, strData);
|
||||
else
|
||||
AddLineToChatList(iChatType-1, strData);
|
||||
}
|
||||
|
||||
++obj;
|
||||
}
|
||||
|
||||
UpdateData(false);
|
||||
|
||||
}
|
||||
|
||||
void CChatParserDlg::OnBnClickedFindnamechk()
|
||||
{
|
||||
m_FindName.EnableWindow(m_FindNameChk.GetCheck());
|
||||
}
|
||||
92
Server/ManageTool/ChatParser/ChatParserDlg.h
Normal file
92
Server/ManageTool/ChatParser/ChatParserDlg.h
Normal file
@@ -0,0 +1,92 @@
|
||||
// ChatParserDlg.h : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//
|
||||
|
||||
#pragma once
|
||||
#include "afxwin.h"
|
||||
#include "XListBox.h"
|
||||
#include <map>
|
||||
|
||||
typedef struct CHATLIST
|
||||
{
|
||||
SYSTEMTIME sysTime;
|
||||
|
||||
char strServerName[32];
|
||||
|
||||
int iZone;
|
||||
int iChannel;
|
||||
unsigned long dwUID;
|
||||
unsigned long dwCID;
|
||||
int iChatType;
|
||||
|
||||
char strSenderName[32];
|
||||
char strTargetName[32];
|
||||
char strMessage[512];
|
||||
|
||||
CHATLIST()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
ZeroMemory(&sysTime, sizeof(sysTime));
|
||||
iZone=0;
|
||||
iChannel=0;
|
||||
dwUID=0;
|
||||
dwCID=0;
|
||||
iChatType=0;
|
||||
ZeroMemory(strServerName, 32);
|
||||
ZeroMemory(strSenderName, 32);
|
||||
ZeroMemory(strTargetName, 32);
|
||||
ZeroMemory(strMessage, 512);
|
||||
}
|
||||
}CHATLIST;
|
||||
|
||||
// CChatParserDlg <20><>ȭ <20><><EFBFBD><EFBFBD>
|
||||
class CChatParserDlg : public CDialog
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
public:
|
||||
CChatParserDlg(CWnd* pParent = NULL); // ǥ<><C7A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
// <20><>ȭ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
enum { IDD = IDD_CHATPARSER_DIALOG };
|
||||
|
||||
protected:
|
||||
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
void AddLineToChatList(unsigned char cChatType, char* szMsg);
|
||||
void Cleanup();
|
||||
void LoadFile();
|
||||
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
protected:
|
||||
HICON m_hIcon;
|
||||
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DEBD><EFBFBD> <20><> <20>Լ<EFBFBD>
|
||||
virtual BOOL OnInitDialog();
|
||||
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
|
||||
afx_msg void OnPaint();
|
||||
afx_msg HCURSOR OnQueryDragIcon();
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
public:
|
||||
OPENFILENAME m_OpenFile;
|
||||
char m_szFileName[MAX_PATH * MAX_PATH];
|
||||
|
||||
std::map<int, CHATLIST> m_ChatData;
|
||||
|
||||
CXListBox m_ChatList;
|
||||
CButton m_OldVersion;
|
||||
CComboBox m_ServerGroup;
|
||||
CComboBox m_ServerZone;
|
||||
CComboBox m_ChatType;
|
||||
CButton m_FindNameChk;
|
||||
CEdit m_FindName;
|
||||
|
||||
public:
|
||||
afx_msg void OnBnClickedOpenfile();
|
||||
afx_msg void OnBnClickedFindlist();
|
||||
afx_msg void OnBnClickedFindnamechk();
|
||||
};
|
||||
15
Server/ManageTool/ChatParser/ChatParserSetup.cpp
Normal file
15
Server/ManageTool/ChatParser/ChatParserSetup.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "stdafx.h"
|
||||
#include "ChatParserSetup.h"
|
||||
|
||||
|
||||
CChatParserSetup::CChatParserSetup(const char* szFileName)
|
||||
: Registry::CSetupFile(szFileName)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CChatParserSetup& CChatParserSetup::GetInstance()
|
||||
{
|
||||
static CChatParserSetup setup("./ChatParserSetup.ini");
|
||||
return setup;
|
||||
}
|
||||
17
Server/ManageTool/ChatParser/ChatParserSetup.h
Normal file
17
Server/ManageTool/ChatParser/ChatParserSetup.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef _GAMA_NETWORK_CHAT_SETUP_H_
|
||||
#define _GAMA_NETWORK_CHAT_SETUP_H_
|
||||
|
||||
#include "RegFunctions.h"
|
||||
|
||||
/** \class CChatParserSetup
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>¾<EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD>*/
|
||||
class CChatParserSetup : public Registry::CSetupFile
|
||||
{
|
||||
public:
|
||||
|
||||
CChatParserSetup(const char* szFileName);
|
||||
static CChatParserSetup& GetInstance();
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
42
Server/ManageTool/ChatParser/ChatParserSetup.ini
Normal file
42
Server/ManageTool/ChatParser/ChatParserSetup.ini
Normal file
@@ -0,0 +1,42 @@
|
||||
[SERVER_GROUP]
|
||||
SERVER_GROUP_CNT = 1
|
||||
SERVER_GROUP1 = Ichman
|
||||
|
||||
[SERVER_ZONE]
|
||||
SERVER_ZONE_CNT = 9
|
||||
SERVER_ZONE1 = 1
|
||||
SERVER_ZONE2 = 2
|
||||
SERVER_ZONE3 = 4
|
||||
SERVER_ZONE4 = 5
|
||||
SERVER_ZONE5 = 8
|
||||
SERVER_ZONE6 = 12
|
||||
SERVER_ZONE7 = 16
|
||||
SERVER_ZONE8 = 17
|
||||
SERVER_ZONE9 = 18
|
||||
|
||||
[CHAT_TYPE]
|
||||
CHAT_TYPE_CNT = 17
|
||||
CHAT_TYPE1 = NORMAL
|
||||
CHAT_TYPE2 = PARTY
|
||||
CHAT_TYPE3 = FRIEND
|
||||
CHAT_TYPE4 = GUILD
|
||||
CHAT_TYPE5 = CLIENT_LOG
|
||||
CHAT_TYPE6 = STALL
|
||||
CHAT_TYPE7 = SHOUT
|
||||
CHAT_TYPE8 = ADMIN_NORMAL_CHAT
|
||||
CHAT_TYPE9 = ADMIN_SHOUT
|
||||
CHAT_TYPE10 = WHISPER
|
||||
CHAT_TYPE11 = TRADE
|
||||
CHAT_TYPE12 = CAMP_SHOP
|
||||
CHAT_TYPE13 = NOTIFY_CHAR_INFO
|
||||
CHAT_TYPE14 = FIND_PARTY
|
||||
CHAT_TYPE15 = ENEMY_CHECK
|
||||
CHAT_TYPE16 = DICE
|
||||
CHAT_TYPE17 = NOTICE
|
||||
|
||||
[LOCAL_STRING]
|
||||
STRING_01 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
STRING_02 = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>α<EFBFBD>
|
||||
STRING_03 = <EFBFBD>ε<EFBFBD> <20>Ϸ<EFBFBD>.
|
||||
STRING_04 = <EFBFBD>˻<EFBFBD>
|
||||
STRING_05 = <EFBFBD≯<EFBFBD><EFBFBD>˻<EFBFBD>
|
||||
253
Server/ManageTool/ChatParser/Clipboard.cpp
Normal file
253
Server/ManageTool/ChatParser/Clipboard.cpp
Normal file
@@ -0,0 +1,253 @@
|
||||
// CClipboard Class
|
||||
// ----------------
|
||||
// Written by David Terracino <davet@lycosemail.com>
|
||||
//
|
||||
// This code is released into the public domain, because
|
||||
// it's silly easy. If you want to use and expand it, go
|
||||
// ahead; fine by me. If you do expand this class's
|
||||
// functionality, please consider sending it back up to
|
||||
// the MFC Programmer's Sourcebook at www.codeguru.com.
|
||||
//
|
||||
// And as always, please give credit where credit is
|
||||
// due. Don't remove my name from the source.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Modified by Hans Dietrich hdietrich2@hotmail.com
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "Clipboard.h"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetText - Retrieves text from the clipboard
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// Return Values:
|
||||
// CString - not empty if text was successfully copied from clipboard
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CString CClipboard::GetText()
|
||||
{
|
||||
CString str;
|
||||
str = _T("");
|
||||
|
||||
// First, open the clipboard. OpenClipboard() takes one
|
||||
// parameter, the handle of the window that will temporarily
|
||||
// be it's owner. If NULL is passed, the current process
|
||||
// is assumed.
|
||||
if (::OpenClipboard(NULL))
|
||||
{
|
||||
// Request a pointer to the text on the clipboard.
|
||||
HGLOBAL hGlobal = ::GetClipboardData(CF_TEXT);
|
||||
|
||||
// If there was no text on the clipboard, we have
|
||||
// been returned a NULL handle.
|
||||
if (hGlobal)
|
||||
{
|
||||
// Now we have a global memory handle to the text
|
||||
// stored on the clipboard. We have to lock this global
|
||||
// handle so that we have access to it.
|
||||
LPSTR lpszData = (LPSTR) ::GlobalLock(hGlobal);
|
||||
|
||||
if (lpszData)
|
||||
{
|
||||
str = lpszData;
|
||||
|
||||
// Now, simply unlock the global memory pointer
|
||||
// and close the clipboard.
|
||||
::GlobalUnlock(hGlobal);
|
||||
}
|
||||
}
|
||||
::CloseClipboard();
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetText - Retrieves text from the clipboard
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameters:
|
||||
// lpszBuffer - pointer to a string where the text is to be put
|
||||
// nBufSize - allocated length of lpszBuffer
|
||||
//
|
||||
// Return Values:
|
||||
// TRUE - Text was successfully retrieved
|
||||
// FALSE - No text returned
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BOOL CClipboard::GetText(LPSTR lpszBuffer, int nBufSize)
|
||||
{
|
||||
ASSERT(lpszBuffer);
|
||||
if (lpszBuffer == NULL)
|
||||
return FALSE;
|
||||
|
||||
if (nBufSize == 0)
|
||||
return FALSE;
|
||||
|
||||
lpszBuffer[0] = 0;
|
||||
|
||||
BOOL bSuccess = FALSE;
|
||||
|
||||
// First, open the clipboard. OpenClipboard() takes one
|
||||
// parameter, the handle of the window that will temporarily
|
||||
// be it's owner. If NULL is passed, the current process
|
||||
// is assumed.
|
||||
if (::OpenClipboard(NULL))
|
||||
{
|
||||
// Request a pointer to the text on the clipboard.
|
||||
HGLOBAL hGlobal = ::GetClipboardData(CF_TEXT);
|
||||
|
||||
// If there was no text on the clipboard, we have
|
||||
// been returned a NULL handle.
|
||||
if (hGlobal)
|
||||
{
|
||||
// Now we have a global memory handle to the text
|
||||
// stored on the clipboard. We have to lock this global
|
||||
// handle so that we have access to it.
|
||||
LPSTR lpszData = (LPSTR) ::GlobalLock(hGlobal);
|
||||
|
||||
if (lpszData)
|
||||
{
|
||||
// Now get the size of the text on the clipboard.
|
||||
DWORD nSize = (DWORD)::GlobalSize(hGlobal);
|
||||
|
||||
// Make sure the text on the clipboard is not longer
|
||||
// that the buffer that was allocated for it. If it was
|
||||
// snip the text on the clipboard so that it fits.
|
||||
if (nSize >= (UINT)nBufSize)
|
||||
nSize = nBufSize - 1;
|
||||
|
||||
// Now, copy the text into the return buffer. Note that
|
||||
// there will be at least one nul at the end
|
||||
ZeroMemory(lpszBuffer, nBufSize);
|
||||
CopyMemory(lpszBuffer, lpszData, nSize);
|
||||
|
||||
// Now, simply unlock the global memory pointer
|
||||
// and close the clipboard.
|
||||
::GlobalUnlock(hGlobal);
|
||||
bSuccess = TRUE;
|
||||
}
|
||||
}
|
||||
::CloseClipboard();
|
||||
}
|
||||
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// GetTextLength - Retrieves length of text on the clipboard
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameters:
|
||||
//
|
||||
// Return Values:
|
||||
// > 0 - Text length was successfully returned.
|
||||
// 0 - No text on the clipboard
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DWORD CClipboard::GetTextLength()
|
||||
{
|
||||
DWORD nSize = 0; // Size of clipboard data
|
||||
|
||||
// First, open the clipboard. OpenClipboard() takes one
|
||||
// parameter, the handle of the window that will temporarily
|
||||
// be it's owner. If NULL is passed, the current process
|
||||
// is assumed.
|
||||
if (::OpenClipboard(NULL))
|
||||
{
|
||||
// Request a pointer to the text on the clipboard.
|
||||
HGLOBAL hGlobal = ::GetClipboardData(CF_TEXT);
|
||||
|
||||
// If there was no text on the clipboard, we have
|
||||
// been returned a NULL handle.
|
||||
if (hGlobal)
|
||||
{
|
||||
// Now we have a global memory handle to the text
|
||||
// stored on the clipboard. We have to lock this global
|
||||
// handle so that we have access to it.
|
||||
LPSTR lpszData = (LPSTR) ::GlobalLock(hGlobal);
|
||||
|
||||
if (lpszData)
|
||||
{
|
||||
// Now get the size of the text on the clipboard.
|
||||
nSize = (DWORD)::GlobalSize(hGlobal);
|
||||
|
||||
// Now, simply unlock the global memory pointer
|
||||
// and close the clipboard.
|
||||
::GlobalUnlock(hGlobal);
|
||||
}
|
||||
}
|
||||
::CloseClipboard();
|
||||
}
|
||||
|
||||
return nSize;
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// SetText - Places text on the clipboard
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Parameters:
|
||||
// lpszBuffer - pointer to a string to put on the clipboard
|
||||
//
|
||||
// Return Values:
|
||||
// TRUE - Text was successfully copied onto clipboard
|
||||
// FALSE - Text not copied
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
BOOL CClipboard::SetText(LPCTSTR lpszBuffer)
|
||||
{
|
||||
BOOL bSuccess = FALSE;
|
||||
|
||||
// First, open the clipboard. OpenClipboard() takes one
|
||||
// parameter, the handle of the window that will temporarily
|
||||
// be it's owner. If NULL is passed, the current process
|
||||
// is assumed. After opening, empty the clipboard so we
|
||||
// can put our text on it.
|
||||
if (::OpenClipboard(NULL))
|
||||
{
|
||||
::EmptyClipboard();
|
||||
|
||||
// Get the size of the string in the buffer that was
|
||||
// passed into the function, so we know how much global
|
||||
// memory to allocate for the string.
|
||||
int nSize = (int)_tcslen(lpszBuffer);
|
||||
|
||||
// Allocate the memory for the string.
|
||||
HGLOBAL hGlobal = ::GlobalAlloc(GMEM_ZEROINIT, nSize+1);
|
||||
|
||||
// If we got any error during the memory allocation,
|
||||
// we have been returned a NULL handle.
|
||||
if (hGlobal)
|
||||
{
|
||||
// Now we have a global memory handle to the text
|
||||
// stored on the clipboard. We have to lock this global
|
||||
// handle so that we have access to it.
|
||||
LPTSTR lpszData = (LPTSTR) ::GlobalLock(hGlobal);
|
||||
|
||||
if (lpszData)
|
||||
{
|
||||
// Now, copy the text from the buffer into the allocated
|
||||
// global memory pointer
|
||||
_tcscpy(lpszData, lpszBuffer);
|
||||
|
||||
// Now, simply unlock the global memory pointer,
|
||||
// set the clipboard data type and pointer,
|
||||
// and close the clipboard.
|
||||
::GlobalUnlock(hGlobal);
|
||||
::SetClipboardData(CF_TEXT, hGlobal);
|
||||
bSuccess = TRUE;
|
||||
}
|
||||
}
|
||||
::CloseClipboard();
|
||||
}
|
||||
|
||||
return bSuccess;
|
||||
}
|
||||
29
Server/ManageTool/ChatParser/Clipboard.h
Normal file
29
Server/ManageTool/ChatParser/Clipboard.h
Normal file
@@ -0,0 +1,29 @@
|
||||
// CClipboard Class
|
||||
// ----------------
|
||||
// Written by David Terracino <davet@lycosemail.com>
|
||||
//
|
||||
// This code is released into the public domain, because
|
||||
// it's silly easy. If you want to use and expand it, go
|
||||
// ahead; fine by me. If you do expand this class's
|
||||
// functionality, please consider sending it back up to
|
||||
// the MFC Programmer's Sourcebook at www.codeguru.com.
|
||||
//
|
||||
// And as always, please give credit where credit is
|
||||
// due. Don't remove my name from the source.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Modified by Hans Dietrich hdietrich2@hotmail.com
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef CCLIPBOARD_H
|
||||
#define CCLIPBOARD_H
|
||||
|
||||
class CClipboard
|
||||
{
|
||||
public:
|
||||
static CString GetText();
|
||||
static BOOL GetText(LPSTR lpszBuffer, int nBufSize);
|
||||
static DWORD GetTextLength();
|
||||
static BOOL SetText(LPCTSTR lpszBuffer);
|
||||
};
|
||||
|
||||
#endif
|
||||
85
Server/ManageTool/ChatParser/ReadMe.txt
Normal file
85
Server/ManageTool/ChatParser/ReadMe.txt
Normal file
@@ -0,0 +1,85 @@
|
||||
================================================================================
|
||||
MFC <20><><EFBFBD>̺귯<CCBA><EAB7AF> : ChatParser <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
|
||||
===============================================================================
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20><> ChatParser <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>. <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> MFC<46><43> <20>⺻ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20>Ӹ<EFBFBD> <20>ƴ϶<C6B4> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1>
|
||||
<EFBFBD>ۼ<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>⺻ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
<EFBFBD><EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> ChatParser <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ԵǾ<D4B5> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
ChatParser.vcproj
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>縦 <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> VC++ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Visual C++ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>縦 <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20>÷<EFBFBD><C3B7><EFBFBD>, <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>ɿ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
ChatParser.h
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20>⺻ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>. <20><><EFBFBD><EFBFBD><E2BFA1> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD>(Resource.h <20><><EFBFBD><EFBFBD>)<29><> <20><><EFBFBD><EFBFBD> <20>ְ<EFBFBD> CChatParserApp <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1>
|
||||
Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
|
||||
ChatParser.cpp
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> Ŭ<><C5AC><EFBFBD><EFBFBD> CChatParserApp<70><70>(<28><>) <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20>⺻ <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1>
|
||||
<20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
ChatParser.rc
|
||||
<20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> Microsoft Windows <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
<20><><EFBFBD><EFBFBD><E2BFA1> RES <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><CDB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><>Ʈ<EFBFBD><C6AE> <20><> Ŀ<><C4BF><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD>Ե˴ϴ<CBB4>. <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>. <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> 1042<34><32> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
res\ChatParser.ico
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>. <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20><> <20><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ChatParser.rc<72><63> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
res\ChatParser.rc2
|
||||
<20><> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> Microsoft Visual C++ <20>̿<EFBFBD><CCBF><EFBFBD> <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>. <20><><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>
|
||||
<20><> <20><><EFBFBD>Ͽ<EFBFBD> <20>־<EFBFBD><D6BE><EFBFBD> <20>մϴ<D5B4>.
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD>翡<EFBFBD><E7BFA1> <20>ϳ<EFBFBD><CFB3><EFBFBD> <20><>ȭ <20><><EFBFBD><EFBFBD> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
ChatParserDlg.h, ChatParserDlg.cpp ? <20><>ȭ <20><><EFBFBD><EFBFBD>
|
||||
<20><> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> CChatParserDlg Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>. <20><> Ŭ<><C5AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><> <20><>ȭ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>. <20><>ȭ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ø<EFBFBD><C3B8><EFBFBD>
|
||||
Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ִ<EFBFBD> ChatParser.rc<72><63> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD>Ÿ ǥ<><C7A5> <20><><EFBFBD><EFBFBD>:
|
||||
|
||||
StdAfx.h, StdAfx.cpp
|
||||
<20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(PCH)<29><> ChatParser.pch<63><68>
|
||||
<20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> StdAfx.obj<62><6A> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
||||
|
||||
Resource.h
|
||||
<20><> <20><><EFBFBD>ҽ<EFBFBD> ID<49><44> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>а<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD>մϴ<D5B4>.
|
||||
|
||||
ChatParser.manifest
|
||||
<09><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20>Ŵ<EFBFBD><C5B4>佺Ʈ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Windows XP<58><50><EFBFBD><EFBFBD> Ư<><C6AF> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Side-by-Side
|
||||
<09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD>Ӽ<EFBFBD><D3BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>. <20>δ<EFBFBD><CEB4><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
<09><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ij<>ÿ<EFBFBD><C3BF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5>ϰų<CFB0> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
<09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ε<EFBFBD><CEB5>մϴ<D5B4>. <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20>Ŵ<EFBFBD><C5B4>佺Ʈ<E4BDBA><C6AE> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
<09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ġ<EFBFBD><C4A1> <20>ܺ<EFBFBD> .manifest <20><><EFBFBD>Ϸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Եǰų<C7B0> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD>·<EFBFBD>
|
||||
<09><><EFBFBD><EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD> <20><><EFBFBD>Ե<EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
<EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD>:
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> "TODO:"<22><> <20><><EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD> <20>߰<EFBFBD><DFB0>ϰų<CFB0> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>ϴ<EFBFBD>
|
||||
<EFBFBD>ҽ<EFBFBD> <20>ڵ<EFBFBD> <20>κ<EFBFBD><CEBA><EFBFBD> <20><>Ÿ<EFBFBD><C5B8><EFBFBD>ϴ<EFBFBD>.
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD> DLL<4C><4C><EFBFBD><EFBFBD> MFC<46><43> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ش<EFBFBD> MFC DLL<4C><4C>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>. <20><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1><D7B7><EFBFBD> <20> ü<><C3BC><EFBFBD><EFBFBD> <20><>Ķ<EFBFBD><C4B6>
|
||||
<EFBFBD>ٸ<EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD>ȭ<EFBFBD><C8AD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> MFC80XXX.DLL<4C><4C>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD> <20>մϴ<D5B4>. <20><> <20>ΰ<EFBFBD><CEB0><EFBFBD> <20><EFBFBD><D7B8><EFBFBD> <20><><EFBFBD><EFBFBD> <20>ڼ<EFBFBD><DABC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
MSDN <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Visual C++ <20><><EFBFBD><EFBFBD> <20><><EFBFBD>α<CEB1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><D7B8><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<EFBFBD>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
187
Server/ManageTool/ChatParser/RegFunctions.cpp
Normal file
187
Server/ManageTool/ChatParser/RegFunctions.cpp
Normal file
@@ -0,0 +1,187 @@
|
||||
#include "stdafx.h"
|
||||
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include "RegFunctions.h"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
bool Registry::WriteString(const char *FileName_In, const char *Section_In,
|
||||
const char *KeyName_In, const char *Value_In)
|
||||
{
|
||||
return 0 != WritePrivateProfileString(Section_In, KeyName_In, Value_In, FileName_In);
|
||||
}
|
||||
|
||||
unsigned long Registry::ReadInt(const char *FileName_In, const char *Section_In, const char *KeyName_In)
|
||||
{
|
||||
return static_cast<unsigned long>(GetPrivateProfileInt(Section_In, KeyName_In, 0, FileName_In));
|
||||
}
|
||||
|
||||
bool Registry::ReadString(const char *FileName_In, const char *Section_In,
|
||||
const char *KeyName_In, char *Buffer_Out, int nBufferSize)
|
||||
{
|
||||
return 0 != GetPrivateProfileString(Section_In, KeyName_In,
|
||||
NULL, Buffer_Out, nBufferSize, FileName_In);
|
||||
}
|
||||
|
||||
bool Registry::WriteStruct(const char *FileName_In, const char *Section_In,
|
||||
const char *KeyName_In, void *Value_In, const int Size_in)
|
||||
{
|
||||
return 0 != WritePrivateProfileStruct(Section_In, KeyName_In, Value_In, Size_in, FileName_In);
|
||||
}
|
||||
|
||||
bool Registry::ReadStruct(const char *FileName_In, const char *Section_In,
|
||||
const char *KeyName_In, void *Value_Out, const int Size_in)
|
||||
{
|
||||
return 0 != GetPrivateProfileStruct(Section_In, KeyName_In, Value_Out, Size_in, FileName_In);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Registry::CSetupFile::CSetupFile()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
Registry::CSetupFile::CSetupFile(const char* szFileName)
|
||||
{
|
||||
Open(szFileName);
|
||||
}
|
||||
|
||||
Registry::CSetupFile::~CSetupFile()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
inline unsigned long sdbmHash(const unsigned char *str)
|
||||
{
|
||||
unsigned long hash = 0;
|
||||
int c;
|
||||
|
||||
while (c = *str++) { hash = c + (hash << 6) + (hash << 16) - hash; }
|
||||
return hash;
|
||||
}
|
||||
|
||||
bool Registry::CSetupFile::Open(const char* szFileName)
|
||||
{
|
||||
std::string fileLine;
|
||||
std::string szSection;
|
||||
std::string szKey;
|
||||
std::string szValue;
|
||||
|
||||
fileLine.reserve(4096);
|
||||
szSection.reserve(1024);
|
||||
szKey.reserve(1024);
|
||||
szValue.reserve(4096);
|
||||
|
||||
std::fstream file(szFileName, std::ios_base::in);
|
||||
|
||||
std::string::size_type nPosition = std::string::npos;
|
||||
std::string::size_type nEndPosition = std::string::npos;
|
||||
std::string::size_type nDataPosition = std::string::npos;
|
||||
std::string::size_type nDataEndPosition = std::string::npos;
|
||||
|
||||
unsigned long dwSectionValue = 0;
|
||||
|
||||
if(file.is_open())
|
||||
{
|
||||
while(std::getline(file, fileLine))
|
||||
{
|
||||
nPosition = fileLine.find_first_not_of(" \r\n\t");
|
||||
|
||||
if(std::string::npos != nPosition)
|
||||
{
|
||||
if('[' == fileLine[nPosition])
|
||||
{
|
||||
// <20><><EFBFBD>Ǹ<EFBFBD><C7B8><EFBFBD>
|
||||
nEndPosition = fileLine.find_first_of(']', nPosition);
|
||||
if(std::string::npos != nEndPosition)
|
||||
{
|
||||
szSection.assign(fileLine.begin() + nPosition + 1,
|
||||
fileLine.begin() + nEndPosition);
|
||||
|
||||
dwSectionValue = sdbmHash(reinterpret_cast<const unsigned char*>(szSection.c_str()));
|
||||
}
|
||||
}
|
||||
else if(0 != fileLine.compare(nPosition, sizeof(char) * 2, "//"))
|
||||
{
|
||||
// <20>ּ<EFBFBD> <20>ƴ<EFBFBD>
|
||||
nEndPosition = fileLine.find_first_of('=', nPosition);
|
||||
|
||||
if(std::string::npos != nEndPosition)
|
||||
{
|
||||
// nEndPosition <20>¿<EFBFBD><C2BF><EFBFBD> Key - Value Pair<69><72>.
|
||||
nDataEndPosition = fileLine.find_last_not_of("= \t", nEndPosition);
|
||||
|
||||
if(std::string::npos != nDataEndPosition)
|
||||
{
|
||||
// Ű <20>о<EFBFBD><D0BE><EFBFBD>.
|
||||
szKey.assign(fileLine.begin() + nPosition,
|
||||
fileLine.begin() + nDataEndPosition + 1);
|
||||
|
||||
nDataPosition = fileLine.find_first_not_of("= \t", nEndPosition);
|
||||
|
||||
if(std::string::npos != nDataPosition)
|
||||
{
|
||||
nDataEndPosition = fileLine.find_last_not_of(" \r\n\t");
|
||||
|
||||
if(std::string::npos != nDataEndPosition)
|
||||
{
|
||||
// <20><> <20>о<EFBFBD><D0BE><EFBFBD>
|
||||
m_SetupMap.insert(SetupMap::value_type(
|
||||
sdbmHash(reinterpret_cast<const unsigned char*>(szKey.c_str())) + dwSectionValue,
|
||||
Data(szSection, szKey,
|
||||
std::string(fileLine.begin() + nDataPosition, fileLine.begin() + nDataEndPosition + 1))));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void Registry::CSetupFile::Clear()
|
||||
{
|
||||
m_SetupMap.clear();
|
||||
}
|
||||
|
||||
const char* Registry::CSetupFile::GetString(const char* szSection, const char* szKey,
|
||||
const char* szDefaultValue)
|
||||
{
|
||||
DWORD dwHashValue = sdbmHash(reinterpret_cast<const unsigned char*>(szSection))
|
||||
+ sdbmHash(reinterpret_cast<const unsigned char*>(szKey));
|
||||
|
||||
std::pair<SetupMap::iterator, SetupMap::iterator> pos_pair = m_SetupMap.equal_range(dwHashValue);
|
||||
|
||||
for(; pos_pair.first != pos_pair.second; ++pos_pair.first)
|
||||
{
|
||||
Data& data = pos_pair.first->second;
|
||||
|
||||
if(0 == data.m_szSection.compare(szSection) &&
|
||||
0 == data.m_szKey.compare(szKey))
|
||||
{
|
||||
return data.m_szValue.c_str();
|
||||
}
|
||||
}
|
||||
|
||||
return szDefaultValue;
|
||||
}
|
||||
|
||||
unsigned int Registry::CSetupFile::GetInt(const char* szSection, const char* szKey,
|
||||
unsigned int nDefaultValue)
|
||||
{
|
||||
const char* szStr = GetString(szSection, szKey);
|
||||
|
||||
if(0 != szStr)
|
||||
{
|
||||
return atoi(szStr);
|
||||
}
|
||||
|
||||
return nDefaultValue;
|
||||
}
|
||||
|
||||
59
Server/ManageTool/ChatParser/RegFunctions.h
Normal file
59
Server/ManageTool/ChatParser/RegFunctions.h
Normal file
@@ -0,0 +1,59 @@
|
||||
#ifndef _REGISTRY_FUNCTIONS_H_
|
||||
#define _REGISTRY_FUNCTIONS_H_
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
namespace Registry
|
||||
{
|
||||
bool WriteString(const char *FileName_In, const char *Section_In,
|
||||
const char *KeyName_In, const char *Value_In);
|
||||
|
||||
unsigned long ReadInt(const char *FileName_In,
|
||||
const char *Section_In, const char *KeyName_In);
|
||||
|
||||
bool ReadString(const char *FileName_In, const char *Section_In,
|
||||
const char *KeyName_In, char *Buffer_Out, int nBufferSize);
|
||||
|
||||
bool WriteStruct(const char *FileName_In, const char *Section_In,
|
||||
const char *KeyName_In, void *Value_In, const int Size_in);
|
||||
|
||||
bool ReadStruct(const char *FileName_In, const char *Section_In,
|
||||
const char *KeyName_In, void *Value_Out, const int Size_in);
|
||||
|
||||
class CSetupFile
|
||||
{
|
||||
public:
|
||||
|
||||
CSetupFile();
|
||||
CSetupFile(const char* szFileName);
|
||||
~CSetupFile();
|
||||
|
||||
bool Open(const char* szFileName);
|
||||
void Clear();
|
||||
|
||||
const char* GetString(const char* szSection, const char* szKey, const char* szDefaultValue = 0);
|
||||
unsigned int GetInt(const char* szSection, const char* szKey, unsigned int nDefaultValue = 0);
|
||||
|
||||
private:
|
||||
|
||||
struct Data
|
||||
{
|
||||
std::string m_szSection;
|
||||
std::string m_szKey;
|
||||
std::string m_szValue;
|
||||
|
||||
Data(const std::string& szSection, const std::string& szKey, const std::string& szValue)
|
||||
: m_szSection(szSection), m_szKey(szKey), m_szValue(szValue)
|
||||
{
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
typedef std::multimap<unsigned long, Data> SetupMap;
|
||||
|
||||
SetupMap m_SetupMap;
|
||||
};
|
||||
};
|
||||
|
||||
#endif
|
||||
702
Server/ManageTool/ChatParser/XListBox.cpp
Normal file
702
Server/ManageTool/ChatParser/XListBox.cpp
Normal file
@@ -0,0 +1,702 @@
|
||||
// XListBox.cpp
|
||||
//
|
||||
// Author: Hans Dietrich
|
||||
// hdietrich2@hotmail.com
|
||||
//
|
||||
// This software is released into the public domain.
|
||||
// You are free to use it in any way you like.
|
||||
//
|
||||
// This software is provided "as is" with no expressed
|
||||
// or implied warranty. I accept no liability for any
|
||||
// damage or loss of business that this software may cause.
|
||||
//
|
||||
// Notes on use: To use in an MFC project, first create
|
||||
// a listbox using the standard dialog editor.
|
||||
// Be sure to mark the listbox as OWNERDRAW
|
||||
// FIXED, and check the HAS STRINGS box.
|
||||
// Using Class Wizard, create a variable for
|
||||
// the listbox. Finally, manually edit the
|
||||
// dialog's .h file and replace CListBox with
|
||||
// CXListBox, and #include XListBox.h.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "XListBox.h"
|
||||
#include "Clipboard.h"
|
||||
|
||||
|
||||
#ifdef _DEBUG
|
||||
#undef THIS_FILE
|
||||
static char BASED_CODE THIS_FILE[] = __FILE__;
|
||||
#endif
|
||||
|
||||
// NOTE - following table must be kept in sync with ColorPickerCB.cpp
|
||||
|
||||
static COLORREF ColorTable[16] = { RGB( 0, 0, 0), // Black
|
||||
RGB(255, 255, 255), // White
|
||||
RGB(255, 255, 255), // ChatNormal
|
||||
RGB(141, 180, 244), // ChatParty
|
||||
RGB(255, 255, 255), // ChatFriend
|
||||
RGB(255, 229, 57), // ChatGuild
|
||||
RGB(255, 255, 255), // ChatStall
|
||||
RGB( 53, 218, 193), // ChatShout
|
||||
RGB(220, 220, 220), // ChatAdminNormal
|
||||
RGB(255, 128, 64), // ChatAdminShout
|
||||
RGB(255, 128, 239), // ChatWhisper
|
||||
RGB(255, 0, 255), // ChatNotice
|
||||
RGB(204, 128, 255), // ChatTrade
|
||||
RGB( 38, 255, 38), // Call : <20><EFBFBD>ڸ<EFBFBD> <20>θ<EFBFBD><CEB8><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ҹ<EFBFBD>-_ -a
|
||||
RGB(255, 0, 255), // GMReport
|
||||
RGB( 0, 0, 0) }; // BackColor
|
||||
|
||||
BEGIN_MESSAGE_MAP(CXListBox, CListBox)
|
||||
//{{AFX_MSG_MAP(CXListBox)
|
||||
ON_WM_LBUTTONDBLCLK()
|
||||
ON_WM_CONTEXTMENU()
|
||||
ON_COMMAND(ID_EDIT_SELECT_ALL, OnEditSelectAll)
|
||||
ON_COMMAND(ID_EDIT_COPY, OnEditCopy)
|
||||
ON_COMMAND(ID_EDIT_CLEAR, OnEditClear)
|
||||
ON_WM_ERASEBKGND()
|
||||
//}}AFX_MSG_MAP
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
#define new DEBUG_NEW
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CXListBox
|
||||
|
||||
CXListBox::CXListBox()
|
||||
{
|
||||
m_ColorWindow = ::GetSysColor(COLOR_WINDOW);
|
||||
m_ColorHighlight = ::GetSysColor(COLOR_HIGHLIGHT);
|
||||
m_ColorWindowText = ::GetSysColor(COLOR_WINDOWTEXT);
|
||||
m_ColorHighlightText = ::GetSysColor(COLOR_HIGHLIGHTTEXT);
|
||||
m_bColor = TRUE;
|
||||
m_cxExtent = 0;
|
||||
m_nTabPosition = 8; // tab stops every 8 columns
|
||||
m_nSpaceWidth = 7;
|
||||
m_nContextMenuId = (UINT)-1;
|
||||
for (int i = 0; i < MAXTABSTOPS; i++)
|
||||
m_nTabStopPositions[i] = (i+1) * m_nTabPosition * m_nSpaceWidth;
|
||||
}
|
||||
|
||||
CXListBox::~CXListBox()
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// MeasureItem
|
||||
void CXListBox::MeasureItem(LPMEASUREITEMSTRUCT)
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// CompareItem
|
||||
int CXListBox::CompareItem(LPCOMPAREITEMSTRUCT)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// DrawItem
|
||||
void CXListBox::DrawItem(LPDRAWITEMSTRUCT lpDIS)
|
||||
{
|
||||
CDC* pDC = CDC::FromHandle(lpDIS->hDC);
|
||||
|
||||
COLORREF oldtextcolor, oldbackgroundcolor;
|
||||
|
||||
pDC->GetCharWidth((UINT) ' ', (UINT) ' ', &m_nSpaceWidth);
|
||||
pDC->GetCharWidth((UINT) 'c', (UINT) 'c', &m_nAveCharWidth);
|
||||
|
||||
for (int i = 0; i < MAXTABSTOPS; i++)
|
||||
m_nTabStopPositions[i] = (i+1) * m_nAveCharWidth * m_nTabPosition;
|
||||
|
||||
// draw focus rectangle when no items in listbox
|
||||
if (lpDIS->itemID == (UINT)-1)
|
||||
{
|
||||
if (lpDIS->itemAction & ODA_FOCUS)
|
||||
pDC->DrawFocusRect(&lpDIS->rcItem);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
int selChange = lpDIS->itemAction & ODA_SELECT;
|
||||
int focusChange = lpDIS->itemAction & ODA_FOCUS;
|
||||
int drawEntire = lpDIS->itemAction & ODA_DRAWENTIRE;
|
||||
|
||||
if (selChange || drawEntire)
|
||||
{
|
||||
BOOL sel = lpDIS->itemState & ODS_SELECTED;
|
||||
|
||||
int nLen = CListBox::GetTextLen(lpDIS->itemID);
|
||||
if (nLen != LB_ERR)
|
||||
{
|
||||
char *buf = new char [nLen + 10];
|
||||
ASSERT(buf);
|
||||
if (buf && (GetTextWithColor(lpDIS->itemID, (LPSTR)buf) != LB_ERR))
|
||||
{
|
||||
// set text color from first character in string -
|
||||
// NOTE: 1 was added to color index to avoid asserts by CString
|
||||
int itext = int (buf[0] - 1);
|
||||
|
||||
// set background color from second character in string -
|
||||
// NOTE: 1 was added to color index to avoid asserts by CString
|
||||
int iback = int (buf[1] - 1);
|
||||
buf[0] = ' ';
|
||||
buf[1] = ' ';
|
||||
COLORREF textcolor = sel ? m_ColorHighlightText : ColorTable[itext];
|
||||
oldtextcolor = pDC->SetTextColor(textcolor);
|
||||
COLORREF backgroundcolor = sel ? m_ColorHighlight : ColorTable[iback];
|
||||
oldbackgroundcolor = pDC->SetBkColor(backgroundcolor);
|
||||
|
||||
// fill the rectangle with the background color the fast way
|
||||
pDC->ExtTextOut(0, 0, ETO_OPAQUE, &lpDIS->rcItem, NULL, 0, NULL);
|
||||
|
||||
pDC->TabbedTextOut(lpDIS->rcItem.left, lpDIS->rcItem.top, &buf[2],
|
||||
(int)strlen(&buf[2]), MAXTABSTOPS, (LPINT)m_nTabStopPositions, 0);
|
||||
|
||||
CSize size;
|
||||
size = pDC->GetOutputTextExtent(&buf[2]);
|
||||
int nScrollBarWidth = ::GetSystemMetrics(SM_CXVSCROLL);
|
||||
size.cx += nScrollBarWidth; // in case of vertical scrollbar
|
||||
|
||||
int cxExtent = (size.cx > m_cxExtent) ? size.cx : m_cxExtent;
|
||||
|
||||
if (cxExtent > m_cxExtent)
|
||||
{
|
||||
m_cxExtent = cxExtent;
|
||||
SetHorizontalExtent(m_cxExtent+(m_cxExtent/32));
|
||||
}
|
||||
}
|
||||
if (buf)
|
||||
delete [] buf;
|
||||
}
|
||||
}
|
||||
|
||||
if (focusChange || (drawEntire && (lpDIS->itemState & ODS_FOCUS)))
|
||||
{
|
||||
pDC->DrawFocusRect(&lpDIS->rcItem);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// GetTextWithColor - get text string with color bytes
|
||||
int CXListBox::GetTextWithColor(int nIndex, LPTSTR lpszBuffer) const
|
||||
{
|
||||
if (!::IsWindow(m_hWnd))
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return LB_ERR;
|
||||
}
|
||||
|
||||
ASSERT(lpszBuffer);
|
||||
lpszBuffer[0] = 0;
|
||||
return CListBox::GetText(nIndex, lpszBuffer);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// GetTextWithColor - get text string with color bytes
|
||||
void CXListBox::GetTextWithColor(int nIndex, CString& rString) const
|
||||
{
|
||||
if (!::IsWindow(m_hWnd))
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
rString.Empty();
|
||||
CListBox::GetText(nIndex, rString);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// GetText - for compatibility with CListBox (no color bytes)
|
||||
int CXListBox::GetText(int nIndex, LPTSTR lpszBuffer) const
|
||||
{
|
||||
if (!::IsWindow(m_hWnd))
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return LB_ERR;
|
||||
}
|
||||
|
||||
ASSERT(lpszBuffer);
|
||||
|
||||
lpszBuffer[0] = 0;
|
||||
|
||||
int nRet = CListBox::GetText(nIndex, lpszBuffer);
|
||||
|
||||
int n = (int)strlen(lpszBuffer);
|
||||
if (n > 2)
|
||||
memcpy(&lpszBuffer[0], &lpszBuffer[2], n-1); // copy nul too
|
||||
|
||||
return nRet;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// GetText - for compatibility with CListBox (no color bytes)
|
||||
void CXListBox::GetText(int nIndex, CString& rString) const
|
||||
{
|
||||
if (!::IsWindow(m_hWnd))
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
CString str;
|
||||
str.Empty();
|
||||
CListBox::GetText(nIndex, str);
|
||||
if ((!str.IsEmpty()) && (str.GetLength() > 2))
|
||||
rString = str.Mid(2);
|
||||
else
|
||||
rString.Empty();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// GetTextLen - for compatibility with CListBox (no color bytes)
|
||||
int CXListBox::GetTextLen(int nIndex) const
|
||||
{
|
||||
if (!::IsWindow(m_hWnd))
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return LB_ERR;
|
||||
}
|
||||
|
||||
int n = CListBox::GetTextLen(nIndex);
|
||||
if (n != LB_ERR && n >= 2)
|
||||
n -= 2;
|
||||
return n;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// SearchString
|
||||
int CXListBox::SearchString(int nStartAfter, LPCTSTR lpszItem, BOOL bExact) const
|
||||
{
|
||||
if (!::IsWindow(m_hWnd))
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return LB_ERR;
|
||||
}
|
||||
|
||||
// start the search after specified index
|
||||
int nIndex = nStartAfter + 1;
|
||||
|
||||
int nCount = GetCount();
|
||||
if (nCount == LB_ERR)
|
||||
return LB_ERR;
|
||||
|
||||
// convert string to search for to lower case
|
||||
CString strItem;
|
||||
strItem = lpszItem;
|
||||
strItem.MakeLower();
|
||||
int nItemSize = strItem.GetLength();
|
||||
|
||||
CString strText;
|
||||
|
||||
// search until end
|
||||
for ( ; nIndex < nCount; nIndex++)
|
||||
{
|
||||
GetText(nIndex, strText);
|
||||
strText.MakeLower();
|
||||
if (!bExact)
|
||||
strText = strText.Left(nItemSize);
|
||||
if (strText == strItem)
|
||||
return nIndex;
|
||||
}
|
||||
|
||||
// if we started at beginning there is no more to do, search failed
|
||||
if (nStartAfter == -1)
|
||||
return LB_ERR;
|
||||
|
||||
// search until we reach beginning index
|
||||
for (nIndex = 0; (nIndex <= nStartAfter) && (nIndex < nCount); nIndex++)
|
||||
{
|
||||
GetText(nIndex, strText);
|
||||
strText.MakeLower();
|
||||
if (!bExact)
|
||||
strText = strText.Left(nItemSize);
|
||||
if (strText == strItem)
|
||||
return nIndex;
|
||||
}
|
||||
|
||||
return LB_ERR;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// FindString
|
||||
int CXListBox::FindString(int nStartAfter, LPCTSTR lpszItem) const
|
||||
{
|
||||
return SearchString(nStartAfter, lpszItem, FALSE);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// SelectString
|
||||
int CXListBox::SelectString(int nStartAfter, LPCTSTR lpszItem)
|
||||
{
|
||||
int rc = SearchString(nStartAfter, lpszItem, FALSE);
|
||||
if (rc != LB_ERR)
|
||||
SetCurSel(rc);
|
||||
return rc;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// FindStringExact
|
||||
int CXListBox::FindStringExact(int nStartAfter, LPCTSTR lpszItem) const
|
||||
{
|
||||
return SearchString(nStartAfter, lpszItem, TRUE);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// InsertString - override to add text color
|
||||
int CXListBox::InsertString(int nIndex, LPCTSTR lpszItem)
|
||||
{
|
||||
if (!::IsWindow(m_hWnd))
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return LB_ERR;
|
||||
}
|
||||
|
||||
CString s;
|
||||
s.Empty();
|
||||
s = lpszItem;
|
||||
|
||||
Color tc = Black; // to force black-only text
|
||||
Color bc = White;
|
||||
|
||||
UINT nColor = (UINT) tc;
|
||||
ASSERT(nColor < 16);
|
||||
if (nColor >= 16)
|
||||
tc = Black;
|
||||
|
||||
// don't display \r or \n characters
|
||||
int i;
|
||||
while ((i = s.FindOneOf("\r\n")) != -1)
|
||||
s.SetAt(i, ' ');
|
||||
|
||||
// first character in string is color -- add 1 to color
|
||||
// to avoid asserts by CString class
|
||||
CString t;
|
||||
t .Empty();
|
||||
t += (char) (tc + 1);
|
||||
t += (char) (bc + 1);
|
||||
t += s;
|
||||
|
||||
// try to insert the string into the listbox
|
||||
i = CListBox::InsertString(nIndex, t);
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// AddString - override to add text color
|
||||
void CXListBox::AddString(LPCTSTR lpszItem)
|
||||
{
|
||||
AddLine(CXListBox::Black, CXListBox::White, lpszItem, true);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// AddLine
|
||||
void CXListBox::AddLine(Color tc, Color bc, LPCTSTR lpszLine, BOOL bAutoScroll)
|
||||
{
|
||||
if (!::IsWindow(m_hWnd))
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
CString s;
|
||||
s.Empty();
|
||||
s = lpszLine;
|
||||
|
||||
if (!m_bColor)
|
||||
{
|
||||
tc = Black; // to force black-only text
|
||||
bc = White;
|
||||
}
|
||||
|
||||
UINT nColor = (UINT) tc;
|
||||
ASSERT(nColor < 16);
|
||||
if (nColor >= 16)
|
||||
tc = Black;
|
||||
|
||||
// don't display \r or \n characters
|
||||
int i;
|
||||
while ((i = s.FindOneOf("\r\n")) != -1)
|
||||
s.SetAt(i, ' ');
|
||||
|
||||
// first character in string is color -- add 1 to color
|
||||
// to avoid asserts by CString class
|
||||
CString t;
|
||||
t.Empty();
|
||||
t += (char) (tc + 1);
|
||||
t += (char) (bc + 1);
|
||||
t += s;
|
||||
|
||||
// try to add the string to the listbox
|
||||
i = CListBox::AddString(t);
|
||||
if (i == LB_ERRSPACE)
|
||||
{
|
||||
// will get LB_ERRSPACE if listbox is out of memory
|
||||
int n = GetCount();
|
||||
|
||||
if (n == LB_ERR)
|
||||
return;
|
||||
|
||||
if (n < 2)
|
||||
return;
|
||||
|
||||
// try to delete some strings to free up some room --
|
||||
// don't spend too much time deleting strings, since
|
||||
// we might be getting a burst of messages
|
||||
n = (n < 20) ? (n - 1) : 20;
|
||||
if (n <= 0)
|
||||
n = 1;
|
||||
|
||||
SetRedraw(FALSE);
|
||||
for (i = 0; i < n; i++)
|
||||
DeleteString(0);
|
||||
|
||||
i = CListBox::AddString(t);
|
||||
|
||||
SetRedraw(TRUE);
|
||||
}
|
||||
|
||||
if(bAutoScroll && (i >= 0))
|
||||
{
|
||||
SetTopIndex(i);
|
||||
}
|
||||
|
||||
SetCurSel(-1);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Printf
|
||||
void _cdecl CXListBox::Printf(Color tc, Color bc, UINT nID, LPCTSTR lpszFmt, ...)
|
||||
{
|
||||
char buf[1024], fmt[1024];
|
||||
va_list marker;
|
||||
|
||||
// load format string from string resource if
|
||||
// a resource ID was specified
|
||||
if (nID)
|
||||
{
|
||||
CString s;
|
||||
if (!s.LoadString(nID))
|
||||
{
|
||||
sprintf(s.GetBufferSetLength(80), "Failed to load string resource %u",
|
||||
nID);
|
||||
s.ReleaseBuffer(-1);
|
||||
}
|
||||
strncpy(fmt, s, sizeof(fmt)-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// format string was passed as parameter
|
||||
strncpy(fmt, lpszFmt, sizeof(fmt)-1);
|
||||
}
|
||||
fmt[sizeof(fmt)-1] = 0;
|
||||
|
||||
// combine output string and variables
|
||||
va_start(marker, lpszFmt);
|
||||
_vsnprintf(buf, sizeof(buf)-1, fmt, marker);
|
||||
va_end(marker);
|
||||
buf[sizeof(buf)-1] = 0;
|
||||
|
||||
AddLine(tc, bc, buf, true);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// EnableColor
|
||||
void CXListBox::EnableColor (BOOL bEnable)
|
||||
{
|
||||
m_bColor = bEnable;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// SetTabPosition
|
||||
void CXListBox::SetTabPosition(int nSpacesPerTab)
|
||||
{
|
||||
ASSERT(nSpacesPerTab > 0 && nSpacesPerTab < 11);
|
||||
|
||||
m_nTabPosition = nSpacesPerTab;
|
||||
|
||||
CDC* pDC = GetDC();
|
||||
|
||||
if (pDC)
|
||||
{
|
||||
TEXTMETRIC tm;
|
||||
pDC->GetTextMetrics(&tm);
|
||||
|
||||
pDC->GetCharWidth((UINT) ' ', (UINT) ' ', &m_nSpaceWidth);
|
||||
pDC->GetCharWidth((UINT) '9', (UINT) '9', &m_nAveCharWidth);
|
||||
|
||||
for (int i = 0; i < MAXTABSTOPS; i++)
|
||||
m_nTabStopPositions[i] = (i+1) * m_nAveCharWidth * m_nTabPosition;
|
||||
|
||||
ReleaseDC(pDC);
|
||||
}
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// GetVisibleLines
|
||||
int CXListBox::GetVisibleLines()
|
||||
{
|
||||
int nCount = 0;
|
||||
|
||||
CDC* pDC = GetDC();
|
||||
|
||||
if (pDC)
|
||||
{
|
||||
TEXTMETRIC tm;
|
||||
pDC->GetTextMetrics(&tm);
|
||||
int h = tm.tmHeight + tm.tmInternalLeading;
|
||||
ReleaseDC(pDC);
|
||||
|
||||
CRect rect;
|
||||
GetClientRect(&rect);
|
||||
nCount = rect.Height() / h;
|
||||
}
|
||||
return nCount;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// ResetContent
|
||||
void CXListBox::ResetContent()
|
||||
{
|
||||
if (!::IsWindow(m_hWnd))
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
CListBox::ResetContent();
|
||||
|
||||
m_cxExtent = 0;
|
||||
|
||||
SetHorizontalExtent(m_cxExtent);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// SetFont
|
||||
void CXListBox::SetFont(CFont *pFont, BOOL bRedraw)
|
||||
{
|
||||
if (!::IsWindow(m_hWnd))
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
CListBox::SetFont(pFont, bRedraw);
|
||||
|
||||
CDC* pDC = GetDC();
|
||||
|
||||
if (pDC)
|
||||
{
|
||||
CFont *pOldFont = pDC->SelectObject(pFont);
|
||||
|
||||
TEXTMETRIC tm;
|
||||
pDC->GetTextMetrics(&tm);
|
||||
int h = tm.tmHeight;
|
||||
SetItemHeight(0, h);
|
||||
|
||||
pDC->SelectObject(pOldFont);
|
||||
|
||||
pDC->GetCharWidth((UINT) ' ', (UINT) ' ', &m_nSpaceWidth);
|
||||
pDC->GetCharWidth((UINT) '9', (UINT) '9', &m_nAveCharWidth);
|
||||
|
||||
for (int i = 0; i < MAXTABSTOPS; i++)
|
||||
m_nTabStopPositions[i] = (i+1) * m_nAveCharWidth * m_nTabPosition;
|
||||
|
||||
ReleaseDC(pDC);
|
||||
}
|
||||
|
||||
m_cxExtent = 0;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// OnLButtonDblClk
|
||||
void CXListBox::OnLButtonDblClk(UINT nFlags, CPoint point)
|
||||
{
|
||||
CListBox::OnLButtonDblClk(nFlags, point);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// OnContextMenu
|
||||
void CXListBox::OnContextMenu(CWnd* /*pWnd*/, CPoint point)
|
||||
{
|
||||
if (m_nContextMenuId == -1)
|
||||
{
|
||||
TRACE(" no context menu\n");
|
||||
return;
|
||||
}
|
||||
|
||||
CMenu menu;
|
||||
if (!menu.LoadMenu(m_nContextMenuId))
|
||||
{
|
||||
TRACE(" ERROR failed to load %d\n", m_nContextMenuId);
|
||||
return;
|
||||
}
|
||||
|
||||
menu.GetSubMenu(0)->TrackPopupMenu(0,
|
||||
point.x, point.y, this, NULL);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// OnEditCopy
|
||||
void CXListBox::OnEditCopy()
|
||||
{
|
||||
CString str;
|
||||
str.Empty();
|
||||
|
||||
int nCount = GetCount();
|
||||
int nSel = 0;
|
||||
|
||||
for (int i = 0; i < nCount; i++)
|
||||
{
|
||||
if (GetSel(i) > 0)
|
||||
{
|
||||
CString s;
|
||||
s.Empty();
|
||||
GetText(i, s);
|
||||
if (!s.IsEmpty())
|
||||
{
|
||||
nSel++;
|
||||
s.TrimLeft("\r\n");
|
||||
s.TrimRight("\r\n");
|
||||
if (s.Find('\n') == -1)
|
||||
s += "\n";
|
||||
s.Replace("\t", " ");
|
||||
str += s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!str.IsEmpty())
|
||||
CClipboard::SetText(str);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// OnEditClear
|
||||
void CXListBox::OnEditClear()
|
||||
{
|
||||
ResetContent();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
// OnEditSelectAll
|
||||
void CXListBox::OnEditSelectAll()
|
||||
{
|
||||
if (!::IsWindow(m_hWnd))
|
||||
{
|
||||
ASSERT(FALSE);
|
||||
return;
|
||||
}
|
||||
|
||||
SelItemRange(TRUE, 0, GetCount()-1);
|
||||
}
|
||||
|
||||
// Add by zun!
|
||||
BOOL CXListBox::OnEraseBkgnd(CDC* pDC)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
93
Server/ManageTool/ChatParser/XListBox.h
Normal file
93
Server/ManageTool/ChatParser/XListBox.h
Normal file
@@ -0,0 +1,93 @@
|
||||
// XListBox.h
|
||||
//
|
||||
// Author: Hans Dietrich
|
||||
// hdietrich2@hotmail.com
|
||||
//
|
||||
// This software is released into the public domain.
|
||||
// You are free to use it in any way you like.
|
||||
//
|
||||
// This software is provided "as is" with no expressed
|
||||
// or implied warranty. I accept no liability for any
|
||||
// damage or loss of business that this software may cause.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef XLISTBOX_H
|
||||
#define XLISTBOX_H
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// CXListBox class
|
||||
|
||||
class CXListBox : public CListBox
|
||||
{
|
||||
// Constructors
|
||||
public:
|
||||
CXListBox();
|
||||
~CXListBox();
|
||||
|
||||
// Attributes
|
||||
public:
|
||||
int m_cxExtent;
|
||||
int m_nTabPosition;
|
||||
BOOL m_bColor;
|
||||
COLORREF m_ColorWindow;
|
||||
COLORREF m_ColorHighlight;
|
||||
COLORREF m_ColorWindowText;
|
||||
COLORREF m_ColorHighlightText;
|
||||
|
||||
// NOTE - following list must be kept in sync with ColorPickerCB.cpp
|
||||
enum Color{ Black, White,
|
||||
ChatNormal, ChatParty, ChatFriend, ChatGuild, ChatStall, ChatShout,
|
||||
ChatAdminNormal, ChatAdminShout, ChatWhisper, ChatNotice, ChatTrade, Call, GMReport, BackColor
|
||||
};
|
||||
|
||||
void EnableColor(BOOL bEnable);
|
||||
|
||||
// Operations
|
||||
public:
|
||||
void AddLine(Color tc, Color bc, LPCTSTR lpszLine, BOOL bAutoScroll = TRUE);
|
||||
void AddString(LPCTSTR lpszItem);
|
||||
int FindString(int nStartAfter, LPCTSTR lpszItem) const;
|
||||
int FindStringExact(int nStartAfter, LPCTSTR lpszItem) const;
|
||||
int GetText(int nIndex, LPTSTR lpszBuffer) const;
|
||||
void GetText(int nIndex, CString& rString) const;
|
||||
int GetTextLen(int nIndex) const;
|
||||
int GetTextWithColor(int nIndex, LPTSTR lpszBuffer) const;
|
||||
void GetTextWithColor(int nIndex, CString& rString) const;
|
||||
int GetVisibleLines();
|
||||
int InsertString(int nIndex, LPCTSTR lpszItem);
|
||||
void _cdecl Printf(Color tc, Color bc, UINT nID, LPCTSTR lpszFmt, ...);
|
||||
virtual void ResetContent();
|
||||
int SelectString(int nStartAfter, LPCTSTR lpszItem);
|
||||
void SetContextMenuId(UINT nId) { m_nContextMenuId = nId; }
|
||||
virtual void SetFont(CFont *pFont, BOOL bRedraw = TRUE);
|
||||
void SetTabPosition(int nSpacesPerTab);
|
||||
|
||||
// Implementation
|
||||
protected:
|
||||
int SearchString(int nStartAfter, LPCTSTR lpszItem, BOOL bExact) const;
|
||||
|
||||
#define MAXTABSTOPS 100
|
||||
int m_nTabStopPositions[MAXTABSTOPS];
|
||||
int m_nSpaceWidth;
|
||||
int m_nAveCharWidth;
|
||||
UINT m_nContextMenuId;
|
||||
|
||||
virtual int CompareItem (LPCOMPAREITEMSTRUCT lpCIS);
|
||||
virtual void DrawItem (LPDRAWITEMSTRUCT lpDIS);
|
||||
virtual void MeasureItem (LPMEASUREITEMSTRUCT lpMIS);
|
||||
|
||||
// Generated message map functions
|
||||
//{{AFX_MSG(CXListBox)
|
||||
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
|
||||
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
|
||||
afx_msg void OnEditCopy();
|
||||
afx_msg void OnEditClear();
|
||||
afx_msg void OnEditSelectAll();
|
||||
afx_msg BOOL OnEraseBkgnd(CDC* pDC); // Add by zun!
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
#endif
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
BIN
Server/ManageTool/ChatParser/res/ChatParser.ico
Normal file
BIN
Server/ManageTool/ChatParser/res/ChatParser.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
13
Server/ManageTool/ChatParser/res/ChatParser.rc2
Normal file
13
Server/ManageTool/ChatParser/res/ChatParser.rc2
Normal file
@@ -0,0 +1,13 @@
|
||||
//
|
||||
// ChatParser.RC2 - Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD>ҽ<EFBFBD>
|
||||
//
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#error <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Microsoft Visual C++<2B><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.
|
||||
#endif //APSTUDIO_INVOKED
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// <20><><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD> <20>߰<EFBFBD><DFB0>մϴ<D5B4>.
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
31
Server/ManageTool/ChatParser/resource.h
Normal file
31
Server/ManageTool/ChatParser/resource.h
Normal file
@@ -0,0 +1,31 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by ChatParser.rc
|
||||
//
|
||||
#define IDM_ABOUTBOX 0x0010
|
||||
#define IDD_ABOUTBOX 100
|
||||
#define IDS_ABOUTBOX 101
|
||||
#define IDD_CHATPARSER_DIALOG 102
|
||||
#define IDR_MAINFRAME 128
|
||||
#define IDC_OPEN_FILENAME 1000
|
||||
#define IDC_OPENFILE 1001
|
||||
#define IDC_FINDLIST 1002
|
||||
#define IDC_CHATLIST 1003
|
||||
#define IDC_OLDVERSION 1004
|
||||
#define IDC_SERVERID 1005
|
||||
#define IDC_ZONEID 1006
|
||||
#define IDC_ZONEID2 1007
|
||||
#define IDC_CHATTYPE 1007
|
||||
#define IDC_FINDNAME 1008
|
||||
#define IDC_FINDNAMECHK 1009
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 129
|
||||
#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
#define _APS_NEXT_CONTROL_VALUE 1009
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
76
Server/ManageTool/ChatParser/stdafx.cpp
Normal file
76
Server/ManageTool/ChatParser/stdafx.cpp
Normal file
@@ -0,0 +1,76 @@
|
||||
// stdafx.cpp : ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>ϸ<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
// ChatParser.pch<63><68> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˴ϴ<CBB4>.
|
||||
// stdafx.obj<62><6A><EFBFBD><EFBFBD> <20≯<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϵ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>Ե˴ϴ<CBB4>.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "ChatParserSetup.h"
|
||||
|
||||
/// \brief <20><><EFBFBD>Ǹ<EFBFBD><C7B8><EFBFBD> Ű<><C5B0> ini <20>¾<EFBFBD> <20><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD> <20><><EFBFBD>õ<EFBFBD> <20><> <20><><EFBFBD><EFBFBD>
|
||||
/// \param szSection <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ǹ<EFBFBD>
|
||||
/// \param szKey <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><>Ī<EFBFBD>Ǵ<EFBFBD> Ű
|
||||
const char* GetMyINIString(const char* szSection, const char* szKey)
|
||||
{
|
||||
const char* szResult = CChatParserSetup::GetInstance().GetString(szSection, szKey, 0);
|
||||
|
||||
if(0 == szResult)
|
||||
{
|
||||
CString strErr;
|
||||
strErr.Format("Setup string load failed! - key: %s", szKey);
|
||||
AfxMessageBox(strErr, MB_ICONSTOP);
|
||||
return "???";
|
||||
}
|
||||
|
||||
return szResult;
|
||||
}
|
||||
|
||||
const int GetChatType(const char* szType)
|
||||
{
|
||||
int iCount = 17;
|
||||
char* strFind[] = {
|
||||
"NORMAL",
|
||||
"PARTY",
|
||||
"FRIEND",
|
||||
"GUILD",
|
||||
"CLIENT_LOG",
|
||||
"STALL",
|
||||
"SHOUT",
|
||||
"ADMIN_NORMAL_CHAT",
|
||||
"ADMIN_SHOUT",
|
||||
"WHISPER",
|
||||
"TRADE",
|
||||
"CAMP_SHOP",
|
||||
"NOTIFY_CHAR_INFO",
|
||||
"FIND_PARTY",
|
||||
"ENEMY_CHECK",
|
||||
"DICE",
|
||||
"NOTICE"
|
||||
};
|
||||
int FindID[] = {
|
||||
NORMAL,
|
||||
PARTY,
|
||||
FRIEND,
|
||||
GUILD,
|
||||
CLIENT_LOG,
|
||||
STALL,
|
||||
SHOUT,
|
||||
ADMIN_NORMAL_CHAT,
|
||||
ADMIN_SHOUT,
|
||||
WHISPER,
|
||||
TRADE,
|
||||
CAMP_SHOP,
|
||||
NOTIFY_CHAR_INFO,
|
||||
FIND_PARTY,
|
||||
ENEMY_CHECK,
|
||||
DICE,
|
||||
NOTICE
|
||||
};
|
||||
|
||||
|
||||
for(int i = 0; i < iCount; ++i)
|
||||
{
|
||||
if(strcmp(szType, strFind[i]) == 0)
|
||||
return FindID[i]+1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
111
Server/ManageTool/ChatParser/stdafx.h
Normal file
111
Server/ManageTool/ChatParser/stdafx.h
Normal file
@@ -0,0 +1,111 @@
|
||||
// stdafx.h : <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD>
|
||||
// ǥ<><C7A5> <20>ý<EFBFBD><C3BD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD><EFBFBD> <20>ִ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _SECURE_ATL
|
||||
#define _SECURE_ATL 1
|
||||
#endif
|
||||
|
||||
#ifndef VC_EXTRALEAN
|
||||
#define VC_EXTRALEAN // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Windows <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
#endif
|
||||
|
||||
// <20>Ʒ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD> <20>켱<EFBFBD>ϴ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ϴ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD>Ǹ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
// <20>ٸ<EFBFBD> <20>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǵ<EFBFBD> <20>ش<EFBFBD> <20><><EFBFBD><EFBFBD> <20>ֽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> MSDN<44><4E> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻʽÿ<CABD>.
|
||||
#ifndef WINVER // Windows XP <20>̻<CCBB><F3BFA1BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define WINVER 0x0501 // <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Windows<77><73> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINNT // Windows XP <20>̻<CCBB><F3BFA1BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_WINNT 0x0501 // <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Windows<77><73> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_WINDOWS // Windows 98 <20>̻<CCBB><F3BFA1BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_WINDOWS 0x0410 // Windows Me <20>̻<EFBFBD><CCBB><EFBFBD> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32_IE // IE 6.0 <20>̻<CCBB><F3BFA1BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>.
|
||||
#define _WIN32_IE 0x0600 // <20>ٸ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IE<49><45> <20>µ<EFBFBD><C2B5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ֽʽÿ<CABD>.
|
||||
#endif
|
||||
|
||||
#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // <20>Ϻ<EFBFBD> CString <20><><EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>˴ϴ<CBB4>.
|
||||
|
||||
// MFC<46><43> <20><><EFBFBD><EFBFBD> <20>κа<CEBA> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><EFBFBD><DEBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>⸦ <20><><EFBFBD><EFBFBD><EFBFBD>մϴ<D5B4>.
|
||||
#define _AFX_ALL_WARNINGS
|
||||
|
||||
#include <afxwin.h> // MFC <20>ٽ<EFBFBD> <20><> ǥ<><C7A5> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
#include <afxext.h> // MFC Ȯ<><C8AE><EFBFBD>Դϴ<D4B4>.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _AFX_NO_OLE_SUPPORT
|
||||
#include <afxdtctl.h> // Internet Explorer 4 <20><><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ѿ<EFBFBD> <20><><EFBFBD><EFBFBD> MFC <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
#endif
|
||||
#ifndef _AFX_NO_AFXCMN_SUPPORT
|
||||
#include <afxcmn.h> // Windows <20><><EFBFBD><EFBFBD> <20><>Ʈ<EFBFBD>ѿ<EFBFBD> <20><><EFBFBD><EFBFBD> MFC <20><><EFBFBD><EFBFBD><EFBFBD>Դϴ<D4B4>.
|
||||
#endif // _AFX_NO_AFXCMN_SUPPORT
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef _UNICODE
|
||||
#if defined _M_IX86
|
||||
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
|
||||
#elif defined _M_IA64
|
||||
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
|
||||
#elif defined _M_X64
|
||||
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
|
||||
#else
|
||||
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#pragma warning(disable : 4996) // vs2005<30><35><EFBFBD><EFBFBD> <20>߰<EFBFBD><DFB0><EFBFBD>. <20><><EFBFBD>Ȼ<EFBFBD><C8BB><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20>̻<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ<EFBFBD> MFC<46><43> ATL <20>Լ<EFBFBD><D4BC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20><><EFBFBD>쿡<EFBFBD><ECBFA1> C4996<39><36> <20><EFBFBD><DFBB><EFBFBD> <20><> <20>ֽ<EFBFBD><D6BD>ϴ<EFBFBD>
|
||||
|
||||
enum ChatCmdType
|
||||
{
|
||||
NORMAL = 0, // <20><><EFBFBD><EFBFBD> ij<><C4B3><EFBFBD><EFBFBD> <20><>ǥ<EFBFBD><C7A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ǵ<EFBFBD>.
|
||||
PARTY = 1, // <20><>Ƽ ä<><C3A4>
|
||||
FRIEND = 2, // ģ<><C4A3> ä<><C3A4> (<28≯<EFBFBD> char[16] * m_cNum - MAX 100<30><30>)
|
||||
GUILD = 3, // <20><><EFBFBD><EFBFBD> ä<><C3A4>
|
||||
|
||||
CLIENT_LOG = 5,
|
||||
STALL = 6, // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ä<><C3A4> (<28≯<EFBFBD> char[16] * m_cNum - MAX 10<31><30>)
|
||||
SHOUT = 7, // <20><>ġ<EFBFBD><C4A1>
|
||||
|
||||
ADMIN_NORMAL_CHAT = 8, // <20><EFBFBD><EEBFB5> <20><><EFBFBD><EFBFBD> ä<><C3A4> (Ack<63>θ<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
ADMIN_SHOUT = 9, // <20><EFBFBD><EEBFB5> <20><>ġ<EFBFBD><C4A1> (Ack<63>θ<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
|
||||
WHISPER = 10, // <20><> <20><>ȣ<EFBFBD><C8A3> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´<CAB4>.Whisper<65><72> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>Ŷ<EFBFBD><C5B6> <20><><EFBFBD><EFBFBD><EFBFBD>ϱ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD>. <20><>, <20>αÿ<D7BD> <20><><EFBFBD>δ<EFBFBD>.
|
||||
TRADE = 11, // <20><>ġ<EFBFBD><C4A1><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> (<28><> <20><><EFBFBD>п<EFBFBD><D0BF><EFBFBD><EFBFBD><EFBFBD> <20>ٸ<EFBFBD> Ŀ<>ǵ<EFBFBD><C7B5><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
|
||||
CAMP_SHOP = 12, // <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> ä<><C3A4> (<28≯<EFBFBD> char[16] * m_cNum - MAX 10<31><30>)
|
||||
|
||||
NOTIFY_CHAR_INFO = 13, // <20><EFBFBD><EEBFB5> <20><><EFBFBD><EFBFBD> hp
|
||||
|
||||
FIND_PARTY = 14, // <20><>Ƽ ã<><C3A3>
|
||||
|
||||
ENEMY_CHECK = 15, // <20><><EFBFBD>Ʊ<EFBFBD> <20>ĺ<EFBFBD>.
|
||||
|
||||
DICE = 16, // <20>ֻ<EFBFBD><D6BB><EFBFBD> ä<><C3A4> (<28><>Ƽä<C6BC>ð<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
|
||||
GMREPORT = 17, // <20><><EFBFBD><EFBFBD> ä<><C3A4>
|
||||
|
||||
NOTICE = 255,
|
||||
|
||||
PktChatMaxSize = 180
|
||||
};
|
||||
|
||||
const char* GetMyINIString(const char* szSection, const char* szKey);
|
||||
const int GetChatType(const char* szType);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user