test page with code

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

[sourcecode language=”plain”]
public void Execute()
{
// Load Selected Features
LoadSelectedFeatures();
// Show the form
IntPtr p = new IntPtr(m_pApp.hWnd);
Show((Form)System.Windows.Forms.Form.FromHandle(p));
}
private void LoadSelectedFeatures()
{
// Get the active map and use it to get the current selection
IMap pMap = m_MxDoc.FocusMap;
IEnumFeature pFeatures = (IEnumFeature)pMap.FeatureSelection;
IFeature pFea = pFeatures.Next();
while (pFea != null)
{
// If the feature has a gas trace weight field, then try to interpret it
int gasTraceWeightFI = pFea.Fields.FindField("GasTraceWeight");
if (gasTraceWeightFI > -1)
{
if (pFea.Shape.GeometryType == esriGeometryType.esriGeometryPolyline)
InterpretLineFeature(pFea, gasTraceWeightFI);
else if (pFea.Shape.GeometryType == esriGeometryType.esriGeometryPoint)
InterpretPointFeature(pFea, gasTraceWeightFI);
}
pFea = pFeatures.Next();
}
}
[/sourcecode]