Exemple #1
0
        void VB._dispVBComponentsEvents.ItemRenamed(VB.VBComponent VBComponent, string OldName)
        {
            using (var component = new VBComponent(VBComponent))
            {
                var handler = ComponentRenamed;
                if (handler == null)
                {
                    return;
                }

                var qmn = new QualifiedModuleName(component);
                handler.Invoke(component,
                               new ComponentRenamedEventArgs(qmn, OldName));
            }
        }
Exemple #2
0
        private static void OnDispatch(EventHandler <ComponentEventArgs> dispatched, VB.VBComponent vbComponent)
        {
            using (var component = new VBComponent(vbComponent))
            {
                var handler = dispatched;
                if (handler == null)
                {
                    return;
                }

                var qmn       = new QualifiedModuleName(component);
                var eventArgs = new ComponentEventArgs(qmn);
                handler.Invoke(component, eventArgs);
            }
        }
        void VB._dispVBComponentsEvents.ItemRenamed(VB.VBComponent VBComponent, string OldName)
        {
            var component = new VBComponent(VBComponent);
            var handler   = ComponentRenamed;

            if (handler == null)
            {
                component.Dispose();
                return;
            }

            IVBProject project;

            using (var components = component.Collection)
            {
                project = components.Parent;
            }
            handler.Invoke(component, new ComponentRenamedEventArgs(project.ProjectId, project, component, OldName));
        }
        private static void OnDispatch(EventHandler <ComponentEventArgs> dispatched, VB.VBComponent vbComponent)
        {
            var component = new VBComponent(vbComponent);
            var handler   = dispatched;

            if (handler == null)
            {
                component.Dispose();
                return;
            }

            IVBProject project;

            using (var components = component.Collection)
            {
                project = components.Parent;
            }


            var eventArgs = new ComponentEventArgs(project.ProjectId, project, component);

            handler.Invoke(component, eventArgs);
        }
Exemple #5
0
 void VB._dispVBComponentsEvents.ItemReloaded(VB.VBComponent VBComponent)
 {
     OnDispatch(ComponentReloaded, VBComponent);
 }
Exemple #6
0
 void VB._dispVBComponentsEvents.ItemActivated(VB.VBComponent VBComponent)
 {
     OnDispatch(ComponentActivated, VBComponent);
 }
Exemple #7
0
 void VB._dispVBComponentsEvents.ItemSelected(VB.VBComponent VBComponent)
 {
     OnDispatch(ComponentSelected, VBComponent);
 }