搜档网
当前位置:搜档网 › C++开发源码分析(4)

C++开发源码分析(4)

C++开发源码分析(4)
(一)源文件
// ChildDlg.cpp : implementation file
//
#include "stdafx.h"
#include "JXIMS.h"
#include "ChildDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CChildDlg dialog
CChildDlg::CChildDlg(CWnd* pParent /*=NULL*/)
: CDialog(CChildDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CChildDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}


void CChildDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CChildDlg)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CChildDlg, CDialog)
//{{AFX_MSG_MAP(CChildDlg)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CChildDlg message handlers

(二)头文件
#if !defined(AFX_CHILDDLG_H__D898944B_576A_47E5_9117_43CECED3EA70__INCLUDED_)
#define AFX_CHILDDLG_H__D898944B_576A_47E5_9117_43CECED3EA70__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ChildDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CChildDlg dialog

class CChildDlg : public CDialog
{
// Construction
public:
CChildDlg(CWnd* pParent = NULL); // standard constructor

// Dialog Data
//{{AFX_DATA(CChildDlg)
enum { IDD = IDD_DIALOG_CHILD };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA


// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CChildDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL

// Implementation
protected:

// Generated message map functions
//{{AFX_MSG(CChildDlg)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_CHILDDLG_H__D898944B_576A_47E5_9117_43CECED3EA70__INCLUDED_)
(三)
@{
Layout = null;
bool u = https://www.sodocs.net/doc/848571375.html,erName == https://www.sodocs.net/doc/848571375.html, ? true : false;
}
@using Blog.Models









相册-@https://www.sodocs.net/doc/848571375.html,erName











@if (https://www.sodocs.net/doc/848571375.html,er.Identity.IsAuthenticated)
{

@Html.ActionLink(https://www.sodocs.net/doc/848571375.html,, "Profile", "Account", routeValues: null, htmlAttributes: new { @class = "username" })
@Html.ActionLink("我的相册", "Index", "Album", routeValues: new { username = @https://www.sodocs.net/doc/848571375.html, }, htmlAttributes: null)
@Html.ActionLink("我的博客", "Index", "User", routeValues: new { username = @https://www.sodocs.net/doc/848571375.html, }, htmlAttributes: null)
@using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" }))
{
@Html.AntiForgeryToken()
注销
}

}
else
{

  • @Html.ActionLink("注册", "Register", "Account", routeValues: null, htmlAttributes: new { id = "registerLink" })

  • @Html.ActionLink("登录", "Login", "Account", routeValues: null, htmlAttributes: new { id = "loginLink" })


}





@Model.NickName


@Model.SelfIntro












@{
int i = 0;
foreach (Photos p in ViewData["photos"] as IQueryable)
{
if (i % 3 == 0)
{@Html.OutPut("
    ")}



  • @p.PhotoName



    照片名称:@p.PhotoName

    照片描述:@p.Description



  • if (i % 3 == 2)
    {@Html.OutPut("
")} i++;
}
}







@if (https://www.sodocs.net/doc/848571375.html,er.Identity.IsAuthenticated)
{

}
else
{


}


@@2013 @https://www.sodocs.net/doc/848571375.html,erName Powered By Zhuankeshumo










@{
Layout = null;
ViewBag.Title = "发表文章";
bool u = https://www.sodocs.net/doc/848571375.html,erName == https://www.sodocs.net/doc/848571375.html, ? true : false;
}
@using Blog.Models


"no-js lt-ie9 lt-ie8">






@(https://www.sodocs.net/doc/848571375.html,erName)的相册