示例#1
0
        /// <summary>
        /// Called when the data entry field is entered to change a topic, but only if panel is visible
        /// </summary>
        /// <param name="e">A HelpPanelEventArgs parameter with a new help title, text and image.</param>
        protected virtual void OnHelpContextChanged(HelpPannelEventArgs e)
        {
            HelpButtonHandler handler = HelpContextChanged;

            if (handler != null)
            {
                handler(this, e);
            }
        }
 // Someone entered a help sensitive area, so if the help is already open, add new content
 void MyFileElement_HelpContextChanged(object sender, HelpPannelEventArgs e)
 {
     // Change the help content only if the panel is already open
     if (splitContainer1.Panel2Collapsed == false)
     {
         l_HelpTitle = e.Title;
         l_HelpText  = e.Text;
         l_HelpImage = e.Image;
         ChangeHelpContent();
         ResizeHelp();
     }
 }
 // Someone pressed a help button, so open the help for that context and expand the help panel
 private void Element_HelpButtonPressed(object sender, HelpPannelEventArgs e)
 {
     if (splitContainer1.Panel2Collapsed == true)
     {
         Width = Width + m_PanelWidth;
         splitContainer1.Panel2Collapsed = false;
         cmdToggleHelp.Text = "<< Hide Help";
     }
     l_HelpTitle        = e.Title;
     l_HelpText         = e.Text;
     lblHelpImage.Image = e.Image;
     ChangeHelpContent();
     ResizeHelp();
 }
示例#4
0
        private void cmdHelp_Click(object sender, EventArgs e)
        {
            HelpPannelEventArgs htxt = new HelpPannelEventArgs(HelpTitle, HelpText, HelpImage);

            OnHelpButtonPressed(htxt);
        }