Skip to content

Commit

Permalink
Adding option to "Wait until all loaded entities"
Browse files Browse the repository at this point in the history
  • Loading branch information
rappen committed Apr 23, 2022
1 parent 8a334a3 commit 70fd47d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
1 change: 1 addition & 0 deletions FetchXmlBuilder/AppCode/FXBSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public class FXBSettings
public bool ShowValidationInfo { get; set; } = true;
public bool ShowRepository { get; set; } = false;
public bool TryMetadataCache { get; set; } = true;
public bool WaitUntilMetadataLoaded { get; set; } = false;
}

public class QueryOptions
Expand Down
18 changes: 16 additions & 2 deletions FetchXmlBuilder/Forms/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions FetchXmlBuilder/Forms/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ private void PopulateSettings(FXBSettings settings)
txtFetch.ConfigureForXml(settings);
txtFetch.FormatXML(settings.QueryOptions.NewQueryTemplate, settings);
chkTryMetadataCache.Checked = settings.TryMetadataCache;
if (chkTryMetadataCache.Checked)
{
chkWaitUntilMetadataLoaded.Enabled = true;
chkWaitUntilMetadataLoaded.Checked = settings.WaitUntilMetadataLoaded;
}
else
{
chkWaitUntilMetadataLoaded.Enabled = false;
chkWaitUntilMetadataLoaded.Checked = false;
}
}

private int SettingResultToComboBoxItem(ResultOutput resultOutput)
Expand Down Expand Up @@ -82,6 +92,7 @@ internal FXBSettings GetSettings()
settings.QueryOptions.ShowAllAttributes = chkShowAllAttributes.Checked;
settings.XmlColors = propXmlColors.SelectedObject as XmlColors;
settings.TryMetadataCache = chkTryMetadataCache.Checked;
settings.WaitUntilMetadataLoaded = chkWaitUntilMetadataLoaded.Checked;
return settings;
}

Expand Down Expand Up @@ -176,5 +187,14 @@ private void chkShowValidation_CheckedChanged(object sender, EventArgs e)
}
chkShowValidationInfo.Enabled = chkShowValidation.Checked;
}

private void chkTryMetadataCache_CheckedChanged(object sender, EventArgs e)
{
chkWaitUntilMetadataLoaded.Enabled = chkTryMetadataCache.Checked;
if (!chkTryMetadataCache.Checked)
{
chkWaitUntilMetadataLoaded.Checked = false;
}
}
}
}

0 comments on commit 70fd47d

Please sign in to comment.