Skip to content

Commit

Permalink
1、 upload JsonConvert.
Browse files Browse the repository at this point in the history
  • Loading branch information
chengstory committed Jun 14, 2014
1 parent 19f8efe commit 75c2114
Show file tree
Hide file tree
Showing 35 changed files with 9,402 additions and 0 deletions.
20 changes: 20 additions & 0 deletions JsonConvert.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JsonConvert", "JsonConvert\JsonConvert.vcxproj", "{E702F3C0-239B-4084-B4D3-D4C6F87ED507}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E702F3C0-239B-4084-B4D3-D4C6F87ED507}.Debug|Win32.ActiveCfg = Debug|Win32
{E702F3C0-239B-4084-B4D3-D4C6F87ED507}.Debug|Win32.Build.0 = Debug|Win32
{E702F3C0-239B-4084-B4D3-D4C6F87ED507}.Release|Win32.ActiveCfg = Release|Win32
{E702F3C0-239B-4084-B4D3-D4C6F87ED507}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
Binary file added JsonConvert/JsonConvert.aps
Binary file not shown.
78 changes: 78 additions & 0 deletions JsonConvert/JsonConvert.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
// JsonConvert.cpp : 定义应用程序的类行为。
//

#include "stdafx.h"
#include "JsonConvert.h"
#include "JsonConvertDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CJsonConvertApp

BEGIN_MESSAGE_MAP(CJsonConvertApp, CWinApp)
ON_COMMAND(ID_HELP, &CWinApp::OnHelp)
END_MESSAGE_MAP()


// CJsonConvertApp 构造

CJsonConvertApp::CJsonConvertApp()
{
// TODO: 在此处添加构造代码,
// 将所有重要的初始化放置在 InitInstance 中
}


// 唯一的一个 CJsonConvertApp 对象

CJsonConvertApp theApp;


// CJsonConvertApp 初始化

BOOL CJsonConvertApp::InitInstance()
{
// 如果一个运行在 Windows XP 上的应用程序清单指定要
// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
//则需要 InitCommonControlsEx()。否则,将无法创建窗口。
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// 将它设置为包括所有要在应用程序中使用的
// 公共控件类。
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);

CWinApp::InitInstance();

AfxEnableControlContainer();

// 标准初始化
// 如果未使用这些功能并希望减小
// 最终可执行文件的大小,则应移除下列
// 不需要的特定初始化例程
// 更改用于存储设置的注册表项
// TODO: 应适当修改该字符串,
// 例如修改为公司或组织名
SetRegistryKey(_T("应用程序向导生成的本地应用程序"));

CJsonConvertDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: 在此处放置处理何时用“确定”来关闭
// 对话框的代码
}
else if (nResponse == IDCANCEL)
{
// TODO: 在此放置处理何时用“取消”来关闭
// 对话框的代码
}

// 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序,
// 而不是启动应用程序的消息泵。
return FALSE;
}
31 changes: 31 additions & 0 deletions JsonConvert/JsonConvert.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// JsonConvert.h : PROJECT_NAME 应用程序的主头文件
//

#pragma once

#ifndef __AFXWIN_H__
#error "在包含此文件之前包含“stdafx.h”以生成 PCH 文件"
#endif

#include "resource.h" // 主符号


// CJsonConvertApp:
// 有关此类的实现,请参阅 JsonConvert.cpp
//

class CJsonConvertApp : public CWinApp
{
public:
CJsonConvertApp();

// 重写
public:
virtual BOOL InitInstance();

// 实现

DECLARE_MESSAGE_MAP()
};

extern CJsonConvertApp theApp;
205 changes: 205 additions & 0 deletions JsonConvert/JsonConvert.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,205 @@
// 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

/////////////////////////////////////////////////////////////////////////////
// ����(�л����񹲺͹�) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS)
#ifdef _WIN32
LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED
#pragma code_page(936)
#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_CHS)\r\n"
"LANGUAGE 4, 2\r\n"
"#pragma code_page(936)\r\n"
"#include ""res\\JsonConvert.rc2"" // �� Microsoft Visual C++ �༭����Դ\r\n"
"#include ""afxres.rc"" // ��׼���\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\\JsonConvert.ico"

/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_ABOUTBOX DIALOGEX 0, 0, 235, 55
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "���� JsonConvert"
FONT 9, "����", 0, 0, 0x1
BEGIN
ICON IDR_MAINFRAME,IDC_STATIC,11,17,20,20
LTEXT "JsonConvert 1.0 ��",IDC_STATIC,40,10,119,8,SS_NOPREFIX
LTEXT "Copyright (C) 2014",IDC_STATIC,40,25,119,8
DEFPUSHBUTTON "ȷ��",IDOK,178,7,50,16,WS_GROUP
END

IDD_JSONCONVERT_DIALOG DIALOGEX 0, 0, 313, 164
STYLE DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_APPWINDOW
CAPTION "JsonConvert"
FONT 9, "����", 0, 0, 0x1
BEGIN
DEFPUSHBUTTON "Convert",IDOK,102,133,50,16
LTEXT "Json Template File",IDC_LABEL1,25,19,210,8
EDITTEXT IDC_EDIT1,24,34,208,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON1,239,34,59,14
LTEXT "Source Json File",IDC_LABEL2,23,55,211,8
EDITTEXT IDC_EDIT2,24,71,208,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON2,239,71,59,14
CTEXT "Target Json File",IDC_LABEL3,20,92,70,8
EDITTEXT IDC_EDIT3,24,106,207,14,ES_AUTOHSCROLL
PUSHBUTTON "Browse",IDC_BUTTON3,239,106,59,14
DEFPUSHBUTTON "Exit",IDCANCEL,157,133,50,16
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 "080403a8"
BEGIN
VALUE "CompanyName", "TODO: <��˾��>"
VALUE "FileDescription", "TODO: <�ļ�˵��>"
VALUE "FileVersion", "1.0.0.1"
VALUE "InternalName", "JsonConvert.exe"
VALUE "LegalCopyright", "TODO: (C) <��˾��>����������Ȩ����"
VALUE "OriginalFilename", "JsonConvert.exe"
VALUE "ProductName", "TODO: <��Ʒ��>"
VALUE "ProductVersion", "1.0.0.1"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x804, 936
END
END


/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO
BEGIN
IDD_ABOUTBOX, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 228
TOPMARGIN, 7
BOTTOMMARGIN, 48
END

IDD_JSONCONVERT_DIALOG, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 306
TOPMARGIN, 7
BOTTOMMARGIN, 157
END
END
#endif // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// String Table
//

STRINGTABLE
BEGIN
IDS_ABOUTBOX "���� JsonConvert(&A)..."
END

#endif // ����(�л����񹲺͹�) 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_CHS)
LANGUAGE 4, 2
#pragma code_page(936)
#include "res\JsonConvert.rc2" // �� Microsoft Visual C++ �༭����Դ
#include "afxres.rc" // ��׼���
#endif

/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

Loading

0 comments on commit 75c2114

Please sign in to comment.