Beispiel #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="button"></param>
        public void ButtonClick([In, MarshalAs(UnmanagedType.IDispatch)] object button)
        {
            if (!Validate("ButtonClick"))
            {
                Invoker.ReleaseParamsArray(button);
                return;
            }

            NetOffice.MSComctlLibApi.Button newButton = Factory.CreateKnownObjectFromComProxy <NetOffice.MSComctlLibApi.Button>(EventClass, button, typeof(NetOffice.MSComctlLibApi.Button));
            object[] paramsArray = new object[1];
            paramsArray[0] = newButton;
            EventBinding.RaiseCustomEvent("ButtonClick", ref paramsArray);
        }
        public void ButtonDropDown([In, MarshalAs(UnmanagedType.IDispatch)] object button)
        {
            Delegate[] recipients = _eventBinding.GetEventRecipients("ButtonDropDown");
            if ((true == _eventClass.IsCurrentlyDisposing) || (recipients.Length == 0))
            {
                Invoker.ReleaseParamsArray(button);
                return;
            }

            NetOffice.MSComctlLibApi.Button newButton = Factory.CreateObjectFromComProxy(_eventClass, button) as NetOffice.MSComctlLibApi.Button;
            object[] paramsArray = new object[1];
            paramsArray[0] = newButton;
            _eventBinding.RaiseCustomEvent("ButtonDropDown", ref paramsArray);
        }