public ColourCensus(string country, List <IDisplayColourCensus> reportList) { InitializeComponent(); dgReportSheet.AutoGenerateColumns = false; ExtensionMethods.DoubleBuffered(dgReportSheet, true); this.country = country; this.reportList = new SortableBindingList <IDisplayColourCensus>(reportList); reportFormHelper = new ReportFormHelper(this, "Colour Census Report", dgReportSheet, this.ResetTable, "Colour Census"); boldFont = new Font(dgReportSheet.DefaultCellStyle.Font, FontStyle.Bold); styles = new Dictionary <int, DataGridViewCellStyle>(); DataGridViewCellStyle notAlive = new DataGridViewCellStyle(); notAlive.BackColor = notAlive.ForeColor = Color.DarkGray; styles.Add(0, notAlive); DataGridViewCellStyle missingCensus = new DataGridViewCellStyle(); missingCensus.BackColor = missingCensus.ForeColor = Color.Red; styles.Add(1, missingCensus); DataGridViewCellStyle censusMissingLC = new DataGridViewCellStyle(); censusMissingLC.BackColor = censusMissingLC.ForeColor = Color.Yellow; styles.Add(2, censusMissingLC); DataGridViewCellStyle notCensusEnterednotLCYear = new DataGridViewCellStyle(); notCensusEnterednotLCYear.BackColor = notCensusEnterednotLCYear.ForeColor = Color.LawnGreen; styles.Add(3, notCensusEnterednotLCYear); DataGridViewCellStyle allEntered = new DataGridViewCellStyle(); allEntered.BackColor = allEntered.ForeColor = Color.LawnGreen; styles.Add(4, allEntered); DataGridViewCellStyle lcNoCensus = new DataGridViewCellStyle(); lcNoCensus.BackColor = lcNoCensus.ForeColor = Color.DarkOrange; styles.Add(5, lcNoCensus); DataGridViewCellStyle onOtherCensus = new DataGridViewCellStyle(); onOtherCensus.BackColor = onOtherCensus.ForeColor = Color.DarkSlateGray; styles.Add(6, onOtherCensus); DataGridViewCellStyle outsideUKCensus = new DataGridViewCellStyle(); outsideUKCensus.BackColor = outsideUKCensus.ForeColor = Color.DarkSlateGray; styles.Add(7, onOtherCensus); DataGridViewCellStyle knownMissing = new DataGridViewCellStyle(); knownMissing.BackColor = knownMissing.ForeColor = Color.MediumSeaGreen; styles.Add(8, knownMissing); SetColumns(country); dgReportSheet.DataSource = this.reportList; reportFormHelper.LoadColumnLayout("ColourCensusLayout.xml"); tsRecords.Text = Properties.Messages.Count + reportList.Count + " records listed."; string defaultProvider = (string)Application.UserAppDataRegistry.GetValue("Default Search Provider"); if (defaultProvider == null) { defaultProvider = "FamilySearch"; } cbCensusSearchProvider.Text = defaultProvider; cbFilter.Text = "All Individuals"; }
public LostCousinsReferral(Individual referee, bool onlyInCommon) { InitializeComponent(); FamilyTree ft = FamilyTree.Instance; this.Text = "Lost Cousins Referral for " + referee.ToString(); reportFormHelper = new ReportFormHelper(this, this.Text, dgLCReferrals, this.ResetTable, "Lost Cousins Referrals"); dgLCReferrals.AutoGenerateColumns = false; ExtensionMethods.DoubleBuffered(dgLCReferrals, true); GeneralSettings.CompactCensusRefChanged += new EventHandler(RefreshCensusReferences); Predicate <Individual> lostCousinsFact = new Predicate <Individual>(x => x.HasLostCousinsFact); List <Individual> lostCousinsFacts = ft.AllIndividuals.Filter(lostCousinsFact).ToList <Individual>(); referrals = new List <ExportReferrals>(); foreach (Individual ind in lostCousinsFacts) { List <Fact> indLCFacts = new List <Fact>(); indLCFacts.AddRange(ind.GetFacts(Fact.LOSTCOUSINS)); indLCFacts.AddRange(ind.GetFacts(Fact.LC_FTA)); foreach (Fact f in indLCFacts) { if ((onlyInCommon && ind.IsBloodDirect) || !onlyInCommon) { referrals.Add(new ExportReferrals(ind, f)); } } } reportFormHelper.LoadColumnLayout("LCReferralsColumns.xml"); tsRecords.Text = GetCountofRecords(); }
public Census(CensusDate censusDate, bool censusDone) { InitializeComponent(); dgCensus.AutoGenerateColumns = false; ExtensionMethods.DoubleBuffered(dgCensus, true); ft = FamilyTree.Instance; reportFormHelper = new ReportFormHelper(this, "Census Report", dgCensus, ResetTable, "Census"); LostCousins = false; CensusDate = censusDate; censusCountry = CensusDate.Country; RecordCount = 0; CensusDone = censusDone; string defaultProvider = (string)Application.UserAppDataRegistry.GetValue("Default Search Provider"); if (defaultProvider == null) { defaultProvider = "FamilySearch"; } string defaultRegion = (string)Application.UserAppDataRegistry.GetValue("Default Region"); if (defaultRegion == null) { defaultRegion = ".co.uk"; } cbCensusSearchProvider.Text = defaultProvider; cbRegion.Text = defaultRegion; CensusSettingsUI.CompactCensusRefChanged += new EventHandler(RefreshCensusReferences); Top += NativeMethods.TopTaskbarOffset; }
public Sources(DisplayFact fact) { InitializeComponent(); this.sources = new SortableBindingList <IDisplaySource>(); dgSources.AutoGenerateColumns = false; ExtensionMethods.DoubleBuffered(dgSources, true); reportFormHelper = new ReportFormHelper(this, this.Text, dgSources, this.ResetTable, "Sources"); AddSources(fact); }
public People() { InitializeComponent(); indReportFormHelper = new ReportFormHelper(this, this.Text, dgIndividuals, this.ResetTable, "People"); famReportFormHelper = new ReportFormHelper(this, this.Text, dgFamilies, this.ResetTable, "People"); ExtensionMethods.DoubleBuffered(dgIndividuals, true); ExtensionMethods.DoubleBuffered(dgFamilies, true); boldFont = new Font(dgFamilies.DefaultCellStyle.Font, FontStyle.Bold); normalFont = new Font(dgFamilies.DefaultCellStyle.Font, FontStyle.Regular); SetSaveButtonsStatus(false); }
public SourcesForm(DisplayFact fact) { InitializeComponent(); Top += NativeMethods.TopTaskbarOffset; sources = new SortableBindingList <IDisplaySource>(); dgSources.AutoGenerateColumns = false; ExtensionMethods.DoubleBuffered(dgSources, true); reportFormHelper = new ReportFormHelper(this, this.Text, dgSources, this.ResetTable, "Sources"); if (fact is object) // checks for not null { AddSources(fact); } }
public People() { try { InitializeComponent(); Top += NativeMethods.TopTaskbarOffset; indReportFormHelper = new ReportFormHelper(this, Text, dgIndividuals, ResetTable, "People"); famReportFormHelper = new ReportFormHelper(this, Text, dgFamilies, ResetTable, "People"); ExtensionMethods.DoubleBuffered(dgIndividuals, true); ExtensionMethods.DoubleBuffered(dgFamilies, true); boldFont = new Font(dgFamilies.DefaultCellStyle.Font, FontStyle.Bold); normalFont = new Font(dgFamilies.DefaultCellStyle.Font, FontStyle.Regular); SetSaveButtonsStatus(false); } catch (Exception) { } }
private Facts() { InitializeComponent(); facts = new SortableBindingList <IDisplayFact>(); facts.SortFinished += new EventHandler(Grid_SortFinished); allFacts = false; CensusRefReport = false; dgFacts.AutoGenerateColumns = false; ExtensionMethods.DoubleBuffered(dgFacts, true); reportFormHelper = new ReportFormHelper(this, Text, dgFacts, ResetTable, "Facts"); italicFont = new Font(dgFacts.DefaultCellStyle.Font, FontStyle.Italic); linkFont = new Font(dgFacts.DefaultCellStyle.Font, FontStyle.Underline); dgFacts.Columns["IndividualID"].Visible = true; dgFacts.Columns["CensusReference"].Visible = true; // originally false - trying true v5.0.0.3 dgFacts.Columns["IgnoreFact"].Visible = false; dgFacts.ReadOnly = true; sep1.Visible = false; btnShowHideFacts.Visible = false; }
public ColourBMD(List <IDisplayColourBMD> reportList) { InitializeComponent(); dgBMDReportSheet.AutoGenerateColumns = false; this.reportList = new SortableBindingList <IDisplayColourBMD>(reportList); reportFormHelper = new ReportFormHelper(this, "Colour BMD Report", dgBMDReportSheet, this.ResetTable, "Colour BMD"); ExtensionMethods.DoubleBuffered(dgBMDReportSheet, true); boldFont = new Font(dgBMDReportSheet.DefaultCellStyle.Font, FontStyle.Bold); styles = new Dictionary <BMDColour, DataGridViewCellStyle>(); DataGridViewCellStyle notRequired = new DataGridViewCellStyle(); notRequired.BackColor = notRequired.ForeColor = Color.DarkGray; styles.Add(BMDColour.EMPTY, notRequired); DataGridViewCellStyle missingData = new DataGridViewCellStyle(); missingData.BackColor = missingData.ForeColor = Color.Red; styles.Add(BMDColour.UNKNOWN_DATE, missingData); DataGridViewCellStyle openEndedDateRange = new DataGridViewCellStyle(); openEndedDateRange.BackColor = openEndedDateRange.ForeColor = Color.OrangeRed; styles.Add(BMDColour.OPEN_ENDED_DATE, openEndedDateRange); DataGridViewCellStyle verywideDateRange = new DataGridViewCellStyle(); verywideDateRange.BackColor = verywideDateRange.ForeColor = Color.Tomato; styles.Add(BMDColour.VERY_WIDE_DATE, verywideDateRange); DataGridViewCellStyle wideDateRange = new DataGridViewCellStyle(); wideDateRange.BackColor = wideDateRange.ForeColor = Color.Orange; styles.Add(BMDColour.WIDE_DATE, wideDateRange); DataGridViewCellStyle narrowDateRange = new DataGridViewCellStyle(); narrowDateRange.BackColor = narrowDateRange.ForeColor = Color.Yellow; styles.Add(BMDColour.NARROW_DATE, narrowDateRange); DataGridViewCellStyle justYearDateRange = new DataGridViewCellStyle(); justYearDateRange.BackColor = justYearDateRange.ForeColor = Color.YellowGreen; styles.Add(BMDColour.JUST_YEAR_DATE, justYearDateRange); DataGridViewCellStyle approxDate = new DataGridViewCellStyle(); approxDate.BackColor = approxDate.ForeColor = Color.PaleGreen; styles.Add(BMDColour.APPROX_DATE, approxDate); DataGridViewCellStyle exactDate = new DataGridViewCellStyle(); exactDate.BackColor = exactDate.ForeColor = Color.LawnGreen; styles.Add(BMDColour.EXACT_DATE, exactDate); DataGridViewCellStyle noSpouse = new DataGridViewCellStyle(); noSpouse.BackColor = noSpouse.ForeColor = Color.LightPink; styles.Add(BMDColour.NO_SPOUSE, noSpouse); DataGridViewCellStyle hasChildren = new DataGridViewCellStyle(); hasChildren.BackColor = hasChildren.ForeColor = Color.LightCoral; styles.Add(BMDColour.NO_PARTNER, hasChildren); DataGridViewCellStyle noMarriage = new DataGridViewCellStyle(); noMarriage.BackColor = noMarriage.ForeColor = Color.Firebrick; styles.Add(BMDColour.NO_MARRIAGE, noMarriage); DataGridViewCellStyle isLiving = new DataGridViewCellStyle(); isLiving.BackColor = isLiving.ForeColor = Color.WhiteSmoke; styles.Add(BMDColour.ISLIVING, isLiving); DataGridViewCellStyle over90 = new DataGridViewCellStyle(); over90.BackColor = over90.ForeColor = Color.DarkGray; styles.Add(BMDColour.OVER90, over90); birthColumnIndex = dgBMDReportSheet.Columns["Birth"].Index; burialColumnIndex = dgBMDReportSheet.Columns["CremBuri"].Index; dgBMDReportSheet.DataSource = this.reportList; reportFormHelper.LoadColumnLayout("ColourBMDColumns.xml"); tsRecords.Text = Properties.Messages.Count + reportList.Count + " records listed."; string defaultProvider = (string)Application.UserAppDataRegistry.GetValue("Default Search Provider"); if (defaultProvider == null) { defaultProvider = "FamilySearch"; } if (defaultProvider.Equals("FreeCen")) { defaultProvider = "FreeBMD"; } cbBMDSearchProvider.Text = defaultProvider; cbFilter.Text = "All Individuals"; }