public override int GetHelpTopic(out string fileName)
            {
                int topic = 0;

                QueryAccessibilityHelpEventHandler handler = (QueryAccessibilityHelpEventHandler)Owner.Events[ToolStripItem.s_queryAccessibilityHelpEvent];

                if (handler != null)
                {
                    QueryAccessibilityHelpEventArgs args = new QueryAccessibilityHelpEventArgs();
                    handler(Owner, args);

                    fileName = args.HelpNamespace;

                    try
                    {
                        topic = int.Parse(args.HelpKeyword, CultureInfo.InvariantCulture);
                    }
                    catch
                    {
                    }

                    return(topic);
                }

                return(base.GetHelpTopic(out fileName));
            }
            public override int GetHelpTopic(out string?fileName)
            {
                int topic = 0;

                QueryAccessibilityHelpEventHandler?handler = (QueryAccessibilityHelpEventHandler?)Owner.Events[s_queryAccessibilityHelpEvent];

                if (handler is null)
                {
                    return(base.GetHelpTopic(out fileName));
                }

                QueryAccessibilityHelpEventArgs args = new QueryAccessibilityHelpEventArgs();

                handler(Owner, args);

                fileName = args.HelpNamespace;

                try
                {
                    topic = int.Parse(args.HelpKeyword, CultureInfo.InvariantCulture);
                }
                catch (Exception e) when(!ClientUtils.IsCriticalException(e))
                {
                }

                return(topic);
            }
Ejemplo n.º 3
0
        /// <include file='doc\HelpProvider.uex' path='docs/doc[@for="HelpProvider.OnQueryAccessibilityHelp"]/*' />
        /// <devdoc>
        ///     Handles the help event for any bound controls.
        /// </devdoc>
        /// <internalonly/>
        private void OnQueryAccessibilityHelp(object sender, QueryAccessibilityHelpEventArgs e)
        {
            Control ctl = (Control)sender;

            e.HelpString    = GetHelpString(ctl);
            e.HelpKeyword   = GetHelpKeyword(ctl);
            e.HelpNamespace = HelpNamespace;
        }
Ejemplo n.º 4
0
        private void HandleQueryAccessibilityHelp(object sender, QueryAccessibilityHelpEventArgs e)
        {
            QueryAccessibilityHelpEventHandler handler = (QueryAccessibilityHelpEventHandler)Events[ToolStripItem.EventQueryAccessibilityHelp];

            if (handler != null)
            {
                handler(this, e);
            }
        }
Ejemplo n.º 5
0
            public override int GetHelpTopic(out string?fileName)
            {
                int topic = 0;

                QueryAccessibilityHelpEventHandler?handler = (QueryAccessibilityHelpEventHandler?)Owner.Events[s_queryAccessibilityHelpEvent];

                if (handler is not null)
                {
                    QueryAccessibilityHelpEventArgs args = new QueryAccessibilityHelpEventArgs();
                    handler(Owner, args);

                    fileName = args.HelpNamespace;

                    int.TryParse(args.HelpKeyword, NumberStyles.Integer, CultureInfo.InvariantCulture, out topic);

                    return(topic);
                }

                return(base.GetHelpTopic(out fileName));
            }
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// queryaccessibilityhelpeventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this QueryAccessibilityHelpEventHandler queryaccessibilityhelpeventhandler, Object sender, QueryAccessibilityHelpEventArgs e, AsyncCallback callback)
        {
            if(queryaccessibilityhelpeventhandler == null) throw new ArgumentNullException("queryaccessibilityhelpeventhandler");

            return queryaccessibilityhelpeventhandler.BeginInvoke(sender, e, callback, null);
        }
Ejemplo n.º 7
0
 /// <include file='doc\HelpProvider.uex' path='docs/doc[@for="HelpProvider.OnQueryAccessibilityHelp"]/*' />
 /// <devdoc>
 ///     Handles the help event for any bound controls.
 /// </devdoc>
 /// <internalonly/>
 private void OnQueryAccessibilityHelp(object sender, QueryAccessibilityHelpEventArgs e) {
     Control ctl = (Control)sender;
     
     e.HelpString = GetHelpString(ctl);
     e.HelpKeyword = GetHelpKeyword(ctl);
     e.HelpNamespace = HelpNamespace;
 }    
Ejemplo n.º 8
0
 private void ParseErrorDialog_QueryAccessibilityHelp(object sender, QueryAccessibilityHelpEventArgs e)
 {
 }
 // Handles the QueryAccessibilityHelp event.
 private void ChartControl_QueryAccessibilityHelp(object sender,
                                                  System.Windows.Forms.QueryAccessibilityHelpEventArgs e)
 {
     e.HelpString = "Displays chart data";
 }
Ejemplo n.º 10
0
 // <Snippet2>
 private void ovalShape1_QueryAccessibilityHelp(object sender,
                                                System.Windows.Forms.QueryAccessibilityHelpEventArgs e)
 {
     e.HelpString = "Displays an oval representing a network node.";
 }
 private void HandleQueryAccessibilityHelp(object sender, QueryAccessibilityHelpEventArgs e)
 {
     QueryAccessibilityHelpEventHandler handler = (QueryAccessibilityHelpEventHandler) base.Events[ToolStripItem.EventQueryAccessibilityHelp];
     if (handler != null)
     {
         handler(this, e);
     }
 }
Ejemplo n.º 12
0
	// Methods that support "AccessibleObject".

	// Get the accessibility help information.
	internal String GetAccessibilityHelp()
			{
				QueryAccessibilityHelpEventArgs e;
				e = new QueryAccessibilityHelpEventArgs();
				OnQueryAccessibilityHelp(e);
				return e.HelpString;
			}
Ejemplo n.º 13
0
	protected virtual void OnQueryAccessibilityHelp
		(QueryAccessibilityHelpEventArgs e)
			{
				QueryAccessibilityHelpEventHandler handler;
				handler = (QueryAccessibilityHelpEventHandler)
					(GetHandler(EventId.QueryAccessibilityHelp));
				if(handler != null)
				{
					handler(this, e);
				}
			}
Ejemplo n.º 14
0
 void OnQueryAccessibilityHelp(object sender, QueryAccessibilityHelpEventArgs e) {
     ToolStripItem ctl = (ToolStripItem)sender;
     e.HelpString = GetHelpString(ctl);
     e.HelpKeyword = GetHelpKeyword(ctl);
     e.HelpNamespace = HelpNamespace;
 }
 public override int GetHelpTopic(out string fileName)
 {
     int num = 0;
     QueryAccessibilityHelpEventHandler handler = (QueryAccessibilityHelpEventHandler) this.Owner.Events[ToolStripItem.EventQueryAccessibilityHelp];
     if (handler == null)
     {
         return base.GetHelpTopic(out fileName);
     }
     QueryAccessibilityHelpEventArgs e = new QueryAccessibilityHelpEventArgs();
     handler(this.Owner, e);
     fileName = e.HelpNamespace;
     if ((fileName != null) && (fileName.Length > 0))
     {
         System.Windows.Forms.IntSecurity.DemandFileIO(FileIOPermissionAccess.PathDiscovery, fileName);
     }
     try
     {
         num = int.Parse(e.HelpKeyword, CultureInfo.InvariantCulture);
     }
     catch
     {
     }
     return num;
 }