public static void initEditing()
{
if (AAState.PerformUpdates == false)
{
AAState.WriteLine(A4LGSharedFunctions.Localizer.GetString("AttributeAssistantEditorMess_3a"));
return;
}
// wire events
if (reInitExt() == false)
{
AAState.WriteLine(A4LGSharedFunctions.Localizer.GetString("AttributeAssistantEditorMess_3b"));
AAState.PerformUpdates = false;
}
if (AAState._editor.EditWorkspace != null)
{
if (AAState._editor.EditWorkspace.Type == esriWorkspaceType.esriFileSystemWorkspace)
{
AAState.WriteLine(A4LGSharedFunctions.Localizer.GetString("AttributeAssistantEditorMess_3c"));
AAState.PerformUpdates = false;
}
}
if (AAState.PerformUpdates)
{
AAState.WriteLine(A4LGSharedFunctions.Localizer.GetString("AttributeAssistantEditorMess_3d"));
if (Debug().ToUpper() == "TRUE")
{
AAState._filePath = Globals.getDebugPath();
if (AAState._filePath != "")
{
AAState._sw = Globals.createTextFile(AAState._filePath, FileMode.Create);
}
Globals.LogLocations = AAState._filePath;
}
else
{
AAState._sw = null;
Globals.LogLocations = "";
}
// Get user Info
reInitExt();
//obtain rotation calculator
AAState.rCalc = new RotationCalculator(ArcMap.Application);
//Create WGS_84 SR
ISpatialReferenceFactory srFactory = new SpatialReferenceEnvironmentClass();
IGeographicCoordinateSystem gcs = srFactory.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_WGS1984);
_sr1 = gcs;
_editEvents.OnChangeFeature += FeatureChange;
_editEvents.OnCreateFeature += FeatureCreate;
_editEvents2.BeforeStopOperation += StopOperation; // SG Jan 2013
}
else
{
AAState.PerformUpdates = false;
_editEvents.OnChangeFeature -= FeatureChange;
_editEvents.OnCreateFeature -= FeatureCreate;
_editEvents2.BeforeStopOperation -= StopOperation; // SG Jan 2013
}
ArcMap.Application.StatusBar.set_Message(0, A4LGSharedFunctions.Localizer.GetString("AttributeAssistantEditorDone_3a"));
}