using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace FCC_Uber_MDX_Configurator { public partial class HelpForm : Form { public int index; public HelpForm(int input_index) { InitializeComponent(); index = input_index; LBL_HELP_TOPIC.Text = GlobalStaticClass.AllHelpTopics[input_index].HelpTitle; LBL_Description.Text = " " + GlobalStaticClass.AllHelpTopics[input_index].HelpDescription.Replace("\\r\\n", "\r\n "); if (GlobalStaticClass.AllHelpTopics.Count > 0) { LISTBOX_LINKS.Items.AddRange(GlobalStaticClass.AllHelpTopics[input_index].ToListArray()); } else { LISTBOX_LINKS.Visible = false; } LBL_HELP_TOPIC.Update(); LBL_Description.Update(); } private void HelpForm_Resize(object sender, EventArgs e) { if (this.Width < 30) { return; } LBL_HELP_TOPIC.MinimumSize = new Size(this.Width - 30, 0); LBL_Description.MinimumSize = new Size(this.Width - 30, 0); } private void LISTBOX_LINKS_SelectedValueChanged(object sender, EventArgs e) { if (LISTBOX_LINKS.SelectedIndex >= 0 && GlobalStaticClass.AllHelpTopics[index].HelpLinkIndexes.Count > LISTBOX_LINKS.SelectedIndex) { GlobalStaticClass.FireHelpEvent(GlobalStaticClass.AllHelpTopics[index].HelpLinkIndexes[LISTBOX_LINKS.SelectedIndex].FormID, GlobalStaticClass.AllHelpTopics[index].HelpLinkIndexes[LISTBOX_LINKS.SelectedIndex].TopicID); } } } }