Example #1
0
        protected virtual void DisconnectWrapped()
        {
            WrappedObject.RemoveNotification("id", NotifyIdHandler);

            if (WrappedObject is Cdn.Annotatable)
            {
                WrappedObject.RemoveNotification("annotation", NotifyAnnotationHandler);
            }

            WrappedObject.VariableAdded   -= HandleVariableAdded;
            WrappedObject.VariableRemoved -= HandleVariableRemoved;
            WrappedObject.Copied          -= HandleCopied;

            WrappedObject.TemplateApplied   -= HandleTemplateApplied;
            WrappedObject.TemplateUnapplied -= HandleTemplateUnapplied;

            if (WrappedObject.SupportsLocation())
            {
                RemoveLocationNotification();
            }
        }
Example #2
0
 private void RemoveLocationNotification()
 {
     WrappedObject.RemoveNotification("x", OnLocationChanged);
     WrappedObject.RemoveNotification("y", OnLocationChanged);
 }