Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Src/LexText/LexTextDll/HelpTopicPaths.resx
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@
<data name="khtpTryAWord" xml:space="preserve">
<value>User_Interface/Menus/Parser/Try_a_word.htm</value>
</data>
<data name="khtpHCMaxCompoundRules" xml:space="preserve">
<value>User_Interface/Menus/Parser/MaxApps_dialog_box.htm</value>
</data>
<data name="khtpField-LexEntry-CitationForm" xml:space="preserve">
<value>User_Interface/Field_Descriptions/Lexicon/Lexicon_Edit_fields/Entry_level_fields/Citation_Form_field.htm</value>
</data>
Expand Down
8 changes: 6 additions & 2 deletions Src/LexText/ParserUI/HCMaxCompoundRulesDlg.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) 2025 SIL International
// This software is licensed under the LGPL, version 2.1 or later
// (http://www.gnu.org/licenses/lgpl-2.1.html)
using SIL.FieldWorks.Common.FwUtils;
using SIL.LCModel;
using System;
using System.Data;
Expand All @@ -21,10 +22,12 @@ public partial class HCMaxCompoundRulesDlg : ParserParametersBase
private const string m_MaxApps = "MaxApps";
private const string m_Guid = "Guid";
private const string m_CompoundRules = "CompoundRules";
private const string HelpTopicID = "khtpHCMaxCompoundRules";
private XElement m_ParserParametersElem;

private DataGrid m_dataGrid;
private DataSet m_dsCompoundRules;
private IHelpTopicProvider m_helpTopicProvider;

public HCMaxCompoundRulesDlg()
{
Expand All @@ -34,13 +37,14 @@ public HCMaxCompoundRulesDlg()
/// <summary>
/// Set up the dlg in preparation to showing it.
/// </summary>
public void SetDlgInfo(string title, string parserParameters, ILcmOwningSequence<IMoCompoundRule> compoundRules)
public void SetDlgInfo(string title, string parserParameters, ILcmOwningSequence<IMoCompoundRule> compoundRules, IHelpTopicProvider helpTopicProvider)
{
CheckDisposed();

XmlRep = parserParameters;
m_ParserParametersElem = XElement.Parse(parserParameters);
Text = title;
m_helpTopicProvider = helpTopicProvider;

m_dsCompoundRules = new DataSet { DataSetName = m_CompoundRules };

Expand Down Expand Up @@ -151,7 +155,7 @@ private XElement CreateCompoundRulesElementToStore(XElement elem)

private void btnHelp_Click(object sender, EventArgs e)
{
MessageBox.Show("Help clicked");
ShowHelp.ShowHelpTopic(m_helpTopicProvider, HelpTopicID);
}

protected void EnforceValidValue(XElement elem, string item, int min, int max, bool useMinIfZero)
Expand Down
2 changes: 1 addition & 1 deletion Src/LexText/ParserUI/ParserParametersDlg.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ private void btnHCMaxCompoundRuleApps_Click(object sender, EventArgs e)
{
// create and show compound rule max apps dialog
var dlg = new HCMaxCompoundRulesDlg();
dlg.SetDlgInfo("MaxApps", XmlRep, m_compoundRules);
dlg.SetDlgInfo("MaxApps", XmlRep, m_compoundRules, m_helpTopicProvider);
dlg.ShowDialog(this);
XmlRep = dlg.XmlRep;
}
Expand Down
Loading