Skip to content

Commit

Permalink
Add setting to Show Validation Tips. Getting back Show Help setting. R…
Browse files Browse the repository at this point in the history
…esolved #615
  • Loading branch information
rappen committed Jan 13, 2022
1 parent 9f3b8c2 commit bfda976
Show file tree
Hide file tree
Showing 6 changed files with 168 additions and 132 deletions.
2 changes: 2 additions & 0 deletions FetchXmlBuilder/AppCode/FXBSettings.cs
Expand Up @@ -29,10 +29,12 @@ public class FXBSettings
public bool AddConditionToFilter { get; set; } = true;
public bool UseSQL4CDS { get; set; }
public bool UseLookup { get; set; } = true;
public bool ShowHelpLinks { get; set; } = true;
public bool ShowButtonTexts { get; set; } = true;
public bool LinkEntityIdAttributesOnly { get; set; } = true;
public XmlColors XmlColors { get; set; } = new XmlColors();
public bool ShowNodeType { get; set; } = false;
public bool ShowValidation { get; set; } = true;
}

public class QueryOptions
Expand Down
4 changes: 4 additions & 0 deletions FetchXmlBuilder/AppCode/Validations.cs
Expand Up @@ -8,6 +8,10 @@ internal static class Validations
{
internal static ControlValidationResult GetWarning(TreeNode node, FetchXmlBuilder fxb)
{
if (!fxb.settings.ShowValidation)
{
return null;
}
var name = TreeNodeHelper.GetAttributeFromNode(node, "name");
var attribute = TreeNodeHelper.GetAttributeFromNode(node, "attribute");
var parententity = TreeNodeHelper.ForThisNodeEntityName(node);
Expand Down
2 changes: 1 addition & 1 deletion FetchXmlBuilder/Controls/FetchXmlElementControlBase.cs
Expand Up @@ -76,7 +76,7 @@ public void InitializeFXB(Dictionary<string, string> collection, FetchXmlBuilder
BlinkStyle = ErrorBlinkStyle.NeverBlink,
Icon = InfoIcon
};
ShowHelpIcon(this, true);
ShowHelpIcon(this, fxb?.settings?.ShowHelpLinks != false);
PopulateControls();
ControlUtils.FillControls(collec, Controls, this);
controlsCheckSum = ControlUtils.ControlsChecksum(Controls);
Expand Down

0 comments on commit bfda976

Please sign in to comment.