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); }
/// <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); }
/// <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); }
/// <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]); }
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); }
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); }
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]; }