Esempio n. 1
0
        public void PresentationOpen([In, MarshalAs(UnmanagedType.IDispatch)] object pres)
        {
            Delegate[] recipients = _eventBinding.GetEventRecipients("PresentationOpen");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(pres);
                return;
            }

            NetOffice.PowerPointApi.Presentation newPres = Factory.CreateObjectFromComProxy(_eventClass, pres) as NetOffice.PowerPointApi.Presentation;
            object[] paramsArray = new object[1];
            paramsArray[0] = newPres;
            _eventBinding.RaiseCustomEvent("PresentationOpen", ref paramsArray);
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pres"></param>
        /// <param name="syncEventType"></param>
        public void PresentationSync([In, MarshalAs(UnmanagedType.IDispatch)] object pres, [In] object syncEventType)
        {
            if (!Validate("PresentationSync"))
            {
                Invoker.ReleaseParamsArray(pres, syncEventType);
                return;
            }

            NetOffice.PowerPointApi.Presentation       newPres          = Factory.CreateKnownObjectFromComProxy <NetOffice.PowerPointApi.Presentation>(EventClass, pres, typeof(NetOffice.PowerPointApi.Presentation));
            NetOffice.OfficeApi.Enums.MsoSyncEventType newSyncEventType = (NetOffice.OfficeApi.Enums.MsoSyncEventType)syncEventType;
            object[] paramsArray = new object[2];
            paramsArray[0] = newPres;
            paramsArray[1] = newSyncEventType;
            EventBinding.RaiseCustomEvent("PresentationSync", ref paramsArray);
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pres"></param>
        /// <param name="wn"></param>
        public void WindowDeactivate([In, MarshalAs(UnmanagedType.IDispatch)] object pres, [In, MarshalAs(UnmanagedType.IDispatch)] object wn)
        {
            if (!Validate("WindowDeactivate"))
            {
                Invoker.ReleaseParamsArray(pres, wn);
                return;
            }

            NetOffice.PowerPointApi.Presentation   newPres = Factory.CreateKnownObjectFromComProxy <NetOffice.PowerPointApi.Presentation>(EventClass, pres, typeof(NetOffice.PowerPointApi.Presentation));
            NetOffice.PowerPointApi.DocumentWindow newWn   = Factory.CreateKnownObjectFromComProxy <NetOffice.PowerPointApi.DocumentWindow>(EventClass, wn, typeof(NetOffice.PowerPointApi.DocumentWindow));
            object[] paramsArray = new object[2];
            paramsArray[0] = newPres;
            paramsArray[1] = newWn;
            EventBinding.RaiseCustomEvent("WindowDeactivate", ref paramsArray);
        }
Esempio n. 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="pres"></param>
        /// <param name="cancel"></param>
        public void PresentationBeforeClose([In, MarshalAs(UnmanagedType.IDispatch)] object pres, [In][Out] ref object cancel)
        {
            if (!Validate("SlideShowOnPrevious"))
            {
                Invoker.ReleaseParamsArray(pres, cancel);
                return;
            }

            NetOffice.PowerPointApi.Presentation newPres = Factory.CreateKnownObjectFromComProxy <NetOffice.PowerPointApi.Presentation>(EventClass, pres, typeof(NetOffice.PowerPointApi.Presentation));
            object[] paramsArray = new object[2];
            paramsArray[0] = newPres;
            paramsArray.SetValue(cancel, 1);
            EventBinding.RaiseCustomEvent("PresentationBeforeClose", ref paramsArray);

            cancel = ToBoolean(paramsArray[1]);
        }
Esempio n. 5
0
        public void PresentationSync([In, MarshalAs(UnmanagedType.IDispatch)] object pres, [In] object syncEventType)
        {
            Delegate[] recipients = _eventBinding.GetEventRecipients("PresentationSync");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(pres, syncEventType);
                return;
            }

            NetOffice.PowerPointApi.Presentation       newPres          = NetOffice.Factory.CreateObjectFromComProxy(_eventClass, pres) as NetOffice.PowerPointApi.Presentation;
            NetOffice.OfficeApi.Enums.MsoSyncEventType newSyncEventType = (NetOffice.OfficeApi.Enums.MsoSyncEventType)syncEventType;
            object[] paramsArray = new object[2];
            paramsArray[0] = newPres;
            paramsArray[1] = newSyncEventType;
            _eventBinding.RaiseCustomEvent("PresentationSync", ref paramsArray);
        }
Esempio n. 6
0
        public void WindowDeactivate([In, MarshalAs(UnmanagedType.IDispatch)] object pres, [In, MarshalAs(UnmanagedType.IDispatch)] object wn)
        {
            Delegate[] recipients = _eventBinding.GetEventRecipients("WindowDeactivate");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(pres, wn);
                return;
            }

            NetOffice.PowerPointApi.Presentation   newPres = NetOffice.Factory.CreateObjectFromComProxy(_eventClass, pres) as NetOffice.PowerPointApi.Presentation;
            NetOffice.PowerPointApi.DocumentWindow newWn   = NetOffice.Factory.CreateObjectFromComProxy(_eventClass, wn) as NetOffice.PowerPointApi.DocumentWindow;
            object[] paramsArray = new object[2];
            paramsArray[0] = newPres;
            paramsArray[1] = newWn;
            _eventBinding.RaiseCustomEvent("WindowDeactivate", ref paramsArray);
        }
Esempio n. 7
0
        public void PresentationBeforeClose([In, MarshalAs(UnmanagedType.IDispatch)] object pres, [In][Out] ref object cancel)
        {
            Delegate[] recipients = _eventBinding.GetEventRecipients("PresentationBeforeClose");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(pres, cancel);
                return;
            }

            NetOffice.PowerPointApi.Presentation newPres = Factory.CreateObjectFromComProxy(_eventClass, pres) as NetOffice.PowerPointApi.Presentation;
            object[] paramsArray = new object[2];
            paramsArray[0] = newPres;
            paramsArray.SetValue(cancel, 1);
            _eventBinding.RaiseCustomEvent("PresentationBeforeClose", ref paramsArray);

            cancel = (bool)paramsArray[1];
        }