public IColor GetFillColor(bool dead) { if (fFlags.Contains(PersonFlag.pfSpecialMark)) { return(ChartRenderer.GetColor(BSDColors.Khaki)); } if (dead) { return(ChartRenderer.GetColor(BSDColors.Black)); } if (IsDup) { return(ChartRenderer.GetColor(BSDColors.Silver)); } if (UserColor != null) { return(UserColor); } bool divorced = HasFlag(PersonFlag.pfDivorced); IColor result; TreeChartOptions options = fModel.Options; switch (fSex) { case GDMSex.svMale: result = divorced ? options.UnHusbandColor : options.MaleColor; break; case GDMSex.svFemale: result = divorced ? options.UnWifeColor : options.FemaleColor; break; default: result = options.UnkSexColor; break; } return(result); }
public IColor GetSelectedColor() { int result; switch (fSex) { case GDMSex.svMale: result = BSDColors.Blue; break; case GDMSex.svFemale: result = BSDColors.Red; break; default: result = BSDColors.Black; break; } return(ChartRenderer.GetColor(result)); }
public IColor GetFillColor(bool dead) { IColor result; if (dead) { result = ChartRenderer.GetColor(ChartRenderer.Black); } else { if (IsDup) { result = ChartRenderer.GetColor(ChartRenderer.Silver); } else { TreeChartOptions options = fModel.Options; switch (fSex) { case GEDCOMSex.svMale: result = Divorced ? options.UnHusbandColor : options.MaleColor; break; case GEDCOMSex.svFemale: result = Divorced ? options.UnWifeColor : options.FemaleColor; break; default: result = options.UnkSexColor; break; } } } return(result); }