protected override void OnShutdown()
{
try
{
script = null;
lastValue = null;
intersectLayer = null;
intersectTable = null;
intersectLayerSelection = null;
intersectTableSelection = null;
qFilter = null;
row = null;
testField = null;
curve = null;
sourceLayer = null;
pFS = null;
_copyPoint = null;
_copyPolyline = null;
_copyPolygon = null;
sFilter = null;
try
{
if (fCursor != null)
Marshal.ReleaseComObject(fCursor);
if (cCurs != null)
Marshal.ReleaseComObject(cCurs);
if (sourceFeature != null)
Marshal.ReleaseComObject(sourceFeature);
}
catch
{ }
fCursor = null;
cCurs = null;
sourceFeature = null;
nearestFeature = null;
fieldObj = null;
_currentDataset = null;
proxOp = null;
}
catch { }
try
{
if (AAState._sw != null)
{
AAState._sw.Flush();
AAState._sw.Close();
AAState._sw = null;
}
}
catch { }
try
{
if (ArcMap.Events != null)
{
ArcMap.Events.NewDocument -= ArcMap_NewOpenDocument;
ArcMap.Events.OpenDocument -= ArcMap_NewOpenDocument;
}
if (AAState._editor != null)
{
if (AAState._editor != null)
{
//Wire editor events.
AAState._editEvents = (IEditEvents_Event)AAState._editor;
AAState._editEvents.OnStartEditing -= OnStartEditing;
AAState._editEvents.OnStopEditing -= OnStopEditing;
AAState._editEvents2 = (IEditEvents2_Event)AAState._editor;// SG Jan 2003
AAState._editor = null;
AAState._editEvents = null;
AAState._editEvents2 = null; // SG Jan 2003
}
}
try
{
AAState.bmpOff.Dispose();
AAState.bmpOn.Dispose();
AAState.commandItem = null;
}
catch { }
}
catch (Exception ex)
{
MessageBox.Show(A4LGSharedFunctions.Localizer.GetString("AttributeAssistantEditorChain5") + ex.Message);
}
}