Skip to content

Commit

Permalink
Added Custom Fact Report to main lists
Browse files Browse the repository at this point in the history
  • Loading branch information
ShammyLevva committed Aug 1, 2020
1 parent b43a207 commit fcf17eb
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 15 deletions.
50 changes: 42 additions & 8 deletions FTAnalyser/Forms/MainForm.Designer.cs

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

35 changes: 31 additions & 4 deletions FTAnalyser/Forms/MainForm.cs
Expand Up @@ -29,7 +29,7 @@ namespace FTAnalyzer
{
public partial class MainForm : Form
{
public static string VERSION = "7.8.5.0";
public static string VERSION = "8.0.0.0";

static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

Expand Down Expand Up @@ -588,6 +588,20 @@ void DgOccupations_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
}
}

void dgCustomFacts_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex >= 0 && e.ColumnIndex >= 0)
{
HourGlass(true);
var customFacts = (DisplayCustomFact)dgCustomFacts.CurrentRow.DataBoundItem;
var frmInd = new People();
frmInd.SetCustomFacts(customFacts.CustomFactName, ft.AllCustomFactIndividuals(customFacts.CustomFactName));
DisposeDuplicateForms(frmInd);
frmInd.Show();
HourGlass(false);
}
}

void SetAsRootToolStripMenuItem_Click(object sender, EventArgs e)
{
HourGlass(true);
Expand Down Expand Up @@ -1336,8 +1350,8 @@ void TabControl_SelectedIndexChanged(object sender, EventArgs e)
try
{
treeViewLocations.Nodes.AddRange(nodes);
}
catch(ArgumentException fEx)
}
catch (ArgumentException fEx)
{
Console.WriteLine(fEx.Message); // typically font loading error
}
Expand Down Expand Up @@ -1399,6 +1413,18 @@ void TabMainListSelector_SelectedIndexChanged(object sender, EventArgs e)
tsHintsLabel.Text = Messages.Hints_Occupation;
Analytics.TrackAction(Analytics.MainListsAction, Analytics.OccupationsTabEvent);
}
else if (tabMainListsSelector.SelectedTab == tabCustomFacts)
{
SortableBindingList<IDisplayCustomFact> list = ft.AllCustomFacts;
dgCustomFacts.DataSource = list;
dgCustomFacts.Sort(dgCustomFacts.Columns["CustomFactName"], ListSortDirection.Ascending);
dgCustomFacts.AllowUserToResizeColumns = true;
dgCustomFacts.Focus();
mnuPrint.Enabled = true;
tsCountLabel.Text = Messages.Count + list.Count;
tsHintsLabel.Text = Messages.Hints_CustomFacts;
Analytics.TrackAction(Analytics.MainListsAction, Analytics.CustomFactTabEvent);
}
}

void SetupIndividualsTab()
Expand Down Expand Up @@ -3507,5 +3533,6 @@ void MnuJSON_Click(object sender, EventArgs e)
}
HourGlass(false);
}

}
}
}
2 changes: 1 addition & 1 deletion FTAnalyser/Forms/MainForm.resx
Expand Up @@ -342,7 +342,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAy
DwAAAk1TRnQBSQFMAgEBCAEAAdABEwHQARMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
DwAAAk1TRnQBSQFMAgEBCAEAAegBEwHoARMBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAATADAAEBAQABCAYAAQwYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
Expand Down
12 changes: 12 additions & 0 deletions FTAnalyser/Forms/People.cs
Expand Up @@ -92,6 +92,18 @@ public void SetWorkers(string job, SortableBindingList<Individual> workers)
splitContainer.Panel2Collapsed = true;
UpdateStatusCount();
}
public void SetCustomFacts(string factType, SortableBindingList<Individual> individuals)
{
Text = "Individuals whose have the custom fact of " + (string.IsNullOrEmpty(factType) ? "not entered" : factType);
SortableBindingList<IDisplayIndividual> dsInd = new SortableBindingList<IDisplayIndividual>();
foreach (Individual i in individuals)
dsInd.Add(i);
dgIndividuals.DataSource = dsInd;
SortIndividuals();
dgIndividuals.Dock = DockStyle.Fill;
splitContainer.Panel2Collapsed = true;
UpdateStatusCount();
}

public void SetSurnameStats(SurnameStats stat, bool ignoreCase)
{
Expand Down
Binary file modified FTAnalyser/GlobalSuppressions.cs
Binary file not shown.
11 changes: 10 additions & 1 deletion FTAnalyser/Properties/Messages.Designer.cs

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

3 changes: 3 additions & 0 deletions FTAnalyser/Properties/Messages.resx
Expand Up @@ -120,6 +120,9 @@
<data name="Count" xml:space="preserve">
<value>Count: </value>
</data>
<data name="Hints_CustomFacts" xml:space="preserve">
<value>Double click to show list of individuals with this custom fact</value>
</data>
<data name="Hints_Duplicates" xml:space="preserve">
<value>Double click to show the facts for both the individual and their possible match.</value>
</data>
Expand Down
2 changes: 1 addition & 1 deletion docs/Whats New in this Release.md
@@ -1,4 +1,4 @@
#### Updated Release Version 7.8.5 18th July 2020
#### Updated Release Version 7.8.5 21st July 2020
**Updates**
Added _ATTR custom attribute flag support from Family Historian
Renamed Unknown fact types to Unknown/Custom fact types
Expand Down

0 comments on commit fcf17eb

Please sign in to comment.