#include "StdAfx.h"
#include "RealEstateProperty.h"
CRealEstateProperty::CRealEstateProperty(void)
{
}
// To determine that two properties are the same,
// we will test only the property number.
// We assume that if two properties have the same number,
// then it is the same property
bool CRealEstateProperty::Equals(Object ^ obj)
{
CRealEstateProperty ^ rep = reinterpret_cast<CRealEstateProperty ^>(obj);
if (rep->PropertyNumber == PropertyNumber)
return true;
else
return false;
}
// To avoid a compiler warning
int CRealEstateProperty::GetHashCode()
{
return GetHashCode();
}

In the Solution Explorer, right-click Form1.h and click Rename

Type AltairRealtors.h and press Enter twice to
display the form

From the Toolbox, add a list view to the form

Right-click that list box on the click Edit Columns...

Create the columns as follows:

(Name)

Text

TextAlign

Width

colPropertyNumber

Property #

65

colCity

City

75

colStories

Stories

Right

45

colYearBuilt

Year

Right

40

colBedrooms

Beds

Right

38

colBathrooms

Baths

Right

40

colCondition

Condition

80

colSaleStatus

Status

70

colMarketValue

Value

Right

75

Click OK

Design the form as follows:

Control

(Name)

Anchor

BorderStyle

SizeMode

Text

ListView

lvwProperties

Top, Bottom, Left, Right

Button

btnNewProperty

Bottom, Left

New Real Estate Property...

PictureBox

pbxPicture

Bottom, Right

FixedSingle

Zoom

Button

btnClose

Bottom, Right

Close

Form

Text:

Altair Realtors - Properties Listing

StartPosition:

CenterScreen

Right-click the form and click Edit Groups...

Create the groups as follows:

Header

Name

Condominium

lvgCondominium

Townhouse

lvgTownhouse

Single Family

lvgSingleFamily

Click OK

To create a new form, on the main menu, click Projects -> Add New
Item...

In the middle list, make sure Windows Form is selected.Set the
Name to PropertyEditor