/// ------------------------------------------------------------------------------------ /// <summary> /// Initialize controls /// </summary> /// ------------------------------------------------------------------------------------ protected virtual void InitializeChooserDlg() { InitializeComponent(); if (m_list != null) { SetTitle(); } tvPossibilities.Load(m_list, m_initiallySelectedHvos, SelectedPossibilitiesLabel); }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="FwChooserDlg"/> class. /// </summary> /// <param name="list">The possibility list used to populate the tree</param> /// <param name="initiallySelectedHvos">The sequence of HVOs of initially selected /// possibilities</param> /// <param name="helptopicProvider">object that knows how to serve up help topics</param> /// <param name="sHelpTopicKey">Topic to display if user clicks Help button (can be /// specific to the possibility list being displayed)</param> /// <param name="projSettingsKey">The project settings key.</param> /// ------------------------------------------------------------------------------------ public FwChooserDlg(ICmPossibilityList list, int[] initiallySelectedHvos, IHelpTopicProvider helptopicProvider, string sHelpTopicKey, IProjectSpecificSettingsKeyProvider projSettingsKey) : this() { if (initiallySelectedHvos == null) throw new ArgumentNullException("initiallySelectedHvos"); if (list == null) throw new ArgumentNullException("list"); m_list = list; m_cache = m_list.Cache; m_initiallySelectedHvos = new List<int>(initiallySelectedHvos); m_helptopicProvider = helptopicProvider; m_helpTopicKey = sHelpTopicKey; m_projSettingsKey = projSettingsKey; SetTitle(); tvPossibilities.Load(m_list, m_initiallySelectedHvos, SelectedPossibilitiesLabel); }