private void UpdateControls() { switch (fFilter.BranchCut) { case ChartFilter.BranchCutType.Persons: rbCutPersons.Checked = true; break; case ChartFilter.BranchCutType.Years: rbCutYears.Checked = true; break; case ChartFilter.BranchCutType.None: rbCutNone.Checked = true; break; } edYear.Enabled = (fFilter.BranchCut == ChartFilter.BranchCutType.Years); fPersonsList.Enabled = (fFilter.BranchCut == ChartFilter.BranchCutType.Persons); edYear.Value = fFilter.BranchYear; fPersonsList.ClearItems(); if (!string.IsNullOrEmpty(fTemp)) { string[] tmpRefs = fTemp.Split(';'); int num = tmpRefs.Length; for (int i = 0; i < num; i++) { string xref = tmpRefs[i]; GEDCOMIndividualRecord p = fBase.Context.Tree.XRefIndex_Find(xref) as GEDCOMIndividualRecord; if (p != null) { fPersonsList.AddItem(p, GKUtils.GetNameString(p, true, false)); } } } if (fFilter.SourceMode != FilterGroupMode.Selected) { cmbSource.SelectedIndex = (sbyte)fFilter.SourceMode; } else { GEDCOMSourceRecord srcRec = fBase.Context.Tree.XRefIndex_Find(fFilter.SourceRef) as GEDCOMSourceRecord; if (srcRec != null) { cmbSource.Text = srcRec.FiledByEntry; } } }
private void UpdateLists() { fPhonesList.ClearItems(); foreach (GEDCOMTag tag in fAddress.PhoneNumbers) { fPhonesList.AddItem(tag, tag.StringValue); } fMailsList.ClearItems(); foreach (GEDCOMTag tag in fAddress.EmailAddresses) { fMailsList.AddItem(tag, tag.StringValue); } fWebsList.ClearItems(); foreach (GEDCOMTag tag in fAddress.WebPages) { fWebsList.AddItem(tag, tag.StringValue); } }
private static void AddItem(GKSheetList list, string name, string value) { list.AddItem(null, new object[] { name, value }); }
private static void AddItem(GKSheetList list, string name, string value) { list.AddItem(null, name, value); }