public void DataChanged(object obj) { ISerializableObject ser = obj as ISerializableObject; if (ser != null) { switch (ser.ClassId) { case ClassId.Lib: if (lib.IsUpdated(LibField.Attr)) { CheckMirrorChanged(); } if (lib.IsUpdated(LibField.Name)) { CheckCompositeNameChanged(lib); } break; case ClassId.Type: GType type = (GType)obj; if (lib.IsUpdated(LibField.Name)) { CheckCompositeNameChanged(type); } break; case ClassId.BgImage: mainForm.RepaintMapForms(); break; case ClassId.Layer: UpdateControls(); break; default: break; } } IShapedObject iobj = obj as IShapedObject; if (iobj != null) { CheckRepaint(iobj); } if (obj is Layers) { UpdateControls(); } if (obj is Map) { UpdateControls(); } }