Ejemplo n.º 1
0
 private static Color GetComparisonColorValT <T>(string nestedName, T?currentValue, AutoGenConfigForm parentForm, Func <T?, T?, bool> equalityFunc)
     where T : struct
 => equalityFunc(currentValue, parentForm.BaselineValues[nestedName]?.Let(it => (T)it))
                         ? GetInitComparisonColorValT(nestedName, currentValue, equalityFunc)
 : equalityFunc(currentValue, AutoGenConfigForm.DefaultValues[nestedName]?.Let(it => (T)it))
                                 ? AutoGenConfigForm.ComparisonColors.ChangedUnset
 : AutoGenConfigForm.ComparisonColors.Changed;
Ejemplo n.º 2
0
 private static Color GetComparisonColorRefT <T>(string nestedName, T?currentValue, AutoGenConfigForm parentForm, Func <T?, T?, bool> equalityFunc)
     where T : class
 => equalityFunc(currentValue, parentForm.BaselineValues[nestedName] as T)
                         ? GetInitComparisonColorRefT(nestedName, currentValue, equalityFunc)
 : equalityFunc(currentValue, AutoGenConfigForm.DefaultValues[nestedName] as T)
                                 ? AutoGenConfigForm.ComparisonColors.ChangedUnset
 : AutoGenConfigForm.ComparisonColors.Changed;