/// <summary>
        ///
        /// </summary>
        /// <param name="newShortcut"></param>
        public void ShortcutAdd([In, MarshalAs(UnmanagedType.IDispatch)] object newShortcut)
        {
            if (!Validate("ShortcutAdd"))
            {
                Invoker.ReleaseParamsArray(newShortcut);
                return;
            }

            NetOffice.OutlookApi.OutlookBarShortcut newNewShortcut = Factory.CreateKnownObjectFromComProxy <NetOffice.OutlookApi.OutlookBarShortcut>(EventClass, newShortcut, typeof(NetOffice.OutlookApi.OutlookBarShortcut));
            object[] paramsArray = new object[1];
            paramsArray[0] = newNewShortcut;
            EventBinding.RaiseCustomEvent("ShortcutAdd", ref paramsArray);
        }
示例#2
0
        public void ShortcutAdd([In, MarshalAs(UnmanagedType.IDispatch)] object newShortcut)
        {
            Delegate[] recipients = _eventBinding.GetEventRecipients("ShortcutAdd");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(newShortcut);
                return;
            }

            NetOffice.OutlookApi.OutlookBarShortcut newNewShortcut = Factory.CreateObjectFromComProxy(_eventClass, newShortcut) as NetOffice.OutlookApi.OutlookBarShortcut;
            object[] paramsArray = new object[1];
            paramsArray[0] = newNewShortcut;
            _eventBinding.RaiseCustomEvent("ShortcutAdd", ref paramsArray);
        }
        public void ShortcutContextMenuDisplay([In, MarshalAs(UnmanagedType.IDispatch)] object commandBar, [In, MarshalAs(UnmanagedType.IDispatch)] object shortcut)
        {
            if (!Validate("ShortcutContextMenuDisplay"))
            {
                Invoker.ReleaseParamsArray(commandBar, shortcut);
                return;
            }

            NetOffice.OfficeApi.CommandBar          newCommandBar = Factory.CreateKnownObjectFromComProxy <NetOffice.OfficeApi.CommandBar>(EventClass, commandBar, NetOffice.OfficeApi.CommandBar.LateBindingApiWrapperType);
            NetOffice.OutlookApi.OutlookBarShortcut newShortcut   = Factory.CreateKnownObjectFromComProxy <NetOffice.OutlookApi.OutlookBarShortcut>(EventClass, shortcut, NetOffice.OutlookApi.OutlookBarShortcut.LateBindingApiWrapperType);
            object[] paramsArray = new object[2];
            paramsArray[0] = newCommandBar;
            paramsArray[1] = newShortcut;
            EventBinding.RaiseCustomEvent("ShortcutContextMenuDisplay", ref paramsArray);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="shortcut"></param>
        /// <param name="cancel"></param>
        public void BeforeShortcutRemove([In, MarshalAs(UnmanagedType.IDispatch)] object shortcut, [In][Out] ref object cancel)
        {
            if (!Validate("BeforeShortcutRemove"))
            {
                Invoker.ReleaseParamsArray(shortcut, cancel);
                return;
            }

            NetOffice.OutlookApi.OutlookBarShortcut newShortcut = Factory.CreateKnownObjectFromComProxy <NetOffice.OutlookApi.OutlookBarShortcut>(EventClass, shortcut, typeof(NetOffice.OutlookApi.OutlookBarShortcut));
            object[] paramsArray = new object[2];
            paramsArray[0] = newShortcut;
            paramsArray.SetValue(cancel, 1);
            EventBinding.RaiseCustomEvent("BeforeShortcutRemove", ref paramsArray);

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

            NetOffice.OfficeApi.CommandBar          newCommandBar = NetOffice.Factory.CreateObjectFromComProxy(_eventClass, commandBar) as NetOffice.OfficeApi.CommandBar;
            NetOffice.OutlookApi.OutlookBarShortcut newShortcut   = NetOffice.Factory.CreateObjectFromComProxy(_eventClass, shortcut) as NetOffice.OutlookApi.OutlookBarShortcut;
            object[] paramsArray = new object[2];
            paramsArray[0] = newCommandBar;
            paramsArray[1] = newShortcut;
            _eventBinding.RaiseCustomEvent("ShortcutContextMenuDisplay", ref paramsArray);
        }
示例#6
0
        public void BeforeShortcutRemove([In, MarshalAs(UnmanagedType.IDispatch)] object shortcut, [In][Out] ref object cancel)
        {
            Delegate[] recipients = _eventBinding.GetEventRecipients("BeforeShortcutRemove");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(shortcut, cancel);
                return;
            }

            NetOffice.OutlookApi.OutlookBarShortcut newShortcut = Factory.CreateObjectFromComProxy(_eventClass, shortcut) as NetOffice.OutlookApi.OutlookBarShortcut;
            object[] paramsArray = new object[2];
            paramsArray[0] = newShortcut;
            paramsArray.SetValue(cancel, 1);
            _eventBinding.RaiseCustomEvent("BeforeShortcutRemove", ref paramsArray);

            cancel = (bool)paramsArray[1];
        }