示例#1
0
 public static string ExercisePurposeDescription(this PersonalExercisePurpose purpose)
 {
     return(String.Concat(
                purpose.ExercisePowerAbility(),
                " / ",
                purpose.ExercisePurpose()));
 }
示例#2
0
        public static String PowerAbliityCss(this PersonalExercisePurpose item, String append = null)
        {
            String css = "col-red";

            if (item != null && item.PowerAbility != null)
            {
                css = item.PowerAbility.Contains("初")
                           ? "col-amber"
                           : item.PowerAbility.Contains("中")
                               ? "col-green"
                               : "col-red";
            }
            return(append == null ? css : $"{css} {append}");
        }
示例#3
0
 public static string ExercisePurpose(this PersonalExercisePurpose purpose)
 {
     return($"{(purpose?.Purpose ?? "?")}期");
 }
示例#4
0
 public static string ExercisePowerAbility(this PersonalExercisePurpose purpose)
 {
     return(purpose?.PowerAbility != null
                 ? purpose.PowerAbility.Substring(0, 3)
                 : "?型");
 }