Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into view-layout
Browse files Browse the repository at this point in the history
  • Loading branch information
rappen committed Jul 1, 2022
2 parents e5a0421 + 34a96ac commit 5897543
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 54 deletions.
5 changes: 5 additions & 0 deletions FetchXmlBuilder/DockControls/ResultGrid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Rappen.XTB.FetchXmlBuilder.AppCode;
using Rappen.XTB.FetchXmlBuilder.Extensions;
using System;
using System.Linq;
using System.Windows.Forms;

namespace Rappen.XTB.FetchXmlBuilder.DockControls
Expand Down Expand Up @@ -83,6 +84,10 @@ private void RefreshData()
crmGridView1.SuspendLayout();
crmGridView1.Refresh();
crmGridView1.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.DisplayedCells);
crmGridView1.Columns.Cast<DataGridViewColumn>()
.Where(c => c.Width > form.settings.Results.MaxColumnWidth)
.ToList()
.ForEach(c => c.Width = form.settings.Results.MaxColumnWidth);
crmGridView1.ResumeLayout();
}

Expand Down
1 change: 1 addition & 0 deletions FetchXmlBuilder/FetchXmlBuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,7 @@
</EmbeddedResource>
<EmbeddedResource Include="Forms\About.resx">
<DependentUpon>About.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="DockControls\ResultGrid.resx">
<DependentUpon>ResultGrid.cs</DependentUpon>
Expand Down
152 changes: 99 additions & 53 deletions FetchXmlBuilder/Forms/Settings.Designer.cs

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

2 changes: 2 additions & 0 deletions FetchXmlBuilder/Forms/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ private void PopulateSettings(FXBSettings settings)
cmbResult.SelectedIndex = SettingResultToComboBoxItem(settings.Results.ResultOutput);
chkResAllPages.Checked = settings.Results.RetrieveAllPages;
chkClickableLinks.Checked = settings.Results.ClickableLinks;
numMaxColumnWidth.Value = settings.Results.MaxColumnWidth;
propXmlColors.SelectedObject = settings.XmlColors;
txtFetch.ConfigureForXml(settings);
txtFetch.FormatXML(settings.QueryOptions.NewQueryTemplate, settings);
Expand Down Expand Up @@ -82,6 +83,7 @@ internal FXBSettings GetSettings()
settings.Results.ResultOutput = ResultItemToSettingResult(cmbResult.SelectedIndex);
settings.Results.RetrieveAllPages = chkResAllPages.Checked;
settings.Results.ClickableLinks = chkClickableLinks.Checked;
settings.Results.MaxColumnWidth = (int)numMaxColumnWidth.Value;
settings.OpenUncustomizableViews = chkAppAllowUncustViews.Checked;
settings.AddConditionToFilter = chkAddConditionToFilter.Checked;
settings.UseSQL4CDS = chkUseSQL4CDS.Checked;
Expand Down
1 change: 1 addition & 0 deletions FetchXmlBuilder/Settings/FXBSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public class ResultOptions
public bool AlwaysNewWindow { get; set; } = false;
public bool QuickFilter { get; set; } = false;
public bool ClickableLinks { get; set; } = true;
public int MaxColumnWidth { get; set; } = 500;
}

public class DockStates
Expand Down

0 comments on commit 5897543

Please sign in to comment.